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-2018, 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::config::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::config::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 }
mrpt::nav::TPlannerInputTempl< node_pose_t, node_pose_t >::goal_pose
node_pose_t goal_pose
Definition: PlannerRRT_common.h:32
mrpt::nav::PlannerRRT_SE2_TPS::TPlannerInput::TPlannerInput
TPlannerInput()
Definition: PlannerRRT_SE2_TPS.h:76
mrpt::nav::TPlannerInputTempl< node_pose_t, node_pose_t >::world_bbox_min
node_pose_t world_bbox_min
Bounding box of the world, used to draw uniform random pose samples.
Definition: PlannerRRT_common.h:34
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::nav::PlannerRRT_SE2_TPS::initialize
void initialize()
Must be called after setting all params (see loadConfig()) and before calling solve()
Definition: PlannerRRT_SE2_TPS.cpp:36
mrpt::nav::PlannerRRT_SE2_TPS::TPlannerResult
Definition: PlannerRRT_SE2_TPS.h:85
M_PI
#define M_PI
Definition: core/include/mrpt/core/bits_math.h:38
PlannerRRT_common.h
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::nav::TPlannerInputTempl< node_pose_t, node_pose_t >::start_pose
node_pose_t start_pose
Definition: PlannerRRT_common.h:32
mrpt::nav::TPlannerResultTempl
Definition: PlannerRRT_common.h:40
mrpt::math::TPose2D
Lightweight 2D pose.
Definition: lightweight_geom_data.h:186
mrpt::nav::PlannerRRT_SE2_TPS
TP Space-based RRT path planning for SE(2) (planar) robots.
Definition: PlannerRRT_SE2_TPS.h:68
mrpt::nav::TPlannerInputTempl< node_pose_t, node_pose_t >::world_bbox_max
node_pose_t world_bbox_max
Definition: PlannerRRT_common.h:34
TMoveTree.h
mrpt::nav::TPlannerInputTempl
Definition: PlannerRRT_common.h:30
mrpt::nav::PlannerRRT_SE2_TPS::TPlannerInput
Definition: PlannerRRT_SE2_TPS.h:74
mrpt::nav::PlannerRRT_SE2_TPS::solve
void solve(const TPlannerInput &pi, TPlannerResult &result)
The main API entry point: tries to find a planned path from 'goal' to 'target'.
Definition: PlannerRRT_SE2_TPS.cpp:45
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::nav::PlannerRRT_SE2_TPS::loadConfig
void loadConfig(const mrpt::config::CConfigFileBase &cfgSource, const std::string &sSectionName=std::string("PTG_CONFIG"))
Load all params from a config file source.
Definition: PlannerRRT_SE2_TPS.cpp:28
mrpt::nav::PlannerRRT_SE2_TPS::PlannerRRT_SE2_TPS
PlannerRRT_SE2_TPS()
Constructor.
Definition: PlannerRRT_SE2_TPS.cpp:26
CSimplePointsMap.h
mrpt::nav::PlannerRRT_SE2_TPS::m_initialized
bool m_initialized
Definition: PlannerRRT_SE2_TPS.h:106
mrpt::nav::PlannerTPS_VirtualBase
Virtual base class for TP-Space-based path planners.
Definition: PlannerRRT_common.h:141



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST