1. Introduction
With the continuous advancement of production automation, robotic arms have been widely applied in various fields such as medical surgery, industrial manufacturing and agricultural harvesting, significantly improving production efficiency and quality [
1,
2]. On the production lines, robotic arms are often used for tasks such as module assembly, welding or grinding. To meet the requirements of these tasks, it is typically necessary to plan a collision-free continuous and optimal path for the robotic arm from the starting point to the target point under a given set of constraints [
3].
The path planning of robotic arms in complex and narrow environments with multiple obstacles poses challenges, and path-planning algorithms can generally be categorized into three types: graph-based search, deep learning-based, and sampling-based algorithms [
4]. In the graph-based search algorithms, such as A* [
5] and D* algorithms [
6], the search space is represented as a graph structure consisting of nodes and edges (paths connecting the nodes), aiming to find the optimal path from the initial point to the destination. While these algorithms are simple and easy to implement, they incur high computational costs and memory consumption when applied to high-dimensional path-planning scenarios [
7]. Deep learning-based algorithms, however, can leverage the powerful nonlinear modeling capabilities of the deep neural networks to directly or indirectly learn the path-planning strategies from the environmental data. For instance, Meng et al. [
8] have proposed a path-planning method which integrates deep learning with a sampling-based planner (NR-RRT), where risk profile maps and neural network-based samplers are employed to rapidly identify risk-constrained paths. Similarly, Huang et al. [
9] have introduced a learning-based path-planning method, i.e., Neural-Informed RRT* (NIRRT*), where the point-cloud-based state representation under the acceptable ellipsoidal constraints with the PointNet++ network can directly generate multiple guiding states from the input point cloud of the free states and accelerate convergence to the optimal path by guiding the sampling process with neural networks. Although deep learning-based path-planning algorithms can improve planning efficiency, they require large amounts of data for training and inference, resulting in longer computational times and higher memory usage. In contrast, sampling-based algorithms, due to their stochastic nature, have lower computational costs and probabilistic completeness. Consequently, these algorithms have been widely adopted in robotic manipulator motion planning [
10,
11].
Sampling-based path-planning algorithms mainly include Probabilistic Roadmap (PRM) [
12] and Rapidly Exploring Random Tree (RRT) [
13]. The RRT is a single-query sampling-based path-planning method which incrementally explores the space by generating random nodes and extending a tree structure until a collision-free path from the initial point to the target point is found. Compared to the PRM, the RRT is more efficient and has lower time costs. However, the randomness in the RRT sampling and expansion would lead to slow convergence, and difficulty in navigating narrow passages and nonoptimal paths.
To address these issues, various improved RRT-based algorithms have been proposed in recent years. Kuffner and LaValle [
14] proposed the RRT-Connect algorithm, which can simultaneously generate two trees at the initial and goal points. By employing a greedy strategy, the two trees grow towards each other, enabling faster pathfinding. However, the bidirectional search still exhibits a certain degree of randomness and cannot guarantee an optimal path obtainment. Karaman and Frazzoli [
15] introduced RRT*, an extension of RRT, which incorporates the parental node reselection and rewiring mechanisms, achieving asymptotic optimality at the cost of increased computation time. Gammell et al. [
16] proposed an Informed-RRT* algorithm with constrained sampling space to an ellipsoid after finding an initial path to improve the planning efficiency. However, it requires substantial time for narrow passage searches and is dependent on the quality of the initial path. Li et al. [
17] proposed an Adaptive Step-size RRT* (AS-RRT*) algorithm, which employs an accumulator-based sampling point selection strategy to enhance the efficiency of the path planning and the pruning optimization methods to quickly identify collision-free paths, thereby reducing the computational costs. Zhang et al. introduced the HP-APF-RRT* algorithm to enhance the sampling efficiency and path search capability through heuristic probability sampling and artificial potential field (APF) methods [
18].
The integration of RRT* with an APF method can enhance the planning efficiency in narrow passages, but it may be trapped in local optima [
19]. Then a heuristic probability-biased goal (PBG-RRT) approach is proposed to achieve faster convergence with local minima avoidance [
20]. Another Heuristic Dynamic Rapidly exploring Random Tree Connect (HDRRT-Connect) algorithm has been proposed to dynamically adjust the step size based on the environmental information so as to mitigate the local optimal path issues [
21]. Dai et al. proposed a potential field extension strategy with a bidirectional tree structure and direct connection strategies to enhance the node expansion efficiency [
22]. Jiang et al. employed a hybrid constraint sampling method to bring nodes closer to the narrow passages between the obstacles. During the expansion process, the adaptive gravitational fields, dynamic step sizes and constrained new node strategy are used to optimize the RRT-Connect algorithm, where these enhancements could effectively reduce excessive exploration and expansion in collision-prone areas [
23]. Cheng et al. [
24] employed an adaptive step-size strategy and fixed sampling functions to establish four trees, conducting searches from different starting points, thereby addressing the issue of the slow expansion speed in the RRT algorithm. Recent efforts include accelerating the path search with goal bias and adaptive step-size strategies [
25] and the RRT* optimization with a manipulability-aware path-planning strategy to minimize the path costs [
26]. The Adaptive Expansion Bidirectional RRT* (AEB-RRT*) [
27] has been developed to dynamically adjust the sampling probabilities to speed up the convergence. Further, the unexplored area sampling probability is used for faster space exploration in narrow environments [
28]. With the biased growth of bidirectional RRT-Connect trees and the Informed-RRT algorithm, the dynamic bias points can be applied to guide the tree growth for faster path generation [
29].
Although numerous improvements have been made to the RRT-related path-planning algorithms, there remain shortcomings in terms of sampling space constraints and longer planning times. The lack of goal bias in the node expansion would limit the algorithm flexibility. Here, this paper proposes a path-planning algorithm based on the improved RRT*-Connect, considering the sampling space constraints, node expansion and path pruning in complex and multi-obstacle environments. The main contributions of the paper are summarized as follows:
(1) A heuristic sampling strategy which integrates the ellipsoid subset sampling and goal-biased sampling is proposed to improve the sampling efficiency in path planning. Initially, goal-biased sampling is utilized to identify an initial path. Then the sampling nodes are concentrated within the ellipsoidal region of the current optimal solution to narrow down the search space gradually and reduce exploration in invalid regions.
(2) An adaptive step-size expansion strategy is introduced to dynamically adjust the step size based on the known environment and the node information so as to reach the target region during the expansion, with reduced invalid exploration but predefined expansion into collision-prone areas. Moreover, a node rejection strategy is proposed to remove the invalid nodes by calculating the estimated cost of the new nodes.
(3) A path-pruning optimization approach is developed to remove the redundant nodes and smooth the path via the cubic non-uniform B-spline interpolation.
(4) We conduct experimental comparisons of the proposed algorithm with other algorithms in both 2D and 3D map environments to validate its superiority. Furthermore, the effectiveness of the algorithm is verified in the ROS simulation environment and practical robotic arm experiments.
The remainder of the manuscript is organized as follows. An exposition of the collision detection model and the underlying principles of the RRT*-Connect algorithm are introduced in
Section 2. The improved variant of the RRT*-Connect path-planning algorithm is explained in
Section 3. Simulation experiments and experimental validation with physical prototypes are shown in
Section 4. Finally, the conclusion is provided in
Section 5.
3. The Proposed IRRT*-Connect Algorithm
To address the limitations of the RRT*-Connect algorithm, this paper proposes an improved RRT*-Connect path-planning algorithm, i.e., IRRT*-Connect. The algorithm employs a heuristic sampling strategy which integrates the ellipsoidal subset constraints and goal-biased sampling. By sampling towards the target direction with a certain probability and constraining the sampling space within an ellipsoidal subset, the algorithm can iteratively compress the sampling space, thereby reducing the exploration of the invalid regions and enhancing the sampling efficiency in narrow passages. An adaptive step-size strategy is further introduced to dynamically adjust the step size based on the obstacle information. Combined with a node rejection strategy, the invalid nodes can be minimized, enabling faster convergence of the two trees. Further, the pruning strategy is applied to optimize the generated path by eliminating redundant nodes, thereby shortening the path length.
3.1. The Heuristic Sampling Strategy
We propose a heuristic sampling strategy that combines the ellipsoidal subset sampling and goal-biased sampling to improve the sampling efficiency during the path planning.
3.1.1. Goal-Biased Sampling
The target bias probability
is defined with a range of
. During the sampling, a point is sampled towards the target direction with probability
, while with probability
, the random sampling is performed in the free space. This strategy can maintain the randomness of the search while improving the search efficiency, expressed as
where
P is the random number uniformly distributed in the range
. During each sampling iteration in the free space, the random tree can generate a random probability
P. If
, the sampling point
is selected via target-biased sampling, where the random tree
samples in the direction of the target point, and the random tree
samples in the direction of the starting point. Otherwise, if
, the sampling point
is generated randomly within the free space.
By introducing the goal-biased probability, the algorithm can maintain the randomness of the search while expanding towards the target region, thereby avoiding excessive exploration in areas far from the goal and accelerating path generation and convergence. The value of the goal-biased probability is selected based on the complexity of the environment: in scenarios with more obstacles, a smaller is chosen to prevent local optima, whereas in the environments with fewer obstacles, a larger is adopted to enhance the convergence speed.
3.1.2. Ellipsoidal Subset Sampling
The schematic diagram of ellipsoidal subset sampling is illustrated in
Figure 3, where the starting point
and the goal point
in the path are set as the two foci of the ellipse,
represents the Euclidean distance between the starting point and the goal point, and
denotes the length of the current shortest path. Specifically,
is defined as the semi-major axis of the ellipsoid and
is defined as the semi-minor axis of the ellipsoid. By iteratively searching for the shorter paths, the ellipsoidal subset space can be reduced gradually.
To achieve the uniform sampling of the ellipsoidal subset, the samples are transformed from a sphere of radius
n to the ellipsoidal subset, as follows:
,
where
,
,
is the center of the hypersphere,
is the random sampling point from the sphere and
L is the transformation matrix. The norm
represents the Euclidean norm of
x and
are the foci of the ellipse.
The transformation is calculated via the Cholesky decomposition of the hyperellipsoid matrix , , and the transformation matrix L can ensure that maintains a uniform distribution. Therefore, the estimation of the subset of sampled points can be achieved via the semi-major axis and semi-minor axis of the ellipse. The diagonal of the semi-major axis is given as and by performing the decomposition, we can obtain the matrix .
To achieve the rotation of the hyperellipsoid into the world coordinate system, the rotation matrix
F is computed based on the solution to Wahba’s problem,
where det(·) denotes the determinant of a matrix. The matrices
and
are obtained from the unitary matrices of the Singular Value Decomposition (SVD)
,
is a diagonal matrix with the absolute values of its diagonal entries equal to 1, matrix
M is computed as the outer product of the first column of the identity matrix
I and the semi-major axis length
in the world coordinate system, i.e.,
, where
. Therefore, the subset of sampled points
, obtained by transforming samples from a sphere of radius
n via a transformation matrix, rotation matrix and translation process, is calculated as,
Finally, the sampled points
within the ellipsoid are returned. The pseudocode of the ellipsoidal subset sampling algorithm is presented in Algorithm 3.
Algorithm 3 Informed_Sample() |
- 1:
if then - 2:
- 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
- 10:
else - 11:
- 12:
end if - 13:
return
|
3.2. The Adaptive Step Size
In the RRT*-Connect algorithm, the connection between a random point and its nearest point is extended in the direction of a fixed step size, and the extension strategy is defined as,
where
q is the fixed step size. The usage of the fixed step size could limit the search ability in complex and narrow regions, and the expansion direction lacks the target bias, which would lead to slow convergence.
Here, an adaptive step size strategy is proposed and the new node expansion is redefined as
where
is the random step size and
is the goal-directed step size. Through the experiments conducted with different upper and lower limits for
and
, it is observed that an excessively large
would cause the nodes to grow preferentially towards the random sampling points, thereby deviating from the target direction. Conversely, an excessively large
would result in growth nodes being unable to bypass the obstacles. Therefore, the ranges for the step size
and
are set to
and
, respectively, with initial values of
and
.
From Equation (6), the new node extension direction is determined by a combination of the sampling point direction and the goal point direction, allowing more efficient navigation of the complex regions and faster convergence. The pseudocode of the adaptive expansion function is shown in Algorithm 4. The main process of the adaptive expansion function is described as follows:
(1) Determine which random tree grows and identify the extension direction. Then the ‘Nearest’ function is applied to return the nearest node , and the ‘AdaptiveSteer’ function is applied to return the new node .
(2) Perform collision detection via the method described in
Section 2.1, check whether there is a collision between
and
along their connection, and return the corresponding state value
S. If
S returned by the current extension function is “Advanced”, it indicates that the extension is successful, the robotic arm is in a collision-free state, and the new node of the current extension function is not connected to the other random tree. In the next extension, the ‘AdaptiveStep’ function is applied to increase
and
by
and
q, respectively. If
S returned by the next adaptive extension function is still “Advanced”, then
and
continue to increase by
and
q, respectively.
will be greater than
to improve the extension towards the target direction until
and
reach the upper limit of the threshold.
(3) If
S is returned, the next ‘AdaptiveExtend’ function is “Trapped”, indicating that a collision occurs between the new node extended by the ‘AdaptiveExtend’ function and the nearest node. In the next extension, the random tree will extend according to the initial values;
will be less than
so as to extend towards the random sampling point to avoid the obstacles.
Algorithm 4 AdaptiveExtend() |
- 1:
- 2:
if then - 3:
- 4:
end if - 5:
- 6:
- 7:
- 8:
if CollisionFree() then - 9:
if then - 10:
return - 11:
else - 12:
return - 13:
end if - 14:
else - 15:
return - 16:
end if
|
3.3. The Node Rejection
After a new node is generated via the adaptive extension function, it is necessary to evaluate whether the node can effectively reduce the path cost. Therefore, we propose a node rejection strategy,
where the Euclidean distance
and
are calculated to estimate the cost to the node and the cost from the node to the goal point. If the estimated total cost of the node exceeds the best path cost
, it indicates that the node will not effectively reduce the path cost and it is removed from the tree. This approach can result in fewer nodes in the random tree and fewer extensions with reduced computational costs and higher planning efficiency [
33].
3.4. The Pruning Optimization
In order to efficiently delete these redundant nodes, this paper proposes a pruning optimization strategy based on the triangle inequality to optimize the generated path.
As displayed in
Figure 4, the robotic arm is required to move from point
to point
while avoiding three obstacles. The black path,
, is the path generated by the algorithm. However, under the assumption that the robotic arm does not collide, it can move directly from
to
, then from
to
. Therefore, the points
,
,
, and
are redundant. Using the principle of pruning based on the triangle inequality, the redundant nodes are removed from the black path, resulting in the red path
, having a shorter distance.
The path point set generated by RRT*-connect is the union of the path point sets of the two random trees,
and
. Taking the optimization of the random tree
as an example,
is the root node of the random tree
and the connected node between the two trees is the current node
.
Figure 5 displays the specific branch pruning optimization process.
(1) Initialization: Add to the empty set , then obtain the parent node of the current node via the edge structure.
(2) Check Grandparent Node: If the grandparent node (the parent of ) is not the root node , proceed to the next step 3.
(3) Edge Structure Update: Use the edge structure to obtain the grandparent node .
(4) Collision Check: Determine whether the robotic arm collides with an obstacle along the connection between the current node and the grandparent node . If no collision occurs, the parent of the current node is updated as the grandparent node , the edge structure is updated, and the intermediate node is skipped. If a collision occurs, the is added to the set and the current node is updated as the .
(5) Repeat Process: Continue to repeat steps 2 to 4 until the grandparent node backtracks to the root node (i.e., ), add the root node to the set and end the loop. The optimized path set is returned.
The pruning optimization process of the random tree is similar to that of . The only difference is that the root node is replaced with the goal node , while the same steps 1–5 are implemented.
3.5. The Process of the Proposed IRRT*-Connect Algorithm
The proposed IRRT*-Connect algorithm utilizes an ellipsoidal subset constraint and a target-bias heuristic sampling strategy to reduce the exploration of the invalid space, so as to improve the sampling efficiency and lower the time costs. It also employs an adaptive step-size strategy to dynamically adjust the step size, enabling faster convergence of the two trees. By integrating a node rejection strategy, the expansion of the invalid nodes can be minimized. Furthermore, a pruning strategy is applied to optimize the generated path with shorter path length. The pseudocode of the algorithm is shown in Algorithm 5.
Algorithm 5 IRRT*-Connect |
- 1:
; ; - 2:
; ; - 3:
; ; ; - 4:
for to n do - 5:
- 6:
- 7:
- 8:
if and - 9:
- 10:
- 11:
end if - 12:
- 13:
- 14:
if then - 15:
- 16:
- 17:
end if - 18:
if then - 19:
- 20:
if then - 21:
- 22:
end if - 23:
end if - 24:
SwapTrees() - 25:
if then - 26:
- 27:
end if - 28:
end for - 29:
return
|
(1) Initialization: Lines 1–2 of the algorithm are the same as in Algorithm 1. Let be the set of all path solutions, be the current shortest path length, and be the number of found path solutions. Initially, before a path solution is found, is an empty set, is infinity and is zero.
(2) Shortest Path Length Calculation: Use the ‘ShortestPathLength’ function to compute the shortest path length from the set .
(3) Sampling and Extension: Use the ‘ImprovedSamplefree’ function to generate a random sample point in the free space. Then, use the ‘AdaptiveExtend’ function to extend the tree and generate a new node , and return the state value S.
(4) State Value and Path Cost Evaluation: Check S and calculate the total estimated path cost for the . If S is not “Trapped” and the total estimated path length of is less than , add to the tree and set the parent of to be . Otherwise, swap the random trees and , re-sample, and return to step 2.
(5) Find Neighboring Nodes and Parent Reselection: Use the ‘GetSortedList’ function to find the neighboring nodes within a spherical region centered around in the random tree. Sort the filled set and return the list ordered by the cost function in ascending order. Next, use the ‘ChooseParent’ process to traverse the sorted list, return the optimal parent node that connects and in the free space. If such a node exists, set as the optimal parent of , and perform the rewiring process.
(6) Tree Connection and Path Optimization: If S is not ’Trapped’, the ‘ImprovedConnect’ function is used to call the ‘AdaptiveExtend’ function to extend the random tree towards the new node in tree and attempt to connect the trees. If the trees fail to connect, the function returns “Trapped”, and are swapped, and is prioritized for expansion in the next iteration. If the connection is successful, “Reached” is returned, indicating that the two trees are connected and a path is found. Then path optimization is performed which returns the set of path solutions , and the number of path solutions found is recorded as . If is less than 4, it continues iterating and performs steps 2–6. If exceeds 4, the optimal path is returned. This process can iteratively refine the path solutions by expanding the trees, checking for collisions, and optimizing the path until a high-quality solution is found.
3.6. Algorithm Time–Space Complexity Analysis
In this study, the time cost of the IRRT*-Connect algorithm is primarily affected by steps such as nearest node search and collision detection. In each iteration, the algorithm performs collision detection for newly generated nodes, resulting in a time complexity of per iteration, N represents the number of nodes in the path-planning tree and M denotes the number of obstacles. Consequently, the overall time complexity of the algorithm is , where T represents the number of iterations. By employing spatial partitioning data structures (e.g., R-tree), the time complexity of the nearest node search can be optimized to , significantly reducing the overall time complexity.
In terms of the spatial complexity, the IRRT*-Connect algorithm must maintain the nodes of the path-planning tree and a cache of the obstacle information. This can result in a spatial complexity of . The space requirements dynamically change during the algorithm execution but are generally linearly related to the scale of the data being processed.
3.7. Path Smoothing
The path generated by the IRRT*-Connect algorithm has fewer points and shorter length. However, at certain path points, sharp corners can cause vibrations in the robotic arm, potentially damaging its mechanical components. Therefore, it is necessary to smooth the generated path. B-spline curves, known for their flexibility, continuity and differentiability, are widely used in robotic arm path planning. In this paper, we use a cubic non-uniform B-spline interpolation algorithm to smooth the path and generate an executable trajectory for the robotic arm. Let the path generated by IRRT*-Connect be denoted as
x, with
(
) being the path points of
x. The cubic non-uniform B-spline interpolation is applied to fit the path
x. The mathematical expression of a B-spline curve is written as,
where
(
) is the control point, and
is the basis function of the
k times of the B-spline.
For the cubic non-uniform B-spline curve, assuming that the length of each edge of the control polygon is
(
), and the total length is
. Based on the chord-length parameterized node vector, the node vector is obtained,
Subsequently, the B-spline basis functions are computed via the recursive function,
The cubic non-uniform B-spline function for reverse-solving control points is expressed as,
Since all the elements in the coefficient matrix are values of the B-spline basis functions, they are solely related to the knot vector, so Equation (11) can be simplified as Equation (12),
By solving Equation (11), all the control points can be determined. Subsequently, with the knot vector, the control points are obtained, and the interpolation adjustment of Equation (8) is performed for the path points, resulting in a smooth trajectory. As illustrated in
Figure 6, the black path segment
represents the trajectory planned by the IRRT*-Connect algorithm. The blue points denote the computed control points, while the red curve is the trajectory obtained through cubic non-uniform B-spline interpolation.
4. Experiment and Result Analysis
To validate the effectiveness and reliability of the proposed algorithm, a series of experiments are conducted. First, simulations of 2D and 3D static obstacle maps are performed via the Python programming language, followed by robotic arm obstacle avoidance simulations in the ROS environment. Subsequently, a physical experimental platform is established in a static multi-obstacle environment to verify the practical performance of the algorithm. All experiments are conducted under the same hardware configuration: an AMD Ryzen 7 5800H CPU (3.20 GHz), 16 GB of RAM, and an NVIDIA GTX 1650 GPU.
In the 2D and 3D static obstacle map experimental environments constructed in Python, each algorithm is evaluated under identical parameter settings, with a step size q of 4 mm, a search radius r of 5 mm, a maximum iteration count of 2000, and a goal-biased probability of 0.1. The search radius r denotes the range for seeking new nodes, which is employed for local optimization. However, an excessively large value of r will increase the computational burden. Therefore, it is advisable to set r slightly larger than the step size. The parameter settings presented in this study are mainly determined via extensive experiments and human experience. To account for the stochastic nature of the sampling-based algorithms, each experiment is repeated 100 times, and the final results are averaged to ensure reliability and consistency.
4.1. The 2D Static Multi-Obstacle Narrow Environment Simulation
In a Python environment, a 2D static multi-obstacle narrow environment is constructed for Scenario 1, as illustrated in
Figure 7. The map size is 100 mm × 100 mm, with a minimum distance of 5 mm between narrow passages. The purple rectangular objects represent the obstacles, the yellow circle denotes the start point at coordinates (0, 0), and the green circle indicates the goal point at coordinates (100, 100). The blue curve represents the path randomly expanded by the planning algorithm from the start point, the green curve represents the path expanded from the goal point and the red curve denotes the final generated path.
The proposed algorithm (IRRT*-Connect) is compared with the RRT*, RRT*-Connect, and Informed-RRT* algorithms in a 2D simulation. From
Figure 7, it can be observed that the RRT* and Informed-RRT* exhibit more random tree branches, while the RRT*-Connect has fewer branches but longer path length. In contrast, the proposed IRRT*-Connect algorithm exhibits a clearer and more focused search direction with fewer branches and a shorter path. The results are listed in
Table 1 and the proposed algorithm achieves reductions in the path cost by
,
, and
compared to RRT*, Informed-RRT*, and RRT*-Connect, respectively, and reductions in time cost by
,
, and
. Therefore, the proposed algorithm demonstrates advantages in both path cost and time cost over the RRT*, Informed-RRT*, and RRT*-Connect algorithms.
In Scenario 2, a 2D static narrow environment with multiple obstacles is used, as depicted in
Figure 8. From the empirical data in
Table 2, it can be observed that the RRT* algorithm achieves an average path length of 163.39 mm and an average planning time of 0.56 s. In contrast, while the Informed-RRT* algorithm reduces the path cost, the average planning time increases to 0.76 s. The RRT*-Connect algorithm with the bidirectional search strategy can significantly optimize the planning time, reducing the average planning time to 0.27 s. However, the path length increases to 186.05mm. The proposed IRRT*-Connect algorithm demonstrates the best performance across all metrics, achieving an average path length of 158.48 mm and an average planning time of 0.18 s. Compared to the RRT*, Informed-RRT*, and RRT*-Connect algorithms, the IRRT*-Connect algorithm can reduce the path cost by
,
, and
, respectively, and decrease the planning time by
,
, and
, respectively.
4.2. The 3D Static Multi-Obstacle Narrow Environment Simulation
In Python, a 3D static multi-obstacle narrow environment (Scenario III) is constructed, as shown in
Figure 9. The map size is set to 100 mm × 100 mm × 100 mm to test the adaptability of the proposed algorithm in a complex narrow passage of a 3D static environment. The purple rectangular prisms represent the obstacles, the yellow circle represents the start point located at (0,0,0), the green circle represents the target point located at (100,100,100), and the minimum clearance between the narrow passages is 5mm.
The proposed algorithm (IRRT*-Connect) is compared with the RRT*, RRT*-Connect and Informed-RRT* algorithms in the 3D simulation. From
Figure 9, the random trees generated by the RRT* and Informed-RRT* algorithms have a larger number of branches, while the random tree generated by the RRT*-Connect algorithm has fewer branches. However, the path generated by RRT*-Connect is more convoluted. The experiment results are listed in
Table 3. In the 3D environment with multiple obstacles and narrow spaces, the Informed-RRT* algorithm can reduce the path cost by
and
compared to RRT*-Connect and RRT*, while the time cost is increased by
and
, respectively. The proposed algorithm can achieve a reduction in path cost by
,
, and
, respectively, and a reduction in the time cost by
,
, and
compared to the RRT*, Informed-RRT*, and RRT*-Connect algorithms.
In Scenario IV, a 3D static narrow environment with multiple obstacles is depicted in
Figure 10, with the starting position and goal position identical to those in Scenario IV. From the experimental data in
Table 4, it can be observed that the RRT* algorithm achieves an average path length of 210.28 mm and an average planning time of 1.12 s. Compared to Scenario iiI, both the path cost and time cost have increased. The Informed-RRT* algorithm exhibits a higher average planning time of 1.26 s but achieves a lower path cost than that of the RRT*. The RRT*-Connect algorithm maintains its advantage in time cost but spends a higher path cost compared to the other algorithms. The IRRT*-Connect algorithm outperforms other algorithms across all metrics, achieving an average path length of 181.78 mm and an average planning time of 0.18 s. Compared to the RRT*, Informed-RRT*, and RRT*-Connect algorithms, the IRRT*-Connect algorithm can reduce the path cost by
,
, and
, respectively, and can reduce the time cost by
,
, and
, respectively.
Through employing the elliptical subset constraint and the target bias heuristic sampling strategy in these experiments, it can be concluded that the proposed IRRT*-Connect algorithm can achieve more accurate and effective sampling directions, with reduced sampling space and minimized exploration of the invalid areas. The adaptive step-size method can dynamically adjust the step size, allowing for faster convergence of the two trees. Additionally, the node selection strategy can reduce the expansion of the invalid nodes, and the pruning strategy based on the triangle inequality can optimize the generated path. Therefore, the proposed IRRT*-Connect algorithm demonstrates higher planning efficiency and lower path costs.
4.3. The Field Experiment of the Robotic Arm
To evaluate the effectiveness of the proposed IRRT*-Connect algorithm in practical applications, experiments are conducted within the Robot Operating System (ROS) framework using the UR5 robotic arm. Initially, a 3D model of the robotic arm is created via the URDF file. Subsequently, the MoveIt motion planning framework is utilized to configure and generate the necessary launch files for trajectory planning, and the 3D model is visualized in rviz. The proposed algorithm is integrated into the OMPL motion planning library to control the robotic arm for obstacle avoidance through the MoveIt motion planning framework.
A static obstacle simulation environment for the robotic arm obstacle avoidance (Scenario V) is set up in rviz, as illustrated in
Figure 11, where yellow, black, and gray rectangular prisms represent the static obstacles. The blue curve depicts the trajectory of the UR5 robotic arm’s end-effector.
Figure 12 illustrates the joint motion curves during the obstacle avoidance process. The initial joint angles of the robotic arm are set to
(in degrees), and the target joint angles are set to
.
It can be seen in
Figure 11 and
Figure 12 that no collision occurs between the robotic arm and the obstacles. The IRRT*-Connect algorithm, in conjunction with cubic non-uniform B-spline interpolation, can generate a sufficiently smooth trajectory, enabling stable motion of the robotic arm without any jitter. Compared to RRT*-Connect, the proposed algorithm yields a shorter motion trajectory with no sharp variations or discontinuities.
Further, to verify the performance of obstacle avoidance of the real arm equipped with the proposed algorithm, a real-world environment with multiple static obstacles in a narrow space was set up, as seen in
Figure 13. The sizes and spatial positions of the white, black, and yellow rectangular prism obstacles are consistent in the rviz simulation environment. With the integration of the MoveIt motion planning framework with the ROS, the real-time control of the UR5 robotic arm and its interaction with the environment can be achieved. Within this framework, the robotic arm obstacle avoidance experiments are precisely synchronized and scheduled via the ROS topics and services. Specifically, the computer is connected to the UR5 robotic arm control cabinet via the Ethernet. Leveraging the MoveIt framework, the IRRT*-Connect algorithm is invoked to perform motion planning. The path information, including the planning time, trajectory length, and the joint angle configurations corresponding to each waypoint, is transmitted to the control cabinet. This enables the physical UR5 manipulator to execute the obstacle avoidance motions which precisely follow the planned trajectory in the simulation environment.
The initial configuration of the manipulator is shown in
Figure 13a. During the execution, the manipulator navigates through a narrow passage formed by a yellow and a white obstacle, avoiding collisions as it enters the enclosed space surrounded by three obstacles. It then proceeds downward and ultimately reaches the target position shown in
Figure 13d. Two key obstacle-avoidance configurations, ‘posture 1’ and ‘posture 2’ during the motion are captured in
Figure 13b,c. Throughout the entire trajectory, the manipulator can successfully avoid all obstacles and operates smoothly without any collision.
In order to validate the feasibility and superiority of the algorithm in the real-world experiments, twenty simulation trials have been conducted, and the results are averaged and listed in
Table 5.
The data presented in
Table 5 demonstrate that the IRRT*-Connect algorithm can significantly outperform the RRT*-Connect algorithm, achieving a
reduction in the planning time and a
decrease in the path cost, while also improving the task success rate by
. These experimental results indicate that the IRRT*-Connect exhibits superior performance in the physical experiments, effectively meeting the motion planning requirements of the robotic manipulators. Further, it can substantially reduce both the planning time and the path cost, making it a highly efficient solution for the practical implementations.
5. Conclusions
This paper proposes the IRRT*-Connect path planning algorithm to address the limitations of the traditional RRT*-Connect algorithm in static multi-obstacle and narrow-space environments, including low sampling efficiency, extended computation time and high path cost. The proposed algorithm can improve the sampling efficiency by employing the dual-tree expansion combined with heuristic sampling techniques, such as ellipsoid subset sampling and goal-biased sampling, which can guide the sampling process towards the target with a certain probability while reducing the exploration in the invalid regions. Further, an adaptive dynamic step-size method is introduced to adjust the step size based on the obstacle information, and a node rejection strategy is applied to accelerate the convergence, while the path-pruning strategy is further used to shorten the planned trajectory. A cubic non-uniform B-spline interpolation algorithm is employed to smooth the path during robotic arm motion, preventing oscillations at sharp turns and reducing mechanical wear.
The effectiveness and superiority of the proposed algorithm are validated via simulations in both 2D and 3D static obstacle maps, as well as ROS-based simulations. Compared to the RRT*-Connect algorithm, the proposed approach can significantly reduce the planning time and shorten the path length. In practical experiments, the robotic arm is able to complete the obstacle avoidance tasks swiftly and smoothly. Therefore, the proposed method is well suited for applications such as robotic arm handling, assembly, and painting in static multi-obstacle environments, enhancing the operational efficiency and reducing energy consumption by minimizing the planning time and the path length. Future research will focus on the path planning of robotic arms in environments with dynamic obstacles.