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.
Definition at line 48 of file CHolonomicND.h.
#include <mrpt/reactivenav/CHolonomicND.h>
Classes | |
struct | TGap |
The structure used to store a detected gap in obstacles. 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. | |
void | navigate (poses::CPoint2D &target, vector_double &obstacles, double maxRobotSpeed, double &desiredDirection, double &desiredSpeed, CHolonomicLogFileRecordPtr &logRecord) |
This method performs the holonomic navigation itself. | |
void | initialize (const mrpt::utils::CConfigFileBase &INI_FILE) |
Initialize the parameters of the navigator. | |
Private Member Functions | |
int | direction2sector (double a, int N) |
void | gapsEstimator (vector_double &obstacles, poses::CPoint2D &in_target, TGapArray &gaps) |
Find gaps in the obtacles. | |
void | searchBestGap (vector_double &in_obstacles, double in_maxObsRange, TGapArray &in_gaps, poses::CPoint2D &in_target, int &out_selDirection, double &out_selEvaluation, TSituations &out_situation, double &out_riskEvaluation, CLogFileRecord_NDPtr log) |
Search the best gap. | |
void | calcRepresentativeSectorForGap (TGap &gap, const poses::CPoint2D &target, const vector_double &obstacles) |
Fills in the representative sector field in the gap structure: | |
void | evaluateGaps (const vector_double &in_obstacles, const double in_maxObsRange, const TGapArray &in_gaps, const int TargetSector, const double TargetDist, vector_double &out_gaps_evaluation) |
Evaluate each gap: | |
Private Attributes | |
int | last_selected_sector |
double | TOO_CLOSE_OBSTACLE |
Configuration: | |
double | WIDE_GAP_SIZE_PERCENT |
double | RISK_EVALUATION_SECTORS_PERCENT |
double | RISK_EVALUATION_DISTANCE |
double | MAX_SECTOR_DIST_FOR_D2_PERCENT |
double | TARGET_SLOW_APPROACHING_DISTANCE |
vector_double | factorWeights |
typedef std::vector<TGap> mrpt::reactivenav::CHolonomicND::TGapArray |
Definition at line 84 of file CHolonomicND.h.
The set of posible situations for each trajectory.
Definition at line 88 of file CHolonomicND.h.
mrpt::reactivenav::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.
void mrpt::reactivenav::CHolonomicND::calcRepresentativeSectorForGap | ( | TGap & | gap, |
const poses::CPoint2D & | target, | ||
const vector_double & | obstacles | ||
) | [private] |
Fills in the representative sector field in the gap structure:
int mrpt::reactivenav::CHolonomicND::direction2sector | ( | double | a, |
int | N | ||
) | [private] |
void mrpt::reactivenav::CHolonomicND::evaluateGaps | ( | const vector_double & | in_obstacles, |
const double | in_maxObsRange, | ||
const TGapArray & | in_gaps, | ||
const int | TargetSector, | ||
const double | TargetDist, | ||
vector_double & | out_gaps_evaluation | ||
) | [private] |
Evaluate each gap:
void mrpt::reactivenav::CHolonomicND::gapsEstimator | ( | vector_double & | obstacles, |
poses::CPoint2D & | in_target, | ||
TGapArray & | gaps | ||
) | [private] |
Find gaps in the obtacles.
void mrpt::reactivenav::CHolonomicND::initialize | ( | const mrpt::utils::CConfigFileBase & | INI_FILE | ) | [virtual] |
Initialize the parameters of the navigator.
Implements mrpt::reactivenav::CAbstractHolonomicReactiveMethod.
void mrpt::reactivenav::CHolonomicND::navigate | ( | poses::CPoint2D & | target, |
vector_double & | obstacles, | ||
double | maxRobotSpeed, | ||
double & | desiredDirection, | ||
double & | desiredSpeed, | ||
CHolonomicLogFileRecordPtr & | logRecord | ||
) | [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::reactivenav::CAbstractHolonomicReactiveMethod.
void mrpt::reactivenav::CHolonomicND::searchBestGap | ( | vector_double & | in_obstacles, |
double | in_maxObsRange, | ||
TGapArray & | in_gaps, | ||
poses::CPoint2D & | in_target, | ||
int & | out_selDirection, | ||
double & | out_selEvaluation, | ||
TSituations & | out_situation, | ||
double & | out_riskEvaluation, | ||
CLogFileRecord_NDPtr | log | ||
) | [private] |
Search the best gap.
Definition at line 113 of file CHolonomicND.h.
int mrpt::reactivenav::CHolonomicND::last_selected_sector [private] |
Definition at line 103 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::MAX_SECTOR_DIST_FOR_D2_PERCENT [private] |
Definition at line 110 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::RISK_EVALUATION_DISTANCE [private] |
Definition at line 110 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::RISK_EVALUATION_SECTORS_PERCENT [private] |
Definition at line 109 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::TARGET_SLOW_APPROACHING_DISTANCE [private] |
Definition at line 111 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::TOO_CLOSE_OBSTACLE [private] |
Configuration:
Definition at line 109 of file CHolonomicND.h.
double mrpt::reactivenav::CHolonomicND::WIDE_GAP_SIZE_PERCENT [private] |
Definition at line 109 of file CHolonomicND.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011 |