Obstacle Avoidance Path Planning for the Dual-Arm Robot Based on an Improved RRT Algorithm

In the future of automated production processes, the manipulator must be more efficient to complete certain tasks. Compared to single-arm robots, dual-arm robots have a larger workspace and stronger load capacity. Coordinated motion planning of multi-arm robots is a problem that must be solved in the process of robot development. This paper proposes an obstacle avoidance path planning method for the dual-arm robot based on the goal probability bias and cost function in a rapidlyexploring random tree algorithm (GA_RRT). The random tree grows to the goal point with a certain probability. At the same time, the cost function is calculated when the random state is generated. The point with the lowest cost is selected as the child node. This reduces the randomness and blindness of the RRT algorithm in the expansion process. The detection algorithm of the bounding sphere is used in the process of collision detection of two arms. The main arm conducts obstacle avoidance path planning for static obstacles. The slave arm not only considers static obstacles, but also takes on the role of the main arm at each moment as a dynamic obstacle for path planning. Finally, MATLAB is used for algorithm simulation, which proves the effectiveness of the algorithm for obstacle avoidance path planning problems for the dual-arm robot.


Introduction
With the development of science and industrial automation, robot technology has been greatly developed in recent decades, and gradually applied in military, aerospace, industry, medical, service, and other fields [1,2]. Single-arm industrial robots have achieved notable development and application in China, widely replacing manual casting, welding, palletizing, and other operations [3,4]. However, many complex operational tasks require collaboration between the robotic arms. The dual-arm robot has a larger working space, stronger load capacity, and obvious advantages in heavy lifting and assembly scenarios. However, unlike a simple combination of two single-arm robots, a dual-arm robot has some overlap in its workspace. The path planning of two arms should not only consider static obstacles in space, but also consider the interference between the two arms. In the field of dual-arm robotics, how to realize obstacle avoidance motion planning is always a hot issue [5,6].
In the field of robot path planning, many path planning algorithms have been formed. The traditional methods mainly include the artificial potential field algorithm [7][8][9], the A* algorithm [10,11], and the RRT algorithm [12,13], etc. The methods based on computational networks mainly include neural network algorithms [14,15] and bioinspired planning algorithms [16,17]. Bioinspired planning algorithms mainly include the genetic algorithm, ant colony optimization (ACO), and so on. The genetic algorithm is an intelligent bionic algorithm based on natural selection and genetic mechanisms [18]. The ACO is an intelligent optimization search model established with reference to the foraging method of ant populations [19,20]. However, in the joint space of a manipulator with high degrees of freedom, each movement of the arms will generate a high computational workload. Algorithms based on computational networks have problems such as excessive computational load and insufficient real-time performance in the field of dual-arm robot path planning.
Among the traditional path planning algorithms, the artificial potential field method has the characteristics of simple implementation and good real-time performance, and has been widely used. Nonetheless, once the resultant force is zero, that is, at the local potential energy minimum point, the algorithm will fall into a deadlock state and stop searching [21]. In addition, the artificial potential field algorithm needs the sampling information of the entire workspace to avoid local minima, which affects the dynamic obstacle avoidance of the dual-arm robot.
The A* algorithm is a method for solving the shortest path in a known static road network. This method is a search algorithm obtained by adding a heuristic function to the Dijkstra algorithm [22]. It evaluates the nodes and guides the search process based on the evaluation value. Latombe et al. applied a PRM (probabilistic road map) to multi-robot path planning, but the increase in degrees of freedom and obstacles reduced the speed of the method [23].
In the field of multi-axis robot planning, due to the constraints of complex environments, most search methods are based on random sampling. Among the path planning methods used in the past few decades, the RRT algorithm, based on random search strategy, is suitable for path planning in high-dimensional space, and has been widely used in the path planning of robots [24][25][26]. The algorithm avoids modeling the entire space by detecting collisions at sample points in the state space. Therefore, it can effectively solve path planning problems with complex constraints in high-dimensional space, and has the advantages of probabilistic completeness and perfect scalability.
RRT is a fast search algorithm proposed by LaValle [27]. However, it is a random search algorithm, and the search path may not be in the direction of the target, therefore the convergence speed is relatively slow. In order to improve the target orientation of the RRT algorithm, Chris Urmson et al. [28] proposed a P probability RRT algorithm based on goal bias strategy. Li et al. [29] proposed a variable step size trunk fast exploration random tree (VT-RRT) algorithm. By transforming the search space of random nodes in the RRT algorithm and adaptively adjusting the step size according to the target position, the search efficiency is effectively improved, and the path planning time is reduced. Jiang Hong et al. [30] proposed a new node expansion method that is biased towards the target point. The method combines the target point gravity, obstacle repulsion, and random point gravity, and adds an adaptive function related to the obstacle distance. A pruning optimization method is proposed to optimize the path length. Lei Shao et al. [31] used an ant colony algorithm to optimize RRT. Experiments show that the combination of an ant colony algorithm and RRT algorithm effectively reduces the number of nodes and the average computing time. Kun Wei [32] proposed a dynamic path planning method for robot autonomous obstacle avoidance based on an improved RRT algorithm, namely smooth RRT (S-RRT). This method takes the directional node as the goal, which greatly improves the sampling speed and efficiency of RRT.
In the field of path planning for dual-arm robots, Andreas [33] proposed a dual-arm path planning method based on closed-chain kinematics to meet the motion constraints of the manipulator. Kim [34] proposed a dimension reduction RRT method, which reduced the dimension of high-dimensional path planning space according to the task requirements of the dual-arm robot. To ensure that the RRT algorithm has higher efficiency, Li yang [35] proposed a cooperative path planning method for a dual-arm robot based on gravity adaptive step length RRT. The simulation results show that the gravity adaptive step size RRT method can effectively constrain the step size in the workspace to ensure the effectiveness of the collision detection algorithm.
In this paper, the GA_RRT path planning algorithm is proposed based on the traditional RRT algorithm by introducing the goal probability bias strategy and A* cost function. In addition, two manipulators use the bounding sphere collision detection method. The main arm considers static obstacles, and the slave arm considers static obstacles and dynamic main arm obstacles. Finally, MATLAB software is used to simulate the obstacle avoidance path planning for the dual-arm robot. It is finally proved that the algorithm is effective and superior for the path planning of dual-arm robot.

Model Building
In this paper, the robot platform composed of two UR5 robotic arms is taken as an example. It mainly includes one base and two 6-DOF manipulators. According to the DH modeling method, we construct the dual-arm robot model, as shown in Figure 1. The joint diagram of the main manipulator is shown in Figure 2. Using the parameters of the robotic arm and DH method, we obtain the DH parameters in Table 1. The joint diagram of the slave manipulator, and the joint diagram of the main manipulator, are mirror-symmetric with the robot body. For example, the DH parameters α and θ of the master manipulator are opposite to those of the slave manipulator.
Appl. Sci. 2022, 11, x FOR PEER REVIEW 3 of 18 step size RRT method can effectively constrain the step size in the workspace to ensure the effectiveness of the collision detection algorithm. In this paper, the GA_RRT path planning algorithm is proposed based on the traditional RRT algorithm by introducing the goal probability bias strategy and A* cost function. In addition, two manipulators use the bounding sphere collision detection method. The main arm considers static obstacles, and the slave arm considers static obstacles and dynamic main arm obstacles. Finally, MATLAB software is used to simulate the obstacle avoidance path planning for the dual-arm robot. It is finally proved that the algorithm is effective and superior for the path planning of dual-arm robot.

Model Building
In this paper, the robot platform composed of two UR5 robotic arms is taken as an example. It mainly includes one base and two 6-DOF manipulators. According to the DH modeling method, we construct the dual-arm robot model, as shown in Figure 1. The joint diagram of the main manipulator is shown in Figure 2. Using the parameters of the robotic arm and DH method, we obtain the DH parameters in Table 1. The joint diagram of the slave manipulator, and the joint diagram of the main manipulator, are mirror-symmetric with the robot body. For example, the DH parameters α and θ of the master manipulator are opposite to those of the slave manipulator.   step size RRT method can effectively constrain the step size in the workspace to ensure the effectiveness of the collision detection algorithm. In this paper, the GA_RRT path planning algorithm is proposed based on the traditional RRT algorithm by introducing the goal probability bias strategy and A* cost function. In addition, two manipulators use the bounding sphere collision detection method. The main arm considers static obstacles, and the slave arm considers static obstacles and dynamic main arm obstacles. Finally, MATLAB software is used to simulate the obstacle avoidance path planning for the dual-arm robot. It is finally proved that the algorithm is effective and superior for the path planning of dual-arm robot.

Model Building
In this paper, the robot platform composed of two UR5 robotic arms is taken as an example. It mainly includes one base and two 6-DOF manipulators. According to the DH modeling method, we construct the dual-arm robot model, as shown in Figure 1. The joint diagram of the main manipulator is shown in Figure 2. Using the parameters of the robotic arm and DH method, we obtain the DH parameters in Table 1. The joint diagram of the slave manipulator, and the joint diagram of the main manipulator, are mirror-symmetric with the robot body. For example, the DH parameters α and θ of the master manipulator are opposite to those of the slave manipulator.   The homogeneous coordinate transformation matrix of a six-axis manipulator with this parameter is shown in Equation (1).
The transformation matrix of all adjacent coordinate systems can be obtained by substituting DH parameters. The transformation matrix relative to the base coordinate system is shown in Equation (2).
Finally, the dual-arm manipulator needs to be unified into the base coordinate system using Equation (3).

Basic RRT
RRT constructs a random tree through random sampling. In the space with obstacles, the algorithm starts to explore from the initial node, X init . This process is shown in Figure 3. Firstly, the random point, X rand , is generated. In all the added path nodes of the tree [X init , X 1 , X 2 , X 3 , X nearest ], the node X nearest , which is nearest to X rand , is selected. Taking X nearest as the root node, a fixed step R is added to the direction of X rand to obtain X new . The collision detection algorithm is used to detect whether the path between X nearest and X rand is feasible. If there is no collision, X new is added to the random tree, T. Alternatively, if there is a collision, X rand will be regenerated. Repeat the whole process until the distance between the latest node and X goal is less than the step value, and there are no obstacles between them; at this point it is considered that the algorithm has converged. When the planning algorithm converges, we start from X goal and trace back along its parent node to find an effective path between the start point and the end point.
The process of the RRT algorithm is shown in Algorithm 1. X nearest = min the distance (X rand )Node tree ); // Find the nearest node 7: X new = extend (X nearest , X rand , R); // Expand towards random points 8: if not obstacle(X nearest , X new ): 9: T[i] = add Node(X new ); // Add a new node to the tree 10: end if 11: end for 12: return T Appl. Sci. 2022, 11, x FOR PEER REVIEW 5 of 18 The process of the RRT algorithm is shown in Algorithm 1.

Path Planning of Dual-Arm Based on GA_RRT
The disadvantage of the traditional RRT algorithm is that it is a random exploration of the whole space, and does not consider the path cost. This paper provides some knowledge of goal probability bias and path cost.
Some principles of the goal probability bias and A* cost function are mainly introduced in this section. Due to the computational complexity of collision detection for dualarm robots, collision detection is mainly performed using the method of the bounding sphere.

The Goal Probability Bias
The traditional RRT algorithm is a random search of space, which ensures the effectiveness of the RRT algorithm. However, excessive blind search reduces the convergence speed and consumes a large amount of computation power. Therefore, we adopt a goal probability bias strategy. This method sets a parameter, , in sampling judgment. Before each extension, a random value, , (between point 0, 1) is randomly generated. When 0 < < , the random tree grows toward the target point, making the random tree expansion more objective. When < < 1, points are generated randomly.

Path Planning of Dual-Arm Based on GA_RRT
The disadvantage of the traditional RRT algorithm is that it is a random exploration of the whole space, and does not consider the path cost. This paper provides some knowledge of goal probability bias and path cost.
Some principles of the goal probability bias and A* cost function are mainly introduced in this section. Due to the computational complexity of collision detection for dual-arm robots, collision detection is mainly performed using the method of the bounding sphere.

The Goal Probability Bias
The traditional RRT algorithm is a random search of space, which ensures the effectiveness of the RRT algorithm. However, excessive blind search reduces the convergence speed and consumes a large amount of computation power. Therefore, we adopt a goal probability bias strategy. This method sets a parameter, P a , in sampling judgment. Before each extension, a random value, P rand , (between point 0, 1) is randomly generated. When 0 < P rand < P a , the random tree grows toward the target point, making the random tree expansion more objective. When P a < P rand < 1, X rand points are generated randomly.
For the dual-arm manipulator environment, when the goal point is taken as a random point with probability P a , we need to read the real-time position of the manipulator, and detect whether there are static obstacles and dynamic obstacles of the manipulator under the path. When there are obstacles, the cost of expansion is infinite. We abandon the random point and restart the random process.

A* Cost Function
Although the probability-biased RRT algorithm greatly shortens the search time, there are still many redundant random points. Therefore, this paper combines the goal probability bias RRT algorithm with the A* search algorithm. The cost function was used to search for the best sampling point, so as to reduce the level of redundant computing and optimize the path. We consider the forward and backward cost of the current node in the RRT algorithm. The distance from the initial point, X init , to the selected node is called forward cost, which can also be called heuristic function H(i). The distance between X select and X goal is called backward cost B(i). The cost function of the current node is represented by F(i), shown in Equation (4). After calculating the random node, select the random point with the smallest cost function to join the random tree list. Repeat the calculation process until extended to the target node.
We need to add two additional data groups. One is the optional random point data group, and the other is the cost function data group corresponding to the optional random point. Each time we expand the random tree, multiple random points, X rand , are generated and put into the optional random point group. Next, the cost function is calculated for the optional random point group. According to the cost function data group, the minimum cost node is taken.

Collision Detection of Dual-Arm Robots
In order to simplify the calculation of the 6-DOF manipulator, the method of the bounding sphere is used for obstacle avoidance detection. It is the smallest sphere that surrounds three-dimensional objects. In order to reduce the complex calculation of collision detection during the movement of the arms, this method is selected in this paper. Its advantages are convenient calculation, simple structure, and it is not affected by spin. This algorithm has better security while generating partial redundant spaces. When considering whether there is a collision between the manipulator and the obstacle, or a collision between the main manipulator and the slave manipulator, it is only necessary to consider the distance and radius of the object center.
The base point of the main manipulator is denoted as O 10 , and the center points of the six joints are denoted as {O 11 Then, the center points of the connecting rod are denoted as {A 1 , A 2 , A 3 , A 4 , A 5 , A 6 }. These values are determined by the parameters of the manipulator body. Taking the joint bounding sphere as an example, the joint bounding sphere can be expressed as: The radius of the joint bounding sphere for the main manipulator is set as {R 11 , R 12 , R 13 , R 14 , R 15 , R 16 }, and the bounding sphere radius of the connecting rod is set as {R a1 , R a2 , R a3 , R a4 , R a5 , R a6 }. The slave arm parameters are represented by O 2i , B i , R 2i , R bi . The radius can be calculated using Equation (6) where x ijmax , x ijmin , y ijmax , y ijmin , z ijmax , z ijmax , respectively, represent the maximum and minimum values of the object projected on the XYZ coordinate axes. Bounding sphere model of the dual-arm robot is shown in Figure 4. The conditions for collision detection of an enclosing ball are shown in Equations (5)-(7).

1.
No collision between each connecting rod and the joint in the main manipulator: 2.
No collision between each connecting rod and the joint in the slave manipulator: 3.
No collision between the links of the main manipulator and the links of the slave manipulator: , i = 1, 2, . . . , 6, j = 1, 2, . . . , 6 The static obstacle collision detection in the environment mainly calculates the distance, D, from the center of the manipulator to the center of the obstacle ball. The collision is judged by comparing the distance, D, with the sum of the radius of the enclosing ball.
where , , , , , , respectively, represent the maximum and minimum values of the object projected on the XYZ coordinate axes. Bounding sphere model of the dual-arm robot is shown in Figure 4.
2. No collision between each connecting rod and the joint in the slave manipulator: 3. No collision between the links of the main manipulator and the links of the slave manipulator:

Overall Process of GA_RRT
The GA_RRT algorithm combines the probabilistic bias method and A* algorithm with RRT. The process of the algorithm is shown in Algorithm 2. if P rand < P a : 7: X direction = X goal ;// Select random points as target points 8: else: 9: X direction = Random sampling(); // Random sampling 10: X nearest = min the distance X direction , Node tree ); 10: X select = extend (X nearest , X direction , R); // Expand 11: X path (j) = add X select // Add random states to cost function group 12: end for 13: F(j) = the distance(X path (j), X init ) + the distance(X path (j), X goal ); // cost function 14: X new = min F(j); // The minimum cost node is taken in tree 15: if not obstacle(X nearest , X new ): 16: The overall flow of GA_RRT algorithm is shown in Figure 5. First, the main flow of the algorithm is used to perform random sampling. Then, the target point is expanded as a direction point with a probability of P a , and a random point is generated with a probability of 1 − P a for expansion. After randomly generating multiple random points for expansion, the algorithm calculates the A* cost function and selects the node with the smallest cost function for the next collision detection. If it passes the detection, the node is added to the random tree. Loop this process until you are near the target point.

Obstacle Avoidance Path Planning for Static Plane
In order to analyze the effectiveness of the GA_RRT algorithm for the path plann problem, this paper compares with the traditional RRT algorithm and the RRT algorit based on goal bias probability (G_RRT) in two different scenarios. The hardware platfo is Intel(R) Core (TM) i7-10700f CPU with 16GB of memory. The simulation experimen built using MATLAB software.
The simulation mainly adopts two common methods to verify the validity of the p planning algorithm. Scenario A is shown in Figure 6, the initial point is 1, 1 and the tar point is 750,750. As can be seen in Figure 6a, the RRT algorithm explores the entire spa while the G_RRT algorithm explores the target point with a probability of 0.5, presen in Figure 6b. This greatly reduces the number of nodes for spatial search. The GA_R algorithm performs node pruning by calculating the cost function while exploring goal point. This further effectively reduces the number of tree node branches and spe up the search efficiency.

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-10700f CPU with 16GB 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. 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.  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. 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. 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%.

Obstacle Avoidance Path Planning for Dynamic Dual-Arm Robots
Through the above path planning simulations in conventional scenarios, the effectiveness of the GA_RRT algorithm in path searching and reducing redundancy is successfully verified. Finally, in order to verify the effectiveness of the algorithm for the obstacle avoidance path planning of the dual-arm robot, this paper establishes a three-dimensional obstacle environment through the robot simulation toolbox. The The obstacle is placed on the path of the dual-arm robot moving towards the target point. The initial scene is shown in Figure 8a.
As shown in Figure 8b,c, if the robot arm does not plan the obstacle avoidance path, the slave robot arm will collide with the static obstacle and the master arm link during the movement. The final state of the dual-arm robot reaching the target point is shown in Figure 8d.
Keeping the surrounding environment of robot arm unchanged, the obstacle avoidance path planning algorithm of the dual-arm robot based on GA_RRT is added into the simulation. Figure 9a shows the exploration process of the main arm joint angle. In order to visualize the six-dimensional exploration process, it is divided into the exploration process of the first three joints and the exploration process of the last three joints.
The angle exploration process is shown in Figure 9. The final result of the exploration is shown in Figure 10. From Figure 10 The main arm The slave arm As shown in Figure 8b,c, if the robot arm does not plan the obstacle avoidance path, the slave robot arm will collide with the static obstacle and the master arm link during the movement. The final state of the dual-arm robot reaching the target point is shown in Figure 8d.
Keeping the surrounding environment of robot arm unchanged, the obstacle avoidance path planning algorithm of the dual-arm robot based on GA_RRT is added into the simulation. Similarly, Figure 11 shows the path exploration process for the slave arm. The starting joint angle and target joint angle of the slave arm are 35, 30, 20, 0, 0, 0 and 0, −45, 30, −30, −15, 0, respectively. We can draw similar conclusions from the search results in Figure 12.  Figure 9a shows the exploration process of the main arm joint angle. In order to visualize the six-dimensional exploration process, it is divided into the exploration process of the first three joints and the exploration process of the last three joints. The angle exploration process is shown in Figure 9. The final result of the exploration is shown in Figure 10.  Similarly, Figure 11 shows the path exploration process for the slave arm. The starting joint angle and target joint angle of the slave arm are 35, 30, 20, 0, 0, 0 and 0, −45, 30, −30, −15, 0, respectively. We can draw similar conclusions from the search results in Figure  12.  Figure 9a shows the exploration process of the main arm joint angle. In order to visualize the six-dimensional exploration process, it is divided into the exploration process of the first three joints and the exploration process of the last three joints. The angle exploration process is shown in Figure 9. The final result of the exploration is shown in Figure 10. From Figure 10  Similarly, Figure 11 shows the path exploration process for the slave arm. The starting joint angle and target joint angle of the slave arm are 35, 30, 20, 0, 0, 0 and 0, −45, 30, −30, −15, 0, respectively. We can draw similar conclusions from the search results in Figure  12.    The simulation realizes the search process and results of a total of 12 joint angles of the main arms and slave arms. It can be seen from the search process that the joint angle search starts from the green starting point. At the beginning, because of the obstacles, the random points directly extended to the target point were not able to pass the obstacle detection. 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. The simulation realizes the search process and results of a total of 12 joint angles of the main arms and slave arms. It can be seen from the search process that the joint angle search starts from the green starting point. At the beginning, because of the obstacles, the random points directly extended to the target point were not able to pass the obstacle detection. 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. The main arm The slave arm 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. 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. 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.  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).
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.

Conclusions
Based on the traditional RRT algorithm, this paper introduces the goal probability bias and A* cost function algorithm. The search time and efficiency of the RRT algorithm is greatly optimized. In addition, the generated paths are also locally optimized. The effectiveness of the GA_RRT algorithm is first verified by the simulation of planar obstacle avoidance path planning. Furthermore, the algorithm is applied to obstacle avoidance path planning simulation of a dual-arm robot. In the process of obstacle avoidance, not only static obstacles are considered, but also the influence of dynamic manipulator obstacles in real time. Finally, the simulation results show that the algorithm can realize the cooperative obstacle avoidance path planning of a dual-arm robot. In terms of search efficiency, it is also superior to the traditional RRT algorithm. As a future research task, the experimental verification process will first need to be improved. In addition, the adaptive step size will be further used to improve the search efficiency of the algorithm. The visual method is also considered to detect the dynamic obstacles in the environment, so as to realize the dual-arm path planning in unstructured environments.