#include <mrpt/poses/CPose3D.h>
Public Member Functions | |
CPose3D (const double &x=0, const double &y=0, const double &z=0, const double &yaw=0, const double &pitch=0, const double &roll=0) | |
Constructor with initilization of the pose; (remember that angles are always given in radians!). | |
CPose3D (const CPose3D &o) | |
Copy constructor. | |
CPose3D & | operator= (const CPose3D &o) |
Copy operator. | |
CPose3D (const math::CMatrixDouble &m) | |
Constructor from a 4x4 homogeneous matrix:. | |
CPose3D (const CPose2D &) | |
Constructor from a CPose2D object. | |
CPose3D (const CPoint3D &) | |
Constructor from a CPoint3D object. | |
const math::CMatrixDouble & | getHomogeneousMatrix () 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). | |
void | addComponents (const CPose3D &p) |
Scalar sum of components: This is diferent from poses composition, which is implemented as "+" operators. | |
void | normalizeAngles () |
Rebuild the internal matrix & update the yaw/pitch/roll angles within the ]-PI,PI] range (Must be called after using addComponents). | |
void | operator*= (const double &s) |
Scalar multiplication of x,y,z,yaw,pitch & roll (angles will be wrapped to the ]-pi,pi] interval). | |
void | sphericalCoordinates (const CPoint3D &point, double &out_range, double &out_yaw, double &out_pitch) const |
Computes the spherical coordinates of a 3D point as seen from the 6D pose specified by this object. | |
void | composePoint (double lx, double ly, double lz, double &gx, double &gy, double &gz) const |
An alternative, slightly more efficient way of doing ![]() | |
void | composePoint (float lx, float ly, float lz, float &gx, float &gy, float &gz) const |
An alternative, slightly more efficient way of doing ![]() | |
void | setFromValues (const double &x0, const double &y0, const double &z0, const double &yaw=0, const double &pitch=0, const double &roll=0) |
Set the pose from a 3D position (meters) and yaw/pitch/roll angles (radians). | |
void | getYawPitchRoll (double &yaw, double &pitch, double &roll) |
Returns the three angles (yaw, pitch, roll), in radians, from the homogeneous matrix. | |
double | distanceEuclidean6D (const CPose3D &o) const |
The euclidean distance between two poses taken as two 6-length vectors (angles in radians). | |
vector_double | getAsVector () const |
Returns a 1x6 vector with [x y z yaw pitch roll]. | |
Public Attributes | |
double | yaw |
These READ-ONLY variables are updated every time that the object homogeneous matrix is modified (construction, loading from values, pose composition, etc ). | |
double | pitch |
double | roll |
Protected Member Functions | |
void | rebuildHomogeneousMatrix () |
Rebuild the homog matrix from x,y,z and the angles. | |
Protected Attributes | |
math::CMatrixD | HM |
The complete homogeneous matrix must be stored for a generalized 3D pose. | |
Friends | |
class | CPose |
class | CPose2D |
class | CPoint |
std::ostream MRPTDLLIMPEXP & | operator<< (std::ostream &o, const CPose3D &p) |
A class used to store a 3D (6D) pose, including the 3D coordinate point and orientation angles. It is used in many situations, from defining a robot pose, maps relative poses, sensors,... See introduction in documentation for the CPoseOrPoint class.
For a complete description of Points/Poses, see mrpt::poses::CPoseOrPoint
For a complete description of Points/Poses, see mrpt::poses::CPoseOrPoint, or refer to the 2D/3D Geometry tutorial in the wiki.
Homogeneous transfomation matrix | Spatial representation | ||||||||||||||||
where: cy = cos Yaw ; sy = sin Yaw cp = cos Pitch ; sp = sin Pitch cr = cos Roll ; sr = sin Roll |
|
Definition at line 158 of file CPose3D.h.
mrpt::poses::CPose3D::CPose3D | ( | const double & | x = 0 , |
|
const double & | y = 0 , |
|||
const double & | z = 0 , |
|||
const double & | yaw = 0 , |
|||
const double & | pitch = 0 , |
|||
const double & | roll = 0 | |||
) |
Constructor with initilization of the pose; (remember that angles are always given in radians!).
mrpt::poses::CPose3D::CPose3D | ( | const CPose3D & | o | ) |
Copy constructor.
mrpt::poses::CPose3D::CPose3D | ( | const math::CMatrixDouble & | m | ) |
Constructor from a 4x4 homogeneous matrix:.
void mrpt::poses::CPose3D::addComponents | ( | const CPose3D & | p | ) |
Scalar sum of components: This is diferent from poses composition, which is implemented as "+" operators.
void mrpt::poses::CPose3D::composePoint | ( | float | lx, | |
float | ly, | |||
float | lz, | |||
float & | gx, | |||
float & | gy, | |||
float & | gz | |||
) | const |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose.
void mrpt::poses::CPose3D::composePoint | ( | double | lx, | |
double | ly, | |||
double | lz, | |||
double & | gx, | |||
double & | gy, | |||
double & | gz | |||
) | const |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose.
double mrpt::poses::CPose3D::distanceEuclidean6D | ( | const CPose3D & | o | ) | const |
The euclidean distance between two poses taken as two 6-length vectors (angles in radians).
vector_double mrpt::poses::CPose3D::getAsVector | ( | ) | const |
Returns a 1x6 vector with [x y z yaw pitch roll].
void mrpt::poses::CPose3D::getHomogeneousMatrix | ( | const math::CMatrixDouble *& | ptrHM | ) | const [virtual] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation), or pose (translation+orientation).
Implements mrpt::poses::CPoseOrPoint.
const math::CMatrixDouble& mrpt::poses::CPose3D::getHomogeneousMatrix | ( | ) | const [virtual] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation), or pose (translation+orientation).
Implements mrpt::poses::CPoseOrPoint.
void mrpt::poses::CPose3D::getYawPitchRoll | ( | double & | yaw, | |
double & | pitch, | |||
double & | roll | |||
) |
Returns the three angles (yaw, pitch, roll), in radians, from the homogeneous matrix.
void mrpt::poses::CPose3D::normalizeAngles | ( | ) |
Rebuild the internal matrix & update the yaw/pitch/roll angles within the ]-PI,PI] range (Must be called after using addComponents).
void mrpt::poses::CPose3D::operator*= | ( | const double & | s | ) | [virtual] |
Scalar multiplication of x,y,z,yaw,pitch & roll (angles will be wrapped to the ]-pi,pi] interval).
Implements mrpt::poses::CPoseOrPoint.
void mrpt::poses::CPose3D::rebuildHomogeneousMatrix | ( | ) | [protected] |
Rebuild the homog matrix from x,y,z and the angles.
void mrpt::poses::CPose3D::setFromValues | ( | const double & | x0, | |
const double & | y0, | |||
const double & | z0, | |||
const double & | yaw = 0 , |
|||
const double & | pitch = 0 , |
|||
const double & | roll = 0 | |||
) |
Set the pose from a 3D position (meters) and yaw/pitch/roll angles (radians).
void mrpt::poses::CPose3D::sphericalCoordinates | ( | const CPoint3D & | point, | |
double & | out_range, | |||
double & | out_yaw, | |||
double & | out_pitch | |||
) | 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.
std::ostream MRPTDLLIMPEXP& operator<< | ( | std::ostream & | o, | |
const CPose3D & | p | |||
) | [friend] |
math::CMatrixD mrpt::poses::CPose3D::HM [protected] |
double mrpt::poses::CPose3D::pitch |
double mrpt::poses::CPose3D::roll |
double mrpt::poses::CPose3D::yaw |
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:41:17 CDT 2009 |