M-File Help: RRT View code for RRT

RRT

Class for rapidly-exploring random tree navigation

A concrete subclass of the abstract Navigation class that implements the rapidly exploring random tree (RRT) algorithm. This is a kinodynamic planner that takes into account the motion constraints of the vehicle.

Methods

RRT Constructor
plan Compute the tree
query Compute a path
plot Display the tree
display Display the parameters in human readable form
char Convert to string

Properties (read only)

graph A PGraph object describign the tree

Example

goal = [0,0,0];
start = [0,2,0];
veh = Bicycle('steermax', 1.2);
rrt = RRT(veh, 'goal', goal, 'range', 5);
rrt.plan()             % create navigation tree
rrt.query(start, goal)  % animate path from this start location

References

See also

Navigation, PRM, DXform, Dstar, PGraph


RRT.RRT

Create an RRT navigation object

R = RRT.RRT(veh, options) is a rapidly exploring tree navigation object for a vehicle kinematic model given by a Vehicle subclass object veh.

R = RRT.RRT(veh, map, options) as above but for a region with obstacles defined by the occupancy grid map.

Options

'npoints', N Number of nodes in the tree (default 500)
'simtime', T Interval over which to simulate kinematic model toward random point (default 0.5s)
'goal', P Goal position (1x2) or pose (1x3) in workspace
'speed', S Speed of vehicle [m/s] (default 1)
'root', R Configuration of tree root (3x1) (default [0,0,0])
'revcost', C Cost penalty for going backwards (default 1)
'range', R Specify rectangular bounds of robot's workspace:

Other options are provided by the Navigation superclass.

Notes

Reference

See also

Vehicle, Bicycle, Unicycle


RRT.char

Convert to string

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


RRT.plan

Create a rapidly exploring tree

R.plan(options) creates the tree roadmap by driving the vehicle model toward random goal points. The resulting graph is kept within the object.

Options

'goal', P Goal pose (1x3)
'ntrials', N Number of path trials (default 50)
'noprogress' Don't show the progress bar
'samples' Show progress in a plot of the workspace

Notes


RRT.plot

Visualize navigation environment

R.plot() displays the navigation tree in 3D, where the vertical axis is vehicle heading angle. If an occupancy grid was provided this is also displayed.


RRT.query

Find a path between two points

x = R.path(start, goal) finds a path (Nx3) from pose start (1x3) to pose goal (1x3). The pose is expressed as [x,Y,THETA].

R.path(start, goal) as above but plots the path in 3D, where the vertical axis is vehicle heading angle. The nodes are shown as circles and the line segments are blue for forward motion and red for backward motion.

Notes

See also

RRT.plot


 

© 1990-2014 Peter Corke.