M-File Help: Lattice | View code for Lattice |
Lattice planner navigation class
A concrete subclass of the abstract Navigation class that implements the lattice planner navigation algorithm over an occupancy grid. This performs goal independent planning of kinematically feasible paths.
Lattice | 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 |
graph | A PGraph object describign the tree |
lp = Lattice(); % create navigation object lp.plan('iterations', 8) % create roadmaps lp.query( [1 2 pi/2], [2 -2 0] ) % find path lp.plot(); % plot the path
Navigation, DXform, Dstar, PGraph
Create a Lattice navigation object
p = Lattice(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).
'grid', G | Grid spacing in X and Y (default 1) |
'root', R | Root coordinate of the lattice (2x1) (default [0,0]) |
'iterations', N | Number of sample points (default Inf) |
'cost', C | Cost for straight, left, right (default [1,1,1]) |
'inflate', K | Inflate all obstacles by K cells. |
Other options are supported by the Navigation superclass.
Convert to string
P.char() is a string representing the state of the Lattice object in human-readable form.
Create a lattice plan
P.plan(options) creates the lattice by iteratively building a tree of possible paths. The resulting graph is kept within the object.
'iterations', N | Number of sample points (default Inf) |
'cost', C | Cost for straight, left, right (default [1,1,1]) |
Default parameter values come from the constructor
Visualize navigation environment
P.plot() displays the occupancy grid with an optional distance field.
'goal' | Superimpose the goal position if set |
'nooverlay' | Don't overlay the Lattice graph |
Find a path between two poses
P.query(start, goal) finds a path (Nx3) from pose start (1x3) to pose goal (1x3). The pose is expressed as [X,Y,THETA].
© 1990-2014 Peter Corke.