## 3 Simulation and Analysis
### Simulations in a Two-Dimensional Environment  
Each algorithm was simulated in three different environments in a two-dimensional space. As shown in Figure 4, three typical maps were used: a map cluttered with obstacles, a trapped environment, and a narrow passage. The environment dimensions were \(500\times 500\) in all cases. The black areas in the map indicate obstacles, and the start and goal points were set separately in each map. The step size \(\varepsilon\) was set to 15, and the maximum number of failures nwas set to 2000. In addition, the \(k\) and \(c\) values in all the algorithms could be adjusted appropriately according to the different environments. Figures 5-7 present the performance of the three algorithms in the cluttered, trapped, and narrow environments, respectively. The entire exploration process is denoted by blue lines, and the resulting query path is denoted by red lines. When the Basic-RRT algorithm was simulated, the nodes of the random tree almost filled the entire free space in each map. By contrast, the number of nodes was greatly reduced after the proposed CSA-RRT and NC-RRT algorithms were used. In addition, as seen in Figures 6c and 7c, the extended nodes in the tree were distributed more around the obstacles because of the node control mechanism in the NC-RRT algorithm. Tables 1-3 present the simulation results of the three algorithms with respect to the average computational time, average number of nodes in the tree, average number of collision detections, average path length, and success rate in each environment. The results revealed that the proposed CSA-RRT and NC-RRT had good effects in each environment. Compared with that of Basic-RRT, the running times of the proposed algorithm were greatly reduced, and the numbers of nodes in the random tree and the numbers of collision detections were decreased. Figure 4: Three typical environments in a two-dimensional space. (**a**) The cluttered environment. (**b**) The trapped environment. (**c**) The narrow environment. However, as can be seen from Tables 1-3, the average computational time of CSA-RRT and NC-RRT in the cluttered environment was 0.058 and 0.055 s, respectively; the average computational time in the trapped environment was 0.118 and 0.159 s, respectively; and the average computational time in the narrow environment was 0.106 and 0.117 s, respectively. Thus, the computing efficiency of the two algorithms in each environment was nearly the same. Moreover, the CSA method could reduce the path length to some extent, but the path length increased slightly after the node control mechanism was added. The reason was that the random tree in the NC-RRT method usually expanded along the boundary of obstacles. However, it was irrelevant for our purposes because the node control mechanism proposed in this paper was concerned more about how to improve the environmental adaptability of the algorithm by using boundary nodes than about the path cost. Furthermore, all  
Figure 5: Performance of the three algorithms in the cluttered environment. \((k=1,\ c=2)\). Figure 6: Performance of the three algorithms in the trapped environment. \((k=3,\ c=2)\). Figure 7: Performance of the three algorithms in the narrow environment. \((k=1,\ c=2)\). the above-mentioned algorithms would eventually need to complete path pruning and smoothing when used in practice, so this cost could be ignored. In addition, we could see that the success rates of NC-RRT in the cluttered and trapped environments were not significantly different compared with those of the other two algorithms. However, in the narrow environment, the success rate was effectively increased, and the occurrence of pathological cases was reduced due to the excellent boundary property of the NC-RRT algorithm. Therefore, the proposed node control mechanism was necessary. In other words, the NC-RRT algorithm, which combined the CSA method and the node control mechanism, could effectively improve the efficiency of planning and was more suitable for complex environments than other algorithms.