Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
14#include <mrpt/poses/CPoint2D.h>
15
16namespace mrpt
17{
18namespace 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 */
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
A class for storing an occupancy grid map.
Searches for collision-free path in 2D occupancy grids for holonomic circular robots.
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,...
float occupancyThreshold
The maximum occupancy probability to consider a cell as an obstacle, default=0.5
float robotRadius
The aproximate robot radius used in the planification. Default is 0.35m.
float minStepInReturnedPath
The minimum distance between points in the returned found path (default=0.4); Notice that full grid r...
PlannerSimple2D()
Default constructor.
A class used to store a 2D pose.
Definition: CPose2D.h:37
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 00:13:14 UTC 2023