MRPT  1.9.9
mrpt::kinematics::CVehicleVelCmd_DiffDriven Class Reference

Detailed Description

Kinematic model for Ackermann-like or differential-driven vehicles.

Definition at line 19 of file CVehicleVelCmd_DiffDriven.h.

#include <mrpt/kinematics/CVehicleVelCmd_DiffDriven.h>

Inheritance diagram for mrpt::kinematics::CVehicleVelCmd_DiffDriven:
Inheritance graph

Public Member Functions

voidoperator new (size_t size)
 
voidoperator new[] (size_t size)
 
void operator delete (void *ptr) noexcept
 
void operator delete[] (void *ptr) noexcept
 
void operator delete (void *memory, void *ptr) noexcept
 
voidoperator new (size_t size, const std::nothrow_t &) noexcept
 
void operator delete (void *ptr, const std::nothrow_t &) noexcept
 
virtual ~CVehicleVelCmd_DiffDriven ()
 
size_t getVelCmdLength () const override
 Get number of components in each velocity command. More...
 
std::string getVelCmdDescription (const int index) const override
 Get textual, human-readable description of each velocity command component. More...
 
double getVelCmdElement (const int index) const override
 Get each velocity command component. More...
 
void setVelCmdElement (const int index, const double val) override
 Set each velocity command component. More...
 
bool isStopCmd () const override
 Returns true if the command means "do not move" / "stop". More...
 
void setToStop () override
 Set to a command that means "do not move" / "stop". More...
 
void cmdVel_scale (double vel_scale) override
 See docs of method in base class. More...
 
double cmdVel_limits (const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
 See base class docs. More...
 
std::string asString () const
 Returns a human readable description of the cmd. 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
 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). More...
 

Static Public Member Functions

static voidoperator new (size_t size, void *ptr)
 

Public Attributes

double lin_vel {.0}
 Linear velocity (m/s) More...
 
double ang_vel {.0}
 Angular velocity (rad/s) 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...
 

Private Member Functions

double filter_max_vw (double &v, double &w, const TVelCmdParams &p)
 

RTTI stuff

using Ptr = std::shared_ptr< CVehicleVelCmd_DiffDriven >
 
using ConstPtr = std::shared_ptr< const CVehicleVelCmd_DiffDriven >
 
using UniquePtr = std::unique_ptr< CVehicleVelCmd_DiffDriven >
 
using ConstUniquePtr = std::unique_ptr< const CVehicleVelCmd_DiffDriven >
 
static mrpt::rtti::CLASSINIT _init_CVehicleVelCmd_DiffDriven
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static constexpr const char * className = "CVehicleVelCmd_DiffDriven"
 
static const mrpt::rtti::TRuntimeClassId_GetBaseClass ()
 
static constexpr auto getClassName ()
 
static const mrpt::rtti::TRuntimeClassIdGetRuntimeClassIdStatic ()
 
static mrpt::rtti::CObjectCreateObject ()
 
template<typename... Args>
static Ptr Create (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

◆ Ptr

A type for the associated smart pointer

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ UniquePtr

Constructor & Destructor Documentation

◆ ~CVehicleVelCmd_DiffDriven()

virtual mrpt::kinematics::CVehicleVelCmd_DiffDriven::~CVehicleVelCmd_DiffDriven ( )
virtual

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::kinematics::CVehicleVelCmd_DiffDriven::_GetBaseClass ( )
staticprotected

◆ asString()

std::string mrpt::kinematics::CVehicleVelCmd::asString ( ) const
inherited

Returns a human readable description of the cmd.

Definition at line 21 of file CVehicleVelCmd.cpp.

References mrpt::format().

◆ clone()

virtual mrpt::rtti::CObject* mrpt::kinematics::CVehicleVelCmd_DiffDriven::clone ( ) const
overridevirtual

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

Implements mrpt::rtti::CObject.

◆ cmdVel_limits()

double CVehicleVelCmd_DiffDriven::cmdVel_limits ( const mrpt::kinematics::CVehicleVelCmd prev_vel_cmd,
const double  beta,
const TVelCmdParams params 
)
overridevirtual

See base class docs.

Tecognizes these parameters: robotMax_V_mps, robotMax_W_degps

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 100 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, ASSERT_, ASSERTMSG_, filter_max_vw(), and lin_vel.

◆ cmdVel_scale()

void CVehicleVelCmd_DiffDriven::cmdVel_scale ( double  vel_scale)
overridevirtual

See docs of method in base class.

The implementation for differential-driven robots of this method just multiplies all the components of vel_cmd times vel_scale, which is appropriate for differential-driven kinematic models (v,w).

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 94 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, and lin_vel.

◆ Create()

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

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ CreateObject()

static mrpt::rtti::CObject* mrpt::kinematics::CVehicleVelCmd_DiffDriven::CreateObject ( )
static

◆ CreateUnique()

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

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ duplicateGetSmartPtr()

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

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 168 of file CObject.h.

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

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

◆ filter_max_vw()

double CVehicleVelCmd_DiffDriven::filter_max_vw ( double &  v,
double &  w,
const TVelCmdParams p 
)
private

Definition at line 133 of file CVehicleVelCmd_DiffDriven.cpp.

Referenced by cmdVel_limits().

◆ getClassName()

static constexpr auto mrpt::kinematics::CVehicleVelCmd_DiffDriven::getClassName ( )
inlinestatic

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::kinematics::CVehicleVelCmd_DiffDriven::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::kinematics::CVehicleVelCmd.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::kinematics::CVehicleVelCmd_DiffDriven::GetRuntimeClassIdStatic ( )
static

◆ getVelCmdDescription()

std::string CVehicleVelCmd_DiffDriven::getVelCmdDescription ( const int  index) const
overridevirtual

Get textual, human-readable description of each velocity command component.

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 21 of file CVehicleVelCmd_DiffDriven.cpp.

References THROW_EXCEPTION_FMT.

◆ getVelCmdElement()

double CVehicleVelCmd_DiffDriven::getVelCmdElement ( const int  index) const
overridevirtual

Get each velocity command component.

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 37 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, lin_vel, and THROW_EXCEPTION_FMT.

◆ getVelCmdLength()

size_t CVehicleVelCmd_DiffDriven::getVelCmdLength ( ) const
overridevirtual

Get number of components in each velocity command.

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 20 of file CVehicleVelCmd_DiffDriven.cpp.

◆ isStopCmd()

bool CVehicleVelCmd_DiffDriven::isStopCmd ( ) const
overridevirtual

Returns true if the command means "do not move" / "stop".

See also
setToStop

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 68 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, and lin_vel.

◆ operator delete() [1/3]

void mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator delete ( void ptr)
inlinenoexcept

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator delete() [2/3]

void mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator delete ( void ptr,
const std::nothrow_t &   
)
inlinenoexcept

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator delete() [3/3]

void mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator delete ( void memory,
void ptr 
)
inlinenoexcept

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator delete[]()

void mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator delete[] ( void ptr)
inlinenoexcept

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator new() [1/3]

static void* mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator new ( size_t  size,
void ptr 
)
inlinestatic

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator new() [2/3]

void* mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator new ( size_t  size)
inline

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator new() [3/3]

void* mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator new ( size_t  size,
const std::nothrow_t &   
)
inlinenoexcept

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ operator new[]()

void* mrpt::kinematics::CVehicleVelCmd_DiffDriven::operator new[] ( size_t  size)
inline

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ serializeFrom()

void CVehicleVelCmd_DiffDriven::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 74 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, lin_vel, and MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.

◆ serializeGetVersion()

uint8_t CVehicleVelCmd_DiffDriven::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 87 of file CVehicleVelCmd_DiffDriven.cpp.

◆ serializeTo()

void CVehicleVelCmd_DiffDriven::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 88 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, and lin_vel.

◆ setToStop()

void CVehicleVelCmd_DiffDriven::setToStop ( )
overridevirtual

Set to a command that means "do not move" / "stop".

See also
isStopCmd

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 73 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, and lin_vel.

Referenced by mrpt::nav::CRobot2NavInterfaceForSimulator_DiffDriven::stop().

◆ setVelCmdElement()

void CVehicleVelCmd_DiffDriven::setVelCmdElement ( const int  index,
const double  val 
)
overridevirtual

Set each velocity command component.

Implements mrpt::kinematics::CVehicleVelCmd.

Definition at line 52 of file CVehicleVelCmd_DiffDriven.cpp.

References ang_vel, lin_vel, THROW_EXCEPTION_FMT, and val.

◆ 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 68 of file CSerializable.h.

Member Data Documentation

◆ _init_CVehicleVelCmd_DiffDriven

mrpt::rtti::CLASSINIT mrpt::kinematics::CVehicleVelCmd_DiffDriven::_init_CVehicleVelCmd_DiffDriven
staticprotected

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ ang_vel

◆ className

constexpr const char* mrpt::kinematics::CVehicleVelCmd_DiffDriven::className = "CVehicleVelCmd_DiffDriven"
static

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.

◆ lin_vel

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::kinematics::CVehicleVelCmd_DiffDriven::runtimeClassId
staticprotected

Definition at line 21 of file CVehicleVelCmd_DiffDriven.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020