Main MRPT website > C++ reference for MRPT 1.4.0
CAbstractHolonomicReactiveMethod.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 CAbstractHolonomicReactiveMethod_H
10#define CAbstractHolonomicReactiveMethod_H
11
15
17
18namespace mrpt
19{
20 namespace nav
21 {
22 /** \addtogroup nav_holo Holonomic navigation methods
23 * \ingroup mrpt_nav_grp
24 * @{ */
25
26 /** The implemented reactive navigation methods. This enum works with mrpt::utils::TEnumType */
28 {
31 };
32
33 /** A base class for holonomic reactive navigation methods.
34 * \sa CHolonomicVFF,CHolonomicND, CReactiveNavigationSystem
35 */
37 {
38 public:
39 /** This method performs the holonomic navigation itself.
40 * \param target [IN] The relative location (x,y) of target point.
41 * \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, but normalized in the range [0,1]
42 * \param maxRobotSpeed [IN] Maximum robot speed, in "pseudometers/sec". See note below.
43 * \param desiredDirection [OUT] The desired motion direction, in the range [-PI,PI]
44 * \param desiredSpeed [OUT] The desired motion speed in that direction, in "pseudometers"/sec. (See note below)
45 * \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.
46 *
47 * NOTE: With "pseudometers" we refer to the distance unit in TP-Space, thus:
48 * <br><center><code>pseudometer<sup>2</sup>= meter<sup>2</sup> + (rad * r)<sup>2</sup></code><br></center>
49 */
50 virtual void navigate(const mrpt::math::TPoint2D &target,
51 const std::vector<float> &obstacles,
52 double maxRobotSpeed,
53 double &desiredDirection,
54 double &desiredSpeed,
55 CHolonomicLogFileRecordPtr &logRecord) = 0;
56
57 /** Virtual destructor
58 */
60
61 /** Initialize the parameters of the navigator.
62 */
63 virtual void initialize( const mrpt::utils::CConfigFileBase &INI_FILE ) = 0;
64
65 };
66 /** @} */
67 }
68 // Specializations MUST occur at the same namespace:
69 namespace utils
70 {
71 template <>
73 {
75 static void fill(bimap<enum_t,std::string> &m_map)
76 {
77 m_map.insert(nav::hmVIRTUAL_FORCE_FIELDS, "hmVIRTUAL_FORCE_FIELDS");
78 m_map.insert(nav::hmSEARCH_FOR_BEST_GAP, "hmSEARCH_FOR_BEST_GAP");
79 }
80 };
81 } // End of namespace
82}
83
84
85#endif
86
A base class for holonomic reactive navigation methods.
virtual void navigate(const mrpt::math::TPoint2D &target, const std::vector< float > &obstacles, double maxRobotSpeed, double &desiredDirection, double &desiredSpeed, CHolonomicLogFileRecordPtr &logRecord)=0
This method performs the holonomic navigation itself.
virtual void initialize(const mrpt::utils::CConfigFileBase &INI_FILE)=0
Initialize the parameters of the navigator.
This class allows loading and storing values and vectors of different types from a configuration text...
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
Definition: bimap.h:29
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
Definition: bimap.h:69
THolonomicMethod
The implemented reactive navigation methods.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Lightweight 2D point.
static void fill(bimap< enum_t, std::string > &m_map)
Only specializations of this class are defined for each enum type of interest.
Definition: TEnumType.h:24



Page generated by Doxygen 1.9.4 for MRPT 1.4.0 SVN: at Thu Aug 4 01:35:14 UTC 2022