Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
mrpt::math::TTwist3D Struct Reference

Detailed Description

3D twist: 3D velocity vector (vx,vy,vz) + angular velocity (wx,wy,wz)

See also
mrpt::math::TTwist2D, mrpt::math::TPose3D

Definition at line 2281 of file lightweight_geom_data.h.

#include <mrpt/math/lightweight_geom_data.h>

Public Types

enum  { static_size = 6 }
 

Public Member Functions

 TTwist3D (double vx_, double vy_, double vz_, double wx_, double wy_, double wz_)
 Constructor from components. More...
 
 TTwist3D ()
 Default fast constructor. More...
 
double & operator[] (size_t i)
 Coordinate access using operator[]. More...
 
const double & operator[] (size_t i) const
 Coordinate access using operator[]. More...
 
void getAsVector (std::vector< double > &v) const
 Transformation into vector. More...
 
bool operator== (const TTwist3D &o) const
 
bool operator!= (const TTwist3D &o) const
 
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) More...
 
std::string asString () const
 
void rotate (const mrpt::poses::CPose3D &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. More...
 
void fromString (const std::string &s)
 Set the current object value from a string generated by 'asString' (eg: "[vx vy vz wx wy wz]" ) More...
 

Static Public Member Functions

static size_t size ()
 

Public Attributes

double vx
 Velocity components: X,Y (m/s) More...
 
double vy
 
double vz
 
double wx
 Angular velocity (rad/s) More...
 
double wy
 
double wz
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
static_size 

Definition at line 2283 of file lightweight_geom_data.h.

Constructor & Destructor Documentation

◆ TTwist3D() [1/2]

mrpt::math::TTwist3D::TTwist3D ( double  vx_,
double  vy_,
double  vz_,
double  wx_,
double  wy_,
double  wz_ 
)
inline

Constructor from components.

Definition at line 2293 of file lightweight_geom_data.h.

◆ TTwist3D() [2/2]

mrpt::math::TTwist3D::TTwist3D ( )
inline

Default fast constructor.

Initializes to garbage

Definition at line 2299 of file lightweight_geom_data.h.

Member Function Documentation

◆ asString() [1/2]

void mrpt::math::TTwist3D::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
fromString

Definition at line 158 of file lightweight_geom_data.cpp.

References mrpt::mrpt::format(), mrpt::mrpt::utils::RAD2DEG(), vx, vy, vz, wx, wy, and wz.

Here is the call graph for this function:

◆ asString() [2/2]

std::string mrpt::math::TTwist3D::asString ( ) const
inline

Definition at line 2355 of file lightweight_geom_data.h.

◆ fromString()

void mrpt::math::TTwist3D::fromString ( const std::string s)

Set the current object value from a string generated by 'asString' (eg: "[vx vy vz wx wy wz]" )

See also
asString
Exceptions
std::exceptionOn invalid format

Definition at line 164 of file lightweight_geom_data.cpp.

References ASSERTMSG_, DEG2RAD, mrpt::mrpt::math::size(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ getAsVector()

void mrpt::math::TTwist3D::getAsVector ( std::vector< double > &  v) const
inline

Transformation into vector.

Definition at line 2343 of file lightweight_geom_data.h.

◆ operator!=()

bool mrpt::math::TTwist3D::operator!= ( const TTwist3D o) const

Definition at line 196 of file lightweight_geom_data.cpp.

◆ operator==()

bool mrpt::math::TTwist3D::operator== ( const TTwist3D o) const

Definition at line 191 of file lightweight_geom_data.cpp.

References vx, vy, vz, wx, wy, and wz.

◆ operator[]() [1/2]

double& mrpt::math::TTwist3D::operator[] ( size_t  i)
inline

Coordinate access using operator[].

Order: vx,vy,vphi

Definition at line 2301 of file lightweight_geom_data.h.

References vx, vy, vz, wx, wy, and wz.

◆ operator[]() [2/2]

const double& mrpt::math::TTwist3D::operator[] ( size_t  i) const
inline

Coordinate access using operator[].

Order: vx,vy,vphi

Definition at line 2322 of file lightweight_geom_data.h.

References vx, vy, vz, wx, wy, and wz.

◆ rotate()

void mrpt::math::TTwist3D::rotate ( const mrpt::poses::CPose3D 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

Definition at line 179 of file lightweight_geom_data.cpp.

References mrpt::poses::CPose3D::getRotationMatrix(), R, vx, vy, vz, wx, wy, and wz.

Here is the call graph for this function:

◆ size()

static size_t mrpt::math::TTwist3D::size ( )
inlinestatic

Definition at line 2373 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator<<(), and mrpt::math::operator>>().

Here is the caller graph for this function:

Member Data Documentation

◆ vx

double mrpt::math::TTwist3D::vx

Velocity components: X,Y (m/s)

Definition at line 2288 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().

◆ vy

double mrpt::math::TTwist3D::vy

Definition at line 2288 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().

◆ vz

double mrpt::math::TTwist3D::vz

Definition at line 2288 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().

◆ wx

double mrpt::math::TTwist3D::wx

Angular velocity (rad/s)

Definition at line 2290 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().

◆ wy

double mrpt::math::TTwist3D::wy

Definition at line 2290 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().

◆ wz

double mrpt::math::TTwist3D::wz

Definition at line 2290 of file lightweight_geom_data.h.

Referenced by asString(), operator==(), operator[](), and rotate().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019