MRPT
1.9.9
|
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
Definition at line 19 of file TTwist2D.h.
#include <mrpt/math/TTwist2D.h>
Public Types | |
enum | { static_size = 3 } |
Public Member Functions | |
constexpr | TTwist2D (double vx_, double vy_, double omega_) |
Constructor from components. More... | |
TTwist2D ()=default | |
Default fast constructor. More... | |
double & | operator[] (size_t i) |
Coordinate access using operator[]. More... | |
constexpr double | operator[] (size_t i) const |
Coordinate access using operator[]. More... | |
void | asVector (std::vector< double > &v) const |
Transformation into vector. More... | |
void | rotate (const double ang) |
Transform the (vx,vy) components for a counterclockwise rotation of ang radians. More... | |
bool | operator== (const TTwist2D &o) const |
bool | operator!= (const TTwist2D &o) const |
mrpt::math::TPose2D | operator* (const double dt) const |
Returns the pose increment of multiplying each twist component times "dt" seconds. More... | |
void | operator*= (const double k) |
Scale factor. More... | |
void | asString (std::string &s) const |
Returns a human-readable textual representation of the object (eg: "[vx
vy omega]", omega in deg/s) More... | |
std::string | asString () const |
void | fromString (const std::string &s) |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45.0]" ) More... | |
constexpr std::size_t | rows () const |
constexpr std::size_t | cols () const |
constexpr std::size_t | size () const |
void | resize (std::size_t n) |
throws if attempted to resize to incorrect length More... | |
Static Public Member Functions | |
static TTwist2D | FromString (const std::string &s) |
Public Attributes | |
double | vx {.0} |
Velocity components: X,Y (m/s) More... | |
double | vy {.0} |
double | omega {.0} |
Angular velocity (rad/s) More... | |
anonymous enum |
Enumerator | |
---|---|
static_size |
Definition at line 21 of file TTwist2D.h.
|
inline |
Constructor from components.
Definition at line 31 of file TTwist2D.h.
|
default |
Default fast constructor.
Initializes to zeros
void TTwist2D::asString | ( | std::string & | s | ) | const |
Returns a human-readable textual representation of the object (eg: "[vx vy omega]", omega in deg/s)
Definition at line 23 of file Twist2D.cpp.
References mrpt::format(), omega, mrpt::RAD2DEG(), vx, and vy.
|
inline |
Definition at line 97 of file TTwist2D.h.
|
inline |
|
inlineinherited |
Definition at line 66 of file TPoseOrPoint.h.
void TTwist2D::fromString | ( | const std::string & | s | ) |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45.0]" )
std::exception | On invalid format |
Definition at line 27 of file Twist2D.cpp.
References ASSERTMSG_, mrpt::math::CMatrixDynamic< T >::cols(), mrpt::DEG2RAD(), mrpt::math::MatrixVectorBase< Scalar, Derived >::fromMatlabStringFormat(), omega, mrpt::math::CMatrixDynamic< T >::rows(), THROW_EXCEPTION, vx, and vy.
Referenced by FromString().
|
inlinestatic |
Definition at line 111 of file TTwist2D.h.
References fromString().
bool TTwist2D::operator!= | ( | const TTwist2D & | o | ) | const |
Definition at line 51 of file Twist2D.cpp.
mrpt::math::TPose2D TTwist2D::operator* | ( | const double | dt | ) | const |
Returns the pose increment of multiplying each twist component times "dt" seconds.
Definition at line 52 of file Twist2D.cpp.
|
inline |
bool TTwist2D::operator== | ( | const TTwist2D & | o | ) | const |
Definition at line 47 of file Twist2D.cpp.
|
inline |
|
inline |
|
inlineinherited |
throws if attempted to resize to incorrect length
Definition at line 70 of file TPoseOrPoint.h.
void TTwist2D::rotate | ( | const double | ang | ) |
Transform the (vx,vy) components for a counterclockwise rotation of ang
radians.
Definition at line 40 of file Twist2D.cpp.
Referenced by mrpt::poses::CRobot2DPoseEstimator::getCurrentEstimate(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTVelLocal(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricVelLocal(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
inlineinherited |
Definition at line 65 of file TPoseOrPoint.h.
|
inlineinherited |
Definition at line 67 of file TPoseOrPoint.h.
double mrpt::math::TTwist2D::omega {.0} |
Angular velocity (rad/s)
Definition at line 28 of file TTwist2D.h.
Referenced by asString(), asVector(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator*=(), operator==(), operator[](), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), TEST(), and mrpt::obs::CActionRobotMovement2D::velocityAng().
double mrpt::math::TTwist2D::vx {.0} |
Velocity components: X,Y (m/s)
Definition at line 26 of file TTwist2D.h.
Referenced by asString(), asVector(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator*=(), operator==(), operator[](), rotate(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), TEST(), and mrpt::obs::CActionRobotMovement2D::velocityLin().
double mrpt::math::TTwist2D::vy {.0} |
Definition at line 26 of file TTwist2D.h.
Referenced by asString(), asVector(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator*=(), operator==(), operator[](), rotate(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), and TEST().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020 |