Go to the documentation of this file.
21 static_assert(std::is_trivially_copyable_v<TTwist2D>);
33 m.
rows() == 1 && m.
cols() == 3,
"Wrong size of vector in ::fromString");
42 const double nvx =
vx * cos(ang) -
vy * sin(ang);
43 const double nvy =
vx * sin(ang) +
vy * cos(ang);
60 for (
size_t i = 0; i < o.
size(); i++) in >> o[i];
66 for (
size_t i = 0; i < o.
size(); i++)
out << o[i];
std::string asString() const
bool fromMatlabStringFormat(const std::string &s, mrpt::optional_ref< std::ostream > dump_errors_here=std::nullopt)
Reads a matrix from a string in Matlab-like format, for example: "[1 0 2; 0 4 -1]" The string must st...
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
void rotate(const double ang)
Transform the (vx,vy) components for a counterclockwise rotation of ang radians.
mrpt::vision::TStereoCalibResults out
double vx
Velocity components: X,Y (m/s)
#define THROW_EXCEPTION(msg)
Virtual base class for "archives": classes abstracting I/O streams.
bool operator!=(const TTwist2D &o) const
constexpr double RAD2DEG(const double x)
Radians to degrees.
mrpt::math::TPose2D operator*(const double dt) const
Returns the pose increment of multiplying each twist component times "dt" seconds.
constexpr std::size_t size() const
constexpr double DEG2RAD(const double x)
Degrees to radians
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45....
This base provides a set of functions for maths stuff.
size_type cols() const
Number of columns in the matrix.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
double omega
Angular velocity (rad/s)
size_type rows() const
Number of rows in the matrix.
std::string std::string format(std::string_view fmt, ARGS &&... args)
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
bool operator==(const TTwist2D &o) const
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020 | |