Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions
mrpt::poses::CPose3DQuat Class Reference

Detailed Description

A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).

For a complete description of Points/Poses, see mrpt::poses::CPoseOrPoint, or refer to the 2D/3D Geometry tutorial in the wiki.

To access the translation use x(), y() and z(). To access the rotation, use CPose3DQuat::quat().

This class also behaves like a STL container, since it has begin(), end(), iterators, and can be accessed with the [] operator with indices running from 0 to 6 to access the [x y z qr qx qy qz] as if they were a vector. Thus, a CPose3DQuat can be used as a 7-vector anywhere the MRPT math functions expect any kind of vector.

This class and CPose3D are very similar, and they can be converted to the each other automatically via transformation constructors.

See also:
CPose3D (for a class based on a 4x4 matrix instead of a quaternion), mrpt::math::TPose3DQuat, mrpt::poses::CPose3DQuatPDF for a probabilistic version of this class, mrpt::math::CQuaternion, CPoseOrPoint

Definition at line 63 of file CPose3DQuat.h.

#include <mrpt/poses/CPose3DQuat.h>

Inheritance diagram for mrpt::poses::CPose3DQuat:
Inheritance graph
[legend]

List of all members.

Classes

struct  const_iterator
struct  iterator

Public Types

enum  { is_3D_val = 1 }
enum  { rotation_dimensions = 3 }
enum  { is_PDF_val = 1 }
typedef CPose3DQuat type_value
 Used to emulate CPosePDF types, for example, in mrpt::graphs::CNetworkOfPoses.
typedef CPose3DQuat mrpt_autotype
 See ops_containers.h.

Public Member Functions

mrpt::math::CQuaternionDoublequat ()
 Read/Write access to the quaternion representing the 3D rotation.
const
mrpt::math::CQuaternionDouble
quat () const
 Read-only access to the quaternion representing the 3D rotation.
mrpt::math::CArrayDouble< 3 > & xyz ()
 Read/Write access to the translation vector in R^3.
const mrpt::math::CArrayDouble< 3 > & xyz () const
 Read-only access to the translation vector in R^3.
 CPose3DQuat ()
 Default constructor, initialize translation to zeros and quaternion to no rotation.
 CPose3DQuat (TConstructorFlags_Quaternions constructor_dummy_param)
 Constructor which left all the quaternion members un-initialized, for use when speed is critical; Use UNINITIALIZED_POSE as argument to this constructor.
 CPose3DQuat (const double x, const double y, const double z, const mrpt::math::CQuaternionDouble &q)
 Constructor with initilization of the pose - the quaternion is normalized to make sure it's unitary.
 CPose3DQuat (const CPose3D &p)
 Constructor from a CPose3D.
 CPose3DQuat (const mrpt::math::TPose3DQuat &p)
 Constructor from lightweight object.
 CPose3DQuat (const CMatrixDouble44 &M)
 Constructor from a 4x4 homogeneous transformation matrix.
void getHomogeneousMatrix (CMatrixDouble44 &out_HM) const
 Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
void getAsVector (vector_double &v) const
 Returns a 1x7 vector with [x y z qr qx qy qz].
void getAsVector (mrpt::math::CArrayDouble< 7 > &v) const
void composeFrom (const CPose3DQuat &A, const CPose3DQuat &B)
 Makes $ this = A \oplus B $ this method is slightly more efficient than "this= A + B;" since it avoids the temporary object.
void inverseComposeFrom (const CPose3DQuat &A, const CPose3DQuat &B)
 Makes $ this = A \ominus B $ this method is slightly more efficient than "this= A - B;" since it avoids the temporary object.
void composePoint (const double lx, const double ly, const double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacobian_df_dpose=NULL) const
 Computes the 3D point G such as $ G = this \oplus L $.
void inverseComposePoint (const double gx, const double gy, const double gz, double &lx, double &ly, double &lz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacobian_df_dpose=NULL) const
 Computes the 3D point L such as $ L = G \ominus this $.
template<class POINT1 , class POINT2 >
void composePoint (const POINT1 &L, POINT2 &G) const
 Computes the 3D point G such as $ G = this \oplus L $.
template<class POINT1 , class POINT2 >
void inverseComposePoint (const POINT1 &G, POINT2 &L) const
 Computes the 3D point L such as $ L = G \ominus this $.
CPoint3D operator+ (const CPoint3D &L) const
 Computes the 3D point G such as $ G = this \oplus L $.
TPoint3D operator+ (const TPoint3D &L) const
 Computes the 3D point G such as $ G = this \oplus L $.
CPoint3D operator- (const CPoint3D &G) const
 Computes the 3D point L such as $ L = G \ominus this $.
TPoint3D operator- (const TPoint3D &G) const
 Computes the 3D point L such as $ L = G \ominus this $.
virtual void operator*= (const double s)
 Scalar multiplication (all x y z qr qx qy qz elements are multiplied by the scalar).
CPose3DQuatoperator+= (const CPose3DQuat &b)
 Make $ this = this \oplus b $.
CPose3DQuat operator+ (const CPose3DQuat &p) const
 Return the composed pose $ ret = this \oplus p $.
CPose3DQuatoperator-= (const CPose3DQuat &b)
 Make $ this = this \ominus b $.
CPose3DQuat operator- (const CPose3DQuat &p) const
 Return the composed pose $ ret = this \ominus p $.
void asString (std::string &s) const
 Returns a human-readable textual representation of the object (eg: "[x y z qr qx qy qz]", angles in degrees.)
std::string asString () const
void fromString (const std::string &s)
 Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8 1 0 0 0]" )
const double & operator[] (unsigned int i) const
 Read only [] operator.
double & operator[] (unsigned int i)
 Read/write [] operator.
void sphericalCoordinates (const TPoint3D &point, double &out_range, double &out_yaw, double &out_pitch, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacob_dryp_dpoint=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *out_jacob_dryp_dpose=NULL) const
 Computes the spherical coordinates of a 3D point as seen from the 6D pose specified by this object.
const type_valuegetPoseMean () const
type_valuegetPoseMean ()
CPose3D operator- (const CPose3D &b) const
 The operator $ a \ominus b $ is the pose inverse compounding operator.
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
CObject * clone () const
 Cloning interface for smart pointers.

Static Public Member Functions

static bool is_3D ()
static bool is_PDF ()

Public Attributes

CArrayDouble< 3 > m_coords
 The translation vector [x,y,z].
mrpt::math::CQuaternionDouble m_quat
 The quaternion.

Static Public Attributes

static const
mrpt::utils::TRuntimeClassId 
classCObject

Protected Member Functions

virtual void writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0
 Introduces a pure virtual method responsible for writing to a CStream.
virtual void readFromStream (mrpt::utils::CStream &in, int version)=0
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

RTTI stuff

typedef CPose3DQuatPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CPose3DQuat
static mrpt::utils::TRuntimeClassId classCPose3DQuat
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CPose3DQuatPtr Create ()

STL-like methods and typedefs

enum  { static_size = 7 }
typedef double value_type
 The type of the elements.
typedef double & reference
typedef const double & const_reference
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type
typedef std::reverse_iterator
< iterator
reverse_iterator
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
void assign (const size_t N, const double val)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
void swap (CPose3DQuat &o)
static size_type size ()
static bool empty ()
static size_type max_size ()
static void resize (const size_t n)
double x () const
 Common members of all points & poses classes.
double & x ()
void x (const double v)
double y () const
double & y ()
void y (const double v)
void x_incr (const double v)
void y_incr (const double v)
double sqrDistanceTo (const CPoseOrPoint< OTHERCLASS > &b) const
 Returns the squared euclidean distance to another pose/point:
double distanceTo (const CPoseOrPoint< OTHERCLASS > &b) const
 Returns the Euclidean distance to another pose/point:
double distanceTo (const mrpt::math::TPoint3D &b) const
 Returns the euclidean distance to a 3D point:
double distance2DToSquare (double ax, double ay) const
 Returns the squared 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
double distance3DToSquare (double ax, double ay, double az) const
 Returns the squared 3D distance from this pose/point to a 3D point.
double distance2DTo (double ax, double ay) const
 Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
double distance3DTo (double ax, double ay, double az) const
 Returns the 3D distance from this pose/point to a 3D point.
double norm () const
 Returns the euclidean norm of vector: $ ||\mathbf{x}|| = \sqrt{x^2+y^2+z^2} $.
vector_double getAsVectorVal () const
 Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation)
CMatrixDouble44 getHomogeneousMatrixVal () const
 Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
void getInverseHomogeneousMatrix (math::CMatrixDouble44 &out_HM) const
 Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose.
mrpt::math::CMatrixDouble44 getInverseHomogeneousMatrix () const
static bool is3DPoseOrPoint ()
 Return true for poses or points with a Z component, false otherwise.

RTTI stuff

static const
mrpt::utils::TRuntimeClassId 
classCSerializable
class mrpt::utils::CStream

Member Typedef Documentation

Definition at line 275 of file CPose3DQuat.h.

Definition at line 424 of file CPose3DQuat.h.

Definition at line 277 of file CPose3DQuat.h.

See ops_containers.h.

Definition at line 443 of file CPose3DQuat.h.

Definition at line 274 of file CPose3DQuat.h.

typedef std::reverse_iterator<iterator> mrpt::poses::CPose3DQuat::reverse_iterator

Definition at line 423 of file CPose3DQuat.h.

Definition at line 276 of file CPose3DQuat.h.

A typedef for the associated smart pointer

Definition at line 66 of file CPose3DQuat.h.

Used to emulate CPosePDF types, for example, in mrpt::graphs::CNetworkOfPoses.

Definition at line 261 of file CPose3DQuat.h.

The type of the elements.

Definition at line 273 of file CPose3DQuat.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
is_3D_val 

Definition at line 262 of file CPose3DQuat.h.

anonymous enum
Enumerator:
rotation_dimensions 

Definition at line 264 of file CPose3DQuat.h.

anonymous enum
Enumerator:
is_PDF_val 

Definition at line 265 of file CPose3DQuat.h.

anonymous enum
Enumerator:
static_size 

Definition at line 280 of file CPose3DQuat.h.


Constructor & Destructor Documentation

mrpt::poses::CPose3DQuat::CPose3DQuat ( ) [inline]

Default constructor, initialize translation to zeros and quaternion to no rotation.

Definition at line 85 of file CPose3DQuat.h.

mrpt::poses::CPose3DQuat::CPose3DQuat ( TConstructorFlags_Quaternions  constructor_dummy_param) [inline]

Constructor which left all the quaternion members un-initialized, for use when speed is critical; Use UNINITIALIZED_POSE as argument to this constructor.

Definition at line 88 of file CPose3DQuat.h.

mrpt::poses::CPose3DQuat::CPose3DQuat ( const double  x,
const double  y,
const double  z,
const mrpt::math::CQuaternionDouble q 
) [inline]

Constructor with initilization of the pose - the quaternion is normalized to make sure it's unitary.

Definition at line 91 of file CPose3DQuat.h.

References Eigen::internal::y.

mrpt::poses::CPose3DQuat::CPose3DQuat ( const CPose3D p) [explicit]

Constructor from a CPose3D.

mrpt::poses::CPose3DQuat::CPose3DQuat ( const mrpt::math::TPose3DQuat p) [inline]

Constructor from lightweight object.

Definition at line 97 of file CPose3DQuat.h.

References mrpt::math::TPose3DQuat::x, mrpt::math::TPose3DQuat::y, Eigen::internal::y, and mrpt::math::TPose3DQuat::z.

mrpt::poses::CPose3DQuat::CPose3DQuat ( const CMatrixDouble44 M) [explicit]

Constructor from a 4x4 homogeneous transformation matrix.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DQuat::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::utils::CSerializable.

void mrpt::poses::CPose3DQuat::assign ( const size_t  N,
const double  val 
) [inline]

Definition at line 286 of file CPose3DQuat.h.

void mrpt::poses::CPose3DQuat::asString ( std::string &  s) const [inline]

Returns a human-readable textual representation of the object (eg: "[x y z qr qx qy qz]", angles in degrees.)

See also:
fromString

Definition at line 199 of file CPose3DQuat.h.

References mrpt::format().

std::string mrpt::poses::CPose3DQuat::asString ( ) const [inline]

Definition at line 200 of file CPose3DQuat.h.

References asString().

Referenced by asString().

iterator mrpt::poses::CPose3DQuat::begin ( ) [inline]

Definition at line 425 of file CPose3DQuat.h.

const_iterator mrpt::poses::CPose3DQuat::begin ( ) const [inline]

Definition at line 427 of file CPose3DQuat.h.

CObject* mrpt::utils::CObject::clone ( ) const [inline, inherited]

Cloning interface for smart pointers.

Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.

Definition at line 154 of file CObject.h.

void mrpt::poses::CPose3DQuat::composeFrom ( const CPose3DQuat A,
const CPose3DQuat B 
)

Makes $ this = A \oplus B $ this method is slightly more efficient than "this= A + B;" since it avoids the temporary object.

Note:
A or B can be "this" without problems.
See also:
inverseComposeFrom, composePoint

Referenced by operator+().

template<class POINT1 , class POINT2 >
void mrpt::poses::CPose3DQuat::composePoint ( const POINT1 &  L,
POINT2 &  G 
) const [inline]

Computes the 3D point G such as $ G = this \oplus L $.

POINT1 and POINT1 can be anything supporing [0],[1],[2].

See also:
composePoint

Definition at line 145 of file CPose3DQuat.h.

References composePoint().

Referenced by composePoint().

void mrpt::poses::CPose3DQuat::composePoint ( const double  lx,
const double  ly,
const double  lz,
double &  gx,
double &  gy,
double &  gz,
mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *  out_jacobian_df_dpoint = NULL,
mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *  out_jacobian_df_dpose = NULL 
) const

Computes the 3D point G such as $ G = this \oplus L $.

See also:
composeFrom, inverseComposePoint
static CPose3DQuatPtr mrpt::poses::CPose3DQuat::Create ( ) [static]
static mrpt::utils::CObject* mrpt::poses::CPose3DQuat::CreateObject ( ) [static]
double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distance2DTo ( double  ax,
double  ay 
) const [inline, inherited]

Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists).

Definition at line 184 of file CPoseOrPoint.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distance2DToSquare ( double  ax,
double  ay 
) const [inline, inherited]

Returns the squared 2D distance from this pose/point to a 2D point (ignores Z, if it exists).

Definition at line 176 of file CPoseOrPoint.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distance3DTo ( double  ax,
double  ay,
double  az 
) const [inline, inherited]

Returns the 3D distance from this pose/point to a 3D point.

Definition at line 187 of file CPoseOrPoint.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distance3DToSquare ( double  ax,
double  ay,
double  az 
) const [inline, inherited]

Returns the squared 3D distance from this pose/point to a 3D point.

Definition at line 179 of file CPoseOrPoint.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distanceTo ( const mrpt::math::TPoint3D b) const [inline, inherited]

Returns the euclidean distance to a 3D point:

Definition at line 190 of file CPoseOrPoint.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::distanceTo ( const CPoseOrPoint< OTHERCLASS > &  b) const [inline, inherited]

Returns the Euclidean distance to another pose/point:

Definition at line 170 of file CPoseOrPoint.h.

virtual mrpt::utils::CObject* mrpt::poses::CPose3DQuat::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const [inline, inherited]

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 151 of file CObject.h.

static bool mrpt::poses::CPose3DQuat::empty ( ) [inline, static]

Definition at line 282 of file CPose3DQuat.h.

iterator mrpt::poses::CPose3DQuat::end ( ) [inline]

Definition at line 426 of file CPose3DQuat.h.

References static_size.

const_iterator mrpt::poses::CPose3DQuat::end ( ) const [inline]

Definition at line 428 of file CPose3DQuat.h.

References static_size.

void mrpt::poses::CPose3DQuat::fromString ( const std::string &  s) [inline]

Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8 1 0 0 0]" )

See also:
asString
Exceptions:
std::exceptionOn invalid format

Definition at line 206 of file CPose3DQuat.h.

References ASSERTMSG_, mrpt::mrpt::math::size(), and THROW_EXCEPTION.

void mrpt::poses::CPose3DQuat::getAsVector ( vector_double v) const

Returns a 1x7 vector with [x y z qr qx qy qz].

void mrpt::poses::CPose3DQuat::getAsVector ( mrpt::math::CArrayDouble< 7 > &  v) const [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 111 of file CPose3DQuat.h.

vector_double mrpt::poses::CPoseOrPoint< CPose3DQuat >::getAsVectorVal ( ) const [inline, inherited]

Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation)

Definition at line 199 of file CPoseOrPoint.h.

void mrpt::poses::CPose3DQuat::getHomogeneousMatrix ( CMatrixDouble44 out_HM) const

Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).

See also:
getInverseHomogeneousMatrix
CMatrixDouble44 mrpt::poses::CPoseOrPoint< CPose3DQuat >::getHomogeneousMatrixVal ( ) const [inline, inherited]

Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).

See also:
getInverseHomogeneousMatrix

Definition at line 209 of file CPoseOrPoint.h.

void mrpt::poses::CPoseOrPoint< CPose3DQuat >::getInverseHomogeneousMatrix ( math::CMatrixDouble44 out_HM) const [inline, inherited]

Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose.

See also:
getHomogeneousMatrix

Definition at line 219 of file CPoseOrPoint.h.

mrpt::math::CMatrixDouble44 mrpt::poses::CPoseOrPoint< CPose3DQuat >::getInverseHomogeneousMatrix ( ) const [inline, inherited]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 226 of file CPoseOrPoint.h.

type_value& mrpt::poses::CPose3DQuat::getPoseMean ( ) [inline]

Definition at line 269 of file CPose3DQuat.h.

const type_value& mrpt::poses::CPose3DQuat::getPoseMean ( ) const [inline]

Definition at line 268 of file CPose3DQuat.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DQuat::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

void mrpt::poses::CPose3DQuat::inverseComposeFrom ( const CPose3DQuat A,
const CPose3DQuat B 
)

Makes $ this = A \ominus B $ this method is slightly more efficient than "this= A - B;" since it avoids the temporary object.

Note:
A or B can be "this" without problems.
See also:
composeFrom, composePoint

Referenced by operator-().

void mrpt::poses::CPose3DQuat::inverseComposePoint ( const double  gx,
const double  gy,
const double  gz,
double &  lx,
double &  ly,
double &  lz,
mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *  out_jacobian_df_dpoint = NULL,
mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *  out_jacobian_df_dpose = NULL 
) const

Computes the 3D point L such as $ L = G \ominus this $.

See also:
composePoint, composeFrom
template<class POINT1 , class POINT2 >
void mrpt::poses::CPose3DQuat::inverseComposePoint ( const POINT1 &  G,
POINT2 &  L 
) const [inline]

Computes the 3D point L such as $ L = G \ominus this $.

See also:
inverseComposePoint

Definition at line 148 of file CPose3DQuat.h.

References inverseComposePoint().

Referenced by inverseComposePoint().

static bool mrpt::poses::CPoseOrPoint< CPose3DQuat >::is3DPoseOrPoint ( ) [inline, static, inherited]

Return true for poses or points with a Z component, false otherwise.

Definition at line 149 of file CPoseOrPoint.h.

static bool mrpt::poses::CPose3DQuat::is_3D ( ) [inline, static]

Definition at line 263 of file CPose3DQuat.h.

static bool mrpt::poses::CPose3DQuat::is_PDF ( ) [inline, static]

Definition at line 266 of file CPose3DQuat.h.

static size_type mrpt::poses::CPose3DQuat::max_size ( ) [inline, static]

Definition at line 283 of file CPose3DQuat.h.

References static_size.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::norm ( ) const [inline, inherited]

Returns the euclidean norm of vector: $ ||\mathbf{x}|| = \sqrt{x^2+y^2+z^2} $.

Definition at line 193 of file CPoseOrPoint.h.

virtual void mrpt::poses::CPose3DQuat::operator*= ( const double  s) [virtual]

Scalar multiplication (all x y z qr qx qy qz elements are multiplied by the scalar).

CPoint3D mrpt::poses::CPose3DQuat::operator+ ( const CPoint3D L) const [inline]

Computes the 3D point G such as $ G = this \oplus L $.

See also:
composePoint

Definition at line 151 of file CPose3DQuat.h.

TPoint3D mrpt::poses::CPose3DQuat::operator+ ( const TPoint3D L) const [inline]

Computes the 3D point G such as $ G = this \oplus L $.

See also:
composePoint

Definition at line 154 of file CPose3DQuat.h.

CPose3DQuat mrpt::poses::CPose3DQuat::operator+ ( const CPose3DQuat p) const [inline]

Return the composed pose $ ret = this \oplus p $.

Definition at line 174 of file CPose3DQuat.h.

References composeFrom().

CPose3DQuat& mrpt::poses::CPose3DQuat::operator+= ( const CPose3DQuat b) [inline]

Make $ this = this \oplus b $.

Definition at line 167 of file CPose3DQuat.h.

CPoint3D mrpt::poses::CPose3DQuat::operator- ( const CPoint3D G) const [inline]

Computes the 3D point L such as $ L = G \ominus this $.

See also:
inverseComposePoint

Definition at line 157 of file CPose3DQuat.h.

TPoint3D mrpt::poses::CPose3DQuat::operator- ( const TPoint3D G) const [inline]

Computes the 3D point L such as $ L = G \ominus this $.

See also:
inverseComposePoint

Definition at line 160 of file CPose3DQuat.h.

CPose3D mrpt::poses::CPose< CPose3DQuat >::operator- ( const CPose3D b) const [inherited]

The operator $ a \ominus b $ is the pose inverse compounding operator.

CPose3DQuat mrpt::poses::CPose3DQuat::operator- ( const CPose3DQuat p) const [inline]

Return the composed pose $ ret = this \ominus p $.

Definition at line 189 of file CPose3DQuat.h.

References inverseComposeFrom().

CPose3DQuat& mrpt::poses::CPose3DQuat::operator-= ( const CPose3DQuat b) [inline]

Make $ this = this \ominus b $.

Definition at line 182 of file CPose3DQuat.h.

double& mrpt::poses::CPose3DQuat::operator[] ( unsigned int  i) [inline]

Read/write [] operator.

Definition at line 231 of file CPose3DQuat.h.

const double& mrpt::poses::CPose3DQuat::operator[] ( unsigned int  i) const [inline]

Read only [] operator.

Definition at line 215 of file CPose3DQuat.h.

mrpt::math::CQuaternionDouble& mrpt::poses::CPose3DQuat::quat ( ) [inline]

Read/Write access to the quaternion representing the 3D rotation.

Definition at line 74 of file CPose3DQuat.h.

const mrpt::math::CQuaternionDouble& mrpt::poses::CPose3DQuat::quat ( ) const [inline]

Read-only access to the quaternion representing the 3D rotation.

Definition at line 76 of file CPose3DQuat.h.

const_reverse_iterator mrpt::poses::CPose3DQuat::rbegin ( ) const [inline]

Definition at line 430 of file CPose3DQuat.h.

References end().

reverse_iterator mrpt::poses::CPose3DQuat::rbegin ( ) [inline]

Definition at line 429 of file CPose3DQuat.h.

References end().

virtual void mrpt::utils::CSerializable::readFromStream ( mrpt::utils::CStream in,
int  version 
) [protected, pure virtual, inherited]

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters:
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions:
std::exceptionOn any error, see CStream::ReadBuffer
See also:
CStream

Implemented in mrpt::math::CMatrix, and mrpt::math::CMatrixD.

reverse_iterator mrpt::poses::CPose3DQuat::rend ( ) [inline]

Definition at line 431 of file CPose3DQuat.h.

References begin().

const_reverse_iterator mrpt::poses::CPose3DQuat::rend ( ) const [inline]

Definition at line 432 of file CPose3DQuat.h.

References begin().

static void mrpt::poses::CPose3DQuat::resize ( const size_t  n) [inline, static]

Definition at line 284 of file CPose3DQuat.h.

References mrpt::format(), and static_size.

static size_type mrpt::poses::CPose3DQuat::size ( ) [inline, static]

Definition at line 281 of file CPose3DQuat.h.

References static_size.

void mrpt::poses::CPose3DQuat::sphericalCoordinates ( const TPoint3D point,
double &  out_range,
double &  out_yaw,
double &  out_pitch,
mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *  out_jacob_dryp_dpoint = NULL,
mrpt::math::CMatrixFixedNumeric< double, 3, 7 > *  out_jacob_dryp_dpose = NULL 
) const

Computes the spherical coordinates of a 3D point as seen from the 6D pose specified by this object.

For the coordinate system see the top of this page. If the matrix pointers are not NULL, the Jacobians will be also computed for the range-yaw-pitch variables wrt the passed 3D point and this 7D pose.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::sqrDistanceTo ( const CPoseOrPoint< OTHERCLASS > &  b) const [inline, inherited]

Returns the squared euclidean distance to another pose/point:

Definition at line 152 of file CPoseOrPoint.h.

void mrpt::poses::CPose3DQuat::swap ( CPose3DQuat o) [inline]
virtual void mrpt::utils::CSerializable::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const [protected, pure virtual, inherited]

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters:
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions:
std::exceptionOn any error, see CStream::WriteBuffer
See also:
CStream

Implemented in mrpt::math::CMatrix, and mrpt::math::CMatrixD.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::x ( ) const [inline, inherited]

Common members of all points & poses classes.

< Get X coord.

Definition at line 135 of file CPoseOrPoint.h.

void mrpt::poses::CPoseOrPoint< CPose3DQuat >::x ( const double  v) [inline, inherited]
Parameters:
vSet X coord.

Definition at line 141 of file CPoseOrPoint.h.

double& mrpt::poses::CPoseOrPoint< CPose3DQuat >::x ( ) [inline, inherited]

Definition at line 138 of file CPoseOrPoint.h.

void mrpt::poses::CPoseOrPoint< CPose3DQuat >::x_incr ( const double  v) [inline, inherited]
Parameters:
vX+=v

Definition at line 144 of file CPoseOrPoint.h.

mrpt::math::CArrayDouble<3>& mrpt::poses::CPose3DQuat::xyz ( ) [inline]

Read/Write access to the translation vector in R^3.

Definition at line 79 of file CPose3DQuat.h.

const mrpt::math::CArrayDouble<3>& mrpt::poses::CPose3DQuat::xyz ( ) const [inline]

Read-only access to the translation vector in R^3.

Definition at line 81 of file CPose3DQuat.h.

double mrpt::poses::CPoseOrPoint< CPose3DQuat >::y ( ) const [inline, inherited]

< Get Y coord.

Definition at line 136 of file CPoseOrPoint.h.

void mrpt::poses::CPoseOrPoint< CPose3DQuat >::y ( const double  v) [inline, inherited]
Parameters:
vSet Y coord.

Definition at line 142 of file CPoseOrPoint.h.

double& mrpt::poses::CPoseOrPoint< CPose3DQuat >::y ( ) [inline, inherited]

Definition at line 139 of file CPoseOrPoint.h.

void mrpt::poses::CPoseOrPoint< CPose3DQuat >::y_incr ( const double  v) [inline, inherited]
Parameters:
vY+=v

Definition at line 145 of file CPoseOrPoint.h.


Friends And Related Function Documentation

friend class mrpt::utils::CStream [friend, inherited]

Member Data Documentation

Definition at line 66 of file CPose3DQuat.h.

Definition at line 139 of file CObject.h.

Definition at line 66 of file CPose3DQuat.h.

Definition at line 56 of file CSerializable.h.

Definition at line 66 of file CPose3DQuat.h.

The translation vector [x,y,z].

Definition at line 69 of file CPose3DQuat.h.

Referenced by swap().

The quaternion.

Definition at line 70 of file CPose3DQuat.h.

Referenced by swap().




Page generated by Doxygen 1.7.4 for MRPT 0.9.5 SVN:2717 at Sun Oct 16 16:08:03 PDT 2011 Hosted on:
SourceForge.net Logo