# A Method of Dual-AGV-Ganged Path Planning Based on the Genetic Algorithm
## 4 Experimental Results and Discussion
### Simulation Experiment of the Introduced Starting-Point and Goal-Point Poses  
This study conducted simulation verification on the ROS Noetic platform using experimental equipment equipped with an i5-12400F processor, 16 GB RAM, and a 2.50 GHz main frequency.The processor was manufactured by Intel Corporation, Santa Clara, USA. The simulation involved two AGVs equipped with VLP-32C LiDAR, produced by Velodyne Lidar, Inc., San Jose, CA, USA, and RealSense D435i depth cameras, produced by Intel Corporation, Santa Clara, CA, USA, along with several static obstacles, modeled in Gazebowith the cost map resolution set to 0.05. The Gmapping simultaneous localization and mapping (SLAM) algorithm, version 1.4.2, was used to generate a detailed environment map, which was converted into a format suitable for path planning using the Map Server package, version 1.17.3. The map was visualized using the Rviz component, as shown in Map 1 in Figure 8. The black and blue rectangular boxes in the center correspond to the overall outline of the dual-AGV-ganged system, as well as the shapes, safety distance, and orientation of the leader AGV (AGV1) and follower AGV (AGV2), as depicted in Figure 2. The other black areas represent obstacles, the regions surrounding the black areas indicate inflated regions, and the gray areas denote navigable regions. To better analyze the path-planning process with consideration of the initial pose, we selected a region from the map shown in Figure 8 with a higher density of obstacles and greater difficulty in path planning. As illustrated in Figure 9, this region was chosen to evaluate the dual-AGV system's performance. The AGV outlines and obstacle information in Figure 9 are consistent with those depicted in Figure 8. The blue dashed rectangular box represents the approximate position of the dual-AGV system during operation. In Figure 9, the black arrows indicate the initial pose, while the black lines represent the planned path. When the initial pose is not considered, the planning primarily follows the shortest path. However, at the starting point, the AGV must rotate from its initial angle to the vector angle formed by the first two points on the path. During this rotation, the dual-AGV system is at risk of colliding with obstacles, as evidenced by the situation at Position A.  
Figure 8: Global cost Map 1. Figure 9: Comparison of the path-planning effects of the algorithm with the introduction of the pose of starting point: (**a**) Path without the introduction of starting-point pose planning. (**b**) Path with the introduction of starting-point pose planning. In contrast, Figure 9 demonstrates the path-planning process when the initial pose is considered. Here, the AGV maintains a straight trajectory aligned with the starting point's angle, continuing in this direction until it reaches a safe position. Only then does it initiate a turn, as shown at Position B. This approach effectively avoids steering collisions that could occur when the initial pose is ignored. To comprehensively demonstrate the effectiveness of the algorithm, we conducted an experiment that simultaneously introduced the poses of both the starting point and the goal point into the path-planning process, as shown in Figure 10. The corresponding map information is similar to that shown in Figure 9, focusing on a region with a higher density of obstacles and greater path-planning challenges. The black arrow at the end of the path represents the goal point's pose. Without accounting for the starting point's pose, the AGV risks colliding with obstacles during the initial phase, as seen at Position C. Moreover, after reaching the goal point's location, the AGV needs to rotate from the angle formed by the last two points on the path to align with the goal point's pose. This turning process may lead to collisions with obstacles, as seen at Position D. Conversely, in Figure 10, the algorithm takes into consideration both the starting-point and goal-point poses.