class mrpt::nav::CHolonomicND

Overview

An implementation of the holonomic reactive navigation method “Nearness-Diagram”.

The algorithm “Nearness-Diagram” was proposed in:

Nearness diagram (ND) navigation: collision avoidance in troublesome scenarios, IEEE Transactions on Robotics and Automation, Minguez, J. and Montano, L., vol. 20, no. 1, pp. 45-59, 2004.

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() or directly in CHolonomicND::options

# Section name can be changed via setConfigFileSectionName()
[ND_CONFIG]
factorWeights=1.0 0.5 2.0 0.4
// 1: Free space
// 2: Dist. in sectors
// 3: Closer to target (euclidean)
// 4: Hysteresis
WIDE_GAP_SIZE_PERCENT            = 0.25
MAX_SECTOR_DIST_FOR_D2_PERCENT   = 0.25
RISK_EVALUATION_SECTORS_PERCENT  = 0.25
RISK_EVALUATION_DISTANCE         = 0.15  // In normalized ps-meters [0,1]
TARGET_SLOW_APPROACHING_DISTANCE = 0.60  // For stopping gradually
TOO_CLOSE_OBSTACLE               = 0.02  // In normalized ps-meters

See also:

CAbstractHolonomicReactiveMethod, CReactiveNavigationSystem

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

class CHolonomicND: public mrpt::nav::CAbstractHolonomicReactiveMethod
{
public:
    // typedefs

    typedef std::vector<TGap> TGapArray;

    // enums

    enum TSituations;

    // structs

    struct TGap;
    struct TOptions;

    // fields

    TOptions options;

    // construction

    CHolonomicND(const mrpt::config::CConfigFileBase* INI_FILE = nullptr);

    // methods

    virtual void navigate(const NavInput& ni, NavOutput& no);
    virtual void initialize(const mrpt::config::CConfigFileBase& INI_FILE);
    virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const;
    virtual double getTargetApproachSlowDownDistance() const;
    virtual void setTargetApproachSlowDownDistance(const double dist);
};

Inherited Members

public:
    // structs

    struct NavInput;
    struct NavOutput;

    // 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;

Fields

TOptions options

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

Construction

CHolonomicND(const mrpt::config::CConfigFileBase* INI_FILE = nullptr)

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

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

Methods

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

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& INI_FILE)

Initialize the parameters of the navigator.

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

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

virtual double getTargetApproachSlowDownDistance() const

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)

Sets the actual value of this parameter [m].

See also:

getTargetApproachSlowDownDistance()