# Global Path Planning for Differential Drive Mobile Robots Based on Improved BSGA* Algorithm
## 4 Simulation and Experiments
### Comparison in Real Environments  
In order to verify the effectiveness of the improved BSGA* algorithm in real environments, a LEO ROS mobile robot is selected for the path-planning experiment. As shown in Figure 16, rubber wheels are adopted as the front wheels and two DC three-phase brushless motors are equipped, which can realize the differential control of both sides of the driving wheels. The rear wheels use omnidirectional wheels to achieve turning. The robot is equipped with a US-015 ultrasonic module, which can detect obstacles with a measuring accuracy of 0.1 cm + 1%. In addition, the robot uses EAI G1 LIDAR to test the surrounding environment, obtains obstacle information based on the triangulation principle, constructs environment maps using the \(Gmapping\) SLAM algorithm, saves them with \(map\_server\), and generates grid maps through the \(map\_2d\) function package. The AMCL algorithm is used to determine the initial position and pose of the robot before navigation. Figure 14: Column graphs and error bars of executing time, path length, and total turning angle in \(15\times 15\) map: (**a**) Executing time; (**b**) Path length; (**c**) Total turning angle. Figure 15: Column graphs and error bars of executing time, path length, and total turning angle in \(30\times 30\) map: (**a**) Executing time; (**b**) Path length; (**c**) Total turning angle. The global path-planning algorithms embedded in the LEO ROS mobile robots exist in the form of plug-ins in the _move_base_ package. By creating and configuring the parameter file _base_global_planner_param.yaml_ writing the \(GlobalPlanner\) class, the selection of different global path-planning algorithms can be realized. In order to apply the improved BSGA* algorithm to the robot, \(BSGAstar\_global\_planner\) plug-in is written and added into the _move_base_ package based on the current \(GlobalPlanner\), and the algorithm was implemented by modifying and configuring the parameter file _move_base_params.yaml_. The LEO ROS robot is 360 mm in length, 455 mm in width, and 160 mm in height. The LIDAR is 100 mm from the ground. Based on the above size, 360 \(\times\) 260 \(\times\) 40 mm cardboard boxes are used to build the experimental environment, as shown in Figure 17. The edge of the square experimental environment consists of 15 cardboard boxes placed side by side. Figure 18a shows environment 1, the starting point and the target point are in a diagonal position, and there are three obstacle areas randomly placed in the environment. Figure 17b shows environment 2, there is a large area of obstacles between the starting point and the target point. The environmental map was constructed using the \(Gmapping\) SLAM algorithm in the ROS system and displayed on the _rivz_ platform in real time. The size of the grid constructed by the robot was set to 360 mm \(\times\) 360 mm. As the construction of environments is affected by many factors, such as the smoothness of driving, it is difficult to be completely consistent with the actual environment. Figure 16: Main structure of the LEO ROS robot. Figure 17: Experimental environments: (**a**) Environment 1; (**b**) Environment 2. It can be obtained that, compared with the other five algorithms in environment 1, the calculation times of the improved BSGA* algorithm are reduced by 73.60%, 69.48%, 93.31%, 92.39%, and 71.43%, respectively, in turn. In environment 2, the corresponding data are 77.67%, 48.17%, 93.47%, 92.66%, and 83.26%, respectively, in turn. This is because the Gaussian function is used to dynamically weigh the heuristic function of the A* algorithm, and the BS search structure is applied to the A* algorithm, which can effectively reduce the redundant search nodes. From Table 9, it can be concluded that, compared with the other five algorithms in environment 1, the driving time of the LEO ROS robot using the improved BSGA* algorithm is reduced by 53.19%, 65.53%, 36.05%, 40.52%, and 68.35%, respectively, in turn.