File Exchange

## A* (A Star) search for path planning tutorial

version 1.2.0.1 (113 KB) by
A tutorial that presents the A* search algorithm for determining the shortest path to a target.

Updated 01 Sep 2016

View Version History

The A* search algorithm is a simple and effective technique that can be used to compute the shortest path to a target location. This tutorial presents a detailed description of the algorithm and an interactive demo.

### Cite As

Paul Premakumar (2020). A* (A Star) search for path planning tutorial (https://www.mathworks.com/matlabcentral/fileexchange/26248-a-a-star-search-for-path-planning-tutorial), MATLAB Central File Exchange. Retrieved .

### Comments and Ratings (42)

abdelbasset nasri

Please guide on this error...
Error in a_star (line 116)
OPEN(OPEN_COUNT,:)=insert_open(xNode,yNode,xNode,yNode,path_cost,goal_distance,goal_distance);

Mohammed Aggoun

thnks a lot for the code , can u help me how to change it to use it in 3d ?

khaled Abdessamed

Aya Ibrahim

Also, how can I add a connection line between the obstacles' dots to create an area of obstacles?

redblack Jason

Elifnaz Erdogdu

Menna Nasser

Menna Nasser

Error in DISPLAY_patchwork (line 3)
HEIGHT = size(map,1);

how can i fix that error ??

Syed Husein Kamil

Tony

Nice script, easily modifiable for other minimum cost functions.

Cristian Moyano

esteban falconi

amin ta

great!

Malaika Mushtaq

Plz help in this error.....
node_index(open,2,1)
Error using open (line 63)
Not enough input arguments.

keshav aggarwal

@Karthikeyan R Add your scripts to the path

The X and Y vector need to be found for trajectory tracking purposes.

Thanks for the code. It is useful for UAV path planning. May I know where the X and Y vector being stored?

Karthikeyan R

Thank you i got it

Karthikeyan R

Please guide on this error...
Error in a_star (line 116)
OPEN(OPEN_COUNT,:)=insert_open(xNode,yNode,xNode,yNode,path_cost,goal_distance,goal_distance);

Freeman colby

It‘s so useful, I want to use this algorithm to do the path planning for uav. i do think it is great.

Alvaro Torres

Hi, how can i change the value of the axis? and also the size of the cells if is possible?

robosun

Hi, Does anybody knows how can I have only vertical and horizontal move?

is there a way to neglect the grid moves? Im looking only for a horizontal and vertical move

Glenn

Error in a_star (line 116)
OPEN(OPEN_COUNT,:)=insert_open(xNode,yNode,xNode,yNode,path_cost,goal_distance,goal_distance);

Plarent Haxhidauti

Very useful

Abhiram Rahatgaonkar

Very good code! Quite easy to modify and test the search function. Thanks a lot!

William de Cothi

wiba rose

ANUSHA D K

great contribution.

Hans Huber

Jingya Liu

RAVISH SINGH

Please tell me where the path from sorce to destination is stored

Gajanan

Please guide on this error...

Error in a_star (line 116)
OPEN(OPEN_COUNT,:)=insert_open(xNode,yNode,xNode,yNode,path_cost,goal_distance,goal_distance);

Paul yang

beautiful!

Jian Guo

Very Well. Thankyou for your contribution.

ghufran

A

Is it possible to change the grid resolution?

YS

A really good code to find a shortest path with obstacles incorporated.

YS

amine amine

why i have this message error ???

Undefined function or method 'insert_open' for input arguments of type 'double'

##### MATLAB Release Compatibility
Created with R2007a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!