MRPT
1.9.9
|
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Allows coordinate access using [] operator.
Definition at line 603 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Types | |
enum | { static_size = 6 } |
Public Member Functions | |
TPose3D (const TPoint2D &p) | |
Implicit constructor from TPoint2D. More... | |
TPose3D (const TPose2D &p) | |
Implicit constructor from TPose2D. More... | |
TPose3D (const TPoint3D &p) | |
Implicit constructor from TPoint3D. More... | |
constexpr | TPose3D (double _x, double _y, double _z, double _yaw, double _pitch, double _roll) |
Constructor from coordinates. More... | |
TPose3D () | |
Default fast constructor. More... | |
double & | operator[] (size_t i) |
Coordinate access using operator[]. More... | |
constexpr const double & | operator[] (size_t i) const |
Coordinate access using operator[]. More... | |
double | norm () const |
Pose's spatial coordinates norm. More... | |
void | getAsVector (std::vector< double > &v) const |
Gets the pose as a vector of doubles. More... | |
void | asString (std::string &s) const |
Returns a human-readable textual representation of the object (eg: "[x y
z yaw pitch roll]", angles in degrees.) More... | |
std::string | asString () const |
void | getAsQuaternion (mrpt::math::CQuaternion< double > &q, mrpt::math::CMatrixFixedNumeric< double, 4, 3 > *out_dq_dr=NULL) const |
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored)
With : , and . More... | |
void | composePoint (const TPoint3D l, TPoint3D &g) const |
void | inverseComposePoint (const TPoint3D g, TPoint3D &l) const |
void | composePose (const TPose3D other, TPose3D &result) const |
void | getRotationMatrix (mrpt::math::CMatrixDouble33 &R) const |
void | getHomogeneousMatrix (mrpt::math::CMatrixDouble44 &HG) const |
void | getInverseHomogeneousMatrix (mrpt::math::CMatrixDouble44 &HG) const |
void | fromHomogeneousMatrix (const mrpt::math::CMatrixDouble44 &HG) |
void | fromString (const std::string &s) |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8]" ) More... | |
Static Public Member Functions | |
static void | SO3_to_yaw_pitch_roll (const mrpt::math::CMatrixDouble33 &R, double &yaw, double &pitch, double &roll) |
static size_t | size () |
Public Attributes | |
double | x |
X,Y,Z, coords. More... | |
double | y |
double | z |
double | yaw |
Yaw coordinate (rotation angle over Z axis). More... | |
double | pitch |
Pitch coordinate (rotation angle over Y axis). More... | |
double | roll |
Roll coordinate (rotation angle over X coordinate). More... | |
anonymous enum |
Enumerator | |
---|---|
static_size |
Definition at line 605 of file lightweight_geom_data.h.
mrpt::math::TPose3D::TPose3D | ( | const TPoint2D & | p | ) |
Implicit constructor from TPoint2D.
Zeroes all the unprovided information.
Definition at line 200 of file lightweight_geom_data.cpp.
mrpt::math::TPose3D::TPose3D | ( | const TPose2D & | p | ) |
Implicit constructor from TPose2D.
Gets the yaw from the 2D pose's phi, zeroing all the unprovided information.
Definition at line 204 of file lightweight_geom_data.cpp.
mrpt::math::TPose3D::TPose3D | ( | const TPoint3D & | p | ) |
Implicit constructor from TPoint3D.
Zeroes angular information.
Definition at line 208 of file lightweight_geom_data.cpp.
|
inline |
Constructor from coordinates.
Definition at line 636 of file lightweight_geom_data.h.
|
inline |
Default fast constructor.
Initializes to garbage.
Definition at line 645 of file lightweight_geom_data.h.
void mrpt::math::TPose3D::asString | ( | std::string & | s | ) | const |
Returns a human-readable textual representation of the object (eg: "[x y z yaw pitch roll]", angles in degrees.)
Definition at line 212 of file lightweight_geom_data.cpp.
References mrpt::format(), pitch, mrpt::RAD2DEG(), roll, and yaw.
Referenced by TEST().
|
inline |
Definition at line 710 of file lightweight_geom_data.h.
Definition at line 256 of file lightweight_geom_data.cpp.
References getRotationMatrix(), R, mrpt::math::TPoint3D::x, x, mrpt::math::TPoint3D::y, y, mrpt::math::TPoint3D::z, and z.
Referenced by mrpt::math::TPolygon3D::createRegularPolygon(), mrpt::math::project3D(), and unsafeProjectPoint().
Definition at line 369 of file lightweight_geom_data.cpp.
References fromHomogeneousMatrix(), and getHomogeneousMatrix().
void mrpt::math::TPose3D::fromHomogeneousMatrix | ( | const mrpt::math::CMatrixDouble44 & | HG | ) |
Definition at line 362 of file lightweight_geom_data.cpp.
References pitch, roll, SO3_to_yaw_pitch_roll(), and yaw.
Referenced by composePose(), mrpt::math::TPolygon3D::contains(), mrpt::math::TPlane::getAsPose3D(), mrpt::math::TPlane::getAsPose3DForcingOrigin(), mrpt::math::intersect(), mrpt::math::operator-(), and mrpt::math::TPolygonWithPlane::TPolygonWithPlane().
void mrpt::math::TPose3D::fromString | ( | const std::string & | s | ) |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8]" )
std::exception | On invalid format |
Definition at line 393 of file lightweight_geom_data.cpp.
References ASSERTMSG_, mrpt::DEG2RAD(), pitch, roll, THROW_EXCEPTION, and yaw.
void mrpt::math::TPose3D::getAsQuaternion | ( | mrpt::math::CQuaternion< double > & | q, |
mrpt::math::CMatrixFixedNumeric< double, 4, 3 > * | out_dq_dr = NULL |
||
) | const |
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored)
With : , and .
out_dq_dr | If provided, the 4x3 Jacobian of the transformation will be computed and stored here. It's the Jacobian of the transformation from (yaw pitch roll) to (qr qx qy qz). |
Definition at line 218 of file lightweight_geom_data.cpp.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::loadFromArray(), MRPT_MAX_ALIGN_BYTES, pitch, roll, and yaw.
Referenced by mrpt::poses::CPose3D::getAsQuaternion(), mrpt::math::slerp(), and mrpt::math::slerp_ypr().
|
inline |
void mrpt::math::TPose3D::getHomogeneousMatrix | ( | mrpt::math::CMatrixDouble44 & | HG | ) | const |
Definition at line 376 of file lightweight_geom_data.cpp.
References getRotationMatrix(), R, x, y, and z.
Referenced by composePose(), createPlaneFromPoseAndAxis(), mrpt::math::createPlaneFromPoseAndNormal(), getInverseHomogeneousMatrix(), mrpt::math::project3D(), and TEST().
void mrpt::math::TPose3D::getInverseHomogeneousMatrix | ( | mrpt::math::CMatrixDouble44 & | HG | ) | const |
Definition at line 387 of file lightweight_geom_data.cpp.
References getHomogeneousMatrix(), and mrpt::math::homogeneousMatrixInverse().
Referenced by mrpt::math::TPolygon3D::contains(), mrpt::math::intersect(), inverseComposePoint(), mrpt::math::project3D(), and mrpt::math::TPolygonWithPlane::TPolygonWithPlane().
void mrpt::math::TPose3D::getRotationMatrix | ( | mrpt::math::CMatrixDouble33 & | R | ) | const |
Definition at line 278 of file lightweight_geom_data.cpp.
References MRPT_MAX_ALIGN_BYTES, pitch, R, roll, and yaw.
Referenced by composePoint(), getHomogeneousMatrix(), and mrpt::math::TTwist3D::rotate().
Definition at line 267 of file lightweight_geom_data.cpp.
References getInverseHomogeneousMatrix().
|
inline |
Pose's spatial coordinates norm.
Definition at line 691 of file lightweight_geom_data.h.
References mrpt::square().
|
inline |
|
inline |
|
inlinestatic |
Definition at line 752 of file lightweight_geom_data.h.
Referenced by mrpt::hmtslam::CLocalMetricHypothesis::getPoseParticles(), mrpt::hmtslam::CLocalMetricHypothesis::getRelativePose(), and mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal().
|
static |
Definition at line 298 of file lightweight_geom_data.cpp.
References ASSERTDEBMSG_, pitch, R, roll, mrpt::square(), and yaw.
Referenced by fromHomogeneousMatrix().
double mrpt::math::TPose3D::pitch |
Pitch coordinate (rotation angle over Y axis).
Definition at line 614 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::poses::CPose3D::CPose3D(), fromHomogeneousMatrix(), fromString(), getAsQuaternion(), getAsVector(), getRotationMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and SO3_to_yaw_pitch_roll().
double mrpt::math::TPose3D::roll |
Roll coordinate (rotation angle over X coordinate).
Definition at line 616 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::poses::CPose3D::CPose3D(), fromHomogeneousMatrix(), fromString(), getAsQuaternion(), getAsVector(), getRotationMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and SO3_to_yaw_pitch_roll().
double mrpt::math::TPose3D::x |
X,Y,Z, coords.
Definition at line 610 of file lightweight_geom_data.h.
Referenced by composePoint(), mrpt::poses::CPose3D::CPose3D(), getAsVector(), getHomogeneousMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and mrpt::math::slerp().
double mrpt::math::TPose3D::y |
Definition at line 610 of file lightweight_geom_data.h.
Referenced by composePoint(), mrpt::poses::CPose3D::CPose3D(), getAsVector(), getHomogeneousMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and mrpt::math::slerp().
double mrpt::math::TPose3D::yaw |
Yaw coordinate (rotation angle over Z axis).
Definition at line 612 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::poses::CPose3D::CPose3D(), fromHomogeneousMatrix(), fromString(), getAsQuaternion(), getAsVector(), getRotationMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and SO3_to_yaw_pitch_roll().
double mrpt::math::TPose3D::z |
Definition at line 610 of file lightweight_geom_data.h.
Referenced by composePoint(), mrpt::poses::CPose3D::CPose3D(), getAsVector(), getHomogeneousMatrix(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_stream(), mrpt::math::operator!=(), mrpt::math::operator==(), operator[](), and mrpt::math::slerp().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |