MRPT
1.9.9
|
A 3D pose, with a 3D translation and a rotation in 3D parameterized in rotation-vector form (equivalent to axis-angle).
The 6D transformation in SE(3) stored in this class is kept in two separate containers: a 3-array for the rotation vector, and a 3-array for the translation.
For a complete descriptionan of Points/Poses, see mrpt::poses::CPoseOrPoint, or refer to the 2D/3D Geometry tutorial online.
There are Lie algebra methods: exp and ln (see the methods for documentation).
Definition at line 42 of file CPose3DRotVec.h.
#include <mrpt/poses/CPose3DRotVec.h>
Public Types | |
enum | { is_3D_val = 1 } |
enum | { rotation_dimensions = 3 } |
enum | { is_PDF_val = 0 } |
using | type_value = CPose3DRotVec |
Used to emulate CPosePDF types, for example, in mrpt::graphs::CNetworkOfPoses. More... | |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) noexcept |
void | operator delete[] (void *ptr) noexcept |
void | operator delete (void *memory, void *ptr) noexcept |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
const type_value & | getPoseMean () const |
type_value & | getPoseMean () |
void | setToNaN () override |
Set all data fields to quiet NaN. More... | |
const CPose3DRotVec & | derived () const |
CPose3DRotVec & | derived () |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
Constructors | |
CPose3DRotVec () | |
Default constructor, with all the coordinates set to zero. More... | |
CPose3DRotVec (TConstructorFlags_Poses constructor_dummy_param) | |
Fast constructor that leaves all the data uninitialized - call with UNINITIALIZED_POSE as argument. More... | |
CPose3DRotVec (const double vx, const double vy, const double vz, const double x, const double y, const double z) | |
Constructor with initilization of the pose. More... | |
CPose3DRotVec (const mrpt::math::CArrayDouble< 6 > &v) | |
Constructor with initilization of the pose from a vector [w1 w2 w3 x y z]. More... | |
CPose3DRotVec (const CPose3DRotVec &o) | |
Copy constructor. More... | |
CPose3DRotVec (const math::CMatrixDouble44 &m) | |
Constructor from a 4x4 homogeneous matrix: More... | |
CPose3DRotVec (const CPose3D &m) | |
Constructor from a CPose3D object. More... | |
CPose3DRotVec (const mrpt::math::CQuaternionDouble &q, const double x, const double y, const double z) | |
Constructor from a quaternion (which only represents the 3D rotation part) and a 3D displacement. More... | |
CPose3DRotVec (const double *vec6) | |
Constructor from an array with these 6 elements: [w1 w2 w3 x y z] where r{ij} are the entries of the 3x3 rotation matrix and t{x,y,z} are the 3D translation of the pose. More... | |
Access 3x3 rotation and 4x4 homogeneous matrices | |
void | getHomogeneousMatrix (mrpt::math::CMatrixDouble44 &out_HM) const |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation). More... | |
void | getRotationMatrix (mrpt::math::CMatrixDouble33 &ROT) const |
Get the 3x3 rotation matrix. More... | |
const mrpt::math::CMatrixDouble33 | getRotationMatrix () const |
Pose-pose and pose-point compositions and operators | |
CPose3DRotVec | operator+ (const CPose3DRotVec &b) const |
The operator is the pose compounding operator. More... | |
CPoint3D | operator+ (const CPoint3D &b) const |
The operator is the pose compounding operator. More... | |
CPoint3D | operator+ (const CPoint2D &b) const |
The operator is the pose compounding operator. More... | |
void | setFromTransformationMatrix (const mrpt::math::CMatrixDouble44 &m) |
void | setFromXYZAndAngles (const double x, const double y, const double z, const double yaw=0, const double pitch=0, const double roll=0) |
void | sphericalCoordinates (const mrpt::math::TPoint3D &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. More... | |
void | composePoint (double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=nullptr) const |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose. More... | |
void | composePoint (const mrpt::math::TPoint3D local_point, mrpt::math::TPoint3D &global_point) const |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose. More... | |
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=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=nullptr) const |
Computes the 3D point L such as . More... | |
void | composeFrom (const CPose3DRotVec &A, const CPose3DRotVec &B, mrpt::math::CMatrixFixedNumeric< double, 6, 6 > *out_jacobian_drvtC_drvtA=nullptr, mrpt::math::CMatrixFixedNumeric< double, 6, 6 > *out_jacobian_drvtC_drvtB=nullptr) |
Makes "this = A (+) B"; this method is slightly more efficient than "this= A + B;" since it avoids the temporary object. More... | |
void | toQuatXYZ (CPose3DQuat &q) const |
Convert this RVT into a quaternion + XYZ. More... | |
CPose3DRotVec & | operator+= (const CPose3DRotVec &b) |
Make (b can be "this" without problems) More... | |
CPose3DRotVec & | operator= (const CPose3DRotVec &o) |
Copy operator. More... | |
void | inverseComposeFrom (const CPose3DRotVec &A, const CPose3DRotVec &B) |
Makes this method is slightly more efficient than "this= A - B;" since it avoids the temporary object. More... | |
CPose3DRotVec | operator- (const CPose3DRotVec &b) const |
Compute . More... | |
void | inverse () |
Convert this pose into its inverse, saving the result in itself. More... | |
CPose3DRotVec | getInverse () const |
Compute the inverse of this pose and return the result. More... | |
void | changeCoordinatesReference (const CPose3DRotVec &p) |
makes: this = p (+) this More... | |
Access and modify contents | |
double | rx () const |
double | ry () const |
double | rz () const |
double & | rx () |
double & | ry () |
double & | rz () |
void | addComponents (const CPose3DRotVec &p) |
Scalar sum of all 6 components: This is diferent from poses composition, which is implemented as "+" operators. More... | |
void | operator*= (const double s) |
Scalar multiplication of x,y,z,vx,vy,vz. More... | |
mrpt::math::CArrayDouble< 3 > | rotVecFromRotMat (const math::CMatrixDouble44 &m) |
Create a vector with 3 components according to the input transformation matrix (only the rotation will be taken into account) More... | |
void | setFromValues (const double x0, const double y0, const double z0, const double vx, const double vy, const double vz) |
Set the pose from a 3D position (meters) and yaw/pitch/roll angles (radians) - This method recomputes the internal rotation matrix. More... | |
template<class ARRAYORVECTOR > | |
void | setFrom6Vector (const ARRAYORVECTOR &vec6) |
Set pose from an array with these 6 elements: [x y z vx vy vz] where v{xyz} is the rotation vector and {xyz} the 3D translation of the pose. More... | |
template<class ARRAYORVECTOR > | |
void | getAs6Vector (ARRAYORVECTOR &vec6) const |
Gets pose as an array with these 6 elements: [x y z vx vy vz] where v{xyz} is the rotation vector and {xyz} the 3D translation of the pose The target vector MUST ALREADY have space for 6 elements (i.e. More... | |
template<class ARRAYORVECTOR > | |
void | getAsVector (ARRAYORVECTOR &v) const |
Like getAs6Vector() but for dynamic size vectors (required by base class CPoseOrPoint) More... | |
const double & | operator[] (unsigned int i) const |
double & | operator[] (unsigned int i) |
void | asString (std::string &s) const |
Returns a human-readable textual representation of the object: "[x y z
rx ry rz]". More... | |
std::string | asString () const |
void | fromString (const std::string &s) |
Set the current object value from a string generated by 'asString' (eg: "[x y z yaw pitch roll]", angles in deg. More... | |
RTTI classes and functions for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | 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). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
static constexpr bool | is_3D () |
static constexpr bool | is_PDF () |
Public Attributes | |
mrpt::math::CArrayDouble< 3 > | m_coords |
The translation vector [x,y,z]. More... | |
mrpt::math::CArrayDouble< 3 > | m_rotvec |
The rotation vector [vx,vy,vz]. More... | |
Protected Member Functions | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
RTTI stuff | |
using | Ptr = std::shared_ptr< CPose3DRotVec > |
using | ConstPtr = std::shared_ptr< const CPose3DRotVec > |
using | UniquePtr = std::unique_ptr< CPose3DRotVec > |
using | ConstUniquePtr = std::unique_ptr< const CPose3DRotVec > |
static mrpt::rtti::CLASSINIT | _init_CPose3DRotVec |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "CPose3DRotVec" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static mrpt::rtti::CObject * | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
Lie Algebra methods | |
static CPose3DRotVec | exp (const mrpt::math::CArrayDouble< 6 > &vect) |
Exponentiate a Vector in the SE(3) Lie Algebra to generate a new CPose3DRotVec (static method). More... | |
void | ln (mrpt::math::CArrayDouble< 6 > &out_ln) const |
Take the logarithm of the 3x4 matrix defined by this pose, generating the corresponding vector in the SE(3) Lie Algebra. More... | |
mrpt::math::CArrayDouble< 3 > | ln_rotation () const |
Take the logarithm of the 3x3 rotation matrix part of this pose, generating the corresponding vector in the Lie Algebra. More... | |
STL-like methods and typedefs | |
enum | { static_size = 6 } |
using | value_type = double |
The type of the elements. More... | |
using | reference = double & |
using | const_reference = const double & |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
static constexpr size_type | size () |
static constexpr bool | empty () |
static constexpr size_type | max_size () |
static void | resize (const size_t n) |
static bool | is3DPoseOrPoint () |
Return true for poses or points with a Z component, false otherwise. More... | |
double | x () const |
Common members of all points & poses classes. More... | |
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: More... | |
double | distanceTo (const CPoseOrPoint< OTHERCLASS > &b) const |
Returns the Euclidean distance to another pose/point: More... | |
double | distanceTo (const mrpt::math::TPoint3D &b) const |
Returns the euclidean distance to a 3D point: More... | |
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). More... | |
double | distance3DToSquare (double ax, double ay, double az) const |
Returns the squared 3D distance from this pose/point to a 3D point. More... | |
double | distance2DTo (double ax, double ay) const |
Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists). More... | |
double | distance3DTo (double ax, double ay, double az) const |
Returns the 3D distance from this pose/point to a 3D point. More... | |
double | norm () const |
Returns the euclidean norm of vector: . More... | |
mrpt::math::CVectorDouble | getAsVectorVal () const |
Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation) More... | |
MATRIX44 | getHomogeneousMatrixVal () const |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation). More... | |
void | getInverseHomogeneousMatrix (MATRIX44 &out_HM) const |
Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose. More... | |
MATRIX44 | getInverseHomogeneousMatrixVal () const |
using mrpt::poses::CPose3DRotVec::const_reference = const double& |
Definition at line 518 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::ConstPtr = std::shared_ptr<const CPose3DRotVec > |
Definition at line 45 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::ConstUniquePtr = std::unique_ptr<const CPose3DRotVec > |
Definition at line 45 of file CPose3DRotVec.h.
Definition at line 520 of file CPose3DRotVec.h.
A type for the associated smart pointer
Definition at line 45 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::reference = double& |
Definition at line 517 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::size_type = std::size_t |
Definition at line 519 of file CPose3DRotVec.h.
Used to emulate CPosePDF types, for example, in mrpt::graphs::CNetworkOfPoses.
Definition at line 494 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::UniquePtr = std::unique_ptr< CPose3DRotVec > |
Definition at line 45 of file CPose3DRotVec.h.
using mrpt::poses::CPose3DRotVec::value_type = double |
The type of the elements.
Definition at line 516 of file CPose3DRotVec.h.
anonymous enum |
Enumerator | |
---|---|
is_3D_val |
Definition at line 495 of file CPose3DRotVec.h.
anonymous enum |
Enumerator | |
---|---|
rotation_dimensions |
Definition at line 500 of file CPose3DRotVec.h.
anonymous enum |
Enumerator | |
---|---|
is_PDF_val |
Definition at line 504 of file CPose3DRotVec.h.
anonymous enum |
Enumerator | |
---|---|
static_size |
Definition at line 523 of file CPose3DRotVec.h.
|
inline |
Default constructor, with all the coordinates set to zero.
Definition at line 57 of file CPose3DRotVec.h.
References m_coords, and m_rotvec.
Referenced by changeCoordinatesReference().
|
inline |
Fast constructor that leaves all the data uninitialized - call with UNINITIALIZED_POSE as argument.
Definition at line 65 of file CPose3DRotVec.h.
References MRPT_UNUSED_PARAM.
|
inline |
Constructor with initilization of the pose.
Definition at line 72 of file CPose3DRotVec.h.
References m_coords, m_rotvec, mrpt::poses::CPoseOrPoint< CPose3DRotVec >::x(), and mrpt::poses::CPoseOrPoint< CPose3DRotVec >::y().
|
inline |
Constructor with initilization of the pose from a vector [w1 w2 w3 x y z].
Definition at line 86 of file CPose3DRotVec.h.
|
inline |
|
explicit |
Constructor from a 4x4 homogeneous matrix:
Definition at line 34 of file CPose3DRotVec.cpp.
|
explicit |
Constructor from a CPose3D object.
Definition at line 43 of file CPose3DRotVec.cpp.
References mrpt::poses::CPose3D::getHomogeneousMatrix(), R, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y().
CPose3DRotVec::CPose3DRotVec | ( | const mrpt::math::CQuaternionDouble & | q, |
const double | _x, | ||
const double | _y, | ||
const double | _z | ||
) |
Constructor from a quaternion (which only represents the 3D rotation part) and a 3D displacement.
Definition at line 55 of file CPose3DRotVec.cpp.
References TH.
|
inlineexplicit |
Constructor from an array with these 6 elements: [w1 w2 w3 x y z] where r{ij} are the entries of the 3x3 rotation matrix and t{x,y,z} are the 3D translation of the pose.
Definition at line 120 of file CPose3DRotVec.h.
|
staticprotected |
|
inline |
Scalar sum of all 6 components: This is diferent from poses composition, which is implemented as "+" operators.
Definition at line 320 of file CPose3DRotVec.h.
|
inline |
Returns a human-readable textual representation of the object: "[x y z rx ry rz]".
Definition at line 445 of file CPose3DRotVec.h.
References mrpt::format(), m_coords, and m_rotvec.
|
inline |
Definition at line 451 of file CPose3DRotVec.h.
|
inline |
makes: this = p (+) this
Definition at line 302 of file CPose3DRotVec.h.
References composeFrom(), and CPose3DRotVec().
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
void CPose3DRotVec::composeFrom | ( | const CPose3DRotVec & | A, |
const CPose3DRotVec & | B, | ||
mrpt::math::CMatrixFixedNumeric< double, 6, 6 > * | out_jacobian_drvtC_drvtA = nullptr , |
||
mrpt::math::CMatrixFixedNumeric< double, 6, 6 > * | out_jacobian_drvtC_drvtB = nullptr |
||
) |
Makes "this = A (+) B"; this method is slightly more efficient than "this= A + B;" since it avoids the temporary object.
Definition at line 295 of file CPose3DRotVec.cpp.
References mrpt::obs::gnss::a1, mrpt::obs::gnss::a2, G, getRotationMatrix(), mrpt::poses::CPose3D::ln_rotation(), m_coords, mrpt::poses::CPose3DQuat::m_quat, m_rotvec, MRPT_MAX_ALIGN_BYTES, mrpt::poses::CPose3D::setRotationMatrix(), mrpt::math::skew_symmetric3(), mrpt::math::skew_symmetric3_neg(), toQuatXYZ(), and mrpt::poses::UNINITIALIZED_POSE.
Referenced by changeCoordinatesReference(), operator+(), and operator+=().
void CPose3DRotVec::composePoint | ( | double | lx, |
double | ly, | ||
double | lz, | ||
double & | gx, | ||
double & | gy, | ||
double & | gz, | ||
mrpt::math::CMatrixFixedNumeric< double, 3, 3 > * | out_jacobian_df_dpoint = nullptr , |
||
mrpt::math::CMatrixFixedNumeric< double, 3, 6 > * | out_jacobian_df_dpose = nullptr |
||
) | const |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose.
If pointers are provided, the corresponding Jacobians are returned. See this report for mathematical details.
Definition at line 165 of file CPose3DRotVec.cpp.
References MRPT_TODO, and THROW_EXCEPTION.
Referenced by composePoint(), and inverseComposePoint().
|
inline |
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose.
Definition at line 224 of file CPose3DRotVec.h.
References composePoint(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inlinestatic |
Definition at line 45 of file CPose3DRotVec.h.
|
static |
|
inlinestatic |
Definition at line 45 of file CPose3DRotVec.h.
|
inlineinherited |
Definition at line 131 of file CPoseOrPoint.h.
|
inlineinherited |
Definition at line 135 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
Definition at line 234 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the squared 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
Definition at line 218 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the 3D distance from this pose/point to a 3D point.
Definition at line 240 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the squared 3D distance from this pose/point to a 3D point.
Definition at line 225 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the Euclidean distance to another pose/point:
Definition at line 211 of file CPoseOrPoint.h.
|
inlineinherited |
Returns the euclidean distance to a 3D point:
Definition at line 246 of file CPoseOrPoint.h.
|
inlineinherited |
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 168 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().
|
inlinestatic |
Definition at line 528 of file CPose3DRotVec.h.
|
static |
Exponentiate a Vector in the SE(3) Lie Algebra to generate a new CPose3DRotVec (static method).
Exponentiate a Vector in the SE3 Lie Algebra to generate a new CPose3DRotVec.
Definition at line 554 of file CPose3DRotVec.cpp.
|
inline |
Set the current object value from a string generated by 'asString' (eg: "[x y z yaw pitch roll]", angles in deg.
)
std::exception | On invalid format |
Definition at line 463 of file CPose3DRotVec.h.
References ASSERTMSG_, m_coords, m_rotvec, and THROW_EXCEPTION.
|
inline |
Gets pose as an array with these 6 elements: [x y z vx vy vz] where v{xyz} is the rotation vector and {xyz} the 3D translation of the pose The target vector MUST ALREADY have space for 6 elements (i.e.
no .resize() method will be called).
Definition at line 379 of file CPose3DRotVec.h.
References m_coords, and m_rotvec.
Referenced by getAsVector().
|
inline |
Like getAs6Vector() but for dynamic size vectors (required by base class CPoseOrPoint)
Definition at line 392 of file CPose3DRotVec.h.
References getAs6Vector().
|
inlineinherited |
Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation)
Definition at line 263 of file CPoseOrPoint.h.
|
inlinestatic |
Definition at line 45 of file CPose3DRotVec.h.
|
inline |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
Definition at line 139 of file CPose3DRotVec.h.
References getRotationMatrix(), and m_coords.
Referenced by inverseComposeFrom().
|
inlineinherited |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
Definition at line 275 of file CPoseOrPoint.h.
CPose3DRotVec CPose3DRotVec::getInverse | ( | ) | const |
Compute the inverse of this pose and return the result.
Definition at line 495 of file CPose3DRotVec.cpp.
References setFromTransformationMatrix(), mrpt::math::UNINITIALIZED_MATRIX, and mrpt::poses::UNINITIALIZED_POSE.
|
inlineinherited |
Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose.
Definition at line 287 of file CPoseOrPoint.h.
|
inlineinherited |
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 295 of file CPoseOrPoint.h.
|
inline |
Definition at line 509 of file CPose3DRotVec.h.
|
inline |
Definition at line 510 of file CPose3DRotVec.h.
void CPose3DRotVec::getRotationMatrix | ( | mrpt::math::CMatrixDouble33 & | ROT | ) | const |
Get the 3x3 rotation matrix.
Definition at line 127 of file CPose3DRotVec.cpp.
References mrpt::poses::CPose3D::exp_rotation().
Referenced by composeFrom().
|
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 154 of file CPose3DRotVec.h.
References mrpt::math::UNINITIALIZED_MATRIX.
Referenced by getHomogeneousMatrix().
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::serialization::CSerializable.
|
static |
void CPose3DRotVec::inverse | ( | ) |
Convert this pose into its inverse, saving the result in itself.
Definition at line 487 of file CPose3DRotVec.cpp.
References mrpt::math::UNINITIALIZED_MATRIX.
void CPose3DRotVec::inverseComposeFrom | ( | const CPose3DRotVec & | A, |
const CPose3DRotVec & | B | ||
) |
Makes this method is slightly more efficient than "this= A - B;" since it avoids the temporary object.
Definition at line 510 of file CPose3DRotVec.cpp.
References getHomogeneousMatrix(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::getInverseHomogeneousMatrix(), and mrpt::math::UNINITIALIZED_MATRIX.
Referenced by operator-().
void CPose3DRotVec::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 = nullptr , |
||
mrpt::math::CMatrixFixedNumeric< double, 3, 6 > * | out_jacobian_df_dpose = nullptr |
||
) | const |
Computes the 3D point L such as .
If pointers are provided, the corresponding Jacobians are returned. See this report for mathematical details.
Definition at line 538 of file CPose3DRotVec.cpp.
References composePoint(), MRPT_TODO, and MRPT_UNUSED_PARAM.
|
inlinestaticinherited |
Return true for poses or points with a Z component, false otherwise.
Definition at line 177 of file CPoseOrPoint.h.
|
inlinestatic |
Definition at line 499 of file CPose3DRotVec.h.
References is_3D_val.
|
inlinestatic |
Definition at line 508 of file CPose3DRotVec.h.
References is_PDF_val.
void CPose3DRotVec::ln | ( | mrpt::math::CArrayDouble< 6 > & | out_ln | ) | const |
Take the logarithm of the 3x4 matrix defined by this pose, generating the corresponding vector in the SE(3) Lie Algebra.
Take the logarithm of the 3x4 matrix defined by this pose, generating the corresponding vector in the SE3 Lie Algebra.
Definition at line 566 of file CPose3DRotVec.cpp.
CArrayDouble< 3 > CPose3DRotVec::ln_rotation | ( | ) | const |
Take the logarithm of the 3x3 rotation matrix part of this pose, generating the corresponding vector in the Lie Algebra.
Take the logarithm of the 3x3 rotation matrix, generating the corresponding vector in the Lie Algebra.
Definition at line 562 of file CPose3DRotVec.cpp.
|
inlinestatic |
Definition at line 529 of file CPose3DRotVec.h.
References static_size.
|
inlineinherited |
Returns the euclidean norm of vector: .
Definition at line 253 of file CPoseOrPoint.h.
|
inlinenoexcept |
Definition at line 45 of file CPose3DRotVec.h.
Definition at line 45 of file CPose3DRotVec.h.
Definition at line 45 of file CPose3DRotVec.h.
Definition at line 45 of file CPose3DRotVec.h.
|
inline |
Definition at line 45 of file CPose3DRotVec.h.
|
inlinenoexcept |
Definition at line 45 of file CPose3DRotVec.h.
Definition at line 45 of file CPose3DRotVec.h.
|
inline |
Definition at line 45 of file CPose3DRotVec.h.
|
inline |
Scalar multiplication of x,y,z,vx,vy,vz.
Definition at line 327 of file CPose3DRotVec.h.
|
inline |
The operator is the pose compounding operator.
Definition at line 167 of file CPose3DRotVec.h.
References composeFrom(), and mrpt::poses::UNINITIALIZED_POSE.
The operator is the pose compounding operator.
Definition at line 223 of file CPose3DRotVec.cpp.
References mrpt::poses::CPoint3D::m_coords.
The operator is the pose compounding operator.
Definition at line 237 of file CPose3DRotVec.cpp.
References mrpt::poses::CPoint3D::m_coords.
|
inline |
Make (b can be "this" without problems)
Definition at line 265 of file CPose3DRotVec.h.
References composeFrom().
|
inline |
Compute .
Definition at line 287 of file CPose3DRotVec.h.
References inverseComposeFrom(), and mrpt::poses::UNINITIALIZED_POSE.
|
inline |
|
inline |
Definition at line 398 of file CPose3DRotVec.h.
|
inline |
Definition at line 419 of file CPose3DRotVec.h.
|
inlinestatic |
Definition at line 530 of file CPose3DRotVec.h.
References mrpt::format(), and static_size.
CArrayDouble< 3 > CPose3DRotVec::rotVecFromRotMat | ( | const math::CMatrixDouble44 & | m | ) |
Create a vector with 3 components according to the input transformation matrix (only the rotation will be taken into account)
Definition at line 103 of file CPose3DRotVec.cpp.
References mrpt::poses::CPose3D::ln_rotation().
Referenced by setFromTransformationMatrix().
|
inline |
Definition at line 312 of file CPose3DRotVec.h.
References m_rotvec.
|
inline |
Definition at line 315 of file CPose3DRotVec.h.
References m_rotvec.
|
inline |
Definition at line 313 of file CPose3DRotVec.h.
References m_rotvec.
|
inline |
Definition at line 316 of file CPose3DRotVec.h.
References m_rotvec.
|
inline |
Definition at line 314 of file CPose3DRotVec.h.
References m_rotvec.
|
inline |
Definition at line 317 of file CPose3DRotVec.h.
References m_rotvec.
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 76 of file CPose3DRotVec.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.
|
overrideprotectedvirtual |
Must return the current versioning number of the object.
Start in zero for new classes, and increments each time there is a change in the stored format.
Implements mrpt::serialization::CSerializable.
Definition at line 70 of file CPose3DRotVec.cpp.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 71 of file CPose3DRotVec.cpp.
|
inline |
Set pose from an array with these 6 elements: [x y z vx vy vz] where v{xyz} is the rotation vector and {xyz} the 3D translation of the pose.
Definition at line 361 of file CPose3DRotVec.h.
|
inline |
Definition at line 180 of file CPose3DRotVec.h.
References rotVecFromRotMat().
Referenced by getInverse().
|
inline |
Set the pose from a 3D position (meters) and yaw/pitch/roll angles (radians) - This method recomputes the internal rotation matrix.
Definition at line 343 of file CPose3DRotVec.h.
void CPose3DRotVec::setFromXYZAndAngles | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const double | yaw = 0 , |
||
const double | pitch = 0 , |
||
const double | roll = 0 |
||
) |
Definition at line 92 of file CPose3DRotVec.cpp.
References mrpt::poses::CPose3D::ln_rotation(), mrpt::poses::CPose3D::m_coords, mrpt::obs::gnss::pitch, and mrpt::obs::gnss::roll.
Referenced by Pose3DRotVecTests::test_compose().
|
overridevirtual |
Set all data fields to quiet NaN.
Implements mrpt::poses::CPoseOrPoint< CPose3DRotVec >.
Definition at line 572 of file CPose3DRotVec.cpp.
|
inlinestatic |
Definition at line 527 of file CPose3DRotVec.h.
References static_size.
void CPose3DRotVec::sphericalCoordinates | ( | const mrpt::math::TPoint3D & | 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 mrpt::poses::CPose3D
Definition at line 137 of file CPose3DRotVec.cpp.
References local, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inlineinherited |
Returns the squared euclidean distance to another pose/point:
Definition at line 184 of file CPoseOrPoint.h.
void CPose3DRotVec::toQuatXYZ | ( | CPose3DQuat & | q | ) | const |
Convert this RVT into a quaternion + XYZ.
Definition at line 248 of file CPose3DRotVec.cpp.
References mrpt::poses::CPoint3D::m_coords.
Referenced by composeFrom().
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 68 of file CSerializable.h.
|
inlineinherited |
Common members of all points & poses classes.
< Get X coord.
Definition at line 140 of file CPoseOrPoint.h.
Referenced by CPose3DRotVec().
|
inlineinherited |
Definition at line 149 of file CPoseOrPoint.h.
|
inlineinherited |
v | Set X coord. |
Definition at line 158 of file CPoseOrPoint.h.
|
inlineinherited |
v | X+=v |
Definition at line 167 of file CPoseOrPoint.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 153 of file CPoseOrPoint.h.
|
inlineinherited |
v | Set Y coord. |
Definition at line 162 of file CPoseOrPoint.h.
|
inlineinherited |
v | Y+=v |
Definition at line 171 of file CPoseOrPoint.h.
|
staticprotected |
Definition at line 45 of file CPose3DRotVec.h.
|
static |
Definition at line 45 of file CPose3DRotVec.h.
mrpt::math::CArrayDouble<3> mrpt::poses::CPose3DRotVec::m_coords |
The translation vector [x,y,z].
Definition at line 49 of file CPose3DRotVec.h.
Referenced by addComponents(), asString(), composeFrom(), CPose3DRotVec(), fromString(), getAs6Vector(), getHomogeneousMatrix(), mrpt::poses::operator!=(), operator*=(), operator=(), mrpt::poses::operator==(), operator[](), setFrom6Vector(), and setFromValues().
mrpt::math::CArrayDouble<3> mrpt::poses::CPose3DRotVec::m_rotvec |
The rotation vector [vx,vy,vz].
Definition at line 51 of file CPose3DRotVec.h.
Referenced by addComponents(), asString(), composeFrom(), mrpt::poses::CPose3D::CPose3D(), CPose3DRotVec(), fromString(), getAs6Vector(), mrpt::poses::operator!=(), operator*=(), operator=(), mrpt::poses::operator==(), operator[](), rx(), ry(), rz(), setFrom6Vector(), and setFromValues().
|
staticprotected |
Definition at line 45 of file CPose3DRotVec.h.
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 |