# Research on AGV Path Planning Integrating an Improved A* Algorithm and DWA Algorithm
## 2 Alternative Implementation of the A* Algorithm
### Smoothness Optimization  
Since the A* algorithm's selection of child nodes in the path planning process is based on the current node, the generated path will contain many redundant nodes [24] and inflection points. Additionally, because the map is constructed using the raster method [25], the planned path comprises multiple sets of raster centers, resulting in a high number of transitions, as the path nodes can only be located at the center of the raster cells. This leads to a path that is neither the shortest nor smoothest. To address these issues, this paper proposes shortening the robot's motion path and improving the path smoothness by reducing the number of turning points. For two non-adjacent path nodes, if the connecting distance between them is less than the planned path distance, and the connecting line does not intersect obstacle vertices or pass through obstacles, the redundant nodes in the middle can be deleted. As shown in Figure 4, \(a_{1}\) to \(a_{3}\) represent three different paths. If \(a_{1}\) and \(a_{2}\) are co-located, then node B can be directly skipped to obtain path \(a_{3}\). If \(a_{1}\) and \(a_{2}\) are not co-located, it is necessary to determine whether path \(a_{3}\) intersects obstacle vertices or passes through an obstacle. If \(a_{3}\) intersects obstacle vertices or passes through an obstacle, the original path is retained. If not, the new path \(a_{3}\) is obtained and the original paths \(a_{1}\) and \(a_{2}\) are eliminated.  
Take Figure 5 as an example; \(S\) is the initial point of the path, \(G\) is the target point, and the motion path before optimization is \(S\)-\(n_{1}\)-\(B\)-\(n_{2}\)-\(G\). The entire path contains redundant nodes and many turns. Using the method proposed in this paper, the path is optimized for smoothness. First, intermediate points on the same connecting line are deleted, retaining only the starting point, inflection points, and end point, resulting in the path \(S\)-\(A\)-\(B\)-\(G\). Next, the initial point \(S\) is connected to path node \(B\) to form a new path \(b\). If path \(b\) passes through an obstacle, it is discarded; otherwise, the path is updated to \(S\)-\(B\)-\(G\). Finally, the midpoint \(C\) of path \(b\) is selected and connected to the goal point \(G\) to form the new path \(c\). If path \(c\) passes through an obstacle, it is discarded; otherwise, the optimized path \(S\)-\(C\)-\(G\) is obtained.  
To verify the performance of the alternative A* algorithm, this paper conducts a comparative experiment using the same starting and ending points. Simulations are performed with both the traditional A* algorithm and the alternative A* algorithm, and the experimental results are presented in Figure 6. The grid map size is 20 \(\times\) 20, and the length  
Figure 4: Path turn optimization.  
Figure 5: Turn-optimized movement paths.  
of each grid unit is 1 m. As shown in Figure 6a, the path planned by the traditional A* algorithm is closer to the obstacles, which can easily lead to collisions between the AGV and the obstacles, resulting in poor safety of the global path. Figure 6b demonstrates that after adopting the obstacle grid method and optimizing the child node selection method, the distance between AGVs and obstacles in the global path increases significantly, avoiding collisions and improving the path safety. Compared with the traditional A* algorithm, the path distance planned by the algorithm with smoothness optimization is significantly shorter, and the AGV's movement process is smoother.  
As shown in Table 1, the improved A* algorithm increases the distance to the nearest obstacle by 0.5 m compared to the alternative A* algorithm, thereby improving the path safety. Additionally, the total path length is shortened by 0.828 m, and the path planning time is reduced by 0.76 s, enhancing the path planning efficiency.