A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz). More...
#include <mrpt/poses/CPose3DQuat.h>


Classes | |
| struct | const_iterator |
| struct | iterator |
Public Types | |
| typedef CPose3DQuat | mrpt_autotype |
| See ops_containers.h. | |
Public Member Functions | |
| mrpt::math::CQuaternionDouble & | quat () |
| 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. | |
| CPose3DQuat () | |
| Default constructor, initialize translation to zeros and quaternion to no rotation. | |
| CPose3DQuat (bool, bool) | |
| 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. | |
| 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 | composeFrom (const CPose3DQuat &A, const CPose3DQuat &B) |
Makes 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 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 . | |
| 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 . | |
| template<class POINT1 , class POINT2 > | |
| void | composePoint (const POINT1 &L, POINT2 &G) const |
Computes the 3D point G such as . | |
| template<class POINT1 , class POINT2 > | |
| void | inverseComposePoint (const POINT1 &G, POINT2 &L) const |
Computes the 3D point L such as . | |
| CPoint3D | operator+ (const CPoint3D &L) const |
Computes the 3D point G such as . | |
| TPoint3D | operator+ (const TPoint3D &L) const |
Computes the 3D point G such as . | |
| CPoint3D | operator- (const CPoint3D &G) const |
Computes the 3D point L such as . | |
| TPoint3D | operator- (const TPoint3D &G) const |
Computes the 3D point L such as . | |
| virtual void | operator*= (const double s) |
| Scalar multiplication (all x y z qr qx qy qz elements are multiplied by the scalar). | |
| CPose3DQuat & | operator+= (const CPose3DQuat &b) |
Make . | |
| CPose3DQuat | operator+ (const CPose3DQuat &p) const |
Return the composed pose . | |
| CPose3DQuat & | operator-= (const CPose3DQuat &b) |
Make . | |
| CPose3DQuat | operator- (const CPose3DQuat &p) const |
Return the composed pose . | |
| 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. | |
Protected Attributes | |
| mrpt::math::CQuaternionDouble | m_quat |
| The quaternion. | |
Friends | |
| class | CPose |
| class | CPose2D |
| class | CPoint |
| std::ostream BASE_IMPEXP & | operator<< (std::ostream &o, const CPose3DQuat &p) |
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) |
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.
Definition at line 62 of file CPose3DQuat.h.
| typedef const double& mrpt::poses::CPose3DQuat::const_reference |
Definition at line 259 of file CPose3DQuat.h.
| typedef std::reverse_iterator<const_iterator> mrpt::poses::CPose3DQuat::const_reverse_iterator |
Definition at line 408 of file CPose3DQuat.h.
| typedef std::ptrdiff_t mrpt::poses::CPose3DQuat::difference_type |
Definition at line 261 of file CPose3DQuat.h.
See ops_containers.h.
Definition at line 427 of file CPose3DQuat.h.
| typedef double& mrpt::poses::CPose3DQuat::reference |
Definition at line 258 of file CPose3DQuat.h.
| typedef std::reverse_iterator<iterator> mrpt::poses::CPose3DQuat::reverse_iterator |
Definition at line 407 of file CPose3DQuat.h.
| typedef std::size_t mrpt::poses::CPose3DQuat::size_type |
Definition at line 260 of file CPose3DQuat.h.
| typedef double mrpt::poses::CPose3DQuat::value_type |
The type of the elements.
Definition at line 257 of file CPose3DQuat.h.
| anonymous enum |
Definition at line 264 of file CPose3DQuat.h.
| mrpt::poses::CPose3DQuat::CPose3DQuat | ( | ) |
Default constructor, initialize translation to zeros and quaternion to no rotation.
| mrpt::poses::CPose3DQuat::CPose3DQuat | ( | bool | , | |
| bool | ||||
| ) |
Constructor which left all the quaternion members un-initialized, for use when speed is critical; Use UNINITIALIZED_POSE as argument to this constructor.
| mrpt::poses::CPose3DQuat::CPose3DQuat | ( | const double | x, | |
| const double | y, | |||
| const double | z, | |||
| const mrpt::math::CQuaternionDouble & | q | |||
| ) |
Constructor with initilization of the pose.
| mrpt::poses::CPose3DQuat::CPose3DQuat | ( | const mrpt::math::TPose3DQuat & | p | ) |
Constructor from lightweight object.
| mrpt::poses::CPose3DQuat::CPose3DQuat | ( | const CMatrixDouble44 & | M | ) | [explicit] |
Constructor from a 4x4 homogeneous transformation matrix.
| void mrpt::poses::CPose3DQuat::assign | ( | const size_t | N, | |
| const double | val | |||
| ) | [inline] |
Definition at line 270 of file CPose3DQuat.h.
| std::string mrpt::poses::CPose3DQuat::asString | ( | ) | const [inline] |
| void mrpt::poses::CPose3DQuat::asString | ( | std::string & | s | ) | const [inline, virtual] |
Returns a human-readable textual representation of the object (eg: "[x y z qr qx qy qz]", angles in degrees.
)
Implements mrpt::poses::CPoseOrPoint.
Definition at line 193 of file CPose3DQuat.h.
References mrpt::format().
| const_iterator mrpt::poses::CPose3DQuat::begin | ( | ) | const [inline] |
Definition at line 411 of file CPose3DQuat.h.
| iterator mrpt::poses::CPose3DQuat::begin | ( | ) | [inline] |
Definition at line 409 of file CPose3DQuat.h.
| void mrpt::poses::CPose3DQuat::composeFrom | ( | const CPose3DQuat & | A, | |
| const CPose3DQuat & | B | |||
| ) |
Makes
this method is slightly more efficient than "this= A + B;" since it avoids the temporary object.
Referenced by operator+().
| void mrpt::poses::CPose3DQuat::composePoint | ( | const POINT1 & | L, | |
| POINT2 & | G | |||
| ) | const [inline] |
Computes the 3D point G such as
.
POINT1 and POINT1 can be anything supporing [0],[1],[2].
Definition at line 139 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
.
| static bool mrpt::poses::CPose3DQuat::empty | ( | ) | [inline, static] |
Definition at line 266 of file CPose3DQuat.h.
| const_iterator mrpt::poses::CPose3DQuat::end | ( | ) | const [inline] |
Definition at line 412 of file CPose3DQuat.h.
| iterator mrpt::poses::CPose3DQuat::end | ( | ) | [inline] |
Definition at line 410 of file CPose3DQuat.h.
| void mrpt::poses::CPose3DQuat::fromString | ( | const std::string & | s | ) | [inline, virtual] |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8 1 0 0 0]" ).
| std::exception | On invalid format |
Implements mrpt::poses::CPoseOrPoint.
Definition at line 200 of file CPose3DQuat.h.
References ASSERTMSG_, mrpt::math::CMatrixTemplate< T >::fromMatlabStringFormat(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::math::size(), and THROW_EXCEPTION.
| void mrpt::poses::CPose3DQuat::getAsVector | ( | vector_double & | v | ) | const [virtual] |
Returns a 1x7 vector with [x y z qr qx qy qz].
Implements mrpt::poses::CPoseOrPoint.
| void mrpt::poses::CPose3DQuat::getHomogeneousMatrix | ( | CMatrixDouble44 & | out_HM | ) | const [virtual] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
Implements mrpt::poses::CPoseOrPoint.
| void mrpt::poses::CPose3DQuat::inverseComposeFrom | ( | const CPose3DQuat & | A, | |
| const CPose3DQuat & | B | |||
| ) |
Makes
this method is slightly more efficient than "this= A - B;" since it avoids the temporary object.
Referenced by operator-().
| void mrpt::poses::CPose3DQuat::inverseComposePoint | ( | const POINT1 & | G, | |
| POINT2 & | L | |||
| ) | const [inline] |
Computes the 3D point L such as
.
Definition at line 142 of file CPose3DQuat.h.
References inverseComposePoint().
Referenced by inverseComposePoint().
| 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
.
| static size_type mrpt::poses::CPose3DQuat::max_size | ( | ) | [inline, static] |
Definition at line 267 of file CPose3DQuat.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).
Implements mrpt::poses::CPoseOrPoint.
| CPose3DQuat mrpt::poses::CPose3DQuat::operator+ | ( | const CPose3DQuat & | p | ) | const [inline] |
Computes the 3D point G such as
.
Definition at line 148 of file CPose3DQuat.h.
Computes the 3D point G such as
.
Definition at line 145 of file CPose3DQuat.h.
| CPose3DQuat& mrpt::poses::CPose3DQuat::operator+= | ( | const CPose3DQuat & | b | ) | [inline] |
Make
.
Definition at line 161 of file CPose3DQuat.h.
| CPose3DQuat mrpt::poses::CPose3DQuat::operator- | ( | const CPose3DQuat & | p | ) | const [inline] |
Return the composed pose
.
Definition at line 183 of file CPose3DQuat.h.
References inverseComposeFrom().
Computes the 3D point L such as
.
Definition at line 154 of file CPose3DQuat.h.
Computes the 3D point L such as
.
Definition at line 151 of file CPose3DQuat.h.
| CPose3DQuat& mrpt::poses::CPose3DQuat::operator-= | ( | const CPose3DQuat & | b | ) | [inline] |
Make
.
Definition at line 176 of file CPose3DQuat.h.
| double& mrpt::poses::CPose3DQuat::operator[] | ( | unsigned int | i | ) | [inline] |
Read/write [] operator.
Definition at line 225 of file CPose3DQuat.h.
| const double& mrpt::poses::CPose3DQuat::operator[] | ( | unsigned int | i | ) | const [inline] |
Read only [] operator.
Definition at line 209 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 80 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 77 of file CPose3DQuat.h.
| const_reverse_iterator mrpt::poses::CPose3DQuat::rbegin | ( | ) | const [inline] |
Definition at line 414 of file CPose3DQuat.h.
| reverse_iterator mrpt::poses::CPose3DQuat::rbegin | ( | ) | [inline] |
Definition at line 413 of file CPose3DQuat.h.
| const_reverse_iterator mrpt::poses::CPose3DQuat::rend | ( | ) | const [inline] |
Definition at line 416 of file CPose3DQuat.h.
| reverse_iterator mrpt::poses::CPose3DQuat::rend | ( | ) | [inline] |
Definition at line 415 of file CPose3DQuat.h.
| static void mrpt::poses::CPose3DQuat::resize | ( | const size_t | n | ) | [inline, static] |
Definition at line 268 of file CPose3DQuat.h.
References mrpt::format().
| static size_type mrpt::poses::CPose3DQuat::size | ( | ) | [inline, static] |
Definition at line 265 of file CPose3DQuat.h.
| 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.
| void mrpt::poses::CPose3DQuat::swap | ( | CPose3DQuat & | o | ) | [inline] |
Definition at line 419 of file CPose3DQuat.h.
References m_quat, mrpt::poses::CPoseOrPoint::m_x, mrpt::poses::CPoseOrPoint::m_y, mrpt::poses::CPoseOrPoint::m_z, mrpt::math::CArray< T, N >::swap(), and std::swap().
friend class CPoint [friend] |
Definition at line 66 of file CPose3DQuat.h.
friend class CPose [friend] |
Definition at line 64 of file CPose3DQuat.h.
friend class CPose2D [friend] |
Definition at line 65 of file CPose3DQuat.h.
| std::ostream BASE_IMPEXP& operator<< | ( | std::ostream & | o, | |
| const CPose3DQuat & | p | |||
| ) | [friend] |
| Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010 |