32 double vx_,
double vy_,
double vz_,
double wx_,
double wy_,
double wz_)
56 throw std::out_of_range(
"index out of range");
77 throw std::out_of_range(
"index out of range");
107 template <
typename VECTORLIKE>
111 for (
int i = 0; i < 6; i++) v[i] = (*
this)[i];
113 template <
typename VECTORLIKE>
122 template <
typename VECTORLIKE>
126 for (
int i = 0; i < 6; i++) (*
this)[i] = v[i];
134 void asString(std::string& s)
const;
void asVector(VECTORLIKE &v) const
Transformation into vector [vx vy vz wx wy wz].
constexpr double operator[](size_t i) const
constexpr TTwist3D(double vx_, double vy_, double vz_, double wx_, double wy_, double wz_)
Constructor from components.
double & operator[](size_t i)
Coordinate access using operator[].
void operator*=(const double k)
Scale factor.
3D twist: 3D velocity vector (vx,vy,vz) + angular velocity (wx,wy,wz)
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
static TTwist3D FromString(const std::string &s)
This base provides a set of functions for maths stuff.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[vx vy vz wx wy wz]" ) ...
bool operator!=(const TTwist3D &o) const
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
TTwist3D()=default
Default fast constructor.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
void fromVector(const VECTORLIKE &v)
Sets from a vector [vx vy vz wx wy wz].
VECTORLIKE asVector() const
double wx
Angular velocity (rad/s)
Virtual base class for "archives": classes abstracting I/O streams.
double vx
Velocity components: X,Y (m/s)
Provided for STL and matrices/vectors compatibility.
mrpt::vision::TStereoCalibResults out
void rotate(const mrpt::math::TPose3D &rot)
Transform all 6 components for a change of reference frame from "A" to another frame "B" whose rotati...
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
double & operator()(int row, int col)
(i,0) access operator (provided for API compatibility with matrices).
std::string asString() const
bool operator==(const TTwist3D &o) const
constexpr double operator()(int row, int col) const