M-File Help: PRM

M-File Help: PRM | View code for PRM

# PRM

Probabilistic RoadMap navigation class

A concrete subclass of the abstract Navigation class that implements the probabilistic roadmap navigation algorithm over an occupancy grid. This performs goal independent planning of roadmaps, and at the query stage finds paths between specific start and goal points.

## Methods

plan | Compute the roadmap
path | Compute a path to the goal
visualize | Display the obstacle map (deprecated)
plot | Display the obstacle map
display | Display the parameters in human readable form
char | Convert to string

## Example

    load map1              % load map
    goal = [50,30];        % goal point
    start = [20, 10];      % start point
    prm = PRM(map);        % create navigation object
    prm.plan()             % create roadmaps
    prm.path(start, goal)  % animate path from this start location

## References

- Probabilistic roadmaps for path planning in high dimensional configuration spaces, L. Kavraki, P. Svestka, J. Latombe, and M. Overmars, IEEE Transactions on Robotics and Automation, vol. 12, pp. 566-580, Aug 1996.
- Robotics, Vision & Control, Section 5.2.4, P. Corke, Springer 2011.

## See also

Navigation, DXform, Dstar, PGraph

# PRM.PRM

Create a PRM navigation object

p = PRM(map, options) is a probabilistic roadmap navigation object, and map is an occupancy grid, a representation of a planar world as a matrix whose elements are 0 (free space) or 1 (occupied).

## Options

'npoints', N | Number of sample points (default 100)
'distthresh', D | Distance threshold, edges only connect vertices closer than D (default 0.3 max(size(occgrid)))

Other options are supported by the Navigation superclass.

## See also

Navigation.Navigation

# PRM.char

Convert to string

P.char() is a string representing the state of the PRM object in human-readable form.

## See also

PRM.display

# PRM.path

Find a path between two points

P.path(start, goal) finds and displays a path from start to goal which is overlaid on the occupancy grid.

x = P.path(start) returns the path (2xM) from start to goal.

# PRM.plan

Create a probabilistic roadmap

P.plan() creates the probabilistic roadmap by randomly sampling the free space in the map and building a graph with edges connecting close points. The resulting graph is kept within the object.

# PRM.plot

Visualize navigation environment

P.plot() displays the occupancy grid with an optional distance field.

## Options

'goal' | Superimpose the goal position if set
'nooverlay' | Don't overlay the PRM graph

© 1990-2014 Peter Corke.