10 #define CHolonomicND_H 19 class CLogFileRecord_ND;
134 const std::vector<double>& obstacles,
140 const std::vector<double>& in_obstacles,
const double in_maxObsRange,
142 unsigned int& out_selDirection,
double& out_selEvaluation,
143 TSituations& out_situation,
double& out_riskEvaluation,
150 const std::vector<double>& obstacles);
155 const std::vector<double>& in_obstacles,
const double in_maxObsRange,
156 const TGapArray& in_gaps,
const unsigned int TargetSector,
157 const float TargetDist, std::vector<double>& out_gaps_evaluation);
194 "SITUATION_TARGET_DIRECTLY");
201 "SITUATION_NO_WAY_FOUND");
void calcRepresentativeSectorForGap(TGap &gap, const mrpt::math::TPoint2D &target, const std::vector< double > &obstacles)
Fills in the representative sector field in the gap structure:
CHolonomicND(const mrpt::utils::CConfigFileBase *INI_FILE=nullptr)
Initialize the parameters of the navigator, from some configuration file, or default values if set to...
An implementation of the holonomic reactive navigation method "Nearness-Diagram". ...
unsigned int m_last_selected_sector
void searchBestGap(const std::vector< double > &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_ND &log)
Search the best gap.
double RISK_EVALUATION_DISTANCE
A base class for holonomic reactive navigation methods.
vector_int gaps_ini
Member data.
std::vector< TGap > TGapArray
CHolonomicND::TSituations situation
Only specializations of this class are defined for each enum type of interest.
double WIDE_GAP_SIZE_PERCENT
void gapsEstimator(const std::vector< double > &obstacles, const mrpt::math::TPoint2D &in_target, TGapArray &gaps)
Find gaps in the obtacles.
void navigate(const NavInput &ni, NavOutput &no) override
Invokes the holonomic navigation algorithm itself.
void initialize(const mrpt::utils::CConfigFileBase &INI_FILE) override
Initialize the parameters of the navigator.
This class allows loading and storing values and vectors of different types from a configuration text...
TOptions options
Parameters of the algorithm (can be set manually or loaded from CHolonomicND::initialize or options...
unsigned int representative_sector
A base class for log records for different holonomic navigation methods.
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
std::vector< double > factorWeights
Vector of 4 weights: [0]=Free space, [1]=Dist.
static void fill(bimap< enum_t, std::string > &m_map)
GLsizei const GLchar ** string
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) override
This method load the options from a ".ini"-like file or memory-stored string list.
void setTargetApproachSlowDownDistance(const double dist) override
Sets the actual value of this parameter [m].
double RISK_EVALUATION_SECTORS_PERCENT
double MAX_SECTOR_DIST_FOR_D2_PERCENT
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
nav::CHolonomicND::TSituations enum_t
virtual void saveConfigFile(mrpt::utils::CConfigFileBase &c) const override
saves all available parameters, in a forma loadable by initialize()
The structure used to store a detected gap in obstacles.
double TARGET_SLOW_APPROACHING_DISTANCE
void evaluateGaps(const std::vector< double > &in_obstacles, const double in_maxObsRange, const TGapArray &in_gaps, const unsigned int TargetSector, const float TargetDist, std::vector< double > &out_gaps_evaluation)
Evaluate each gap:
A class for storing extra information about the execution of CHolonomicND navigation.
GLsizei GLsizei GLchar * source
std::vector< int32_t > vector_int
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
std::vector< double > gaps_eval
GLubyte GLubyte GLubyte a
Output for CAbstractHolonomicReactiveMethod::navigate()
double TOO_CLOSE_OBSTACLE
TSituations
The set of posible situations for each trajectory.
unsigned int direction2sector(const double a, const unsigned int N)
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string §ion) const override
This method saves the options to a ".ini"-like file or memory-stored string list. ...
double getTargetApproachSlowDownDistance() const override
Returns the actual value of this parameter [m], as set via the children class options structure...