Shortest Path with Obstacle Avoidance (ver 1.3)
by Michael Kleder
03 Oct 2005
(Updated 26 Aug 2008)
No BSD License
Computes shortest path between two points in the plane, avoiding obstacles.
Download Now
|
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 (17) |
| 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
|
|
|
| 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 |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com