31 constexpr
TTwist2D(
double vx_,
double vy_,
double omega_)
49 throw std::out_of_range(
"index out of range");
64 throw std::out_of_range(
"index out of range");
77 void rotate(
const double ang);
void rotate(const double ang)
Transform the (vx,vy) components for a counterclockwise rotation of ang radians.
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
std::string asString() const
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: "[0.02 1.04 -45...
double vx
Velocity components: X,Y (m/s)
constexpr const double & operator[](size_t i) const
Coordinate access using operator[].
mrpt::math::TPose2D operator*(const double dt) const
Returns the pose increment of multiplying each twist component times "dt" seconds.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
GLsizei const GLchar ** string
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
constexpr TTwist2D(double vx_, double vy_, double omega_)
Constructor from components.
double & operator[](size_t i)
Coordinate access using operator[].
Virtual base class for "archives": classes abstracting I/O streams.
Provided for STL and matrices/vectors compatibility.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
void asVector(std::vector< double > &v) const
Transformation into vector.
TTwist2D()=default
Default fast constructor.
double omega
Angular velocity (rad/s)
bool operator!=(const TTwist2D &o) const
bool operator==(const TTwist2D &o) const