This paper includes A∗ algorithm in vector map, using map's corners as the nodes. In traditional A∗ algorithm, nodes are considered as the condition of bringing up moving paths. By this way, there are a large number of turning points in the algorithm. For this reason, this paper modifies the process in A∗ algorithm and adds a function to check the feasible moving paths between nodes. And to avoid moving paths being too near obstacles and collisions, this paper includes image erosion processing to erase the region too close to the obstacles so that the robot can keep suitable distance from obstacles while moving. Besides, this paper also adds arc-shaped path optimization to make the paths smoother, so the robot can cross each node in curve path, and reduce the cost time.