Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Public Member Functions | Public Attributes
mrpt::nav::PlannerSimple2D Class Reference

Detailed Description

Searches for collision-free path in 2D occupancy grids for holonomic circular robots.

The implementation first enlargest obstacles with robot radius, then applies a wavefront algorithm to find the shortest free path between origin and target 2D points.

Notice that this simple planner does not take into account robot kinematic constraints.

Definition at line 30 of file PlannerSimple2D.h.

#include <mrpt/nav/planners/PlannerSimple2D.h>

Public Member Functions

 PlannerSimple2D ()
 Default constructor. More...
 
virtual ~PlannerSimple2D ()
 
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, from the origin location to a target point. More...
 

Public Attributes

float occupancyThreshold
 The maximum occupancy probability to consider a cell as an obstacle, default=0.5. More...
 
float minStepInReturnedPath
 The minimum distance between points in the returned found path (default=0.4); Notice that full grid resolution is used in path finding, this is only a way to reduce the amount of redundant information to be returned. More...
 
float robotRadius
 The aproximate robot radius used in the planification. Default is 0.35m. More...
 

Constructor & Destructor Documentation

◆ PlannerSimple2D()

PlannerSimple2D::PlannerSimple2D ( )

Default constructor.

Definition at line 25 of file PlannerSimple2D.cpp.

◆ ~PlannerSimple2D()

virtual mrpt::nav::PlannerSimple2D::~PlannerSimple2D ( )
inlinevirtual

Definition at line 34 of file PlannerSimple2D.h.

Member Function Documentation

◆ computePath()

void PlannerSimple2D::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, from the origin location to a target point.

The options and additional parameters to this method can be set with member configuration variables.

Parameters
theMap[IN] The occupancy gridmap used to the planning.
origin[IN] The starting pose of the robot, in coordinates of "map".
target[IN] The desired target pose for the robot, in coordinates of "map".
path[OUT] The found path, in global coordinates relative to "map".
notFount[OUT] Will be true if no path has been found.
maxSearchPathLength[IN] The maximum path length to search for, in meters (-1 = no limit)
See also
robotRadius
Exceptions
std::exceptionOn any error

Definition at line 36 of file PlannerSimple2D.cpp.

References ASSERT_, CELL_EMPTY, CELL_OBSTACLE, CELL_ORIGIN, CELL_TARGET, mrpt::maps::COccupancyGridMap2D::getCell(), mrpt::maps::COccupancyGridMap2D::getResolution(), mrpt::maps::COccupancyGridMap2D::getSizeX(), mrpt::maps::COccupancyGridMap2D::getSizeY(), mrpt::maps::COccupancyGridMap2D::getXMax(), mrpt::maps::COccupancyGridMap2D::getXMin(), mrpt::maps::COccupancyGridMap2D::getYMax(), mrpt::maps::COccupancyGridMap2D::getYMin(), mrpt::maps::COccupancyGridMap2D::idx2x(), mrpt::maps::COccupancyGridMap2D::idx2y(), min, minStepInReturnedPath, occupancyThreshold, robotRadius, mrpt::math::square(), val, mrpt::math::TPoint2D::x, mrpt::maps::COccupancyGridMap2D::x2idx(), mrpt::math::TPoint2D::y, and mrpt::maps::COccupancyGridMap2D::y2idx().

Member Data Documentation

◆ minStepInReturnedPath

float mrpt::nav::PlannerSimple2D::minStepInReturnedPath

The minimum distance between points in the returned found path (default=0.4); Notice that full grid resolution is used in path finding, this is only a way to reduce the amount of redundant information to be returned.

Definition at line 45 of file PlannerSimple2D.h.

Referenced by computePath().

◆ occupancyThreshold

float mrpt::nav::PlannerSimple2D::occupancyThreshold

The maximum occupancy probability to consider a cell as an obstacle, default=0.5.

Definition at line 39 of file PlannerSimple2D.h.

Referenced by computePath().

◆ robotRadius

float mrpt::nav::PlannerSimple2D::robotRadius

The aproximate robot radius used in the planification. Default is 0.35m.

Definition at line 47 of file PlannerSimple2D.h.

Referenced by computePath().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019