| M-File Help: Bug2 | View code for Bug2 |
Bug navigation class
A concrete subclass of the Navigation class that implements the bug2 navigation algorithm. This is a simple automaton that performs local planning, that is, it can only sense the immediate presence of an obstacle.
| path | Compute a path from start to goal |
| visualize | Display the obstacle map (deprecated) |
| plot | Display the obstacle map |
| display | Display state/parameters in human readable form |
| char | Convert to string |
| load map1 | % load the map |
| bug = Bug2(map); | % create navigation object |
bug.goal = [50, 35]; % set the goal
| bug.path([20, 10]); | % animate path to (20,10) |
Navigation, DXform, Dstar, PRM
bug2 navigation object constructor
b = Bug2(map) is a bug2 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).
| 'goal', G | Specify the goal point (1x2) |
| 'inflate', K | Inflate all obstacles by K cells. |
© 1990-2014 Peter Corke.