Main MRPT website > C++ reference for MRPT 1.9.9
PlannerRRT_SE2_TPS.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-2017, 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 
10 #pragma once
11 
15 #include <numeric>
16 
17 namespace mrpt
18 {
19 namespace nav
20 {
21 /** \addtogroup nav_planners Path planning
22  * \ingroup mrpt_nav_grp
23  * @{ */
24 
25 /** TP Space-based RRT path planning for SE(2) (planar) robots.
26 *
27 * This planner algorithm is described in the paper:
28 * - M. Bellone, J.L. Blanco, A. Gimenez, "TP-Space RRT: Kinematic path
29 * planning of non-holonomic any-shape vehicles", International Journal of
30 * Advanced Robotic Systems, 2015.
31 *
32 * Typical usage:
33 * \code
34 * mrpt::nav::PlannerRRT_SE2_TPS planner;
35 *
36 * // Set or load planner parameters:
37 * //planner.loadConfig( mrpt::utils::CConfigFile("config_file.cfg") );
38 * //planner.params.... // See RRTAlgorithmParams
39 *
40 * // Set RRT end criteria (when to stop searching for a solution)
41 * //planner.end_criteria.... // See RRTEndCriteria
42 *
43 * planner.initialize(); // Initialize after setting the algorithm parameters
44 *
45 * // Set up planning problem:
46 * PlannerRRT_SE2_TPS::TPlannerResult planner_result;
47 * PlannerRRT_SE2_TPS::TPlannerInput planner_input;
48 * // Start & goal:
49 * planner_input.start_pose = mrpt::math::TPose2D(XXX,XXX,XXX);
50 * planner_input.goal_pose = mrpt::math::TPose2D(XXX,XXX,XXX);
51 * // Set obtacles: (...)
52 * // planner_input.obstacles_points ...
53 * // Set workspace bounding box for picking random poses in the RRT algorithm:
54 * planner_input.world_bbox_min = mrpt::math::TPoint2D(XX,YY);
55 * planner_input.world_bbox_max = mrpt::math::TPoint2D(XX,YY);
56 * // Do path planning:
57 * planner.solve( planner_input, planner_result);
58 * // Analyze contents of planner_result...
59 * \endcode
60 *
61 * - Changes history:
62 * - 06/MAR/2014: Creation (MB)
63 * - 06/JAN/2015: Refactoring (JLBC)
64 *
65 * \todo Factorize into more generic path planner classes! //template <class
66 * POSE, class MOTIONS>...
67 */
69 {
70  public:
71  /** The type of poses at nodes */
73 
74  struct TPlannerInput : public TPlannerInputTempl<node_pose_t, node_pose_t>
75  {
77  {
79  goal_pose = mrpt::math::TPose2D(0, 0, 0);
80  world_bbox_min = mrpt::math::TPose2D(-10., -10.0, -M_PI);
82  }
83  };
84 
85  struct TPlannerResult : public TPlannerResultTempl<TMoveTreeSE2_TP>
86  {
87  };
88 
89  /** Constructor */
91 
92  /** Load all params from a config file source */
93  void loadConfig(
94  const mrpt::utils::CConfigFileBase& cfgSource,
95  const std::string& sSectionName = std::string("PTG_CONFIG"));
96 
97  /** Must be called after setting all params (see `loadConfig()`) and before
98  * calling `solve()` */
99  void initialize();
100 
101  /** The main API entry point: tries to find a planned path from 'goal' to
102  * 'target' */
103  void solve(const TPlannerInput& pi, TPlannerResult& result);
104 
105  protected:
107 
108 }; // end class PlannerRRT_SE2_TPS
109 
110 /** @} */
111 }
112 }
node_pose_t world_bbox_min
Bounding box of the world, used to draw uniform random pose samples.
#define M_PI
Definition: bits.h:92
void initialize()
Must be called after setting all params (see loadConfig()) and before calling solve() ...
This class allows loading and storing values and vectors of different types from a configuration text...
void loadConfig(const mrpt::utils::CConfigFileBase &cfgSource, const std::string &sSectionName=std::string("PTG_CONFIG"))
Load all params from a config file source.
Virtual base class for TP-Space-based path planners.
GLsizei const GLchar ** string
Definition: glext.h:4101
void solve(const TPlannerInput &pi, TPlannerResult &result)
The main API entry point: tries to find a planned path from &#39;goal&#39; to &#39;target&#39;.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::math::TPose2D node_pose_t
The type of poses at nodes.
Lightweight 2D pose.
TP Space-based RRT path planning for SE(2) (planar) robots.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019