To validate the performance of the improved RRT and DWA algorithms, comparative experiments with different algorithms are performed in Matlab R2021b software. The simulation experiments compare and verify the algorithms in terms of their adaptive ability in static scenarios and mixed static and dynamic scenarios and compare their planning efficiency as well as their planning effectiveness. Global path planning aims to plan the optimal path under typical working conditions, so this paper selects the most common driving scenarios in the actual driving of vehicles, including parking lot exit-tracking scenarios, roundabout-turn driving scenarios, intersection left-turn scenarios, and lane-change obstacle-avoidance scenarios. For this paper, we improved the simulation environment required by RRT by building a simulation scene map in Matlab and forming the boot region. Simulation experiments used the computer configuration of a 64-bit Windows 11 system with an Intel 12th i7 processor and an NVIDIA GeForce GTX 4060Ti graphics card. Considering the deviation of RRT series algorithms in each iteration, to prevent a deviation from influencing the results, we conducted 50 simulation tests with four algorithms and took the average value as the result.
4.1. Experimental Analysis of Static Simulation Scenarios
As the real road environment is full of uncertainties, even when traffic rules are observed, the sudden behavior of other road users can still affect driving safety. For example, pedestrians may suddenly enter the lane, and the vehicle in front of them may brake suddenly. To verify the effectiveness of the improved algorithm to meet the unmanned vehicle’s driving needs in daily life so that the unmanned vehicle can respond quickly in these situations, several simulation experiments were carried out using the traditional RRT algorithm, the RRT* and RRT-connect algorithms, and the improved algorithm proposed in this paper, respectively. Four different scenarios were selected: the park lot scenario, the roundabout scenario, the one-way lane obstacle-avoidance scenario, and the intersection left-turn scenario. In the simulation scenarios, the red diamonds all represent the starting position of the vehicle, i.e., the root node of the random tree; the green origins all represent the endpoint of the vehicle; and all the black shapes are obstacles. The experimental results are shown in
Figure 16, where the green solid line is the traditional RRT algorithm, the dark blue solid line is the RRT*, the purple solid line is the RRT-connect, and the red solid line is the improved RRT algorithm. The performance comparison of the algorithms is shown in
Table 2.
Scenario 1 is a parking lot scenario in which the simulation environment is a parking lot of size 50 m × 50 m, in which the black rectangles represent vehicles parked in the parking lot, all the road sections in the parking lot are unidirectional, and there is only the road section from the entrance to the exit, as shown in
Figure 16a. The black dots represent pedestrians who are looking for vehicles. This scenario simulates the planned route of a car from its own parking space to the exit of the parking lot. Due to the special scene and relatively small environment, the RRT algorithm only uses objects as reference points. Here, based on the environment, the range of the obstacle is expanded, and the reservation of its contour distance is increased to ensure that no cuts or even collisions will occur because of its own contour distance and the surrounding body contour while planning the optimal driving route.
Scenario 2 is a roundabout scenario in which the simulated environment is a lane with a unidirectional width of 2.5 m and a small urban unsignalized roundabout with a diameter of 17 m. Vehicles enter the roundabout from the right side of the road below and exit at the third exit of the roundabout, as shown in
Figure 16b. The black dots represent pedestrians and non-motorized vehicles crossing the intersection in this scenario.
Scenario 3 is a left-turn intersection scenario in which the simulation environment is a small unsignalized intersection consisting of an urban roadway with a width of 2.5 m on one side. Vehicles enter the intersection from the right side of the intersection, moving from left to right, to make a left turn and exit the intersection downward to continue traveling, as shown in
Figure 16c. The black dots are pedestrians and non-motorized vehicles crossing the intersection.
Scenario 4 is a one-way lane obstacle-avoidance scenario, where the simulated environment is a two-lane unidirectional urban road, from left to right, with each lane having a width of 3.75 m and an intercept length of 30 m, where the black squares are the vehicles temporarily stopped or slowed down on the side of the road, as shown in
Figure 16d. The black dots represent pedestrians crossing the road or small animals appearing from out of nowhere.
The following figure shows the effect of the paths planned by the four algorithms with the same conditions, where the size of the simulation environment in the parking lot scenario is 50 × 50 m, the step size is set to 1 m, and the coordinates of the start point and the target point are Xstart = [5.5, 13] and Xgoal = [46, 46]. The roundabout scenario is for a simulation environment size of 25 × 25 m with a step size of 0.5. The start and target points are Xstart = [13.5, 5] and Xgoal = [13.5, 20]. The volume of the simulation environment for the intersection left-turn scenario is 25 × 25 m. The coordinates of the root node and the target point are set to Xstart = [10.5, 5] and Xgoal = [18.5, 13.5]; the fixed step size is taken as 0.5. The size of the simulation environment for the obstacle-avoidance lane-changing scenario is 30 × 15 m, the black rectangle represents the static obstacles on the road, the road width is set to 7.5 m, the step size is 0.5, and the start and target points are Xstart = [2.5, 9.5] and Xgoal = [28, 12.5].
As can be seen from
Figure 16 and
Table 2, due to the complex environment with narrow space, the number of turning points and the path length are very close to and better than the RRT* algorithm, which proves that the improved RRT algorithm exceeds the best RRT* in terms of the degree of path smoothing and optimization, and at the same time, the number of sampling times and the simulation time both exceed those of the effective RRT-connect algorithm in the parking lot exit-tracking scenario in comparison In the experiment, the improved RRT algorithm compared with the remaining three algorithms reduces the time and the number of samples by 92%, 98.8%, and 99% and 95.8%, 95.2%, and 95.1%, respectively. The path cost is reduced by 24.1%, 5.9%, and 25.8%, respectively, and the number of corners is zero; the improved RRT algorithm has a substantial improvement in all four indicators. It can meet the driverless complex roadway path planning needs of unmanned complex roadways.
From
Figure 16 and
Table 2, it can be seen that in the comparison experiment of the roundabout turn, the improved RRT algorithm reduces the time and sampling times by 98.4%, 98%, and 98.7% and 95%, 97.4%, and 71.7%, respectively, compared to the remaining three algorithms; the path cost is reduced by 14.3%, 3.93%, and 20% respectively; and the number of corners is zero. The four indicators of the improved RRT algorithm are all greatly improved and can meet the path planning requirements of unmanned roundabout turns.
From
Figure 16 and
Table 2, it can be seen that in the comparison experiments of the obstacle-avoidance lane-changing scenario, the improved RRT algorithm reduces the time and the number of samples compared with the remaining three algorithms by 45.5%, 99%, and 97.5% and 49.1%, 87.4%, and 36.8%, respectively, and the path cost is reduced by 20.3%, 0.01%, and 21%, respectively. The number of corners is zero, and the four indexes of the RRT algorithm are all greatly improved, so it can meet the path planning requirements of unmanned vehicle obstacle avoidance and lane changing.
From
Figure 16 and
Table 2, it can be seen that the improved method proposed in this paper has apparent advantages over the remaining three algorithms in the intersection left-turn scenario in terms of the three evaluation indexes of the number of samples, planning time, and number of corners compared with the RRT algorithm, the RRT* algorithm, and the RT-connect algorithm. The time is reduced by 96.8%, 98.6%, and 97.9%, respectively; the number of samples is reduced by 63%, 95%, and 39%, respectively; the path length is reduced by 28%, 0.04%, and 19%; and the number of corners achieves the ideal 0, 63%, 95%, and 39%, respectively. The path length is reduced by 28%, 0.04%, and 19%, respectively, compared to the number of samples, and the number of corners reaches the ideal of 0. The improved RRT algorithm outperforms the remaining three algorithms in all indicators.
4.2. Analysis of Experimental Results of Static and Dynamic Fusion Simulation Scenarios
Simulation experiments were conducted to compare the performance difference between the improved DWA algorithm based on evaluation function optimization and adaptive weighting in the traditional RRT and DWA fusion algorithm and the improved RRT and DWA fusion algorithm of this paper, considering path planning in different daily driving scenarios. While international traffic regulations provide a structured framework for vehicle movement, dynamic and unexpected scenarios still occur frequently. Our approach is designed to operate within the bounds of these regulations, ensuring that the unmanned vehicle can adapt to real-time changes in the environment and avoid collisions effectively.
In order to further verify the reliability of the hybrid algorithm, temporary static and dynamic obstacles are added to the map, where the black ball is a dynamic obstacle and makes reciprocal uniform motion on both sides of the path, and other black shapes are static obstacles. Simulation comparison experiments with traditional RRT and DWA fusion algorithms and improved DWA algorithms with optimized evaluation functions are also conducted and compared to verify the planning efficiency as well as the planning effect. The experimental results are shown in
Figure 17 and
Figure 18, and the performance pairs are shown in
Table 3.
In order to further verify the superiority of the fusion algorithm proposed in this paper, comparative experiments with the RRT and DWA fusion algorithm, the improved DWA algorithm, and the improved fusion algorithm in this paper are conducted on the parking lot scenario map, as shown in
Figure 17. As can be seen from
Figure 17, all three algorithms successfully find the path from the starting point to the destination in an environment containing unknown and dynamic obstacles. However, the path planned by the RRT algorithm, as shown in
Figure 17a, is not flat and is accompanied by steep turns while running a path that does not meet our daily driving requirements. Moreover, the improved DWA algorithm, shown in
Figure 17b, can realize dynamic obstacle avoidance, but the path has the disadvantages of being unsafe and not smooth, and it does not meet the driving conditions. As shown in
Figure 17c, the improved fusion algorithm proposed in this paper has smoother paths and safer obstacle distances with smaller and fewer turning angles, which is more suitable for unmanned vehicle driving conditions.
Figure 18 shows the linear velocity, angular velocity, and time comparison graphs, which show that the algorithm has small and gradual changes in linear and angular velocities when avoiding unknown obstacles. Meanwhile, in the area without obstacles, the linear velocity stays within a stable range, showing the stability and efficiency of this paper’s algorithm in path planning. When stable steering is required, the angular velocity should be kept within a reasonable range without frequent or drastic changes to ensure smooth steering movements and coherent paths. In the parking lot scenario, the improved algorithm in this paper decelerates when encountering sudden oncoming obstacles as well as when turning, which is more in line with driving requirements. Meanwhile, compared with the RRT and DWA fusion algorithm and the improved DWA algorithm, the magnitude of change in linear velocity and angular velocity and the algorithm time of this paper’s algorithm are significantly improved. In
Table 3, the running time of the fusion algorithm proposed in this paper is reduced by 36.8% and 30.9% compared to the RRT and DWA fusion algorithm and the improved DWA algorithm, respectively. In addition, the path length is reduced by 4.8% and 8.4%, and the algorithm significantly improves the computing speed and planning efficiency with better path tracking characteristics.
To further verify the superiority of the fusion algorithm proposed in this paper, comparison experiments with the RRT and DWA fusion algorithm, the improved DWA algorithm, and the improved fusion algorithm of this paper are conducted on the map of the roundabout scenario, as shown in
Figure 19. Among them, the RRT and DWA fusion algorithm in
Figure 19a does not run successfully because the target point is on the opposite side of the starting point, and at the same time, there is an obstacle between the starting point and the endpoint, which causes the DWA algorithm to fall into the local optimum and fail to run. As shown in
Figure 19b, although the improved DWA algorithm successfully finds the path from the starting point to the goal point in an environment containing unknown and dynamic obstacles, the path is tortuous and lengthy. As shown in
Figure 19c, the improved fusion algorithm proposed in this paper has smoother paths and safer obstacle distances, smaller and fewer turning angles, and shorter paths more suitable for unmanned vehicle driving conditions.
As can be seen from
Figure 20, the linear velocity of the improved fusion algorithm in this paper exhibits more excellent stability, and the angular velocity exhibits less fluctuation compared to the RRT and DWA fusion algorithm and the improved DWA algorithm, which makes the travel of the unmanned vehicle more stable and comfortable. In addition,
Table 4 shows that the running time of the improved fusion algorithm in this paper is reduced by 27.6% compared to the improved DWA algorithm, respectively. In addition, the path length is reduced by 17%. In summary, utilizing the improved RRT and DWA fusion algorithm proposed in this paper not only enhances the safety of unmanned vehicle path planning but also ensures stability.
To further verify the superiority of the fusion algorithm proposed in this paper, comparative experiments with the RRT and DWA fusion algorithm, the improved DWA algorithm, and the improved fusion algorithm in this paper are conducted on the map of the intersection scenario. As shown in
Figure 21, all three algorithms successfully find the path from the starting point to the goal point in the environment containing unknown and dynamic obstacles. However, the path planned by the RRT algorithm, as shown in
Figure 21a, is not flat and is accompanied by steep turns while running a path that does not meet our daily driving requirements at intersections. Moreover,
Figure 21b shows that although the improved DWA algorithm successfully finds a path from the starting point to the destination in an environment containing unknown and dynamic obstacles, there is a starting phase where the path is winding and too close to the opposite lane. As shown in
Figure 21c, the improved fusion algorithm proposed in this paper has smoother paths and safer obstacle distances, smaller and fewer turning angles, and shorter paths. It is more compatible with unmanned vehicle driving conditions.
As can be seen from
Figure 22, compared with the RRT and DWA fusion algorithm and the improved DWA algorithm, the linear velocity of the improved fusion algorithm in this paper shows more excellent stability. In contrast, the angular velocity shows less fluctuation. After successfully avoiding an obstacle, the linear and angular velocities should quickly return to the normal traveling state, showing the adaptability and efficiency of the DWA algorithm in dynamic environments. In addition,
Table 5 shows that the running time of the improved fusion algorithm in this paper is reduced by 69.7% and 60.5% compared with the RRT and DWA fusion algorithm and the improved DWA algorithm, respectively. In addition, the path length is reduced by 50.1% and 33.4%. In summary, using the improved RRT and DWA fusion algorithm proposed in this paper not only enhances the safety of unmanned vehicle path planning but also ensures stability.
To further verify the superiority of the fusion algorithm proposed in this paper, comparative experiments with the RRT and DWA fusion algorithm, the improved DWA algorithm, and the improved fusion algorithm in this paper are carried out on the map of the obstacle avoidance lane-change scenario, as shown in
Figure 23. Among them, the RRT and DWA fusion algorithm in
Figure 23a does not run successfully because the target point is on the opposite side of the obstacle, which causes the DWA algorithm to fall into the local optimum and fail to run. As shown in
Figure 23b, although the improved DWA algorithm successfully finds the path from the starting point to the goal point in the environment containing unknown and dynamic obstacles, the path is too long because the goal point is on the opposite side of the obstacle, which causes the improved DWA algorithm to fall into the local optimum first, but then it jumps out of the local optimum to find the goal point. As shown in
Figure 23c, the improved fusion algorithm proposed in this paper has smoother paths and safer obstacle distances, avoids all dynamic static obstacles, has smaller and fewer turning angles, and has shorter paths more suitable for unmanned vehicle driving conditions.
As can be seen from
Figure 24, compared with the RRT and DWA fusion algorithm and the improved DWA algorithm, the linear velocity of the improved fusion algorithm in this paper exhibits greater stability, while the angular velocity exhibits less fluctuation. In the area without obstacles, the linear velocity stays within a stable range, reflecting the stability and efficiency of this paper’s algorithm in path planning. During the obstacle avoidance process, the adjustments of linear and angular velocities are fast enough and effective enough to ensure that the obstacle avoidance maneuver is smooth without losing its smoothness.
Table 6 shows that the running time of the improved fusion algorithm in this paper is reduced by 54.2% compared with the improved DWA algorithm, respectively. In addition, the path length is reduced by 36.8%. In summary, utilizing the improved RRT and DWA fusion algorithm proposed in this paper not only enhances the safety of unmanned vehicle path planning but also ensures stability.