2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
Definition at line 2145 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Types | |
enum | { static_size = 3 } |
Public Member Functions | |
constexpr | TTwist2D (double vx_, double vy_, double omega_) |
Constructor from components. More... | |
TTwist2D () | |
Default fast constructor. More... | |
double & | operator[] (size_t i) |
Coordinate access using operator[]. More... | |
constexpr const double & | operator[] (size_t i) const |
Coordinate access using operator[]. More... | |
void | getAsVector (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 | 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... | |
Static Public Member Functions | |
static size_t | size () |
Public Attributes | |
double | vx |
Velocity components: X,Y (m/s) More... | |
double | vy |
double | omega |
Angular velocity (rad/s) More... | |
anonymous enum |
Enumerator | |
---|---|
static_size |
Definition at line 2147 of file lightweight_geom_data.h.
|
inlineconstexpr |
Constructor from components.
Definition at line 2157 of file lightweight_geom_data.h.
|
inline |
Default fast constructor.
Initializes to garbage
Definition at line 2162 of file lightweight_geom_data.h.
|
inline |
Definition at line 2214 of file lightweight_geom_data.h.
void mrpt::math::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 100 of file lightweight_geom_data.cpp.
References mrpt::format(), omega, mrpt::RAD2DEG(), vx, and vy.
void mrpt::math::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 104 of file lightweight_geom_data.cpp.
References ASSERTMSG_, mrpt::DEG2RAD(), omega, THROW_EXCEPTION, vx, and vy.
|
inline |
Transformation into vector.
Definition at line 2194 of file lightweight_geom_data.h.
bool mrpt::math::TTwist2D::operator!= | ( | const TTwist2D & | o | ) | const |
Definition at line 128 of file lightweight_geom_data.cpp.
mrpt::math::TPose2D mrpt::math::TTwist2D::operator* | ( | const double | dt | ) | const |
Returns the pose increment of multiplying each twist component times "dt" seconds.
Definition at line 129 of file lightweight_geom_data.cpp.
bool mrpt::math::TTwist2D::operator== | ( | const TTwist2D & | o | ) | const |
Definition at line 124 of file lightweight_geom_data.cpp.
|
inline |
Coordinate access using operator[].
Order: vx,vy,vphi
Definition at line 2164 of file lightweight_geom_data.h.
|
inlineconstexpr |
Coordinate access using operator[].
Order: vx,vy,vphi
Definition at line 2179 of file lightweight_geom_data.h.
void mrpt::math::TTwist2D::rotate | ( | const double | ang | ) |
Transform the (vx,vy) components for a counterclockwise rotation of ang
radians.
Definition at line 117 of file lightweight_geom_data.cpp.
Referenced by mrpt::poses::CRobot2DPoseEstimator::getCurrentEstimate(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTVelLocal(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricVelLocal(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), and mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds().
|
inlinestatic |
Definition at line 2227 of file lightweight_geom_data.h.
Referenced by mrpt::math::operator<<(), and mrpt::math::operator>>().
double mrpt::math::TTwist2D::omega |
Angular velocity (rad/s)
Definition at line 2154 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), getAsVector(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator==(), operator[](), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), and mrpt::obs::CActionRobotMovement2D::velocityAng().
double mrpt::math::TTwist2D::vx |
Velocity components: X,Y (m/s)
Definition at line 2152 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), getAsVector(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator==(), operator[](), rotate(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), and mrpt::obs::CActionRobotMovement2D::velocityLin().
double mrpt::math::TTwist2D::vy |
Definition at line 2152 of file lightweight_geom_data.h.
Referenced by asString(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), getAsVector(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), operator*(), operator==(), operator[](), rotate(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), and mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep().
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |