Simulation Diagram of Unmanned Vehicle Driving from Current Position to Optimal Parking Space Based on A* Algorithm

To draw the simulation diagram of the unmanned vehicle driving from the current position to the optimal parking space, the parking space with the shortest distance from the starting point to the control point is defined as the optimal point in this paper. We simplify the driving route into a straight line and establish the coordinate axes. Depending on the driving direction, the driving trajectory can be divided into different cases. In each case, the order of the parking spaces passed by the vehicle is fixed. Therefore, if the parking space is occupied, its value is assigned as 0; otherwise, it is 1. The initial value is assigned as 0, and we accumulate the weighted value in each case. When the total weight reaches 1, accumulation stops, and the optimal parking space in this case is recorded. The optimal parking space is in which the vehicle travels the shortest distance among all the cases. Based on the A* algorithm, a raster map is constructed. The obstacle area is expanded by narrowing the feasible area range of control points in the parking lot so that the path of control points can meet the kinematic and obstacle avoidance constraints of vehicles. Finally, a simulation diagram of the parking trajectory is drawn.