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
17namespace 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 */
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
#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.
A holonomic reactive navigation method, based on Virtual Force Fields (VFF).
Definition: CHolonomicVFF.h:52
TOptions options
Parameters of the algorithm (can be set manually or loaded from CHolonomicVFF::initialize or options....
Definition: CHolonomicVFF.h:95
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.
CHolonomicVFF(const mrpt::utils::CConfigFileBase *INI_FILE=NULL)
Initialize the parameters of the navigator, from some configuration file, or default values if set to...
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
A class for storing extra information about the execution of CHolonomicVFF navigation.
Definition: CHolonomicVFF.h:31
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...
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Definition: memory.h:112
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
struct NAV_IMPEXP CHolonomicLogFileRecordPtr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Lightweight 2D point.
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.
double TARGET_SLOW_APPROACHING_DISTANCE
For stopping gradually (Default: 0.10)
Definition: CHolonomicVFF.h:87
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.
double TARGET_ATTRACTIVE_FORCE
Dimension-less (may have to be tuned depending on the density of obstacle sampling) (Default: 20)
Definition: CHolonomicVFF.h:88



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Tue Jan 17 22:40:29 UTC 2023