# Obstacle Avoidance Path Planning for the Dual-Arm Robot Based on an Improved RRT Algorithm
## 4 Simulation
### Obstacle Avoidance Path Planning for Dynamic Dual-Arm Robots
The algorithm explores the joint angle to avoid obstacles. After avoiding obstacles, all random nodes extended to the target point are quickly selected by the cost function, and the search efficiency is greatly improved. To analyze the effectiveness of the GA_RRT algorithm for obstacle avoidance, the visualization results are presented in Figures 13 and 14. For static obstacles in the environment, as shown in Figure 13, the trajectory of the main arm is far away from the static obstacles. This can also be seen in Figure 14a. For the slave arm, the arm successfully avoids static obstacles, compared to Figure 8b. In addition, through the comparison of Figures 14a and 8c, it can be seen that the slave arm realizes the static obstacle avoidance and completes the dynamic obstacle avoidance of the main arm. Figure 12: The final result of the path planning for the slave arm. Figure 13: Static obstacle avoidance. After ten groups of angle planning experiments, the average planning time of the robotic arms is 2.04 s. Due to the complexity of transplanting different algorithms into the simulation of dual-arm robots, we here present a comparison by referencing the experimental data of algorithms that are similar [32]. The comparison results are shown in Table 4.  
Compared to the traditional RRT algorithm, the search time of the GA_RRT algorithm is reduced by about 70% for the obstacle avoidance path planning of the dual-arm robot. Although the simulation environment is different, it can be seen that the algorithm is effective at accelerating the search efficiency. Finally, in order to fully verify the effectiveness of the algorithm for dual-arm obstacle avoidance path planning, this paper changes the position and radius of the obstacle sphere, and records the experimental results of the GA_RRT algorithm several times. The center and radius of each obstacle in scenarios 1 and 2 are shown in Equations (11) and (12). \[O_{sphere1}=\left[ \begin{array}{ccc}-0.55&-0.2&0.15\\ -0.45&-0.2&0.15\\ -0.35&-0.2&0.15\\ -0.35&0.2&-0.15\\ \end{array} \right];\;\text{R}=[0.05,0.05,0.05,0.05] \tag{11}\] \begin{table}
\begin{tabular}{c c c c c} \hline  & **RRT** & **Bi-RRT** & **S-RRT** & **GA\_RRT** \\ \hline
**Average Planning Time/s** & 9.86 & 5.23 & 2.42 & 2.04 \\ \hline \end{tabular}
\end{table} 
Table 4: Calculation time. Figure 14: GA_RRT obstacle avoidance trajectory: (**a**) self-collision avoidance; (**b**) side view of final state. \[O_{sphere2}=\left[ \begin{array}{ccc}-0.55&-0.2&0.15\\ -0.45&0.2&0.15\\ -0.3&0.3&0.15\\ -0.4&-0.25&0.15\\ -0.5&0.3&-0.05\end{array} \right];\;\mathrm{R}=[0.08,0.1,0.06,0.06,0.06] \tag{12}\]  
The path planning algorithm is tested ten times in each scenario, and the final average values of the tests are shown in Table 5.  
From the analysis of successful times, we can find that the algorithm realizes obstacle avoidance path planning for the dual-arm robot in various scenarios. Compared with the slave arm, the master arm only considers spherical obstacles, and its path planning will be faster. This can also be seen from the experimental data. The slave arm needs to detect the motion state of the main arm for dynamic obstacle avoidance. In each scenario of ten tests, path planning time will be different. However, the final average in various scenarios is about 2s. This fully demonstrates that the algorithm is effective, and its average efficiency is reliable in the obstacle avoidance scenario of the dual-arm robot.