32 double x{.0},
y{.0},
z{.0};
63 double _x,
double _y,
double _z,
double _yaw,
double _pitch,
90 throw std::out_of_range(
"index out of range");
111 throw std::out_of_range(
"index out of range");
135 void asString(std::string& s)
const;
212 TPose3D
operator-(
const TPose3D& b,
const TPose3D& a);
217 return (p1.
x == p2.
x) && (p1.
y == p2.
y) && (p1.
z == p2.
z) &&
227 return (p1.
x != p2.
x) || (p1.
y != p2.
y) || (p1.
z != p2.
z) ||
std::vector< T1 > operator-(const std::vector< T1 > &v1, const std::vector< T2 > &v2)
A compile-time fixed-size numeric matrix container.
constexpr double operator[](size_t i) const
Coordinate access using operator[].
double roll
Roll coordinate (rotation angle over X coordinate).
Base type of all TPoseXX and TPointXX classes in mrpt::math.
mrpt::math::CMatrixDouble33 getRotationMatrix() const
void fromHomogeneousMatrix(const mrpt::math::CMatrixDouble44 &HG)
double yaw
Yaw coordinate (rotation angle over Z axis).
std::optional< std::reference_wrapper< T > > optional_ref
Shorter name for std::optional<std::reference_wrapper<T>>
mrpt::math::CMatrixDouble44 getHomogeneousMatrix() const
double norm() const
Pose's spatial coordinates norm.
static constexpr TPose3D Identity()
Returns the identity transformation, T=eye(4)
This base provides a set of functions for maths stuff.
void composePose(const TPose3D other, TPose3D &result) const
constexpr TPose3D()=default
Default fast constructor.
T wrapTo2Pi(T a)
Modifies the given angle to translate it into the [0,2pi[ range.
void composePoint(const TPoint3D &l, TPoint3D &g) const
void getAsQuaternion(mrpt::math::CQuaternion< double > &q, mrpt::optional_ref< mrpt::math::CMatrixFixed< double, 4, 3 >> out_dq_dr=std::nullopt) const
Returns the quaternion associated to the rotation of this object (NOTE: XYZ translation is ignored) ...
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
constexpr TPose3D(double _x, double _y, double _z, double _yaw, double _pitch, double _roll)
Constructor from coordinates.
constexpr bool operator==(const TPoint2D_< T > &p1, const TPoint2D_< T > &p2)
Exact comparison between 2D points.
Base template for TPoint2D and TPoint2Df.
double pitch
Pitch coordinate (rotation angle over Y axis).
static void SO3_to_yaw_pitch_roll(const mrpt::math::CMatrixDouble33 &R, double &yaw, double &pitch, double &roll)
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0...
return_t square(const num_t x)
Inline function for the square of a number.
constexpr bool operator!=(const TPoint2D_< T > &p1, const TPoint2D_< T > &p2)
Exact comparison between 2D points.
static TPose3D FromString(const std::string &s)
Provided for STL and matrices/vectors compatibility.
mrpt::math::CMatrixDouble44 getInverseHomogeneousMatrix() const
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void asVector(std::vector< double > &v) const
Gets the pose as a vector of doubles.
double & operator[](size_t i)
Coordinate access using operator[].
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ...
void inverseComposePoint(const TPoint3D &g, TPoint3D &l) const
std::string asString() const