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