Struct TTwist3D
Defined in File TTwist3D.h
Inheritance Relationships
Base Type
public mrpt::math::internal::ProvideStaticResize< TTwist3D >(Template Struct ProvideStaticResize)
Struct Documentation
-
struct TTwist3D : public mrpt::math::internal::ProvideStaticResize<TTwist3D>
3D twist: 3D velocity vector (vx,vy,vz) + angular velocity (wx,wy,wz)
See also
Public Functions
-
inline constexpr TTwist3D(double vx_, double vy_, double vz_, double wx_, double wy_, double wz_)
Constructor from components
-
TTwist3D() = default
Default fast constructor. Initializes to zeros
-
inline double &operator[](size_t i)
Coordinate access using operator[]. Order: vx,vy,vz, wx, wy, wz
-
inline constexpr double operator[](size_t i) const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
inline double &operator()(int row, int col)
(i,0) access operator (provided for API compatibility with matrices).
See also
operator[]
-
inline constexpr double operator()(int row, int col) const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
inline void operator*=(const double k)
Scale factor
-
template<typename Vector>
inline void asVector(Vector &v) const Transformation into vector [vx vy vz wx wy wz].
- Template Parameters:
Vector – It can be std::vector<double>, Eigen::VectorXd, etc.
-
template<typename Vector>
inline Vector asVector() const This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
template<typename VECTORLIKE>
inline void fromVector(const VECTORLIKE &v) Sets from a vector [vx vy vz wx wy wz]
-
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: “[vx
vy vz wx wy wz]”, omegas in deg/s)
See also
-
inline std::string asString() const
-
void rotate(const mrpt::math::TPose3D &rot)
Transform all 6 components for a change of reference frame from “A” to another frame “B” whose rotation with respect to “A” is given by
rot. The translational part of the pose is ignored
Public Members
-
double vx = {.0}
Velocity components: X,Y (m/s)
-
double vy = {.0}
-
double vz = {.0}
-
double wx = {.0}
Angular velocity (rad/s)
-
double wy = {.0}
-
double wz = {.0}
Public Static Functions
Public Static Attributes
-
static constexpr std::size_t static_size = 6
-
inline constexpr TTwist3D(double vx_, double vy_, double vz_, double wx_, double wy_, double wz_)