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

PRM Constructor
plan Compute the roadmap
query Find a path
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.query(start, goal)  % animate path from this start location

References

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.plan

Create a probabilistic roadmap

P.plan(options) 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.

Options

'npoints', N Number of sample points (default is set by constructor)
'distthresh', D Distance threshold, edges only connect vertices closer than D (default set by constructor)

PRM.plot

Visualize navigation environment

P.plot() displays the roadmap and the occupancy grid.

Options

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

Notes


PRM.query

Find a path between two points

P.query(start, goal) finds a path (Mx2) from start to goal.


 

© 1990-2014 Peter Corke.