Main MRPT website > C++ reference for MRPT 1.4.0
CHolonomicVFF.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CHolonomicVFF_H
10 #define CHolonomicVFF_H
11 
15 
16 
17 namespace mrpt
18 {
19  namespace nav
20  {
22  /** \addtogroup nav_holo Holonomic navigation methods
23  * \ingroup mrpt_nav_grp
24  * @{ */
25 
26  /** A class for storing extra information about the execution of
27  * CHolonomicVFF navigation.
28  * \sa CHolonomicVFF, CHolonomicLogFileRecord
29  */
31  {
33  public:
34 
35  };
37 
38 
39  /** A holonomic reactive navigation method, based on Virtual Force Fields (VFF).
40  *
41  * 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 (see also the field CHolonomicVFF::options).
42  *
43  * \code
44  * [VFF_CONFIG]
45  * TARGET_SLOW_APPROACHING_DISTANCE = 0.10 // For stopping gradually
46  * TARGET_ATTRACTIVE_FORCE = 20 // Dimension-less (may have to be tuned depending on the density of obstacle sampling)
47  * \endcode
48  *
49  * \sa CAbstractHolonomicReactiveMethod,CReactiveNavigationSystem
50  */
52  {
53  public:
55  public:
56  /** Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL.
57  */
59 
60  /** This method performs the holonomic navigation itself.
61  * \param target [IN] The relative location (x,y) of target point.
62  * \param 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.
63  * \param maxRobotSpeed [IN] Maximum robot speed, in "pseudometers/sec". See note below.
64  * \param desiredDirection [OUT] The desired motion direction, in the range [-PI,PI]
65  * \param desiredSpeed [OUT] The desired motion speed in that direction, in "pseudometers"/sec. (See note below)
66  * \param 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 <b>must free memory</b> using "delete logRecord" after using it.
67  *
68  * NOTE: With "pseudometers" we refer to the distance unit in TP-Space, thus:
69  * <br><center><code>pseudometer<sup>2</sup>= meter<sup>2</sup> + (rad * r)<sup>2</sup></code><br></center>
70  */
71  void navigate( const mrpt::math::TPoint2D &target,
72  const std::vector<float> &obstacles,
73  double maxRobotSpeed,
74  double &desiredDirection,
75  double &desiredSpeed,
76  CHolonomicLogFileRecordPtr &logRecord );
77 
78  /** Initialize the parameters of the navigator from section "VFF_CONFIG" of a config file. \sa options */
79  void initialize( const mrpt::utils::CConfigFileBase &INI_FILE )
80  {
81  options.loadFromConfigFile(INI_FILE, std::string("VFF_CONFIG"));
82  }
83 
84  /** Algorithm options */
86  {
87  double TARGET_SLOW_APPROACHING_DISTANCE; //!< For stopping gradually (Default: 0.10)
88  double TARGET_ATTRACTIVE_FORCE; //!< Dimension-less (may have to be tuned depending on the density of obstacle sampling) (Default: 20)
89 
91  void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source,const std::string &section) MRPT_OVERRIDE; // See base docs
92  void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg ,const std::string &section) const MRPT_OVERRIDE; // See base docs
93  };
94 
95  TOptions options; //!< Parameters of the algorithm (can be set manually or loaded from CHolonomicVFF::initialize or options.loadFromConfigFile(), etc.)
96 
97  };
98  /** @} */
99  }
100 }
101 
102 
103 #endif
104 
105 
106 
CAbstractHolonomicReactiveMethod.h
mrpt::nav::CHolonomicVFF::options
TOptions options
Parameters of the algorithm (can be set manually or loaded from CHolonomicVFF::initialize or options....
Definition: CHolonomicVFF.h:95
mrpt::nav::CHolonomicVFF::TOptions
Algorithm options.
Definition: CHolonomicVFF.h:86
CHolonomicLogFileRecord.h
mrpt::nav::CHolonomicVFF
A holonomic reactive navigation method, based on Virtual Force Fields (VFF).
Definition: CHolonomicVFF.h:52
mrpt::nav::CLogFileRecord_VFF
A class for storing extra information about the execution of CHolonomicVFF navigation.
Definition: CHolonomicVFF.h:31
mrpt::nav::CHolonomicVFF::TOptions::TOptions
TOptions()
CLoadableOptions.h
mrpt::nav::CHolonomicVFF::CHolonomicVFF
CHolonomicVFF(const mrpt::utils::CConfigFileBase *INI_FILE=NULL)
Initialize the parameters of the navigator, from some configuration file, or default values if set to...
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:17
mrpt::nav::CHolonomicVFF::TOptions::TARGET_ATTRACTIVE_FORCE
double TARGET_ATTRACTIVE_FORCE
Dimension-less (may have to be tuned depending on the density of obstacle sampling) (Default: 20)
Definition: CHolonomicVFF.h:88
mrpt::nav::CHolonomicVFF::TOptions::saveToConfigFile
void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string &section) const MRPT_OVERRIDE
This method saves the options to a ".ini"-like file or memory-stored string list.
mrpt::nav::CAbstractHolonomicReactiveMethod
A base class for holonomic reactive navigation methods.
Definition: CAbstractHolonomicReactiveMethod.h:37
MRPT_MAKE_ALIGNED_OPERATOR_NEW
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Definition: memory.h:112
mrpt::utils::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: CConfigFileBase.h:31
mrpt::utils::CLoadableOptions
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Definition: CLoadableOptions.h:32
DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Definition: CSerializable.h:174
mrpt::nav::CHolonomicVFF::TOptions::loadFromConfigFile
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
mrpt::math::TPoint2D
Lightweight 2D point.
Definition: lightweight_geom_data.h:33
mrpt::nav::CHolonomicVFF::TOptions::TARGET_SLOW_APPROACHING_DISTANCE
double TARGET_SLOW_APPROACHING_DISTANCE
For stopping gradually (Default: 0.10)
Definition: CHolonomicVFF.h:87
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
#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...
Definition: CSerializable.h:170
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:147
mrpt::nav::CHolonomicVFF::navigate
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.
mrpt::nav::CHolonomicLogFileRecord
A base class for log records for different holonomic navigation methods.
Definition: CHolonomicLogFileRecord.h:30
mrpt::nav::CHolonomicVFF::initialize
void initialize(const mrpt::utils::CConfigFileBase &INI_FILE)
Initialize the parameters of the navigator from section "VFF_CONFIG" of a config file.
Definition: CHolonomicVFF.h:79
MRPT_OVERRIDE
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28



Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020