Main MRPT website > C++ reference
MRPT logo
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-2014, 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 
13 #include <mrpt/utils/TEnumType.h>
15 
17 
18 namespace mrpt
19 {
20  namespace reactivenav
21  {
22  using namespace mrpt::utils;
23  using namespace mrpt::poses;
24 
25  /** The implemented reactive navigation methods. This enum works with mrpt::utils::TEnumType
26  * \ingroup mrpt_reactivenav_grp
27  */
29  {
32  };
33 
34  /** A base class for holonomic reactive navigation methods.
35  * \sa CHolonomicVFF,CHolonomicND, CReactiveNavigationSystem
36  * \ingroup mrpt_reactivenav_grp
37  */
39  {
40  public:
41  /** This method performs the holonomic navigation itself.
42  * \param target [IN] The relative location (x,y) of target point.
43  * \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]
44  * \param maxRobotSpeed [IN] Maximum robot speed, in "pseudometers/sec". See note below.
45  * \param desiredDirection [OUT] The desired motion direction, in the range [-PI,PI]
46  * \param desiredSpeed [OUT] The desired motion speed in that direction, in "pseudometers"/sec. (See note below)
47  * \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.
48  *
49  * NOTE: With "pseudometers" we refer to the distance unit in TP-Space, thus:
50  * <br><center><code>pseudometer<sup>2</sup>= meter<sup>2</sup> + (rad ยท r)<sup>2</sup></code><br></center>
51  */
52  virtual void navigate(const mrpt::math::TPoint2D &target,
53  const std::vector<float> &obstacles,
54  double maxRobotSpeed,
55  double &desiredDirection,
56  double &desiredSpeed,
57  CHolonomicLogFileRecordPtr &logRecord) = 0;
58 
59  /** Virtual destructor
60  */
62 
63  /** Initialize the parameters of the navigator.
64  */
65  virtual void initialize( const mrpt::utils::CConfigFileBase &INI_FILE ) = 0;
66 
67  };
68  }
69  // Specializations MUST occur at the same namespace:
70  namespace utils
71  {
72  template <>
73  struct TEnumTypeFiller<reactivenav::THolonomicMethod>
74  {
76  static void fill(bimap<enum_t,std::string> &m_map)
77  {
78  m_map.insert(reactivenav::hmVIRTUAL_FORCE_FIELDS, "hmVIRTUAL_FORCE_FIELDS");
79  m_map.insert(reactivenav::hmSEARCH_FOR_BEST_GAP, "hmSEARCH_FOR_BEST_GAP");
80  }
81  };
82  } // End of namespace
83 }
84 
85 
86 #endif
87 
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
Only specializations of this class are defined for each enum type of interest.
Definition: TEnumType.h:23
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 and which actually contains two std...
Definition: bimap.h:27
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Definition: CPoint.h:17
A base class for holonomic reactive navigation methods.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
THolonomicMethod
The implemented reactive navigation methods.
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
Definition: bimap.h:68
Lightweight 2D point.



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014