Shortest Path with Obstacle Avoidance (ver 1.3)
by Michael Kleder
03 Oct 2005
(Updated 26 Aug 2008)
Computes shortest path between two points in the plane, avoiding obstacles.
|
Watch this File
|
| File Information |
| Description |
SHPATH - shortest path with obstacle avoidance (ver 1.3)
Given a "terrain" matrix consisting of zeros (for open space) and ones (for obstacles), this function computes the shortest path between two specified points while avoiding obstacles.
A two-stage solution is employed. In stage one, the algorithm rapidly propagates through all possible pathways to find a representative shortest route. In stage two, the path is contracted to follow closely around sharp corners and eliminate quantization noise. Although the map coordinates (and intial and final points) are integers, the solution coordinates are reals to allow for the elimination of jitter from map quantization.
Note that diagonal "moves" ARE allowed.
To avoid confusion over X/Y conventions for grid matrices, the issue is avoided entirely by referring only to the row and column entries in the grid. The user is invited to employ whatever convention he or she is comfortable using for mapping Cartesian coordinates to the grid matrix entries.
The user is encouraged to see the code comments (or the "help" text) and to run the example code.
Michael Kleder, Oct 2005 |
| MATLAB release |
MATLAB 7.0.4 (R14SP2)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (20) |
| 04 Oct 2005 |
Steven Lord
|
|
|
| 05 Oct 2005 |
ron chand
|
|
|
| 05 Oct 2005 |
Rick Behrens
|
|
|
| 05 Oct 2005 |
Michael Kleder
|
|
|
| 06 Oct 2005 |
Rick Behrens
|
|
|
| 06 Oct 2005 |
Michael Kleder
|
|
|
| 07 Oct 2005 |
Michael Kleder
|
|
|
| 19 Dec 2005 |
MAK Adams
|
|
|
| 16 May 2006 |
Jackson Wong
|
|
|
| 17 May 2006 |
The Author
|
|
|
| 13 Feb 2007 |
Subrata Bhowmik
|
|
|
| 13 Feb 2007 |
The Author
|
|
|
| 29 Mar 2007 |
Simon Jin
|
|
|
| 23 Dec 2007 |
mandana noroozi
|
|
|
| 12 Jan 2008 |
afaz uddin
|
|
|
| 30 Jan 2008 |
Amiya Patanaik
|
|
|
| 02 Nov 2009 |
James
|
|
|
| 30 Aug 2010 |
Thijs
|
|
|
| 30 Aug 2010 |
Thijs
|
|
|
| 07 Nov 2011 |
ANNAIYAN ARUN
|
|
|
| Updates |
| 06 Oct 2005 |
Input checks added. Unsolvable case handled. Description text edited. |
| 07 Oct 2005 |
Additional output created. Description updated. |
| 10 Oct 2005 |
Improved speed and precision; improved unit-width corridor penetration; improved penetration between diagonally adjacent obstacle squares; improved example plot; improved description text |
| 26 Aug 2008 |
Improved speed and precision; improved unit-width corridor penetration; improved penetration between diagonally adjacent obstacle squares; improved example plot; improved description text |
|
Contact us at files@mathworks.com