72 const std::vector<float> &obstacles,
74 double &desiredDirection,
95 SITUATION_TARGET_DIRECTLY = 1,
98 SITUATION_NO_WAY_FOUND
105 options.loadFromConfigFile(INI_FILE, std::string(
"ND_CONFIG"));
132 const std::vector<float> & obstacles,
140 const std::vector<float> & in_obstacles,
141 const double in_maxObsRange,
144 unsigned int & out_selDirection,
145 double & out_selEvaluation,
147 double & out_riskEvaluation,
155 const std::vector<float> & obstacles);
160 const std::vector<float> & in_obstacles,
161 const float in_maxObsRange,
163 const unsigned int TargetSector,
164 const float TargetDist,
165 std::vector<double> & out_gaps_evaluation );
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before 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".
TOptions options
Parameters of the algorithm (can be set manually or loaded from CHolonomicND::initialize or options....
void initialize(const mrpt::utils::CConfigFileBase &INI_FILE)
Initialize the parameters of the navigator.
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:
std::vector< TGap > TGapArray
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.
unsigned int m_last_selected_sector
void gapsEstimator(const std::vector< float > &obstacles, const mrpt::math::TPoint2D &in_target, TGapArray &gaps)
Find gaps in the obtacles.
CHolonomicND(const mrpt::utils::CConfigFileBase *INI_FILE=NULL)
Initialize the parameters of the navigator, from some configuration file, or default values if set to...
unsigned int direction2sector(const double a, const unsigned int N)
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.
TSituations
The set of posible situations for each trajectory.
@ SITUATION_TARGET_DIRECTLY
void calcRepresentativeSectorForGap(TGap &gap, const mrpt::math::TPoint2D &target, const std::vector< float > &obstacles)
Fills in the representative sector field in the gap structure:
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.
std::vector< int32_t > vector_int
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
struct NAV_IMPEXP CLogFileRecord_NDPtr
struct NAV_IMPEXP CHolonomicLogFileRecordPtr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The structure used to store a detected gap in obstacles.
unsigned int representative_sector
double MAX_SECTOR_DIST_FOR_D2_PERCENT
std::vector< double > factorWeights
Vector of 4 weights: [0]=Free space, [1]=Dist. in sectors, [2]=Closer to target (Euclidean),...
void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string §ion) const MRPT_OVERRIDE
This method saves the options to a ".ini"-like file or memory-stored string list.
double TARGET_SLOW_APPROACHING_DISTANCE
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
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.