MRPT  1.9.9
mrpt::obs::CActionRobotMovement3D Class Reference

Detailed Description

Represents a probabilistic 3D (6D) movement.

Currently this can be determined from visual odometry for full 6D, or from wheel encoders for 2D movements only. Here implemented the motion model from the next article: A. L. Ballardini, A. Furlan, A. Galbiati, M. Matteucci, F. Sacchi, D. G. Sorrenti An effective 6DoF motion model for 3D-6DoF Monte Carlo Localization 4th Workshop on Planning, Perception and Navigation for Intelligent Vehicles, IROS, 2012

See also
CAction

Definition at line 26 of file CActionRobotMovement3D.h.

#include <mrpt/obs/CActionRobotMovement3D.h>

Inheritance diagram for mrpt::obs::CActionRobotMovement3D:

Classes

struct  TMotionModelOptions
 The parameter to be passed to "computeFromOdometry". More...
 

Public Types

enum  TEstimationMethod { emOdometry = 0, emVisualOdometry }
 A list of posible ways for estimating the content of a CActionRobotMovement3D object. More...
 
enum  TDrawSampleMotionModel { mmGaussian = 0, mm6DOF }
 

Public Member Functions

 CActionRobotMovement3D ()=default
 
void computeFromOdometry (const mrpt::poses::CPose3D &odometryIncrement, const TMotionModelOptions &options)
 Computes the PDF of the pose increment from an odometry reading and according to the given motion model (speed and encoder ticks information is not modified). More...
 
void computeFromOdometry_model6DOF (const mrpt::poses::CPose3D &odometryIncrement, const TMotionModelOptions &o)
 Computes the PDF of the pose increment from an odometry reading, using the motion model for 6 DOF. More...
 
virtual mxArraywriteToMatlab () const
 Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More...
 
RTTI classes and functions for polymorphic hierarchies
mrpt::rtti::CObject::Ptr duplicateGetSmartPtr () const
 Makes a deep copy of the object and returns a smart pointer to it. More...
 

Public Attributes

mrpt::poses::CPose3DPDFGaussian poseChange {}
 The 3D pose change probabilistic estimation. More...
 
mrpt::poses::CPose3D rawOdometryIncrementReading {}
 This is the raw odometry reading, and only is used when "estimationMethod" is "TEstimationMethod::emOdometry". More...
 
TEstimationMethod estimationMethod {emOdometry}
 This fields indicates the way this estimation was obtained. More...
 
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions motionModelConfiguration
 
std::vector< bool > hasVelocities {false, false, false, false, false, false}
 Each "true" entry means that the corresponding "velocities" element contains valid data - There are 6 entries. More...
 
mrpt::math::CVectorFloat velocities {6}
 The velocity of the robot in each of 6D: v_x,v_y,v_z,v_yaw,v_pitch,v_roll (linear in meters/sec and angular in rad/sec). More...
 
mrpt::system::TTimeStamp timestamp {INVALID_TIMESTAMP}
 The associated time-stamp. More...
 

Protected Member Functions

CSerializable virtual methods
uint8_t serializeGetVersion () const override
 Must return the current versioning number of the object. More...
 
void serializeTo (mrpt::serialization::CArchive &out) const override
 Pure virtual method for writing (serializing) to an abstract archive. More...
 
void serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override
 Pure virtual method for reading (deserializing) from an abstract archive. More...
 
CSerializable virtual methods
virtual void serializeTo (CSchemeArchiveBase &out) const
 Virtual method for writing (serializing) to an abstract schema based archive. More...
 
virtual void serializeFrom (CSchemeArchiveBase &in)
 Virtual method for reading (deserializing) from an abstract schema based archive. More...
 

RTTI stuff

using Ptr = std::shared_ptr< CActionRobotMovement3D >
 
using ConstPtr = std::shared_ptr< const CActionRobotMovement3D >
 
using UniquePtr = std::unique_ptr< CActionRobotMovement3D >
 
using ConstUniquePtr = std::unique_ptr< const CActionRobotMovement3D >
 
static mrpt::rtti::CLASSINIT _init_CActionRobotMovement3D
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static constexpr const char * className = "CActionRobotMovement3D"
 
static const mrpt::rtti::TRuntimeClassId_GetBaseClass ()
 
static constexpr auto getClassName ()
 
static const mrpt::rtti::TRuntimeClassIdGetRuntimeClassIdStatic ()
 
static std::shared_ptr< CObjectCreateObject ()
 
template<typename... Args>
static Ptr Create (Args &&... args)
 
template<typename Alloc , typename... Args>
static Ptr CreateAlloc (const Alloc &alloc, Args &&... args)
 
template<typename... Args>
static UniquePtr CreateUnique (Args &&... args)
 
virtual const mrpt::rtti::TRuntimeClassIdGetRuntimeClass () const override
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::rtti::CObjectclone () const override
 Returns a deep copy (clone) of the object, indepently of its class. More...
 

Member Typedef Documentation

◆ ConstPtr

◆ ConstUniquePtr

Definition at line 28 of file CActionRobotMovement3D.h.

◆ Ptr

A type for the associated smart pointer

Definition at line 28 of file CActionRobotMovement3D.h.

◆ UniquePtr

Member Enumeration Documentation

◆ TDrawSampleMotionModel

Enumerator
mmGaussian 
mm6DOF 

Definition at line 55 of file CActionRobotMovement3D.h.

◆ TEstimationMethod

A list of posible ways for estimating the content of a CActionRobotMovement3D object.

Enumerator
emOdometry 
emVisualOdometry 

Definition at line 34 of file CActionRobotMovement3D.h.

Constructor & Destructor Documentation

◆ CActionRobotMovement3D()

mrpt::obs::CActionRobotMovement3D::CActionRobotMovement3D ( )
default

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::obs::CActionRobotMovement3D::_GetBaseClass ( )
staticprotected

◆ clone()

virtual mrpt::rtti::CObject* mrpt::obs::CActionRobotMovement3D::clone ( ) const
overridevirtual

Returns a deep copy (clone) of the object, indepently of its class.

Implements mrpt::rtti::CObject.

◆ computeFromOdometry()

void CActionRobotMovement3D::computeFromOdometry ( const mrpt::poses::CPose3D odometryIncrement,
const TMotionModelOptions options 
)

Computes the PDF of the pose increment from an odometry reading and according to the given motion model (speed and encoder ticks information is not modified).

According to the parameters in the passed struct, it will be called one the private sampling functions (see "see also" next).

See also
computeFromOdometry_model6DOF

Definition at line 62 of file CActionRobotMovement3D.cpp.

References mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::modelSelection.

◆ computeFromOdometry_model6DOF()

void CActionRobotMovement3D::computeFromOdometry_model6DOF ( const mrpt::poses::CPose3D odometryIncrement,
const TMotionModelOptions o 
)

Computes the PDF of the pose increment from an odometry reading, using the motion model for 6 DOF.

The source: A. L. Ballardini, A. Furlan, A. Galbiati, M. Matteucci, F. Sacchi, D. G. Sorrenti An effective 6DoF motion model for 3D-6DoF Monte Carlo Localization 4th Workshop on Planning, Perception and Navigation for Intelligent Vehicles, IROS, 2012

See also
computeFromOdometry

Definition at line 77 of file CActionRobotMovement3D.cpp.

References mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a1, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a10, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a2, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a3, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a4, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a5, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a6, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a7, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a8, mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::a9, mrpt::random::getRandomGenerator(), mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::mm6DOFModel, mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::norm(), mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel::nParticlesCount, mrpt::poses::CPose3D::pitch(), mrpt::poses::CPose3DPDFParticles::resetDeterministic(), mrpt::poses::CPose3D::roll(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y(), and mrpt::poses::CPose3D::yaw().

Here is the call graph for this function:

◆ Create()

template<typename... Args>
static Ptr mrpt::obs::CActionRobotMovement3D::Create ( Args &&...  args)
inlinestatic

Definition at line 28 of file CActionRobotMovement3D.h.

◆ CreateAlloc()

template<typename Alloc , typename... Args>
static Ptr mrpt::obs::CActionRobotMovement3D::CreateAlloc ( const Alloc &  alloc,
Args &&...  args 
)
inlinestatic

Definition at line 28 of file CActionRobotMovement3D.h.

◆ CreateObject()

static std::shared_ptr<CObject> mrpt::obs::CActionRobotMovement3D::CreateObject ( )
static

◆ CreateUnique()

template<typename... Args>
static UniquePtr mrpt::obs::CActionRobotMovement3D::CreateUnique ( Args &&...  args)
inlinestatic

Definition at line 28 of file CActionRobotMovement3D.h.

◆ duplicateGetSmartPtr()

mrpt::rtti::CObject::Ptr CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Makes a deep copy of the object and returns a smart pointer to it.

Definition at line 200 of file CObject.h.

References mrpt::rtti::CObject::clone().

Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClassName()

static constexpr auto mrpt::obs::CActionRobotMovement3D::getClassName ( )
inlinestatic

Definition at line 28 of file CActionRobotMovement3D.h.

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::obs::CActionRobotMovement3D::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::obs::CAction.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::obs::CActionRobotMovement3D::GetRuntimeClassIdStatic ( )
static

◆ serializeFrom() [1/2]

void CActionRobotMovement3D::serializeFrom ( mrpt::serialization::CArchive in,
uint8_t  serial_version 
)
overrideprotectedvirtual

Pure virtual method for reading (deserializing) from an abstract archive.

Users don't call this method directly. Instead, use stream >> object;.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any I/O error

Implements mrpt::serialization::CSerializable.

Definition at line 34 of file CActionRobotMovement3D.cpp.

References INVALID_TIMESTAMP, and MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.

◆ serializeFrom() [2/2]

virtual void mrpt::serialization::CSerializable::serializeFrom ( CSchemeArchiveBase in)
inlineprotectedvirtualinherited

Virtual method for reading (deserializing) from an abstract schema based archive.

Definition at line 74 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ serializeGetVersion()

uint8_t CActionRobotMovement3D::serializeGetVersion ( ) const
overrideprotectedvirtual

Must return the current versioning number of the object.

Start in zero for new classes, and increments each time there is a change in the stored format.

Implements mrpt::serialization::CSerializable.

Definition at line 24 of file CActionRobotMovement3D.cpp.

◆ serializeTo() [1/2]

void CActionRobotMovement3D::serializeTo ( mrpt::serialization::CArchive out) const
overrideprotectedvirtual

Pure virtual method for writing (serializing) to an abstract archive.

Users don't call this method directly. Instead, use stream << object;.

Exceptions
std::exceptionOn any I/O error

Implements mrpt::serialization::CSerializable.

Definition at line 25 of file CActionRobotMovement3D.cpp.

References mrpt::serialization::CArchive::WriteAs().

Here is the call graph for this function:

◆ serializeTo() [2/2]

virtual void mrpt::serialization::CSerializable::serializeTo ( CSchemeArchiveBase out) const
inlineprotectedvirtualinherited

Virtual method for writing (serializing) to an abstract schema based archive.

Definition at line 64 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ writeToMatlab()

virtual mxArray* mrpt::serialization::CSerializable::writeToMatlab ( ) const
inlinevirtualinherited

Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class.

Returns
A new mxArray (caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB.

Definition at line 90 of file CSerializable.h.

Member Data Documentation

◆ _init_CActionRobotMovement3D

mrpt::rtti::CLASSINIT mrpt::obs::CActionRobotMovement3D::_init_CActionRobotMovement3D
staticprotected

Definition at line 28 of file CActionRobotMovement3D.h.

◆ className

constexpr const char* mrpt::obs::CActionRobotMovement3D::className = "CActionRobotMovement3D"
static

Definition at line 28 of file CActionRobotMovement3D.h.

◆ estimationMethod

TEstimationMethod mrpt::obs::CActionRobotMovement3D::estimationMethod {emOdometry}

This fields indicates the way this estimation was obtained.

Definition at line 53 of file CActionRobotMovement3D.h.

Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation().

◆ hasVelocities

std::vector<bool> mrpt::obs::CActionRobotMovement3D::hasVelocities {false, false, false, false, false, false}

Each "true" entry means that the corresponding "velocities" element contains valid data - There are 6 entries.

Definition at line 119 of file CActionRobotMovement3D.h.

◆ motionModelConfiguration

struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions mrpt::obs::CActionRobotMovement3D::motionModelConfiguration

◆ poseChange

mrpt::poses::CPose3DPDFGaussian mrpt::obs::CActionRobotMovement3D::poseChange {}

The 3D pose change probabilistic estimation.

It can be converted to/from these alternative classes:

Definition at line 46 of file CActionRobotMovement3D.h.

Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation().

◆ rawOdometryIncrementReading

mrpt::poses::CPose3D mrpt::obs::CActionRobotMovement3D::rawOdometryIncrementReading {}

This is the raw odometry reading, and only is used when "estimationMethod" is "TEstimationMethod::emOdometry".

Definition at line 50 of file CActionRobotMovement3D.h.

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::obs::CActionRobotMovement3D::runtimeClassId
staticprotected

Definition at line 28 of file CActionRobotMovement3D.h.

◆ timestamp

mrpt::system::TTimeStamp mrpt::obs::CAction::timestamp {INVALID_TIMESTAMP}
inherited

The associated time-stamp.

Definition at line 33 of file CAction.h.

Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation().

◆ velocities

mrpt::math::CVectorFloat mrpt::obs::CActionRobotMovement3D::velocities {6}

The velocity of the robot in each of 6D: v_x,v_y,v_z,v_yaw,v_pitch,v_roll (linear in meters/sec and angular in rad/sec).

Definition at line 125 of file CActionRobotMovement3D.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c26d46ba6 Thu Jul 18 13:03:42 2019 +0200 at jue jul 18 13:10:17 CEST 2019