Main MRPT website > C++ reference
MRPT logo
nav/reactive/CReactiveNavigationSystem.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-2015, 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 CReactiveNavigationSystem_H
10 #define CReactiveNavigationSystem_H
11 
13 
14 namespace mrpt
15 {
16  /** This namespace contains classes for building a TP-Space Reactive Navigation System.
17  */
18  namespace nav
19  {
20  /** See base class CAbstractPTGBasedReactive for a description and instructions of use.
21  * This particular implementation assumes a 2D robot shape.
22  *
23  * Publications:
24  * - Blanco, Jose-Luis, Javier Gonzalez, and Juan-Antonio Fernandez-Madrigal. "[Extending obstacle avoidance methods through multiple parameter-space transformations](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.190.4672&rep=rep1&type=pdf)." Autonomous Robots 24.1 (2008): 29-48.
25  *
26  * Class history:
27  * - 17/JUN/2004: First design.
28  * - 16/SEP/2004: Totally redesigned, according to document "MultiParametric Based Space Transformation for Reactive Navigation"
29  * - 29/SEP/2005: Totally rewritten again, for integration into MRPT library and according to the ICRA paper.
30  * - 17/OCT/2007: Whole code updated to accomodate to MRPT 0.5 and make it portable to Linux.
31  * - DEC/2013: Code refactoring between this class and CAbstractHolonomicReactiveMethod
32  *
33  * \sa CAbstractReactiveNavigationSystem, CParameterizedTrajectoryGenerator, CAbstractHolonomicReactiveMethod
34  * \ingroup mrpt_nav_grp
35  */
37  {
38  public:
40  public:
41  /** See docs in ctor of base class */
43  CReactiveInterfaceImplementation &react_iterf_impl,
44  bool enableConsoleOutput = true,
45  bool enableLogFile = false);
46 
47  /** Destructor
48  */
49  virtual ~CReactiveNavigationSystem();
50 
51  /** Reload the configuration from a file
52  */
53  void loadConfigFile(const mrpt::utils::CConfigFileBase &ini, const mrpt::utils::CConfigFileBase &robotIni);
54 
55  /** Change the robot shape, which is taken into account for collision
56  * grid building.
57  */
58  void changeRobotShape( const math::CPolygon &shape );
59 
60  /** Returns the number of different PTGs that have been setup */
61  virtual size_t getPTG_count() const { return PTGs.size(); }
62 
63  /** Gets the i'th PTG */
65  {
66  ASSERT_(i<PTGs.size())
67  return PTGs[i];
68  }
69 
70 
71  private:
72  // ------------------------------------------------------
73  // PRIVATE VARIABLES
74  // ------------------------------------------------------
75  float minObstaclesHeight, maxObstaclesHeight; // The range of "z" coordinates for obstacles to be considered
76 
77  /** The robot 2D shape model */
79 
80  /** The set of transformations to be used:
81  */
82  std::vector<CParameterizedTrajectoryGenerator*> PTGs;
83 
84  // Steps for the reactive navigation sytem.
85  // ----------------------------------------------------------------------------
86  virtual void STEP1_CollisionGridsBuilder();
87 
88  // See docs in parent class
89  virtual bool STEP2_SenseObstacles();
90 
91  // See docs in parent class
92  virtual void STEP3_WSpaceToTPSpace(const size_t ptg_idx,std::vector<float> &out_TPObstacles);
93 
94  /** Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the current timestep */
95  virtual void loggingGetWSObstaclesAndShape(CLogFileRecord &out_log);
96 
97 
98  mrpt::maps::CSimplePointsMap m_WS_Obstacles; //!< The obstacle points, as seen from the local robot frame.
99 
100  }; // end class
101  }
102 }
103 
104 
105 #endif
106 
107 
108 
109 
110 
std::vector< CParameterizedTrajectoryGenerator * > PTGs
The set of transformations to be used:
mrpt::maps::CSimplePointsMap m_WS_Obstacles
The obstacle points, as seen from the local robot frame.
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Definition: memory.h:112
A wrapper of a TPolygon2D class, implementing CSerializable.
Definition: CPolygon.h:25
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
virtual size_t getPTG_count() const
Returns the number of different PTGs that have been setup.
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
This class allows loading and storing values and vectors of different types from a configuration text...
This is the base class for any user-defined PTG.
Base class for reactive navigator systems based on TP-Space, with an arbitrary holonomic reactive met...
virtual CParameterizedTrajectoryGenerator * getPTG(size_t i)
Gets the i'th PTG.
math::CPolygon m_robotShape
The robot 2D shape model.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERT_(f)
The pure virtual class that a user of CAbstractReactiveNavigationSystem-derived classes must implemen...
See base class CAbstractPTGBasedReactive for a description and instructions of use.



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.0 SVN: at Sun Sep 13 03:55:12 UTC 2015