MRPT logo

mrpt::poses::CPose2D Class Reference

A class used to store a 2D pose. More...

#include <mrpt/poses/CPose2D.h>

Inheritance diagram for mrpt::poses::CPose2D:

mrpt::poses::CPose mrpt::poses::CPoseOrPoint mrpt::utils::CSerializable

List of all members.

Public Member Functions

 CPose2D (const double &x=0, const double &y=0, const double &phi=0)
 Constructor from an initial value of the pose.
 CPose2D (const CPoint2D &)
 Constructor from a CPoint2D object.
 CPose2D (const CPose3D &)
 Aproximation!! Avoid its use, since information is lost.
const math::CMatrixDoublegetHomogeneousMatrix () const
 Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation), or pose (translation+orientation).
void getHomogeneousMatrix (const math::CMatrixDouble *&ptrHM) const
 Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation), or pose (translation+orientation).
CPose2D operator+ (const CPose2D &D) const
 The operator $ a = this \oplus D $ is the pose compounding operator.
CPose3D operator+ (const CPose3D &D) const
 The operator $ a = this \oplus D $ is the pose compounding operator.
CPoint2D operator+ (const CPoint2D &u) const
 The operator $ u' = this \oplus u $ is the pose/point compounding operator.
CPoint3D operator+ (const CPoint3D &u) const
 The operator $ u' = this \oplus u $ is the pose/point compounding operator.
CPose2D operator- (const CPose2D &b) const
 The operator $ D = this \ominus b $ is the pose inverse compounding operator, the resulting pose D fulfils: $ this = b \oplus D $, that is: $ b = a \oplus (b \ominus a) $.
void AddComponents (CPose2D &p)
 Scalar sum of components: This is diferent from poses composition, which is implemented as "+" operators in "CPose" derived classes.
void operator*= (const double &s)
 Scalar multiplication.
void normalizePhi ()
 Forces "phi" to be in the range [-pi,pi];.

Public Attributes

double phi
 The orientation of the pose, in radians.

Protected Attributes

math::CMatrixDouble aux_HM


Detailed Description

A class used to store a 2D pose.

A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle. It is used in many situations, from defining a robot pose, maps relative poses, sensors,...

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

poses::CPose2D

Homogeneous transfomation matrix

Spatial representation

cosj

-sinj

0

x

sinj

cosj

0

y

0

0

1

0

0

0

0

1

CPose2D.gif

See also:
CPoseOrPoint,CPoint2D

Definition at line 154 of file CPose2D.h.


Constructor & Destructor Documentation

mrpt::poses::CPose2D::CPose2D ( const double &  x = 0,
const double &  y = 0,
const double &  phi = 0 
)

Constructor from an initial value of the pose.

mrpt::poses::CPose2D::CPose2D ( const CPoint2D  ) 

Constructor from a CPoint2D object.

mrpt::poses::CPose2D::CPose2D ( const CPose3D  )  [explicit]

Aproximation!! Avoid its use, since information is lost.


Member Function Documentation

void mrpt::poses::CPose2D::AddComponents ( CPose2D p  ) 

Scalar sum of components: This is diferent from poses composition, which is implemented as "+" operators in "CPose" derived classes.

void mrpt::poses::CPose2D::getHomogeneousMatrix ( const math::CMatrixDouble *&  ptrHM  )  const [virtual]

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

See also:
getInverseHomogeneousMatrix

Implements mrpt::poses::CPoseOrPoint.

const math::CMatrixDouble& mrpt::poses::CPose2D::getHomogeneousMatrix (  )  const [virtual]

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

See also:
getInverseHomogeneousMatrix

Implements mrpt::poses::CPoseOrPoint.

void mrpt::poses::CPose2D::normalizePhi (  ) 

Forces "phi" to be in the range [-pi,pi];.

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

Scalar multiplication.

Implements mrpt::poses::CPoseOrPoint.

CPoint3D mrpt::poses::CPose2D::operator+ ( const CPoint3D u  )  const

The operator $ u' = this \oplus u $ is the pose/point compounding operator.

Reimplemented from mrpt::poses::CPose.

CPoint2D mrpt::poses::CPose2D::operator+ ( const CPoint2D u  )  const

The operator $ u' = this \oplus u $ is the pose/point compounding operator.

CPose3D mrpt::poses::CPose2D::operator+ ( const CPose3D D  )  const

The operator $ a = this \oplus D $ is the pose compounding operator.

Reimplemented from mrpt::poses::CPose.

CPose2D mrpt::poses::CPose2D::operator+ ( const CPose2D D  )  const

The operator $ a = this \oplus D $ is the pose compounding operator.

CPose2D mrpt::poses::CPose2D::operator- ( const CPose2D b  )  const

The operator $ D = this \ominus b $ is the pose inverse compounding operator, the resulting pose D fulfils: $ this = b \oplus D $, that is: $ b = a \oplus (b \ominus a) $.


Member Data Documentation

Definition at line 160 of file CPose2D.h.

The orientation of the pose, in radians.

Definition at line 177 of file CPose2D.h.

Referenced by mrpt::slam::CRobotSimulator::GetOdometry(), and mrpt::slam::CRobotSimulator::GetRealPose().




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:18:33 EST 2009