Represents a probabilistic 2D movement of the robot mobile base.
See the tutorial on probabilistic motion models.
- See also
- CAction
Definition at line 34 of file CActionRobotMovement2D.h.
#include <mrpt/slam/CActionRobotMovement2D.h>
◆ SmartPtr
◆ TDrawSampleMotionModel
◆ TEstimationMethod
◆ CActionRobotMovement2D() [1/2]
mrpt::slam::CActionRobotMovement2D::CActionRobotMovement2D |
( |
| ) |
|
◆ CActionRobotMovement2D() [2/2]
◆ ~CActionRobotMovement2D()
mrpt::slam::CActionRobotMovement2D::~CActionRobotMovement2D |
( |
| ) |
|
◆ _GetBaseClass()
◆ clone()
CObject* mrpt::utils::CObject::clone |
( |
| ) |
const |
|
inlineinherited |
Cloning interface for smart pointers.
Definition at line 135 of file CObject.h.
◆ computeFromEncoders()
void mrpt::slam::CActionRobotMovement2D::computeFromEncoders |
( |
double |
K_left, |
|
|
double |
K_right, |
|
|
double |
D |
|
) |
| |
If "hasEncodersInfo"=true, this method updates the pose estimation according to the ticks from both encoders and the passed parameters, which is passed internally to the method "computeFromOdometry" with the last used PDF options (or the defualt ones if not explicitly called by the user).
- Parameters
-
K_left | The meters / tick ratio for the left encoder. |
K_right | The meters / tick ratio for the right encoder. |
D | The distance between both wheels, in meters. |
◆ computeFromOdometry()
void mrpt::slam::CActionRobotMovement2D::computeFromOdometry |
( |
const CPose2D & |
odometryIncrement, |
|
|
const TMotionModelOptions & |
options |
|
) |
| |
◆ computeFromOdometry_modelGaussian()
void mrpt::slam::CActionRobotMovement2D::computeFromOdometry_modelGaussian |
( |
const CPose2D & |
odometryIncrement, |
|
|
const TMotionModelOptions & |
o |
|
) |
| |
|
protected |
Computes the PDF of the pose increment from an odometry reading, using a Gaussian approximation as the motion model.
- See also
- computeFromOdometry
◆ computeFromOdometry_modelThrun()
void mrpt::slam::CActionRobotMovement2D::computeFromOdometry_modelThrun |
( |
const CPose2D & |
odometryIncrement, |
|
|
const TMotionModelOptions & |
o |
|
) |
| |
|
protected |
Computes the PDF of the pose increment from an odometry reading, using the motion model from Thrun's book.
This model is discussed in "Probabilistic Robotics", Thrun, Burgard, and Fox, 2006, pp.136.
- See also
- computeFromOdometry
◆ Create()
◆ CreateObject()
◆ drawSingleSample()
void mrpt::slam::CActionRobotMovement2D::drawSingleSample |
( |
CPose2D & |
outSample | ) |
const |
Using this method instead of "poseChange->drawSingleSample()" may be more efficient in most situations.
- See also
- CPosePDF::drawSingleSample
◆ drawSingleSample_modelGaussian()
void mrpt::slam::CActionRobotMovement2D::drawSingleSample_modelGaussian |
( |
CPose2D & |
outSample | ) |
const |
|
protected |
The sample generator for the model "computeFromOdometry_modelGaussian", internally called when the user invokes "drawSingleSample".
◆ drawSingleSample_modelThrun()
void mrpt::slam::CActionRobotMovement2D::drawSingleSample_modelThrun |
( |
CPose2D & |
outSample | ) |
const |
|
protected |
The sample generator for the model "computeFromOdometry_modelThrun", internally called when the user invokes "drawSingleSample".
◆ duplicate()
◆ duplicateGetSmartPtr()
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
Definition at line 132 of file CObject.h.
◆ fastDrawSingleSample()
void mrpt::slam::CActionRobotMovement2D::fastDrawSingleSample |
( |
CPose2D & |
outSample | ) |
const |
Faster version than "drawSingleSample", but requires a previous call to "prepareFastDrawSingleSamples".
◆ fastDrawSingleSample_modelGaussian()
void mrpt::slam::CActionRobotMovement2D::fastDrawSingleSample_modelGaussian |
( |
CPose2D & |
outSample | ) |
const |
|
protected |
◆ fastDrawSingleSample_modelThrun()
void mrpt::slam::CActionRobotMovement2D::fastDrawSingleSample_modelThrun |
( |
CPose2D & |
outSample | ) |
const |
|
protected |
◆ GetRuntimeClass()
Returns information about the class of an object in runtime.
Reimplemented from mrpt::slam::CAction.
◆ operator=()
◆ prepareFastDrawSingleSample_modelGaussian()
void mrpt::slam::CActionRobotMovement2D::prepareFastDrawSingleSample_modelGaussian |
( |
| ) |
const |
|
protected |
◆ prepareFastDrawSingleSample_modelThrun()
void mrpt::slam::CActionRobotMovement2D::prepareFastDrawSingleSample_modelThrun |
( |
| ) |
const |
|
protected |
◆ prepareFastDrawSingleSamples()
void mrpt::slam::CActionRobotMovement2D::prepareFastDrawSingleSamples |
( |
| ) |
const |
Call this before calling a high number of times "fastDrawSingleSample", which is much faster than "drawSingleSample".
◆ readFromStream()
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
- Parameters
-
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
- Exceptions
-
- See also
- CStream
Implements mrpt::utils::CSerializable.
◆ writeToStream()
void mrpt::slam::CActionRobotMovement2D::writeToStream |
( |
mrpt::utils::CStream & |
out, |
|
|
int * |
getVersion |
|
) |
| const |
|
protectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
- Parameters
-
out | The output binary stream where object must be dumped. |
getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
- Exceptions
-
- See also
- CStream
Implements mrpt::utils::CSerializable.
◆ _init_CActionRobotMovement2D
◆ classCAction
◆ classCActionRobotMovement2D
◆ classCObject
◆ classCSerializable
◆ classinfo
◆ encoderLeftTicks
int32_t mrpt::slam::CActionRobotMovement2D::encoderLeftTicks |
◆ encoderRightTicks
int32_t mrpt::slam::CActionRobotMovement2D::encoderRightTicks |
◆ estimationMethod
◆ hasEncodersInfo
bool mrpt::slam::CActionRobotMovement2D::hasEncodersInfo |
If "true" means that "encoderLeftTicks" and "encoderRightTicks" contain valid values.
Definition at line 78 of file CActionRobotMovement2D.h.
◆ hasVelocities
bool mrpt::slam::CActionRobotMovement2D::hasVelocities |
If "true" means that "velocityLin" and "velocityAng" contain valid values.
Definition at line 87 of file CActionRobotMovement2D.h.
◆ m_fastDrawGauss_M
CPose2D mrpt::slam::CActionRobotMovement2D::m_fastDrawGauss_M |
|
mutableprotected |
◆ m_fastDrawGauss_Z
◆ motionModelConfiguration
◆ poseChange
CPosePDFPtr mrpt::slam::CActionRobotMovement2D::poseChange |
◆ rawOdometryIncrementReading
CPose2D mrpt::slam::CActionRobotMovement2D::rawOdometryIncrementReading |
This is the raw odometry reading, and only is used when "estimationMethod" is "TEstimationMethod::emOdometry".
Definition at line 70 of file CActionRobotMovement2D.h.
◆ timestamp
The associated time-stamp.
This was added at 2-Dec-2007, new serialization versions have been added to derived classes to manage this time-stamp. Prior versions will be read as having a INVALID_TIMESTAMP value.
Definition at line 50 of file CAction.h.
◆ velocityAng
float mrpt::slam::CActionRobotMovement2D::velocityAng |
◆ velocityLin
float mrpt::slam::CActionRobotMovement2D::velocityLin |