Main MRPT website > C++ reference for MRPT 1.5.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 #include <mrpt/nav/link_pragmas.h>
18 
19 namespace mrpt
20 {
21  namespace nav
22  {
23  /** \addtogroup nav_planners Path planning
24  * \ingroup mrpt_nav_grp
25  * @{ */
26 
27  /** TP Space-based RRT path planning for SE(2) (planar) robots.
28  *
29  * This planner algorithm is described in the paper:
30  * - M. Bellone, J.L. Blanco, A. Gimenez, "TP-Space RRT: Kinematic path planning of non-holonomic any-shape vehicles", International Journal of 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 POSE, class MOTIONS>...
66  */
68  {
69  public:
70  typedef mrpt::math::TPose2D node_pose_t; //!< The type of poses at nodes
71 
72  struct NAV_IMPEXP TPlannerInput : public TPlannerInputTempl<node_pose_t, node_pose_t>
73  {
75  {
76  start_pose = mrpt::math::TPose2D(0, 0, 0);
77  goal_pose = mrpt::math::TPose2D(0, 0, 0);
78  world_bbox_min = mrpt::math::TPose2D(-10., -10.0, -M_PI);
79  world_bbox_max = mrpt::math::TPose2D( 10., 10.0, M_PI);
80  }
81  };
82 
83  struct NAV_IMPEXP TPlannerResult : public TPlannerResultTempl<TMoveTreeSE2_TP>
84  {
85  };
86 
87  /** Constructor */
89 
90  /** Load all params from a config file source */
91  void loadConfig(const mrpt::utils::CConfigFileBase &cfgSource, const std::string &sSectionName = std::string("PTG_CONFIG"));
92 
93  /** Must be called after setting all params (see `loadConfig()`) and before calling `solve()` */
94  void initialize();
95 
96  /** The main API entry point: tries to find a planned path from 'goal' to 'target' */
97  void solve( const TPlannerInput &pi, TPlannerResult & result );
98 
99  protected:
101 
102  }; // end class PlannerRRT_SE2_TPS
103 
104  /** @} */
105  }
106 }
#define M_PI
Definition: bits.h:78
This class allows loading and storing values and vectors of different types from a configuration text...
Virtual base class for TP-Space-based path planners.
GLsizei const GLchar ** string
Definition: glext.h:3919
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.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020