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
Definition at line 51 of file CHolonomicND.h.
#include <mrpt/nav/holonomic/CHolonomicND.h>
Classes | |
struct | TGap |
The structure used to store a detected gap in obstacles. More... | |
struct | TOptions |
Algorithm options. More... | |
Public Types | |
enum | TSituations { SITUATION_TARGET_DIRECTLY = 1 , SITUATION_SMALL_GAP , SITUATION_WIDE_GAP , SITUATION_NO_WAY_FOUND } |
The set of posible situations for each trajectory. More... | |
typedef std::vector< TGap > | TGapArray |
Public Member Functions | |
CHolonomicND (const mrpt::utils::CConfigFileBase *INI_FILE=NULL) | |
Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL. More... | |
void | navigate (const mrpt::math::TPoint2D &target, const std::vector< float > &obstacles, double maxRobotSpeed, double &desiredDirection, double &desiredSpeed, CHolonomicLogFileRecordPtr &logRecord) |
This method performs the holonomic navigation itself. More... | |
void | initialize (const mrpt::utils::CConfigFileBase &INI_FILE) |
Initialize the parameters of the navigator. More... | |
Public Attributes | |
TOptions | options |
Parameters of the algorithm (can be set manually or loaded from CHolonomicND::initialize or options.loadFromConfigFile(), etc.) More... | |
Private Member Functions | |
unsigned int | direction2sector (const double a, const unsigned int N) |
void | gapsEstimator (const std::vector< float > &obstacles, const mrpt::math::TPoint2D &in_target, TGapArray &gaps) |
Find gaps in the obtacles. More... | |
void | searchBestGap (const std::vector< float > &in_obstacles, const double in_maxObsRange, const TGapArray &in_gaps, const mrpt::math::TPoint2D &in_target, unsigned int &out_selDirection, double &out_selEvaluation, TSituations &out_situation, double &out_riskEvaluation, CLogFileRecord_NDPtr log) |
Search the best gap. More... | |
void | calcRepresentativeSectorForGap (TGap &gap, const mrpt::math::TPoint2D &target, const std::vector< float > &obstacles) |
Fills in the representative sector field in the gap structure: More... | |
void | evaluateGaps (const std::vector< float > &in_obstacles, const float in_maxObsRange, const TGapArray &in_gaps, const unsigned int TargetSector, const float TargetDist, std::vector< double > &out_gaps_evaluation) |
Evaluate each gap: More... | |
Private Attributes | |
unsigned int | m_last_selected_sector |
typedef std::vector<TGap> mrpt::nav::CHolonomicND::TGapArray |
Definition at line 89 of file CHolonomicND.h.
The set of posible situations for each trajectory.
(mrpt::utils::TEnumType works with this enum)
Enumerator | |
---|---|
SITUATION_TARGET_DIRECTLY | |
SITUATION_SMALL_GAP | |
SITUATION_WIDE_GAP | |
SITUATION_NO_WAY_FOUND |
Definition at line 93 of file CHolonomicND.h.
mrpt::nav::CHolonomicND::CHolonomicND | ( | const mrpt::utils::CConfigFileBase * | INI_FILE = NULL | ) |
Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL.
|
private |
Fills in the representative sector field in the gap structure:
|
private |
|
private |
Evaluate each gap:
|
private |
Find gaps in the obtacles.
|
inlinevirtual |
Initialize the parameters of the navigator.
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 103 of file CHolonomicND.h.
|
virtual |
This method performs the holonomic navigation itself.
target | [IN] The relative location (x,y) of target point. |
obstacles | [IN] Distance to obstacles from robot location (0,0). First index refers to -PI direction, and last one to +PI direction. Distances can be dealed as "meters", although they are "pseudometers", see note below. |
maxRobotSpeed | [IN] Maximum robot speed, in "pseudometers/sec". See note below. |
desiredDirection | [OUT] The desired motion direction, in the range [-PI,PI] |
desiredSpeed | [OUT] The desired motion speed in that direction, in "pseudometers"/sec. (See note below) |
logRecord | [IN/OUT] A placeholder for a pointer to a log record with extra info about the execution. Set to NULL if not required. User must free memory using "delete logRecord" after using it. |
NOTE: With "pseudometers" we refer to the distance unit in TP-Space, thus:
pseudometer2= meter2 + (rad * r)2
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
|
private |
Search the best gap.
|
private |
Definition at line 125 of file CHolonomicND.h.
TOptions mrpt::nav::CHolonomicND::options |
Parameters of the algorithm (can be set manually or loaded from CHolonomicND::initialize or options.loadFromConfigFile(), etc.)
Definition at line 122 of file CHolonomicND.h.
Page generated by Doxygen 1.9.2 for MRPT 1.4.0 SVN: at Mon Sep 20 00:21:40 UTC 2021 |