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



Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020