1. Introduction
Robotic manipulators have assumed a more significant role in industrial fields, including manufacturing [
1], logistics [
2], warehousing [
3], and aerospace [
4]. Manipulators can fulfill diverse tasks and operations across these fields. Whether it pertains to manufacturing for machining, logistics for handling, or aerospace for attitude control, each field necessitates the meticulous refinement of motion paths for manipulators and the precise planning of end effector trajectories. In real industrial applications, obstacles are often extremely complex. Considering the pertinence of the research, we only focus on frame obstacles in industrial scenes. In the environment with frame obstacles, obstacle avoidance is an indispensable component in path planning for manipulators. Hence, research on obstacle avoidance trajectory planning for manipulators stands as one of the most critical aspects within the field of manipulator studies.
Traditional path planning algorithms include the Dijkstra algorithm [
5]; A* algorithm [
6]; artificial potential field (APF) method [
7]; and heuristic optimization algorithms [
8], such as the particle swarm optimization (PSO) algorithm [
9] and genetic algorithm (GA) [
10]. However, when applied to manipulators, these algorithms often fall short in achieving optimal results in terms of path generation efficiency and path quality.
Global obstacle avoidance path planning for a manipulator refers to the process of determining feasible paths in a known environment with predefined obstacle positions and shapes. In the domain of global obstacle avoidance trajectory planning for manipulators in a configuration space, sampling-based methods have frequently been employed to plan path points for manipulators. The most common sampling-based path planning algorithms include the probabilistic roadmap (PRM) algorithm [
11] and rapidly exploring random tree (RRT) algorithm [
12]. Many researchers favor the RRT algorithm due to its simple structure and strong adaptability. Thus far, several improvement methods for RRT have been widely adopted by researchers, such as RRT* [
13], RRT-Connect [
14], RRT* Connect [
15], and RRT*Smart [
16].
Path generation time, trajectory running time, and path length are significant evaluation indicators in the field of trajectory planning. Path generation time indicates the efficiency of the algorithm in generating path points. Trajectory running time directly determines the efficiency of the robotic arm in completing the task. Moreover, the length of the path includes lengths in the configuration space and workspace. The former represents the amount of the change joint’s angle. It can further characterize the energy consumption of the robotic arm. The latter represents the length and smoothness of the motion trajectory of the end of the robotic manipulator in the real world. Despite the advancements achieved in their respective domains via improvements to the RRT algorithm, most current enhanced RRT algorithms fail to comprehensively optimize the three above-mentioned indicators. This is because these algorithms do not combine the configuration space of the manipulator with the workspace and cannot highlight the pertinence of the algorithm for the robotic arm. Therefore, there is still room for improvement in applying this algorithm in the field of robotic manipulator trajectory planning. The contributions of this article are outlined below.
(1) The proposed improved algorithm, search direction adaptive RRT*Connect (SDA-RRT*Connect), which is based on the RRT algorithm, is introduced. It can adaptively and rationally adjust the search direction to alter the search process at different stages of the algorithm, enabling it to find feasible paths rapidly.
(2) A novel method for handling path points is proposed to address issues such as path crossing and oscillations in the workspace. This method enhances path smoothness and reduces path length in the workspace.
(3) The PSO algorithm is used to fit polynomial curves for each segment of the path, aiming to minimize the trajectory execution time of the manipulator under velocity and acceleration constraints.
(4) Comparative simulation experiments are conducted to validate that the proposed method achieves superior results in terms of path generation time, trajectory execution time, and path length.
2. Related Works
Regarding further improved algorithms of RRT in the field of manipulator trajectory planning, researchers have carried out numerous attempts. Among these, many methods were proposed to enhance the algorithms by optimizing the structure of the exploration tree. Wu et al. [
17] proposed an obstacle avoidance path planning algorithm based on the central multi-node RRT* (CMN-RRT) algorithm. This study primarily focused on addressing the challenges of lengthy computation times and inadequate obstacle avoidance effectiveness in traditional RRT algorithms. The primary enhancement focuses on optimizing the sampling strategy of the traditional algorithm. The concept of connectivity was introduced during the path’s growth process, allowing multiple trees to grow simultaneously and thereby facilitating quicker obstacle avoidance. Song et al. [
18] proposed an enhanced RRT algorithm based on the probability target deviation strategy and the triangle inequality pruning method in order to tackle lengthy computation times and the generation of lengthy paths in motion planning for manipulators using the RRT algorithm.
In addition to optimizing the tree structure, improving the sampling process can also effectively enhance the performance of the algorithm. Shen et al. [
19] proposed a new optimal RRT path planning strategy based on operability for industrial manipulators. Two constraints, namely path length and the operability measure, were imposed during sampling in the search space to find the minimum-cost path connecting the start and goal points. By tracing the generated paths, the manipulator’s end effector could navigate the workspace with shorter distances. Wang et al. [
20] proposed a method for setting the intermediate bias point. In random sampling, the sampling point was biased towards the intermediate bias point with a certain probability in order to reduce the blindness of sampling. Thakar et al. [
21] introduced a bi-directional sampling-based approach for generating robotic trajectories for pick-and-place tasks along a given mobile base trajectory. The method implicitly determined the positions of the mobile base at the beginning and end of the robot’s motion, as well as the location where grasping occurs. It also identified the grasp poses used for picking up parts. Additionally, techniques for reducing robot motion and computation times were proposed. Du et al. [
22] proposed an improvement to the RRT algorithm by introducing a node attractive field function, which can reduce the generation of redundant nodes, thereby enhancing the convergence speed of the path. Yi et al. [
23] presented an enhanced approach for robotic path planning using the improved P_RRT* algorithm to address path planning challenges in workspace for manipulators. Jiang et al. [
24] developed a collision detection model for manipulators and obstacles based on cylindrical and spherical bounding boxes. They replaced random sampling with hybrid constraint sampling and introduced a new method called RRT-Connect by combining artificial potential field techniques. Ji et al. [
25] proposed an ellipsoidal rapidly exploring random tree (E-RRT*) method for the path planning of highly redundant manipulators (HRM) in work spaces.
Additionally, researchers also enhanced the algorithm to operate effectively in dynamic environments. Qi et al. [
26] proposed the MOD-RRT* algorithm, which generates an initial path and constructs a state tree structure based on a known map. They introduced a path replanning scheme to navigate around unknown obstacles and proposed a path smoothing method. In addition, they designed a reconnection scheme to optimize tree structures in the presence of unknown obstacles. Moreover, they presented a multi-objective path replanning method based on Pareto theory to select the optimal alternative nodes when obstacles obstruct pre-planned paths. Zhao et al. [
27] proposed the dynamic RRT algorithm. The objective was to devise feasible paths in environments with randomly distributed obstacles while balancing convergence time and path length. Furthermore, by embracing dynamic programming principles, they decomposed the planning problem into sub-problems by updating nodes selected through Pareto dominance as new starting nodes, thereby optimizing the distance to the goal. Zhou et al. [
28] proposed the RRT*-FDWA algorithm for dynamic environments—this algorithm can avoid local minima, quickly perform path replanning, generate smooth optimal paths, and increase the robot’s maneuvering range. Yuan et al. [
29] proposed a multi-query and sampling motion replanning algorithm named DBG-RRT based on a dynamic deviation goal factor for the obstacle avoidance problem of robotic arms in dynamic environments in order to achieve rapid responses and a high success rate. This method uses a relay node approach to generate new collision-free trajectories on the basis of motion planning. Subsequently, a non-interruption strategy is adopted to determine whether dynamic obstacles will interfere with the generated trajectories.
Integrating the RRT algorithm with optimization problems can also enhance the effectiveness of the algorithm. Khan et al. [
30] utilized the intelligent weighted Jacobian rapidly exploring random tree (WJRRT) algorithm to propose a model-free control framework for the path planning of both rigid and flexible manipulators. This framework addressed uncertainties in manipulators and enhanced the computational efficiency of path planning. Gao et al. [
31] proposed a path planning method for six-degree-of-freedom robotic manipulators in narrow spaces with multiple obstacles in 3D. They addressed issues such as slow-motion planning, low efficiency, and high path computation costs. Their method—named BP-RRT* and based on a BP neural network and an improved rapidly exploring random trees algorithm—aimed to overcome these challenges and enhance the efficiency of robotic manipulator path planning. Shi et al. [
32] introduced the GA_RRT path planning algorithm by incorporating the target probability bias strategy and an A* cost function into the traditional RRT algorithm. This approach reduced the randomness and blindness during the expansion process of the RRT algorithm. Long et al. [
33] introduced a novel motion planner called RRT*Smart-AD. It was designed to ensure that dual-arm robots adhere to obstacle avoidance constraints and dynamic characteristics within dynamic environments.
The above are the improvements made by researchers to RRT from different aspects for this task in recent years.
3. Problem Statement
In this section, the definition of the path planning problem for a manipulator is provided, and the mathematical notation involved in the subsequent sections is elucidated. denotes the configuration space of the manipulator, where N is the degrees of freedom of the manipulator. Generally speaking, the value of N is equal to the number of axes included in the robotic arm. is the reachable space. It includes all the states that the manipulator can reach. is the workspace of the manipulator. It denotes the set of points where the end of manipulator can reach. Forward kinematic mapping is , which maps the reachable space to the workspace. The starting point and end point are, respectively, and . The information of obstacles in the environment is O. In this problem, obstacles are stationary. Moreover, the positions of obstacles included in O are given.
We need to plan a trajectory from to . Here, is a time series. increases from zero. m, n, and p are the number of path points, number of moments between different path points, and information on manipulators during all moments, respectively. , , where and .
The entire process is divided into two steps, as illustrated in
Figure 1. Firstly, the path planning algorithm in the configuration space of the manipulator
is used to plan a series of path points in the trajectory
to avoid obstacles in the environment, where
, and
m denotes the number of path points. This process corresponds to the first stage in
Figure 1, which is called path points generation.
Subsequently, based on the aforementioned path points, an optimization algorithm is employed to fit trajectory curves to minimize the optimization target. A polynomial curve is fitted between each pair of path points as the trajectory curve of the manipulator in this section. The trajectory optimization of the curve is conducted based on the manipulator’s operating time. This process corresponds to the second stage in
Figure 1, which is called trajectory optimization. The optimization problem is described below:
In the above formula, is the running time in moment j of the manipulator in the ith trajectory. is the joint angle of manipulator in this trajectory. is the polynomial function corresponding to this curve. , , and are velocity, acceleration, and joint angle of moment j in this trajectory fragment, respectively. , , , are initial angle, termination angle, initial velocity, termination velocity, initial acceleration, and termination acceleration, respectively.
According to the properties of a polynomial curve, the set of manipulator state values corresponding to the
ith curve is as follows:
with
.
is a polynomial function, and its parameters are determined by
.
Finally, we can obtain trajectory
T by connecting each
and
vector.
The key to addressing the above issues is to design a function to obtain the set of path points. Then, the obstacle avoidance trajectory planning of the manipulator can be achieved. The design of the function will be introduced below.
4. SDA-RRT*Connect Path Planning
For the key function mentioned above, this article presents a path planning method for the manipulator based on the improved RRT algorithm as the implementation of the function.
4.1. RRT*Connect
The RRT algorithm is a sampling-based path planning algorithm. Its basic steps involve generating an exploration tree from the starting point of the path. This is achieved by continuously expanding the tree’s leaf nodes through random node sampling. Ultimately, when a leaf node reaches or comes close to the target point, a feasible path is successfully obtained. By continuously tracing back to its parent nodes from this point, the final planned result can be determined.
The RRT* and RRT-Connect algorithm are both improved versions of the traditional RRT algorithm. Each introduces specific enhancements aimed at improving the path cost and the time needed to generate the path. RRT*Connect combines elements from both the RRT* algorithm and RRT-Connect algorithm.
The RRT*Connect algorithm introduces two primary enhancements over the traditional RRT algorithm. Firstly, it employs the simultaneous expansion of two exploration trees from the start and goal points to search for feasible paths because of the symmetry between start and goal points in the configuration space of the manipulator. Specifically, a separate exploration tree is established at both the start and goal points of the path. Through sampling, both trees are continuously expanded simultaneously. During the expansion of either tree, if a new node reaches or approaches a node in the other tree, a viable path is successfully identified. By backtracking the parent nodes of these two nodes in their respective trees, the final planned path can be determined.
Additionally, RRT*Connect incorporates the optimization of the path length during path expansion. Specifically, this method introduces two new operations during node expansion. Firstly, it entails reselecting the parent node. After generating a new node using the traditional RRT algorithm, it explores neighboring nodes within a certain distance of the new node. If traversing through a neighbor node can result in a shorter path length to reach the new node, that neighbor node is reassigned as the parent node of the new node. Secondly, it involves reconnecting neighboring nodes. After identifying the parent node for the new node, it continues to explore neighboring nodes. If traversing through the new node can result in a shorter path length for reaching a neighboring node, the parent node of that neighboring node is reassigned to be the new node.
4.2. Adaptive Search Direction
Aiming at the environment of frame obstacles in industrial scenes, we propose the SDA-RRT*Connect algorithm. The proposed method proposes an optimization method for the RRT*Connect algorithm based on the search direction. As shown in Algorithm 1, the input of algorithm
is the environment of the manipulator.
is the starting position, and
is the target position. StepSize is the step size for expanding nodes in the exploration tree. R denotes the critical distance of neighboring nodes. The MaxIter is the maximum number of iterations. The output of the algorithm
is a path from the starting point to the target point, where
.
, and
are two exploration trees rooted at the start and goal points.
Algorithm 1 SDA-RRT*Connect |
- Require:
- Ensure:
path C from to - 1:
- 2:
for do - 3:
- 4:
- 5:
- 6:
- 7:
- 8:
- 9:
if then - 10:
- 11:
- 12:
end if - 13:
if then - 14:
- 15:
return C - 16:
end if - 17:
- 18:
- 19:
- 20:
- 21:
if then - 22:
- 23:
- 24:
end if - 25:
if then - 26:
- 27:
return C - 28:
end if - 29:
end for
|
The algorithm operates as follows. First, we obtain
by sampling randomly. Then, we find the node
in
, which has the shortest distance with
. After that, we should find the node
in
, which has the shortest distance with
. As shown in
Figure 2, vector
implies the direction of random expansion, and vector
implies the direction of targeted expansion. The final direction of expansion will be determined by their sum. We set a parameter
to control the weight of the two directions of expansion. The generation of the new node
is shown as (6), and it corresponds to the Steer function in line 7 of Algorithm 1. An increase in
indicates a tendency towards more random expansion, and a decrease in
denotes a tendency towards the other tree. When we obtain the new node, as the RRT*Connect does, we need to choose the father node for the new node. Then, collision detection is performed on the newly generated nodes and edges. If there is no collision, the neighboring nodes of the new node are reconnected according to the rules of the RRT*Connect algorithm. If the new node satisfies the termination condition of the algorithm, the algorithm ends and returns the path. If it does not satisfy the condition, the same process is carried out on
because of the symmetry between start and goal points. The above steps are repeated until the two trees are connected.
Due to the diverse requirements for expansion directions during different stages of the algorithm process, the concept of adapting parameter for adaptive control emerges. We hope that the parameter can take different values at different stages of the algorithm to enable the more efficient expansion of the exploration tree. In the initial stages of the algorithm, both trees need to explore as widely as possible to search for feasible directions in order to effectively navigate around obstacles and find truly viable paths. However, as the algorithm progresses, it may be beneficial to slightly decrease the value of in order to accelerate convergence. This adjustment will orient the expansion direction more towards the nodes in the other tree, thereby enhancing efficiency.
This article utilizes the distance between nodes on the two trees as indicators to measure the progress of the algorithm. A significant distance between the two trees implies that the algorithm is still in its early stages. As the algorithm progresses, the distance between the two trees continuously decreases. Based on this observation, we design an adaptive control function for parameter
:
where
represents the distance between the two trees.
,
.
represents the initial distance between two trees. The parameter
is used to control the lower bound of
. It corresponds to the GetLambda function in line 6 of Algorithm 1. According to the (7), the range of
is
. In the early stages of the algorithm, the value of
is large; thus, parameter
is also large. The exploration tree exhibits more random expansion. As the search progresses, the distance between the two search trees continues to decrease, and
also gradually decreases to speed up the convergence of the algorithm.
Specifically, in Algorithm 1, at the beginning of the algorithm, , , and the direction of exploration is completely random. As the algorithm progresses, the value of gradually decreases to near 0, and gradually decreases to the lower limit it can reach. During this process, the exploration’s randomness gradually decreases, and the tendency of the two trees to gather is increasing.
Regarding the design of the GetLambda function, we need a function that can decrease with a decrease in . It is because the number and complexity of frame obstacles are limited. When performing tasks, the manipulator can always regard them as a whole and avoid them. Moreover, in order to highlight the completeness of the early exploration of the algorithm, we hope that the value of the will decline in a slow and then fast trend. Considering the need to add a parameter to the function to control the lower limit of , in view of the characteristics of the logarithmic function, we design the GetLambda function, as shown in (7).
Unlike the traditional RRT-Connect algorithm, which only considers the workspace distance and the termination condition of the collision relationship, we design a new termination condition for the robotic arm. We also consider the configuration space distance of the node, the workspace distance, and the positional relationship with the obstacle. Specifically, when the distance between the newly generated node and any node of another tree is less than the critical distance between the configuration space and the workspace simultaneously, collision detection is performed on the edge formed by the two nodes. If it passes, the algorithm is terminated. In this manner, through the dual judgment of the configuration space and the workspace, the search tree intersection condition for the robot arm is more completely defined.
Meanwhile, the proposed algorithm has its shortcomings. It may not have a satisfactory performance in environments with more complex obstacles because the GetLambda function is designed to be a concise monotonic function. When the obstacles are too complex to be regarded as a whole, the adaptive search direction will lose its advantage.
4.3. Path Handling Method
Because sampling in the algorithm is conducted in the configuration space, the sequence of poses of the end effector in the workspace may not be optimal. This can lead to issues such as repeated or intersecting paths. Therefore, post-processing in the workspace is necessary after path generation. The specific method is illustrated below.
In the algorithm,
C is the set of original path points.
.
m represents the number of path points in set
C.
denotes the critical distance in the workspace.
is the set of newly processed path points.
,
. The specific process of the path processing algorithm is as follows. First, the path processing algorithm is iterated through each path point
in
C and added into
. Then, all nodes following this one in the sequence are found within a distance of
, and the node with the largest index is selected, which corresponds to the function FindShortcutNode in line 4 of Algorithm 2. If such a node exists, iteration is continued along that node. As shown in
Figure 3, the upper image shows the original path before processing, while the lower image displays the path after processing. This path processing method optimizes partial nodes in the original path that intersect or backtrack within the workspace. Consequently, it enhances the smoothness of the path, thereby optimizing the path length.
Algorithm 2 PathProcess |
- Require:
- Ensure:
- 1:
- 2:
for do - 3:
- 4:
- 5:
if k exist then - 6:
- 7:
end if - 8:
end for - 9:
return
|
Algorithm 2 finds the redundant nodes through the FindShortcutNode function and removes them from the set of path points, thus enhancing the path’s smoothness. Specifically, after setting the critical distance parameters of the configuration space and workspace, they are removed from the set of path points. The FindShortcutNode function will find redundant nodes for each node. It will find the last node behind it that satisfies the following condition: (1) The distance between them is less than the critical distance in the configuration space. (2) The distance between them is less than , which is the critical distance in the workspace. (3) The edge between them will not collide with obstacles. All nodes between them are considered as redundant nodes. We should delete them from the set of path points to enhance the smoothness of the path.
In order to avoid destroying the obstacle avoidance effect of the path after deleting redundant nodes, it is necessary to limit the size of the critical distance (not too large). It is reasonable to set the critical distance to the step size of the new node expansion in the configuration space, while the critical distance in the workspace () still needs to be set artificially as a hyperparameter.
When the value is relatively small, the improvement degree of the path smoothness is very limited. It is not worth sacrificing part of the algorithm’s efficiency for it. When the setting is relatively large, due to the critical distance setting in the configuration space, the selection of redundant nodes will completely depend on the critical distance in the configuration space, and the constraint of on the smoothness of the workspace will become meaningless. We will lose the improvement in the smoothness of the workspace. Finally, is set with reference to the average expansion distance in the workspace.