In the research process, Dijkstra algorithm can ensure that a shortest path can be found, but the efficiency is low, because it traverses the entire grid map and the target point is only in a certain direction, but it traverses nodes in all directions, which takes a lot of time. The main content of A* algorithm is to combine heuristic function with walking cost function. It can not only guarantee to find a shortest path, but also guarantee the speed of search. Adopting the advantages of Dijsktra algorithm and avoiding its disadvantages, it is well applied to raster map, making it one of the most widely used path planning algorithms.