Main MRPT website > C++ reference for MRPT 1.5.9
PlannerSimple2D.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 #ifndef PlannerSimple2D_H
10 #define PlannerSimple2D_H
11 
12 #include <mrpt/nav/link_pragmas.h>
14 #include <mrpt/poses/CPoint2D.h>
15 
16 namespace mrpt
17 {
18 namespace nav
19 {
20  /** \addtogroup nav_planners Path planning
21  * \ingroup mrpt_nav_grp
22  * @{ */
23 
24  /** Searches for collision-free path in 2D occupancy grids for holonomic circular robots.
25  * The implementation first enlargest obstacles with robot radius, then applies a
26  * wavefront algorithm to find the shortest free path between origin and target 2D points.
27  *
28  * Notice that this simple planner does not take into account robot kinematic constraints.
29  */
31  {
32  public:
33  PlannerSimple2D(); //!< Default constructor
34  virtual ~PlannerSimple2D() //!< Destructor
35  {
36  }
37 
38  /** The maximum occupancy probability to consider a cell as an obstacle, default=0.5 */
40 
41  /** The minimum distance between points in the returned found path (default=0.4); Notice
42  * that full grid resolution is used in path finding, this is only a way to reduce the
43  * amount of redundant information to be returned.
44  */
46 
47  float robotRadius; //!< The aproximate robot radius used in the planification. Default is 0.35m
48 
49  /** This method compute the optimal path for a circular robot, in the given
50  * occupancy grid map, from the origin location to a target point.
51  * The options and additional parameters to this method can be set with
52  * member configuration variables.
53  *
54  * \param theMap [IN] The occupancy gridmap used to the planning.
55  * \param origin [IN] The starting pose of the robot, in coordinates of "map".
56  * \param target [IN] The desired target pose for the robot, in coordinates of "map".
57  * \param path [OUT] The found path, in global coordinates relative to "map".
58  * \param notFount [OUT] Will be true if no path has been found.
59  * \param maxSearchPathLength [IN] The maximum path length to search for, in meters (-1 = no limit)
60  *
61  * \sa robotRadius
62  *
63  * \exception std::exception On any error
64  */
65  void computePath(
66  const mrpt::maps::COccupancyGridMap2D &theMap,
67  const mrpt::poses::CPose2D &origin,
68  const mrpt::poses::CPose2D &target,
69  std::deque<mrpt::math::TPoint2D> &path,
70  bool &notFound,
71  float maxSearchPathLength = -1
72  ) const;
73 
74  };
75 
76  /** @} */
77  } // End of namespace
78 } // End of namespace
79 
80 #endif
float robotRadius
The aproximate robot radius used in the planification. Default is 0.35m.
Searches for collision-free path in 2D occupancy grids for holonomic circular robots.
float minStepInReturnedPath
The minimum distance between points in the returned found path (default=0.4); Notice that full grid r...
float occupancyThreshold
The maximum occupancy probability to consider a cell as an obstacle, default=0.5. ...
A class for storing an occupancy grid map.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:36



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