# Obstacle Avoidance Path Planning for the Dual-Arm Robot Based on an Improved RRT Algorithm
## 4 Simulation  
### Obstacle Avoidance Path Planning for Static Plane  
In order to analyze the effectiveness of the GA_RRT algorithm for the path planning problem, this paper compares with the traditional RRT algorithm and the RRT algorithm based on goal bias probability (G_RRT) in two different scenarios. The hardware platform is Intel(R) Core (TM) i7-10700 CPU with 16 GB of memory. The simulation experiment is built using MATLAB software.  
The simulation mainly adopts two common methods to verify the validity of the path planning algorithm. Scenario A is shown in Figure 6, the initial point is 1, 1 and the target point is 750,750. As can be seen in Figure 6a, the RRT algorithm explores the entire space, while the G_RRT algorithm explores the target point with a probability of 0.5, presented in Figure 6b. This greatly reduces the number of nodes for spatial search. The GA_RRT algorithm performs node pruning by calculating the cost function while exploring the goal point. This further effectively reduces the number of tree node branches and speeds up the search efficiency.  
Figure 5: GA_RRT algorithm flow.  
In the experiment, since the paths generated by the RRT algorithm have high randomness, the number of nodes and time of each path may be quite different. Therefore, this paper conducts ten experiments for each algorithm, and takes the average value as the final data. The path data for Scenario A are shown in Table 2.  
It is calculated that the average number of nodes explored by the G_RRT algorithm is 58.9% less than that of the RRT algorithm. The GA_RRT algorithm is further reduced by 51.3% on the basis of the G_RRT algorithm. Due to the addition of the cost function, the path length is also optimized. Compared with the RRT algorithm, the GA_RRT path length is optimized by 10.7%. Due to the reduction in node redundancy, the time cost of the GA_RRT algorithm is reduced by 59.5% in this scenario. Compared to the G_RRT algorithm, it is reduced by 24.8%.  
In scenario B, the target point is directly occluded, as shown in Figure 7. The initial point is 400,400 and the target point is 750,750.  
The average experimental data for Scenario B is shown in Table 3.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **RRT** & **G\_RRT** & **GA\_RRT** \\ \hline
**Total number of nodes** & 256 & 105 & 49 \\ \hline
**Path length** & 1539 & 1360 & 1373 \\ \hline
**Average time/s** & 8.35 & 4.5 & 3.38 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The average experimental data for Scenario A.  
Figure 6: The obstacle avoidance path planning result of scenario A (**a**) RRT; (**b**) G_RRT; (**c**) GA_RRT.  
Figure 7: The obstacle avoidance path planning result of scenario B: (**a**) RRT; (**b**) G_RRT; (**c**) GA_RRT.  
In scenario B, the starting point and the target point are directly blocked. Theoretically, there is no significant difference among the three algorithms in the U-shaped obstacle space. However, outside the obstacle space, the GA_RRT algorithm should have better performance. By comparing the data in Table 3, we can draw similar conclusions.  
The total number of nodes explored by G_RRT is 62.9% lower than that of the RRT algorithm. The GA_RRT algorithm is further reduced by 41.8% on the basis of the G_RRT algorithm. Compared to the RRT algorithm, the GA_RRT path length is optimized by 32.8%, and the time cost is reduced by 72.5%.