M-File Help: Lattice View code for Lattice

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.

Methods

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

Properties (read only)

graph A PGraph object describign the tree

Example

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

References

See also

Navigation, DXform, Dstar, PGraph


Lattice.Lattice

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

Options

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

Notes

See also

Navigation.Navigation


Lattice.char

Convert to string

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

See also

Lattice.display


Lattice.plan

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.

Options

'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


Lattice.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 Lattice graph

Lattice.query

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.