MRPT  1.9.9
mrpt::nav::CHolonomicVFF Class Reference

Detailed Description

A holonomic reactive navigation method, based on Virtual Force Fields (VFF).

These are the optional parameters of the method which can be set by means of a configuration file passed to the constructor or to CHolonomicND::initialize (see also the field CHolonomicVFF::options).

# Section name can be changed via setConfigFileSectionName()
[VFF_CONFIG]
TARGET_SLOW_APPROACHING_DISTANCE = 0.10 // For stopping gradually
TARGET_ATTRACTIVE_FORCE = 20 // Dimension-less (may have to be
tuned depending on the density of obstacle sampling)
See also
CAbstractHolonomicReactiveMethod,CReactiveNavigationSystem

Definition at line 48 of file CHolonomicVFF.h.

#include <mrpt/nav/holonomic/CHolonomicVFF.h>

Inheritance diagram for mrpt::nav::CHolonomicVFF:
Inheritance graph

Classes

struct  TOptions
 Algorithm options. More...
 

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
 
 CHolonomicVFF (const mrpt::config::CConfigFileBase *INI_FILE=nullptr)
 Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL. More...
 
void navigate (const NavInput &ni, NavOutput &no) override
 Invokes the holonomic navigation algorithm itself. More...
 
void initialize (const mrpt::config::CConfigFileBase &INI_FILE) override
 Initialize the parameters of the navigator, reading from the default section name (see derived classes) or the one set via setConfigFileSectionName() More...
 
virtual void saveConfigFile (mrpt::config::CConfigFileBase &c) const override
 saves all available parameters, in a forma loadable by initialize() More...
 
double getTargetApproachSlowDownDistance () const override
 Returns the actual value of this parameter [m], as set via the children class options structure. More...
 
void setTargetApproachSlowDownDistance (const double dist) override
 Sets the actual value of this parameter [m]. More...
 
void setConfigFileSectionName (const std::string &sectName)
 Defines the name of the section used in initialize() More...
 
std::string getConfigFileSectionName () const
 Gets the name of the section used in initialize() More...
 
void setAssociatedPTG (mrpt::nav::CParameterizedTrajectoryGenerator *ptg)
 Optionally, sets the associated PTG, just in case a derived class requires this info (not required for methods where the robot kinematics are totally abstracted) More...
 
mrpt::nav::CParameterizedTrajectoryGeneratorgetAssociatedPTG () const
 Returns the pointer set by setAssociatedPTG() More...
 
void enableApproachTargetSlowDown (bool enable)
 
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)
 
static CAbstractHolonomicReactiveMethod::Ptr Factory (const std::string &className) noexcept
 
static CAbstractHolonomicReactiveMethodCreate (const std::string &className) noexcept
 Class factory from class name, e.g. More...
 

Public Attributes

TOptions options
 Parameters of the algorithm (can be set manually or loaded from CHolonomicVFF::initialize or options.loadFromConfigFile(), etc.) 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...
 

Protected Attributes

mrpt::nav::CParameterizedTrajectoryGeneratorm_associatedPTG
 If applicable, this will contain the argument of the most recent call to setAssociatedPTG() More...
 
bool m_enableApproachTargetSlowDown
 Whether to decrease speed when approaching target. More...
 

RTTI stuff

using Ptr = std::shared_ptr< CHolonomicVFF >
 
using ConstPtr = std::shared_ptr< const CHolonomicVFF >
 
using UniquePtr = std::unique_ptr< CHolonomicVFF >
 
using ConstUniquePtr = std::unique_ptr< const CHolonomicVFF >
 
static mrpt::rtti::CLASSINIT _init_CHolonomicVFF
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static constexpr const char * className = "CHolonomicVFF"
 
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

Definition at line 50 of file CHolonomicVFF.h.

◆ Ptr

A type for the associated smart pointer

Definition at line 50 of file CHolonomicVFF.h.

◆ UniquePtr

Definition at line 50 of file CHolonomicVFF.h.

Constructor & Destructor Documentation

◆ CHolonomicVFF()

mrpt::nav::CHolonomicVFF::CHolonomicVFF ( const mrpt::config::CConfigFileBase INI_FILE = nullptr)

Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::nav::CHolonomicVFF::_GetBaseClass ( )
staticprotected

◆ clone()

virtual mrpt::rtti::CObject* mrpt::nav::CHolonomicVFF::clone ( ) const
overridevirtual

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

Implements mrpt::rtti::CObject.

◆ Create() [1/2]

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

Definition at line 50 of file CHolonomicVFF.h.

◆ Create() [2/2]

static CAbstractHolonomicReactiveMethod* mrpt::nav::CAbstractHolonomicReactiveMethod::Create ( const std::string className)
staticnoexceptinherited

Class factory from class name, e.g.

"CHolonomicVFF", etc.

Exceptions
std::logic_errorOn invalid or missing parameters.

◆ CreateObject()

static mrpt::rtti::CObject* mrpt::nav::CHolonomicVFF::CreateObject ( )
static

◆ CreateUnique()

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

Definition at line 50 of file CHolonomicVFF.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().

◆ enableApproachTargetSlowDown()

void mrpt::nav::CAbstractHolonomicReactiveMethod::enableApproachTargetSlowDown ( bool  enable)
inlineinherited

◆ Factory()

◆ getAssociatedPTG()

mrpt::nav::CParameterizedTrajectoryGenerator * CAbstractHolonomicReactiveMethod::getAssociatedPTG ( ) const
inherited

◆ getClassName()

static constexpr auto mrpt::nav::CHolonomicVFF::getClassName ( )
inlinestatic

Definition at line 50 of file CHolonomicVFF.h.

◆ getConfigFileSectionName()

std::string CAbstractHolonomicReactiveMethod::getConfigFileSectionName ( ) const
inherited

Gets the name of the section used in initialize()

Definition at line 35 of file CAbstractHolonomicReactiveMethod.cpp.

References mrpt::nav::CAbstractHolonomicReactiveMethod::m_cfgSectionName.

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::nav::CHolonomicVFF::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::nav::CAbstractHolonomicReactiveMethod.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::nav::CHolonomicVFF::GetRuntimeClassIdStatic ( )
static

◆ getTargetApproachSlowDownDistance()

double mrpt::nav::CHolonomicVFF::getTargetApproachSlowDownDistance ( ) const
inlineoverridevirtual

Returns the actual value of this parameter [m], as set via the children class options structure.

See also
setTargetApproachSlowDownDistance()

Implements mrpt::nav::CAbstractHolonomicReactiveMethod.

Definition at line 86 of file CHolonomicVFF.h.

References options, and mrpt::nav::CHolonomicVFF::TOptions::TARGET_SLOW_APPROACHING_DISTANCE.

◆ initialize()

void CHolonomicVFF::initialize ( const mrpt::config::CConfigFileBase c)
overridevirtual

Initialize the parameters of the navigator, reading from the default section name (see derived classes) or the one set via setConfigFileSectionName()

Implements mrpt::nav::CAbstractHolonomicReactiveMethod.

Definition at line 33 of file CHolonomicVFF.cpp.

◆ navigate()

◆ operator delete() [1/3]

void mrpt::nav::CHolonomicVFF::operator delete ( void memory,
void ptr 
)
inlinenoexcept

Definition at line 50 of file CHolonomicVFF.h.

◆ operator delete() [2/3]

void mrpt::nav::CHolonomicVFF::operator delete ( void ptr)
inlinenoexcept

Definition at line 50 of file CHolonomicVFF.h.

◆ operator delete() [3/3]

void mrpt::nav::CHolonomicVFF::operator delete ( void ptr,
const std::nothrow_t &   
)
inlinenoexcept

Definition at line 50 of file CHolonomicVFF.h.

◆ operator delete[]()

void mrpt::nav::CHolonomicVFF::operator delete[] ( void ptr)
inlinenoexcept

Definition at line 50 of file CHolonomicVFF.h.

◆ operator new() [1/3]

void* mrpt::nav::CHolonomicVFF::operator new ( size_t  size)
inline

Definition at line 50 of file CHolonomicVFF.h.

◆ operator new() [2/3]

static void* mrpt::nav::CHolonomicVFF::operator new ( size_t  size,
void ptr 
)
inlinestatic

Definition at line 50 of file CHolonomicVFF.h.

◆ operator new() [3/3]

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

Definition at line 50 of file CHolonomicVFF.h.

◆ operator new[]()

void* mrpt::nav::CHolonomicVFF::operator new[] ( size_t  size)
inline

Definition at line 50 of file CHolonomicVFF.h.

◆ saveConfigFile()

void CHolonomicVFF::saveConfigFile ( mrpt::config::CConfigFileBase c) const
overridevirtual

saves all available parameters, in a forma loadable by initialize()

Implements mrpt::nav::CAbstractHolonomicReactiveMethod.

Definition at line 37 of file CHolonomicVFF.cpp.

◆ serializeFrom()

void CHolonomicVFF::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 112 of file CHolonomicVFF.cpp.

References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.

◆ serializeGetVersion()

uint8_t CHolonomicVFF::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 106 of file CHolonomicVFF.cpp.

◆ serializeTo()

void CHolonomicVFF::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 107 of file CHolonomicVFF.cpp.

◆ setAssociatedPTG()

void CAbstractHolonomicReactiveMethod::setAssociatedPTG ( mrpt::nav::CParameterizedTrajectoryGenerator ptg)
inherited

Optionally, sets the associated PTG, just in case a derived class requires this info (not required for methods where the robot kinematics are totally abstracted)

Definition at line 40 of file CAbstractHolonomicReactiveMethod.cpp.

References mrpt::nav::CAbstractHolonomicReactiveMethod::m_associatedPTG.

◆ setConfigFileSectionName()

void CAbstractHolonomicReactiveMethod::setConfigFileSectionName ( const std::string sectName)
inherited

Defines the name of the section used in initialize()

Defines the name of the section (Default: "FULL_EVAL_CONFIG")

Definition at line 30 of file CAbstractHolonomicReactiveMethod.cpp.

References mrpt::nav::CAbstractHolonomicReactiveMethod::m_cfgSectionName.

◆ setTargetApproachSlowDownDistance()

void mrpt::nav::CHolonomicVFF::setTargetApproachSlowDownDistance ( const double  dist)
inlineoverridevirtual

Sets the actual value of this parameter [m].

See also
getTargetApproachSlowDownDistance()

Implements mrpt::nav::CAbstractHolonomicReactiveMethod.

Definition at line 90 of file CHolonomicVFF.h.

References options, and mrpt::nav::CHolonomicVFF::TOptions::TARGET_SLOW_APPROACHING_DISTANCE.

◆ 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_CHolonomicVFF

mrpt::rtti::CLASSINIT mrpt::nav::CHolonomicVFF::_init_CHolonomicVFF
staticprotected

Definition at line 50 of file CHolonomicVFF.h.

◆ className

constexpr const char* mrpt::nav::CHolonomicVFF::className = "CHolonomicVFF"
static

Definition at line 50 of file CHolonomicVFF.h.

◆ m_associatedPTG

mrpt::nav::CParameterizedTrajectoryGenerator* mrpt::nav::CAbstractHolonomicReactiveMethod::m_associatedPTG
protectedinherited

If applicable, this will contain the argument of the most recent call to setAssociatedPTG()

Definition at line 128 of file CAbstractHolonomicReactiveMethod.h.

Referenced by mrpt::nav::CAbstractHolonomicReactiveMethod::getAssociatedPTG(), and mrpt::nav::CAbstractHolonomicReactiveMethod::setAssociatedPTG().

◆ m_enableApproachTargetSlowDown

bool mrpt::nav::CAbstractHolonomicReactiveMethod::m_enableApproachTargetSlowDown
protectedinherited

Whether to decrease speed when approaching target.

Definition at line 130 of file CAbstractHolonomicReactiveMethod.h.

Referenced by mrpt::nav::CAbstractHolonomicReactiveMethod::enableApproachTargetSlowDown(), and mrpt::nav::CHolonomicFullEval::navigate().

◆ options

TOptions mrpt::nav::CHolonomicVFF::options

Parameters of the algorithm (can be set manually or loaded from CHolonomicVFF::initialize or options.loadFromConfigFile(), etc.)

Definition at line 84 of file CHolonomicVFF.h.

Referenced by getTargetApproachSlowDownDistance(), and setTargetApproachSlowDownDistance().

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::nav::CHolonomicVFF::runtimeClassId
staticprotected

Definition at line 50 of file CHolonomicVFF.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