class mrpt::nav::CAbstractHolonomicReactiveMethod

A base class for holonomic reactive navigation methods.

See also:

CHolonomicVFF, CHolonomicND, CHolonomicFullEval, CReactiveNavigationSystem

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

class CAbstractHolonomicReactiveMethod: public mrpt::serialization::CSerializable
{
public:
    // structs

    struct NavInput;
    struct NavOutput;

    // construction

    CAbstractHolonomicReactiveMethod(const std::string& defaultCfgSectionName);

    //
methods

    mrpt::rtti::CObject::Ptr duplicateGetSmartPtr() const;
    static CAbstractHolonomicReactiveMethod* Create(const std::string& className);
    virtual void navigate(const NavInput& ni, NavOutput& no) = 0;
    virtual void initialize(const mrpt::config::CConfigFileBase& c) = 0;
    virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const = 0;
    void setConfigFileSectionName(const std::string& sectName);
    std::string getConfigFileSectionName() const;
    virtual double getTargetApproachSlowDownDistance() const = 0;
    virtual void setTargetApproachSlowDownDistance(const double dist) = 0;
    void setAssociatedPTG(mrpt::nav::CParameterizedTrajectoryGenerator* ptg);
    mrpt::nav::CParameterizedTrajectoryGenerator* getAssociatedPTG() const;
    virtual mxArray* writeToMatlab() const;
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual CObject* clone() const = 0;
};

// direct descendants

class CHolonomicFullEval;
class CHolonomicND;
class CHolonomicVFF;

Construction

CAbstractHolonomicReactiveMethod(const std::string& defaultCfgSectionName)

ctor

Methods

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

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

static CAbstractHolonomicReactiveMethod* Create(const std::string& className)

Class factory from class name, e.g.

"CHolonomicVFF", etc.

Parameters:

std::logic_error

On invalid or missing parameters.

virtual void navigate(const NavInput& ni, NavOutput& no) = 0

Invokes the holonomic navigation algorithm itself.

See the description of the input/output structures for details on each parameter.

virtual void initialize(const mrpt::config::CConfigFileBase& c) = 0

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

virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const = 0

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

void setConfigFileSectionName(const std::string& sectName)

Defines the name of the section used in initialize()

Defines the name of the section (Default: “FULL_EVAL_CONFIG”)

std::string getConfigFileSectionName() const

Gets the name of the section used in initialize()

virtual double getTargetApproachSlowDownDistance() const = 0

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

See also:

setTargetApproachSlowDownDistance()

virtual void setTargetApproachSlowDownDistance(const double dist) = 0

Sets the actual value of this parameter [m].

See also:

getTargetApproachSlowDownDistance()

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)

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

Returns the pointer set by setAssociatedPTG()

virtual mxArray* writeToMatlab() 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.

Returns:

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

virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const

Returns information about the class of an object in runtime.

virtual CObject* clone() const = 0

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