Next Article in Journal
Performance Evaluation of Mirror Coatings with Limited Data Using a Transfer Learning Approach
Previous Article in Journal
Toward End-to-End Event-Driven Systems: A Hardware-Oriented Hierarchical Spiking Predictive Coding Framework for On-Device Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Path Planning of Cable Survey Robotic Arm Based on Improved Bidirectional RRT and APF Fusion Algorithm

Faculty of Electrical Engineering, Shanghai University of Electric Power, Yangpu Campus, Shanghai 200090, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(10), 4897; https://doi.org/10.3390/app16104897
Submission received: 13 March 2026 / Revised: 29 April 2026 / Accepted: 5 May 2026 / Published: 14 May 2026

Abstract

We present a hybrid algorithm for 3D obstacle-avoidance path planning of a six-axis robotic arm in cable inspection environments. It improves on traditional RRT, which suffers from blind sampling and low efficiency, and APF, which tends to become stuck in local optima and has unstable potential fields. For the bidirectional RRT, we introduce target-biased sampling and a dynamic step-size expansion strategy driven by target attraction to enhance sampling directionality. For the APF, we optimize the potential field function by incorporating shape and size factors, use simulated annealing to overcome local optima, and apply Gaussian filtering to smooth the potential field. A triangular inequality pruning strategy with a target chain is then used to optimize the initial path, combined with cubic B-spline curves for path smoothing, and we design a simplified collision detection method to reduce computational cost. Simulation experiments are carried out in 2D and 3D spaces, as well as in a robotic arm setup that mimics cable inspection. Compared with basic RRT, bidirectional RRT, and the RRT-APF fusion algorithm, our method achieves significant improvements in average iteration count, planning time, path length, and number of generated nodes. The resulting trajectories are shorter and smoother, effectively boosting the efficiency and quality of 3D obstacle-avoidance path planning for six-axis robotic arms, and offering a practical solution for engineering scenarios such as power line inspection.

1. Introduction

Robotic arms are widely used in electrical survey engineering projects, but they still face some practical issues. In real operating environments, six-axis robotic arms often have to work under complex conditions and in highly confined spaces—such as cable trenches and cable compartments—where clearances are tight and elevations change irregularly. To make things worse, obstacles like cables and cable supports add further difficulty to path planning. The core goal here is to generate a safe, feasible motion trajectory based on the robotic arm’s starting and target poses, all within such a constrained environment. By defining a reasonable sequence of waypoints, the method ensures the arm can avoid obstacles during movement and complete tasks reliably. Over the years, researchers have looked into this problem and proposed a range of classic path planning methods.
Sang L L et al. [1] applied Dijkstra’s algorithm as the global path planning algorithm and the Dynamic Window Algorithm (DWA) as the local path planning algorithm to an intelligent mobile robot, enabling it to successfully navigate around obstacles at the initial planning position and reach the designated location. Tang Xianxing et al. [2] have proposed a global path planning and obstacle avoidance algorithm for a six-degree-of-freedom robotic arm based on an improved A* algorithm and the artificial potential field method. In response to the issues of low search efficiency and high computational cost associated with traditional D* path planning algorithms, Liu J et al. [3] proposed the directed D* algorithm. This algorithm takes into account information regarding the destination and obstacles, introduces the concept of key nodes, determines feasible paths through step-by-step expansion, and incorporates a steering function to control the search range of nodes in a single search iteration, thereby improving search efficiency. Chen Lifang et al. [4] have proposed a path planning method that integrates B-spline technology with genetic algorithms to address the problem of path planning for robots in environments with complex obstacles. You Yong et al. [5] have proposed a path planning method based on an improved PRM algorithm. This addresses various issues encountered when using traditional probabilistic route mapping (PRM) algorithms in robots for aircraft wing box assembly. Tan Zhongwan et al. [6] propose an improved RRT-Connect algorithm. This addresses issues with the RRT-Connect algorithm, such as low path planning efficiency, poor obstacle avoidance capabilities, and poor path quality in complex environments.
Xie Long [7] improved the artificial potential field method and proposed a dynamic obstacle avoidance planning algorithm suitable for robotic arm systems. This algorithm builds an attractive velocity in Cartesian space to track obstacles in real time and links changes in obstacle velocity to repulsive velocity, giving the robotic arm decent dynamic obstacle avoidance ability. That said, single algorithms still have inherent drawbacks. Random sampling methods like RRT can explore space quickly, but the paths they produce are often of poor quality. The artificial potential field method, on the other hand, can generate smooth paths, but it tends to become stuck in local optima. To strike a balance between efficiency and path quality, hybrid algorithms that combine multiple strategies have gradually become a mainstream research direction. The APF algorithm transforms complex planning problems into potential energy calculations; its concept is clear and easy to understand. Paths are guided continuously by a resultant force field, resulting in naturally smooth trajectories that conform to the laws of natural motion. As it only needs to process local environmental information, the algorithm is fast and highly suitable for scenarios requiring high real-time performance. Its structure is straightforward, making it easy to implement and deploy rapidly. These technologies have a wide range of applications, including real-time obstacle avoidance in robotic arms to ensure the safety of human–robot collaboration; local obstacle avoidance in autonomous mobile robots; autonomous avoidance of dynamic or static obstacles by drones in complex environments; and local path planning in autonomous vehicles for tasks such as lane keeping and lane-changing maneuvers to avoid obstacles. Fan and Chen et al. [8] further proposed a bidirectional artificial potential field RRT algorithm (Bi-APF-RRT), which significantly reduces the number of iterations and improves search efficiency through a bidirectional tree structure. To integrate the rapid convergence advantage of APF-RRT and the path optimization capability of Q-RRT, Chen et al. [9] proposed a new algorithm that combines goal bias, a potential field and fast RRT (Goal-Biased Potential-Field-Q-RRT, GB-PQ-RRT). Goal bias was introduced to optimize the selection of sampling points, enabling the search tree to grow towards the goal point with a certain probability. A potential field was introduced to optimize the generation of new nodes and accelerate the algorithm’s convergence; the Q-RRT algorithm was then integrated to optimize the path. In addition, to determine the optimal trajectory for mobile robots in complex environments, Xiong et al. [10] proposed a hybrid particle swarm optimization algorithm (IPSO-GOP). They modified the particle swarm optimization algorithm by adaptively adjusting the inertial weights at various stages of the algorithm’s execution to enhance the particles’ search capabilities.
Zong Chengxing [11] employed the A* algorithm for collision-free planning of robotic arm operating paths and used B-spline functions for path smoothing optimization. Qi Zhigang [12], targeting a seven-axis redundant robotic arm, optimized the A* algorithm based on arm-shape angle inverse kinematics, expanding the number of available alternative solutions and enhancing the flexibility of the path planning process, thereby improving the robotic arm’s obstacle avoidance capability and effectively achieving path smoothing. In response to the issues faced by traditional ant colony algorithms in agricultural robot path planning—such as slow convergence, low search efficiency and poor global search capabilities—Zhao et al. [13] proposed a multi-strategy fusion-based improved ant colony algorithm. Based on a multi-level field-of-view search strategy, the study introduces a non-uniform pheromone initialization strategy incorporating an angle-based judgment mechanism. This assigns higher initial pheromone concentrations to preferred paths closer to the start-to-end line, whilst introducing reward and penalty constraints along the ants’ forward trajectory to enhance the specificity and efficiency of the search. Wang Wei et al. [14] have proposed an arm path planning algorithm, H-RRT-C, which integrates hierarchical heuristic guidance with reinforcement learning. This method establishes a multi-strategy collaborative optimization framework: the upper layer utilizes an improved A* algorithm to generate a global, coarse-grained path skeleton, and employs an adaptive weighting mechanism to guide a bidirectional search tree to prioritize sampling of key nodes, thereby effectively reducing the randomness of exploration; simultaneously, a dual-Q-network reinforcement learning strategy is introduced, with a multi-objective reward function designed to incorporate path length, node distribution diversity and obstacle avoidance safety, to enable intelligent decision-making regarding expansion dire. Xu Wei et al. [15] employs the Sarsa (λ) reinforcement learning method to achieve autonomous path planning and intelligent decision-making for target tracking and obstacle avoidance. This method treats each segment of the robotic arm system as a decision-making agent. By perceiving a two-dimensional state comprising the deviation from the target and the distance to obstacles, it designs a reward function that approximates human experience. Reinforcement training is then conducted for the rotational movements of each arm segment, ultimately resulting in a state-action value table for each agent, which serves as the basis for decision-making in the robotic arm’s online path planning. Yuan Meng’en et al. [16] proposed a multi-population particle swarm algorithm and applied it to robotic arm path planning. This method first uses a vision algorithm to determine the spatial pose of the target object relative to the robotic arm and then employs the multi-population particle swarm algorithm to evolve the optimal angles for each joint of the robotic arm to reach the target position. Wang Z et al. [17] investigated the use of reinforcement learning methods for handling robotic arm path planning problems. By fitting the Q-function with a neural network, the path planning problem is transformed into a transfer process between finite states, and the deep Q-learning method is used to successfully achieve robotic arm obstacle avoidance and grasping tasks. Yashar Mousavi et al. [18] have proposed a Q-learning-enhanced adaptive fractional-order firefly algorithm, QRL-AFOFA, to address the challenges posed by large-scale dynamic multi-objective optimisation problems. Although fractional-order meta-heuristics provide memory-driven search dynamics and reinforcement learning (RL) offers adaptive policy control, existing hybrid methods often suffer from serious limitations such as parameter sensitivity, premature convergence and poor diversity preservation.
In the context of 3D obstacle-avoidance path planning for six-axis robotic arms in cable surveying environments, the traditional RRT algorithm suffers from a high degree of sampling blindness and limited operational efficiency, whilst the APF algorithm is prone to becoming stuck in local optima and exhibits poor potential field stability. Furthermore, a single algorithm struggles to balance planning efficiency with path quality. This paper therefore proposes a hybrid path planning algorithm that integrates and improves upon the bidirectional RRT and APF algorithms. The innovation of this algorithm lies in introducing a target-biased sampling strategy and a target-attraction extension strategy with dynamic step sizes to the bidirectional RRT algorithm, thereby enhancing the goal-oriented nature of sampling, reducing ineffective searches, and improving obstacle avoidance flexibility. Secondly, the potential field function of the APF algorithm is optimized by introducing shape and size factors to achieve precise calculation of repulsive forces; the simulated annealing algorithm is integrated to resolve the local optimum problem, and Gaussian filtering is applied to smooth the potential field, thereby enhancing motion stability. Finally, the original path is optimized using a triangular inequality pruning strategy with a target chain, and cubic B-spline curves are employed to smooth the path; simultaneously, a simplified collision detection method is designed to reduce computational complexity.

2. Traditional Algorithms

2.1. Bidirectional RRT Algorithm Principle

The Bidirectional Random Tree (Bidirectional RRT) algorithm is a well-established path planning method, particularly renowned for its efficiency in complex environments. Its core principle involves growing two independent random trees in a two- or three-dimensional environment—one rooted at the start configuration and the other at the goal configuration—and expanding them simultaneously until they intersect. This bidirectional search strategy generates a feasible path connecting the start and goal points by merging the two trees when they meet.
In the initialization phase of the algorithm, two random trees, T s t a r t and T g o a l , are created with the start point q s t a r t and the end point q g o a l as their respective root nodes. A random tree consists of a series of nodes and the edges connecting them, where each node represents a state of the robotic arm in the configuration space.
The iterative expansion process of the algorithm mainly includes the following key steps: random sampling, finding the nearest node, expanding the tree, and collision detection. First, a new sample point q r a n d is generated by random sampling throughout the entire configuration space. The sampling process can use a uniformly distributed random number generator to generate random points within the range of the configuration space. Then, in the T s t a r t tree, the node q n e a r 1 closest to q r a n d is found, and in the T g o a l tree, the node q n e a r 2 closest to q r a n d is found. Finding the nearest node is usually achieved by calculating the distance between the sample point and all nodes in the tree and selecting the node with the minimum distance as the nearest node. The Euclidean distance formula can be used for distance calculation [19]:
d = { q r a n d ( x ) q n o d e ( x ) } 2 + { q r a n d ( y ) q n o d e ( y ) } 2 + { q r a n d ( z ) q n o d e ( z ) } 2
Next, a new node q n e w 1 is formed by extending a certain step length S from q n e a r 1 in the direction of q r a n d , and it is added to the T s t a r t tree. Similarly, a new node q n e w 2 is formed by extending the same step length from q n a e r 2 in the direction of q r a n d , and it is added to the T g o a l tree. During the expansion process, collision detection is required to ensure that the newly expanded nodes and paths do not collide with obstacles. Collision detection can be achieved by determining whether the new node or path intersects with the geometric model of the obstacle. For example, for a circular obstacle, it can be determined by calculating whether the distance from the new node to the center of the obstacle is less than the radius of the obstacle.
When the two trees meet the connection condition during the expansion process, the path generation is successful. The connection condition is usually that the distance between the nearest nodes of the two trees is less than a preset threshold ρ , i.e., d ( q n e w 1 , q n e w 2 ) < ρ . The choice of threshold ρ is determined based on factors such as the environment’s dimensions, node density and obstacle size. If ρ is too small, the tree expands slowly, making it difficult to connect nodes; search efficiency is low, and a path may not be found. If ρ is too large, the algorithm is likely to bypass obstacles, generating invalid paths, whilst also increasing the computational load of collision detection. Once the connection condition is met, the final path can be generated by backtracking along the parent node pointers from both trees. The backtracking process starts from q n e w 1 , successively visits its parent nodes until it reaches the root node q s t a r t , obtaining the path from the start point to q n e w 1 . Similarly, starting from q n e w 2 , it backtracks to the root node q g o a l , obtaining the path from q n e w 2 to the end point. By connecting these two paths, the complete path from the start point to the end point is obtained.
To improve both the efficiency and overall performance of the Bidirectional RRT algorithm, researchers often combine several optimization strategies. One common approach is to add a heuristic target bias—basically, selecting the goal point as the random sample with a certain probability. This nudges the tree to grow more deliberately toward the target, cutting down on wasted sampling. Another technique is dynamic step size adjustment: the expansion step length changes based on local obstacle density and how close the tree is to the goal. In cluttered areas, the step size shrinks for more precise obstacle avoidance; in open spaces, it grows to speed up exploration. Beyond that, by borrowing ideas from the artificial potential field method, both attractive and repulsive forces can guide node expansion. The attractive part pulls the tree toward the target, while the repulsive part pushes it away from obstacles. Taken together, these enhancements make the search more directed and efficient, ultimately helping the algorithm find feasible paths in complex environments. Figure 1 below shows a schematic diagram of the traditional RRT algorithm.

2.2. APF Algorithm Principle

The artificial potential field (APF) method is a classic approach to path planning, widely used in robot navigation and robotic arm motion planning. The basic idea is to treat the robotic arm’s movement through space like a particle moving under forces in a virtual field. In this field, the target acts as a source of attraction, pulling the arm toward it, while obstacles act as sources of repulsion, pushing the arm away. Under the combined effect of attractive and repulsive forces, the arm moves along the gradient direction of the potential field, which produces a path from the start point to the target.
The attractive field is a key factor in the APF algorithm that guides the robotic arm to move towards the target point. The attractive potential field function U a t t ( q ) is usually defined as a function of the distance from the current position q of the robotic arm to the target position q g o a l . A common expression is:
U a t t ( q ) = 1 2 k a t t d g o a l 2
where k a t t is the attractive coefficient, which determines the strength of the attractive force.
d g o a l = q q g o a l
represents the Euclidean distance between the current position of the robotic arm and the target position. The attractive force F a t t is the negative gradient of the attractive potential field function:
F a t t = U a t t ( q ) = k a t t ( q g o a l q )
The attractive force always points toward the target, and its strength grows with the distance between the robotic arm and the goal. When the arm is far away, the force is stronger, so it moves faster toward the target. As the arm becomes closer, the force gradually weakens, allowing for a smoother, more controlled approach.
The repulsive field is the core of the APF algorithm for achieving obstacle avoidance. The definition of the repulsive potential field function U r e p ( q ) is related to the distance d o b s from the current position q of the robotic arm to the obstacle and the range of action of the repulsive force d 0 . For a single obstacle, the repulsive potential field function is usually expressed as [20]:
U r e p ( q ) = { 1 2 k r e p ( 1 d o b s 1 d 0 ) 2 , d o b s d 0 0 , d o b s > d 0
The repulsive potential field of multiple obstacles is typically modeled using linear superposition:
U r e p , t o t a l ( q ) = i U r e p ( i ) ( q )
where k r e p is the repulsive coefficient, which determines the strength of the repulsive force. When the robotic arm is close to the obstacle, i.e., d o b s d 0 , the repulsive potential field takes effect, and the repulsive force F r e p = U r e p ( q ) has a direction away from the obstacle and a magnitude inversely proportional to the distance from the robotic arm to the obstacle. The closer the distance, the greater the repulsive force, thus effectively preventing the robotic arm from approaching the obstacle; when the robotic arm is far from the obstacle, d o b s > d 0 , the repulsive potential field is zero, and the repulsive force has no effect.
In the actual path planning process, the resultant force F t o t a l on the robotic arm is the vector sum of the attractive force F a t t and the repulsive forces F r e p from all obstacles:
F t o t a l = F a t t + i = 1 n F r e p   i  
where n is the number of obstacles. Under the action of the resultant force, the robotic arm moves in the direction of the resultant force, continuously updating its position. By iteratively calculating the resultant force and updating the position of the robotic arm, the robotic arm gradually avoids obstacles and approaches the target point until it reaches the target point, completing the path planning.
The APF method is popular because it is simple and easy to implement. It produces fairly smooth paths with low computational cost, which makes it a good fit for real-time applications. That said, it does have some drawbacks. One well-known problem is local optima: when the attractive and repulsive forces cancel each other out at some point, the robotic arm can become stuck in a local minimum and never reach the target. Another issue occurs when obstacles are too close to the goal—the repulsive force may then overpower the attractive force, keeping the arm from getting anywhere near the target. Also, in complex environments, building an effective potential field function becomes tricky, and the system can start to oscillate, which hurts overall planning performance.

2.3. Collision Detection

Whether a six-axis robotic arm can complete path planning in a 3D environment depends on the crucial step of collision detection for the robotic arm. obstacles are simplified into three-dimensional spheres, and the links of the robotic arm are simplified into cylinders. As shown in Figure 2, Let the central axis of a certain link in the robotic arm be the line segment P1P2, where P1 and P2 are the centers (3D coordinates) of the two joints of that link. Let the center of the obstacle ball be O, with radius R2, which has been expanded to account for the link radius R1. Then, the formula for calculating the shortest distance d from the center O to the line segment P1P2 is:
  d = { O P 1   t 0 O ( P 1 + t · v ) , 0 < t < 1 O P 2   t 1
Here, v = P2 − P1 is the direction vector of the connecting rod’s central axis, and the parameter t is determined by the projection of the center of the sphere O onto the line containing the line segment:
  t = ( O P 1 ) v v v
the radius R1 of the cylinder simplified from the robotic arm is added to the radius R2 of the sphere simplified from the obstacle. In this way, the collision detection between the robotic arm and the obstacle is simplified to determining the positional relationship between the central axis of the robotic arm link and the bounding sphere. Let the distance between the central axis and the bounding sphere be d, as shown in Figure 2. The judgment formula for collision detection (10) is as follows:
                            { d > R 1 + R 2 , collision free d < R 1 + R 2 , collision
To overcome the limitations of overly simplified obstacle models in conventional path planning simulations, this paper presents a realism-enhanced modeling method specifically designed for cable inspection scenarios. The proposed approach constructs a cable model that achieves a balance between physical fidelity and computational efficiency, focusing on three critical aspects: the static equilibrium configuration of the cable, its geometric discretization, and accurate collision detection.
Taking into account the natural sag of the cable when fixed at both ends and subjected to uniformly distributed gravity, the catenary equation is used to describe its centreline. Let the horizontal span of the cable be Let L be the length of the arc, with both endpoints at height h and the total arc length S . Then the central axis satisfies:
  y ( x ) = a cos h ( x L 2 a ) + h a cos h ( L 2 a )
The parameter a is implicitly determined by the arc length constraint. S = 2 a sin h ( L 2 a ) . When the sag-to-span ratio y ( x ) L < 0.1 , A parabolic approximation may be used:
  g ( x ) = 4 y ( x ) x ( L x ) L 2 + h
To reduce the computational cost. This modeling approach accurately reflects the continuous bending behaviors of cables under the influence of gravity, avoiding the distortion in spatial representation associated with rigid straight-rod or simple spherical models.
To support efficient collision detection, the centreline of a continuous cable is discretised into a series of line segments of length s , and a capsule is constructed for each segment with that segment as its center and the cable radius R c as its radius. The lengths of the discrete segments satisfy s 2 R c , to ensure that adjacent capsules overlap. The entire cable is represented as a collection of capsules: C = U i = 1 N C i .
  C i = { x d i s t ( x , P i P i + 1 ¯ ) R c }
Theoretical analysis shows that when s is sufficiently small, the Hausdorff distance between the discrete model and the actual cable can be kept within a predetermined error bound, thereby achieving geometric fidelity in an engineering sense. A robotic arm linkage is simplified to a cylinder with a radius of R l . Its central axis is the line segment Q 1 Q 2 ¯ . The shortest distance between two expanding bodies is equal to the shortest distance between their central axes minus the sum of their radii:
d m i n = m a x ( 0 , d i s t s e g ( P i P i + 1 ¯ ) , Q 1 Q 2 ¯ ) ( R c + R l ) )  
In particular, d i s t s e g ( · , · ) denotes the Euclidean distance between two line segments. By solving a quadratic convex optimization problem and projecting onto the interval of line segment parameters [ 0 , 1 ] 2 , An analytical expression for this distance can be obtained. The necessary and sufficient condition for a collision to occur is d m i n < 0 . This method yields an analytical closed-form solution, is computationally efficient, and ensures numerical stability as the distance function is continuously differentiable with respect to the robotic arm’s pose. Since the capsule model is entirely contained within the expanded section of the actual cable, if there is no collision between the robotic arm and the discrete capsule model, there will necessarily be no collision with the actual cable. Consequently, the collision detection method employed in this paper is conservative, providing a reliable safety margin for path planning. At the same time, by setting an upper bound on the length of the discrete segments s R c , the maximum geometric approximation error can be controlled to the order of R c , thereby balancing safety and computational efficiency.

3. Improved Algorithm Design

3.1. Bidirectional RRT Algorithm Improvement Strategy

Target-Biased Sampling Strategy

To address the blindness in the search process of the traditional bidirectional RRT algorithm, this study introduces a target-biased sampling strategy. The random sampling of the traditional algorithm lacks effective guidance towards the target direction, leading to low search efficiency. The core of the target-biased sampling strategy is to generate random points biased towards the target point with a certain probability. The specific implementation is that during each random sampling, a probability threshold p is set. When generating a random point, the target point is selected as the random point with probability p , while random sampling is performed in the entire configuration space with probability 1 p . This method allows the sample points to be more targetedly distributed near the target area, accelerating the search process.
From a mathematical perspective, assuming the random point in the configuration space is q r a n d and the target point is q g o a l , under the target-biased sampling strategy, the new random point q n e w can be generated as follows: when the randomly generated probability value is less than p , q n e w = q g o a l ; when the randomly generated probability value is greater than or equal to p , q n e w is generated in the configuration space according to the traditional random sampling method. This method increases the chances of sampling near the target point, making the tree’s expansion more inclined towards the target direction.
Consider a real-world case: a complex industrial workshop full of irregularly shaped obstacles. In such an environment, the traditional bidirectional RRT algorithm often wastes a lot of samples in areas far from the target, which makes the search take much longer. By using a target-biased sampling strategy, the algorithm can sample near the target with a higher probability, quickly pulling the tree to expand toward the goal and dramatically cutting down the search time. In a simulation experiment, with the probability threshold p = 0.3 , in an environment containing 20 irregular obstacles, the traditional bidirectional RRT algorithm required an average of 5000 samples to find a path, while the improved algorithm with the target-biased sampling strategy required only an average of 2000 samples, improving the search efficiency by 60%.
The target-biased sampling strategy helps the bidirectional RRT algorithm search more effectively near the target area. It cuts down on wasted samples, boosts search efficiency, and makes it easier to find a feasible path quickly.

3.2. Target Gravitational Extension Strategy Combined with Dynamic Step Size

The traditional RRT algorithm extends a new node x new from x near towards x rand with a fixed step size. The extension formula is as follows:
x new = x near + s t e p × x rand x near | x rand x near |
In this paper, the extension method for xnew is improved by incorporating the concept of target gravity. The improved extension formula for the new node is:
x new = x near + s x rand x near | x rand x near | + s g x goal x near | x goal x near |
In Equation (16), s denotes the extension step size, | x rand x near | is the Euclidean distance between the random sample x rand and the nearest node x near , | x goal x near | is the distance between the target node x goal and x near , and g represents the gravitational coefficient.
From the revised expansion formula, it is evident that the value of g has a direct impact on the growth direction of the random tree. Let g i n i t be the global initial value of the gravitational coefficient, λ ( 0.1 ) be the decay coefficient (damping coefficient), dmin be the current minimum distance between the robot arm and the obstacle and dsafe be the preset safety distance threshold.
  g k + 1 = { λ · g k   , d m i n d s a f e g k   , d m i n > d s a f e
Here, k is the index of the expansion step. When the minimum distance between the robotic arm and an obstacle is less than or equal to the safety threshold, the attraction coefficient decays continuously according to the damping coefficient λ, thereby reducing the guiding effect of the target attraction on the expansion direction. This causes the random tree to tend to expand toward the randomly sampled points, facilitating obstacle avoidance.
  { d m i n d s a f e   ,   C o n t i n u e   w i t h   t h e   d e c a y   u p d a t e d m i n > d s a f e , S t o p   a t t e n u a t i o n
When any of the following conditions is met, the gravity coefficient is reset to the global initial value g i n i t , and the expansion step size is restored to the initial step size s i n i t .
If the condition dmin > dsafe holds for N consecutive iterations, and the current node has completely bypassed the obstacle area, obstacle avoidance is considered successful; if the distance between the current node and the target point is less than the preset threshold dgoal, it indicates that the specified area has been reached.
A larger g amplifies the attractive influence of the target on the nearest node, steering the tree more aggressively toward the goal and thus improving search efficiency. In contrast, a smaller g leads to more diffuse and widespread expansion, which facilitates obstacle avoidance by encouraging growth toward the random sample x rand .
To balance these behaviors, g is initially set to a relatively high value. When the tree encounters an obstacle during expansion, g is progressively reduced by applying a decay factor, allowing the step size to adapt dynamically until the obstacle is cleared. Once the region is successfully navigated, both g and the step size revert to their original global values. This adaptive mechanism preserves the algorithm’s goal-directed characteristics while significantly enhancing its ability to maneuver through densely cluttered areas, thereby improving overall path planning performance [21]. Figure 3 shows the improved new node generation diagram.

3.3. Potential Field Function Optimization

To help the conventional APF algorithm avoid obstacles better in complex environments, we refine the potential field function by taking into account obstacle-specific attributes and adding an adaptive parameter adjustment mechanism. These changes allow the repulsive force to be computed more accurately, so the robotic arm can respond more effectively to different types of obstacles.
In the traditional formulation, the repulsive force only depends on the distance between the arm and the obstacle, ignoring the obstacle’s shape and size. But in practice, obstacles with different geometries and dimensions pose different levels of threat. For example, at the same distance, a large rectangular obstacle and a small circular one clearly affect the arm’s movement differently. To capture these differences more precisely, we introduce two extra parameters: a shape factor and a size factor.
The shape factor is derived from the geometric characteristics of the obstacle. For a rectangular obstacle, it can be expressed as the ratio of length to width; For spherical obstacles, since their properties are the same in all directions, the direction of the repulsive force always lies along the shortest line connecting the center of the sphere and the robotic arm; therefore, the shape factor is defined as σ = 1 . Since the cylinder has a dominant axial characteristic, the repulsive force should be modulated based on the orientation of the robotic arm relative to the cylinder’s axis. Let the unit vector in the direction of the cylinder’s axis be a The base radius is rc, and the half-height is hc. Let n be the unit vector from the closest point on the cylinder’s axis to the closest point on the robotic arm, and define the shape factor as σ = 1 + α · ( n · a ) 2 .
Where α 0 is the axial enhancement factor. This definition ensures that when the robotic arm is positioned on the side of the cylinder (n is perpendicular to a), σ = 1 . The repulsive force primarily manifests as radial deflection; when the robotic arm is oriented toward the end of the cylinder (n is parallel to a), σ = 1 + α . The repulsive force is increased to account for the additional resistance to motion at the interface.
The size factor is used to quantify the effect of an obstacle’s dimensions on the strength of the repulsive force; it is defined as the equivalent cross-sectional scale perpendicular to the shortest distance.
Spherical obstacle: radius R, with a size factor of β = R . Cylindrical obstacles: Taking into account the combined effects of the base radius and height on the obstructing effect, the size factor is defined as:
  β = r c · ( 1 + γ · h c r c )
γ represents the height influence factor. The former applies to obstacles where height is the dominant factor, while the latter applies to general situations; the appropriate option can be selected based on the actual scenario.
F r e p = { μ · σ · β · ( 1 d 1 d 0 ) · 1 d 2 · n , d d 0 0 , d d 0
η is the repulsive force gain coefficient; d is the shortest distance between the centerline of the robotic arm’s link and the obstacle; d0 is the obstacle influence distance threshold; n is the unit vector pointing from the obstacle to the nearest point on the robotic arm.
To enable the repulsive force to better adapt to different obstacles and environmental changes, this study adopts an adaptive parameter adjustment method. The repulsive coefficient k r e p . These parameters—including the repulsive coefficient, shape factor, and size factor—are adjusted adaptively according to the relative position and distance between the robotic arm and nearby obstacles. The repulsion coefficient k r e p is dynamically adjusted based on the shortest distance d between the robotic arm and the obstacle; this is expressed using the following formula:
  k r e p ( d ) = { k m a x , d d m i n k m i n + ( k m a x k m i n ) k m i n ,   d > d 0 · d 0 d d 0 d m i n , d m i n < d d 0
As the arm approaches an obstacle, the repulsive coefficient is increased to strengthen the repulsive effect, helping the arm avoid collision in a timely manner. Conversely, when the arm moves away, the coefficient is reduced to prevent excessive repulsion from interfering with its motion. The shape and size factors are updated in real time based on the actual geometry and dimensions of the obstacle, ensuring that the repulsive force calculation reflects the current situation more accurately. For irregularly shaped obstacles, contour information is acquired through sensors, and the corresponding shape factor is computed to further refine the repulsive force estimation. Based on sensor data, irregular obstacles are described using discrete point clouds or triangular meshes. To calculate the shape factor and size factor, an axis-aligned bounding box (AABB) or a minimum oriented bounding box (OBB) is computed using bounding box fitting, thereby obtaining the three-dimensional dimensions Lx, Ly, Lz. The size factor is defined as the sum of the lengths of the three sides of the bounding box or the length of the longest side, serving as a measure of size: β i r r e = m a x ( L x , L y , L z ) . Define the anisotropy coefficient based on the aspect ratios of the three sides of the bounding box, using the shape factor as:
σ = 1 + φ · ( m a x ( L x , L y , L z ) m i n ( L x , L y , L z ) 1 )  
where φ is the shape-sensitive coefficient This definition results in stronger repulsive force modulation along the axial direction for slender obstacles. For real-time simulation, point cloud data is updated at every control cycle, and the bounding box parameters are recalculated, thereby enabling dynamic adaptation of the shape factor and size factor.
Through the optimization of the potential field function described above, the obstacle avoidance capability of the improved APF algorithm in complex environments has been significantly improved. In a simulation environment containing obstacles of various shapes and sizes, the improved algorithm can more flexibly avoid obstacles, find better paths, and effectively improve the success rate and efficiency of path planning. The results of the simulation experiment are shown in Figure 4. The effectiveness and improved efficiency of the optimized APF algorithm can be seen from the path planning success rate and average path length, as shown in Table 1 below.

3.4. Trap Avoidance Strategy

To address the tendency of the conventional APF algorithm to become trapped in local optima, this study incorporates the simulated annealing algorithm as a trap avoidance mechanism. This approach enables the robotic arm to escape local minima and more effectively explore the solution space in search of a global optimum.
Simulated annealing is a probabilistic optimization method inspired by how metals cool and anneal in the real world. When you heat a metal to a high temperature, its atoms gain energy and move around freely. As the temperature slowly drops, the atoms slow down and eventually settle into a stable, low-energy structure. Simulated annealing works the same way: it uses a temperature parameter that decreases over time, and during this cooling process, it sometimes accepts worse solutions with a certain probability. This randomness helps the algorithm avoid becoming stuck in local optima too early, allowing it to explore the search space more thoroughly.
Let the pose of the robotic arm’s end-effector or in joint space be q Q R n . Here, Q represents the feasible configuration space of the robotic arm. During path planning, the configuration qk at each discrete time step is treated as a state of the algorithm. Define the energy corresponding to state q as the total potential energy in the artificial potential field:
  E ( q ) = U a t t ( q ) + U r e p ( q )
where U a t t ( q ) is the gravitational potential generated by the target point, U r e p ( q ) is the repulsive potential caused by the obstacle. The lower the value of the energy function E ( q ) , the closer the state is to the optimal solution—that is, closer to the goal and farther from obstacles. Against the backdrop of robotic arm movement, In the context of robotic arm motion, this represents the change in potential energy resulting from E transition from the current state q k to the candidate state q n e w :
  E ( q ) = E ( q n e w ) E ( q k )
If E < 0 this indicates that the candidate state results in a decrease in total potential energy (moving toward the goal or away from an obstacle), and is the preferred direction of movement; If E > 0 this indicates a candidate state increases the total potential energy (possibly leading to a trap or moving away from the target), it may still be accepted with a certain probability according to the simulated annealing rules.
In the improved APF algorithm, the simulated annealing algorithm is incorporated into the calculation of the potential field. As the robotic arm moves within the potential field, each iteration determines whether to accept the current direction of motion based on the rules of the simulated annealing algorithm. Specifically, after calculating composite force   F t o t a l and obtaining q n e w based on the aforementioned neighboring solution rule, Based on the current “temperature” (T), Generate a random number r in the range [0, 1]. If r is less than the acceptance probability p , accept q n e w as the next state; if r is greater than or equal to p , reject that direction and recalculate the resultant force. The acceptance probability p   is typically calculated using the Metropolis rule, namely
  p = { 1 , E 0 e E T , E > 0
Here, E is the change in potential energy as defined above. As the iterations progress, T gradually decreases. The probability of accepting a suboptimal solution gradually decreases, and the algorithm gradually converges to the global optimal solution.

3.5. Potential Field Smoothing

Abrupt changes in the potential field seriously hurt the stability and reliability of the traditional APF algorithm in complex environments. To lessen their impact on the robotic arm’s movement, we smooth the potential field, which makes the obstacle avoidance process more stable.
Abrupt changes in the potential field tend to happen when the robotic arm becomes close to an obstacle. The repulsive field shifts sharply, causing violent fluctuations that make it hard to control the arm’s movement steadily. In narrow passages or areas with irregularly shaped obstacles, these sudden changes can subject the arm to forces that keep switching direction and strength within a short time. This leads to severe oscillations, and the arm may not be able to get through smoothly.
To address this, we use Gaussian filtering to smooth the repulsive field. Gaussian filtering is a common linear smoothing technique—it works by taking a weighted average of neighboring values. For the repulsive field, we pick a neighborhood of suitable size around each point, calculate the weights based on the Gaussian function, and then take a weighted average of the repulsive force values in that neighborhood. The result is a smoothed repulsive force value.
The specific implementation process of Gaussian filtering is as follows: for each point ( x , y ) in the repulsive field, its smoothed repulsive force value F r e p s m o o t h ( x , y ) can be calculated by the following formula:
F r e p s m o o t h ( x , y ) = i = n n j = n n G ( i , j ) F r e p ( x + i , y + j ) i = n n j = n n G ( i , j )
where G ( i , j ) is the Gaussian function:
G ( i , j ) = 1 2 π σ 2 e i 2 + j 2 2 σ 2
σ is the standard deviation of the Gaussian function, which determines the degree of smoothing of the filter; n is the size of the neighborhood, usually taken as a suitable odd number to ensure that the center of the neighborhood is the current point. F r e p ( x + i , y + j ) is the original repulsive force value of the point ( x + i , y + j ) in the neighborhood.
Applying Gaussian filtering to the repulsive field helps smooth out the abrupt changes, making the potential field much more stable. In a simulation environment with narrow passages and irregular obstacles, the smoothed field allows the robotic arm to move more steadily—no more violent oscillations, and it can successfully get through tricky areas. Experimental results show that this improved APF method, with potential field smoothing, boosts the obstacle avoidance success rate in complex environments by 25%, and the overall path planning stability improves noticeably. As can be seen from Figure 5, there is a difference between the results before and after path smoothing.
Smoothing the potential field with Gaussian filtering reduces the impact of sudden changes on the arm’s movement. It makes the improved APF algorithm more stable and reliable in complex settings, which in turn helps the robotic arm move safely and smoothly.

3.6. Pruning and Path Smoothing Strategies

This strategy aims to address the issues commonly encountered in the RRT (Rapidly Exploring Random Trees) family of algorithms during path planning, namely path redundancy, slow convergence, and poor quality of the final path. Traditional RRT algorithms expand the tree structure through random sampling; whilst this enables rapid exploration of the search space, the resulting paths often contain a significant number of unnecessary detours and backtracking, resulting in paths that deviate considerably from the optimal path. To address this, this paper introduces the ‘triangle inequality pruning with target chains’ method, the core idea of which is as follows: This strategy mainly reduces the path length by expanding the search range of nodes to their parent nodes in the ChooseParent and Review functions, as shown in the figure. At the same time, if there is a collision-free path between xnew and xtar, then xnew and xtar are directly connected. This strategy can improve path quality and speed up the path generation. In addition, it is worth noting that, unlike the RRT-APF algorithm, the improved algorithm introduces a rewiring strategy and an optimization objective, making the tree structure converge to the target point more efficiently. This pruning strategy not only improves the ‘effective connection rate’ per expansion but also reduces the total path length through the geometric constraints imposed by the triangle inequality. Whereas the classical RRT requires tens of thousands of iterations to produce a viable path, this method can generate high-quality paths within a few hundred iterations, laying a solid foundation for subsequent smoothing [22]. Figure 6 illustrates a pruning strategy for triangular inequalities.
Since the path is not a smooth curve, it may have a significant impact on the stability of the robotic arm in some segments. Therefore, after obtaining the initial path, this paper uses the cubic B-spline curve method for further optimization [23]. Cubic B-splines have some nice properties. Each curve segment depends only on four neighboring control points, so moving one point only changes a small part of the curve—this makes local adjustments easy without messing up the overall smoothness. A cubic B-spline also keeps continuous first and second derivatives along the whole curve, which means velocity and acceleration change smoothly, meeting the robotic arm’s dynamic requirements. Another thing: B-splines do not force the curve to go exactly through every control point; the points just “guide” it roughly into position. This naturally takes the sharp corners off the original polyline and gives you a much smoother path.
The cubic B-spline curve formula is as follows:
c ( t ) = i = 0 3 c i F i , k ( t )
{ F 0 , 3 ( t ) = 1 6 ( 1 t ) 3 F 1 , 3 ( t ) = 1 6 ( 3 t 3 6 t 2 + 4 ) F 2 , 3 ( t ) = 1 6 ( 3 t 3 + 3 t 2 + 3 t + 1 ) F 3 , 3 ( t ) = 1 6 t 3 , t [ 0 , 1 ]
Here, t denotes the normalized arc length position of the current curve segment; the four basis functions constitute the weighting coefficients for this segment, and their sum is 1, ensuring the convex hull property of the curve; the sequence of control points c is taken from four adjacent nodes in the original path (or from feature points obtained through sampling).
Cubic B-splines can effectively remove ‘jaggies’ and sharp angles from a path, resulting in a smoother change in curvature. However, it should be noted that excessive smoothing may cause the path to deviate from the original collision-free region, or even intrude into obstacles. Therefore, it is usually necessary to perform a collision detection after smoothing and make local adjustments to the intruding sections (such as adjusting control point weights or adding constraint points). The strategy outlined in this paper aims to maximize smoothness whilst preserving the original path topology, thereby striking a balance between ‘path length’ and ‘motion smoothness’.

3.7. Ablation Experiment

To validate the effectiveness of the key components in the improved bidirectional RRT and APF fusion algorithm proposed in this paper, ablation experiments were conducted in a cable detection simulation environment. Each configuration was run independently 50 times, and the average number of iterations, average planning time, average path length and average number of nodes were recorded, with the standard deviation of each metric calculated. The specific configurations are as follows: Complete algorithm, remove target-biased sampling and switch to uniform random sampling, Remove the dynamic gravitational coefficient adjustment and dynamic step size; set the gravitational coefficient to a fixed value of g = 1 and the step size to a fixed value of s = 50. The traditional APF potential function is used (excluding shape and size factors, with a fixed repulsive coefficient). Remove the mechanism for escaping local minima in simulated annealing; when a local optimum is reached, apply only random perturbations. Remove the Gaussian smoothing from the potential field and retain the original potential field. Remove triangle inequality pruning and cubic B-spline smoothing, and use only the original RRT path. The results of the ablation experiments are shown in Table 2.
As can be seen from the table above, target-biased sampling has the greatest impact; upon its removal, the number of iterations increased by 90.2% and planning time increased by 68.0%, confirming that this strategy significantly enhances the directionality of the search. Performance deteriorated markedly following the removal of simulated annealing and dynamic attraction step sizes, with the number of iterations increasing by 78.0% and 63.4%, respectively, demonstrating the critical role of trap avoidance and adaptive obstacle avoidance strategies in complex cable environments. Triangular pruning and smoothing have the most pronounced effects on path length and the number of nodes; upon removal, path length increases by 9.8% and the number of nodes by 84.3%, with a significant increase in standard deviation, indicating that the pruning strategy effectively reduces redundancy and stabilizes path quality. The contributions of the optimized potential field function and Gaussian filtering were relatively modest; upon removal, the number of iterations increased by 43.9% and 34.1%, respectively, whilst the standard deviation of path length rose slightly, indicating that both play a supplementary stabilizing role in high-precision obstacle avoidance and smooth motion. The complete algorithm achieved the optimal mean and the smallest standard deviation across all metrics, demonstrating that the collaborative operation of all components enables efficient, stable, and smooth robotic arm path planning. Figure 7 is a flowchart of the entire algorithm, designed to provide a comprehensive overview of the algorithm’s workflow.

4. Experiments and Results Analysis

4.1. Simulation Environment Setup

To test the improved algorithm proposed in this paper, simulation experiments were conducted. The simulation was performed on a computer with an Intel® Core™ i9-12900H CPU @ 2.50 GHz and 16.00 GB of memory, using MATLAB R2022a software. This paper conducts experimental simulations of the algorithm in a 2D environment, a 3D environment, and the working space of a robotic arm. The simulation of the robotic arm requires the use of the MATLAB Robotics Toolbox. In this chapter, the improved algorithm of this paper is compared with three other algorithms: bidirectional RRT, a hybrid algorithm combining APF and RRT, and the algorithm proposed in Ref. [24], in both 2D and 3D models. The target bias probability p is set to 0.3, Firstly, simulations were carried out in MATLAB using both 2D and 3D modeling environments to obtain the robot arm trajectories planned by the four algorithms. The algorithm proposed in this paper was then compared with the three previous algorithms to assess whether there were any performance improvements. A schematic diagram of the 2D environment is shown in Figure 8.
The 2D space is a 1000 × 1000 path planning space, where the black shapes are the preset obstacles. The red point is the starting point with coordinates (0, 0), and the blue point is the end point with coordinates (1000, 1000). The 3D space is a 1000 × 1000 × 1000 path planning space, where the green spheres are the preset obstacles. The red point is the starting point with coordinates (0, 0, 0), and the blue point is the end point with coordinates (1000, 1000, 1000). The improved algorithm of this paper and the four algorithms were run in both environments. The path planning indicators were verified, and the results are analyzed at the end of this chapter. A schematic diagram of the 3D environment is shown in Figure 9.

4.2. 2D Space Simulation

Path planning simulations were conducted in a 2D space. Figure 10, Figure 11, Figure 12 and Figure 13 show the experimental results for the four algorithms in a 2D environment. The blue parts represent the expanded tree branches, and the red parts represent the final searched path.
Analysis of the table data indicates that the improved algorithm presented in this paper demonstrates superior performance in a 2D environment. Compared with the algorithm in Ref. [24], the average search time is reduced by 33.7%, the average path length by 7.6%, and the average number of nodes by 67.7%, whilst the average number of iterations increases by 2.0% (slightly higher than the comparison algorithm). Compared with the bidirectional RRT algorithm, the average search time is reduced by 47.8%, the average path length by 12.3%, the average number of nodes by 89.1%, and the average number of iterations by 15.1%. Compared with the RRT-APF hybrid algorithm, the average search time is reduced by 65.8%, the average path length by 20.0%, the average number of nodes by 71.4%, and the average number of iterations by 60.2%. Table 3 sets out the specific experimental data.

4.3. 3D Space Simulation

Path planning simulations were conducted in a 3D space. Figure 14, Figure 15, Figure 16 and Figure 17 show the experimental results for the four algorithms in a 3D environment.
Analysis of the tabular data demonstrates the performance advantages of the improved algorithm proposed in this paper in 3D environments: compared with the algorithm in Ref. [24], the average search time is reduced by 43.9%, the average path length by 4.4%, the average number of nodes by 80.0%, and the average number of iterations by 53.7%. Compared with the bidirectional RRT algorithm, the average search time was reduced by 31.8%, the average path length by 5.6%, the average number of nodes by 91.4%, and the average number of iterations by 50.0%. Compared with the RRT-APF hybrid algorithm, the average search time was reduced by 81.6%, the average path length by 9.2%, the average number of nodes by 86.8%, and the average number of iterations by 88.1%. Table 4 sets out the specific experimental data.

4.4. Simulated Cable Survey Environment Simulation

The superiority of the algorithm described in this paper has already been demonstrated under the first two environmental simulations; however, the ultimate objective of this study is to verify whether the algorithm remains effective in a cable environment. Therefore, based on the cable environment observed during on-site surveys, a cable environment was simulated in MATLAB R2022a. This was then combined with a robotic arm model to simulate the application of the improved algorithm in a cable environment and assess its suitability. Figure 18 shows a photograph of a real-world cable environment.
The improved algorithm of this paper is applied to the robotic arm obstacle avoidance path planning in a space of size 2500 × 3000 × 2000. The starting point coordinates are set to (−1000, −1500, −500), and the target point coordinates are (500, 500, 700). Cylinders are used to represent obstacles. 50 tests were conducted. Figure 19 is a schematic diagram of a cable environment. The experimental results for the four algorithms can be seen in Figure 20.
The specific experimental data can be found in Table 5. Analysis of the table data shows that, compared with the algorithm in Ref. [24], the average search time is reduced by 18.1%, the average path length by 3.5%, the average number of nodes by 31.1%, and the average number of iterations by 36.9%. Compared with the bidirectional RRT algorithm, the average search time was reduced by 34.1%, the average path length by 4.8%, the average number of nodes by 69.8%, and the average number of iterations by 33.9%. Compared with the RRT-APF hybrid algorithm, the average search time was reduced by 68.2%, the average path length by 10.9%, the average number of nodes by 37.0%, and the average number of iterations by 66.1%.
A physical platform was constructed based on the simulation environment, and a UR5 robotic arm was used. The experimental results are shown in Figure 21. The robotic arm was able to effectively avoid obstacles along a pre-planned path and move from the starting point to the target point without collision, demonstrating the effectiveness and practicality of the improved algorithm described in this paper.
The experimental results presented above indicate that, when applied to end-effector obstacle avoidance path planning for a robotic arm, the proposed improved bidirectional RRT and APF fusion algorithm consistently outperforms the other methods evaluated. Across both 2D and 3D simulation environments, the algorithm generates trajectories that are not only shorter and smoother but also require fewer iterations, less computation time, and a reduced number of nodes. In the simulated cable survey environment specifically, it achieved the shortest path with the fewest nodes and iterations, all while maintaining accurate obstacle avoidance and the fastest planning speed. These findings highlight the algorithm’s effectiveness in enhancing both the efficiency and quality of path planning in complex operational settings.
Building on this work, although improvements have been made compared to traditional algorithms, there is still room for further advancement. Future research could focus on deploying the algorithm on a real six-axis robotic arm platform to validate the transferability from simulation to the physical world. The introduction of dynamic obstacle prediction and real-time re-planning mechanisms could enhance the algorithm’s robustness in non-static environments. Research into adaptive parameter tuning methods based on reinforcement learning or Bayesian optimization could reduce reliance on manual parameter tuning.

5. Conclusions

To address the efficiency limitations of the RRT algorithm in 3D obstacle avoidance path planning for six-axis robotic arms—particularly its tendency to explore excessively large spaces and incur high computational costs—this paper proposes an improved approach. The method begins by determining an initial expansion step size based on an adaptive step size strategy. A probabilistic target-biased sampling mechanism is then introduced to guide the generation of random sample points, increasing the likelihood of expansion toward the goal and enhancing overall sample quality.
In addition, a gravitational component with an adjustable coefficient is incorporated into the node expansion process, making the growth of new nodes more goal-directed. Near obstacles, this is combined with a dynamic step size adjustment to help the random tree navigate around obstructions more effectively. Once an initial path is found, it undergoes pruning and optimization.
The refined APF algorithm is subsequently applied for local trajectory fine-tuning through several enhancements: optimization of the potential field function using obstacle-specific attributes for more accurate repulsive force computation, integration of simulated annealing as a trap avoidance mechanism to escape local minima, and application of Gaussian filtering to smooth the repulsive field and improve motion stability. After iteratively refining the path from start to goal, cubic B-spline curves are used to generate a final smooth trajectory.
Simulation experiments conducted in 2D and 3D environments (including dedicated robotic arm obstacle avoidance scenarios) demonstrate that the proposed improved bidirectional RRT-APF fusion algorithm outperforms the algorithm described in Ref. [24], the bidirectional RRT, and the standard RRT–APF fusion method. The results indicate that both planning time and path length have been reduced, whilst trajectory characteristics are smoother; this confirms the algorithm’s effectiveness in enhancing three-dimensional obstacle-avoidance path planning for robotic arms. Its practicality has also been verified in physical experiments.
The improved bidirectional RRT-APF fusion algorithm proposed in this paper demonstrates superior path planning performance compared to the baseline methods in both simulation and physical experiments. Nevertheless, the current algorithm still relies on a traditional serial computing architecture, which may encounter computational bottlenecks when applied to cable inspection tasks that require extremely high real-time performance. To further enhance the algorithm’s execution efficiency and energy efficiency—especially its potential for deployment on embedded or mobile robotic platforms—we note that the parallel computing paradigm of Cellular Neural Networks (CNNs) offers distinct advantages in robot motion control.
Arena et al. [25] presented a CNN-based chip for robot motion control. It solves partial differential equations in parallel using locally connected analog processing units, which allows obstacle avoidance and trajectory tracking with very low latency. Inspired by their work, we can map some of the key computations in our algorithm—such as potential field forces, collision detection, and the distance calculations used in triangle inequality pruning—onto a CNN architecture. The natural parallelism and analog nature of CNNs could greatly cut the per-iteration computation time. This is especially relevant for cable detection environments, where a lot of repetitive geometric calculations (e.g., shortest distance between a capsule and a cylinder) are needed. The grid-like parallel structure of CNNs is well suited to such tasks, and could potentially bring planning time down from milliseconds to microseconds.
Another limitation is that our algorithm currently uses fixed parameter settings. In future work, we could bring in reinforcement learning or Bayesian optimization to tune those parameters online, so the system can adapt to changes in cable layout or obstacle density. We also plan to combine the algorithm with neuromorphic hardware—like CNN-based biomimetic chips or FPGA accelerators—to build a real-time obstacle avoidance system that tightly integrates perception, planning, and control.

Author Contributions

Conceptualization, L.L. and J.C.; methodology, L.L.; software, L.L.; validation, L.L. and J.C.; formal analysis, L.L.; investigation, L.L.; resources, L.L.; data curation, L.L.; writing—original draft preparation, L.L.; writing—review and editing, L.L.; visualization, L.L.; supervision, J.C.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

Special thanks go to my advisor Chen Jiong, my senior colleagues Qin Ziyi and Yao Anshuo. They provided invaluable guidance and encouragement, urging me to strive for greater achievements in my future research and studies. I also extend my gratitude to my family and friends for their love and support throughout this journey.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Liu, L.; Lin, J.; Yao, J.; He, D.; Zheng, J.; Huang, J.; Shi, P. Path Planning for Smart Car Based on Dijkstra Algorithm and Dynamic Window Approach. Wirel. Commun. Mob. Comput. 2021, 56, 391–400. [Google Scholar] [CrossRef]
  2. Tang, X.; Zhou, H.; Xu, T. Obstacle avoidance path planning of 6-DOF robotic arm based on improved A* algorithm and artificial potential field method. Robotica 2024, 42, 457–481. [Google Scholar] [CrossRef]
  3. Liu, J.; Feng, S.; Ren, J.H. Directed D* algorithm for dynamic path planning of mobile robots. J. Zhejiang Univ. Eng. Sci. 2020, 54, 291–300. [Google Scholar] [CrossRef]
  4. Chen, L.; Yang, H.; Chen, Z.; Yang, J. Global path planning with integration of B-spline technique and genetic algorithm. J. Zhejiang Univ. Eng. Sci. 2024, 58, 2520–2530. [Google Scholar] [CrossRef]
  5. You, Y.; Li, H.; Li, Y.; Jiang, J.; Bi, Y. Research on Path Planning of Wing Box Assembly Robot Based on Improved PRM Algorithm. Aeronaut. Manuf. Technol. 2025, 68, 155–164+185. [Google Scholar] [CrossRef]
  6. Tan, Z.; Yuan, Y. Research on the Improvement of RRT-Connect Path Planning Algorithm Based on Complex Environments. Sci. Technol. Eng. 2025, 25, 8127–8134. [Google Scholar] [CrossRef]
  7. Xie, L.; Liu, S. Dynamic obstacle-avoiding motion planning for manipulator based on improved artificial potential filed. Control Theory Appl. 2018, 35, 1239–1249. [Google Scholar] [CrossRef]
  8. Fan, J.; Chen, X.; Liang, X. UAV Trajectory Planning Based on Bi-Directional APF-RRT Algorithm with Goal-Biased. J. Expert Syst. Appl. 2023, 213, 119137. [Google Scholar] [CrossRef]
  9. Chen, X.; Zhao, Y.; Fan, J.; Liu, H. Three-dimensional UAV track planning based on the GB-PQ-RRT* algorithm. In Proceedings of the 2023 42nd Chinese Control Conference (CCC), Tianjin, China, 24–26 July 2023; pp. 4639–4644. [Google Scholar] [CrossRef]
  10. Xiong, X.X.; He, L.L. Path Planning for Mobile Robot Based on Improved Particle Swarm Optimization Algorithm. Comput. Syst. Appl. 2021, 30, 153–159. (In Chinese) [Google Scholar]
  11. Zong, C.; Lu, L.; Lei, X.; Zhao, P. A path planning method for spatial multi-DOF manipulator based on A algorithm. J. Hefei Univ. Technol. Nat. Sci. 2017, 40, 164–168. [Google Scholar] [CrossRef]
  12. Qi, Z.; Huang, P.; Liu, Z.; Han, D. Research on path planning method for space redundant manipulator. Acta Autom. Sin. 2019, 45, 1103–1110. [Google Scholar] [CrossRef]
  13. Zhao, X.; Zhang, H.; Liu, L.; Yin, Q.; Wu, S. Path Planning for Agricultural Robots Based on Multi-strategy Fusion Improved Ant Colony Algorithm. Trans. Chin. Soc. Agric. Mach. 2026, 57, 350–361. [Google Scholar]
  14. Wang, W.; Wang, S.; Wang, Q.; Qu, J.; Liu, H. Path planning for RRT-connect manipulator based on hierarchical reinforcement learning. Control. Decis. 2026, 1–12. [Google Scholar] [CrossRef]
  15. Xu, W.; Lu, S. Analysis of Space Manipulator Route Planning Based on Sarsa (λ) Reinforcement Learning. J. Astronaut. 2019, 40, 435–443. [Google Scholar] [CrossRef]
  16. Yuan, M.; Chen, L.; Feng, Z. Path planning algorithm for manipulator based on monocular vision and multi-population particle swarm optimization. J. Comput. Appl. 2020, 40, 9. [Google Scholar]
  17. Wang, Z.; Hu, L. Path planning method for industrial robotic arm based on deep Q-learning. Chem. Autom. Instrum. 2018, 45, 141–145, 171. [Google Scholar]
  18. Mousavi, Y.; Akbari, P.; Mousavi, R.; Mousavi, A.; Kucukdemiral, I.B.; Fekih, A.; Cali, U. QRL-AFOFA: Q-learning enhanced self-adaptive fractional order firefly algorithm for large-scale and dynamic multiobjective optimization problems. Artif. Intell. Rev. 2026, 59, 117. [Google Scholar] [CrossRef]
  19. Zhou, Z.; Meng, X.; Wang, Z.; Zhang, Z.; Liu, H.; Wen, J. Research on Obstacle Avoidance Path Planning of Robotic Arm Based on Adaptive Step Size Bidirectional RRT Algorithm. Comput. Eng. Appl. 2025, 61, 146–156. [Google Scholar] [CrossRef]
  20. Deng, D.; Xu, J.; Meng, H.; Yang, W. Path planning for mobile robot based on fusion of ant colony algorithm and artificial potential field method. Chin. J. Sci. Instrum. 2025, 46, 1–16. [Google Scholar] [CrossRef]
  21. Wang, H.; Yang, Y.; Fang, W. Improved APF-RRT* path planning algorithm for unstructured environments. Comput. Sci. Appl. 2025, 15, 97–111. [Google Scholar] [CrossRef]
  22. Wang, N.; Gao, T. Mobile robot path planning based on improved RRT*-APF algorithm. Modul. Mach. Tool Autom. Manuf. Tech. 2025, 6, 54–59. [Google Scholar] [CrossRef]
  23. Cui, X.; Qin, Y. Nesting method based on cubic B-spline subinterval method. J. Tianjin Univ. Nat. Sci. Eng. Technol. Ed. 2007, 9, 1094–1098. [Google Scholar]
  24. Wang, H.; Chen, K.; He, L.; Bai, K. Path planning for robotic fish based on fusion of improved A* algorithm and artificial potential field method. Electron. Meas. Technol. 2025, 48, 58–72. [Google Scholar] [CrossRef]
  25. Arena, P.; Fortuna, L.; Frasca, M.; Patané, L. A CNN-based chip for robot motion control. IEEE Trans. Circuits Syst. I Regul. Pap. 2005, 52, 1862–1871. [Google Scholar] [CrossRef]
Figure 1. RRT Algorithm Principle.
Figure 1. RRT Algorithm Principle.
Applsci 16 04897 g001
Figure 2. Collision Detection Model.
Figure 2. Collision Detection Model.
Applsci 16 04897 g002
Figure 3. Improved New Node Generation Diagram.
Figure 3. Improved New Node Generation Diagram.
Applsci 16 04897 g003
Figure 4. Cylindrical Model Simulation.
Figure 4. Cylindrical Model Simulation.
Applsci 16 04897 g004
Figure 5. The optimized path.
Figure 5. The optimized path.
Applsci 16 04897 g005
Figure 6. Triangular Inequality Pruning Strategy.
Figure 6. Triangular Inequality Pruning Strategy.
Applsci 16 04897 g006
Figure 7. Flowchart.
Figure 7. Flowchart.
Applsci 16 04897 g007
Figure 8. Two-dimensional environment.
Figure 8. Two-dimensional environment.
Applsci 16 04897 g008
Figure 9. Three-dimensional environment.
Figure 9. Three-dimensional environment.
Applsci 16 04897 g009
Figure 10. Bi-RRT Algorithm.
Figure 10. Bi-RRT Algorithm.
Applsci 16 04897 g010
Figure 11. RRT-APF Fusion Algorithm.
Figure 11. RRT-APF Fusion Algorithm.
Applsci 16 04897 g011
Figure 12. The Algorithm in Ref. [24].
Figure 12. The Algorithm in Ref. [24].
Applsci 16 04897 g012
Figure 13. Improved Algorithm.
Figure 13. Improved Algorithm.
Applsci 16 04897 g013
Figure 14. Bidirectional RRT Algorithm.
Figure 14. Bidirectional RRT Algorithm.
Applsci 16 04897 g014
Figure 15. RRT-APF Algorithm.
Figure 15. RRT-APF Algorithm.
Applsci 16 04897 g015
Figure 16. The Algorithm in Ref. [24].
Figure 16. The Algorithm in Ref. [24].
Applsci 16 04897 g016
Figure 17. Improved Algorithm.
Figure 17. Improved Algorithm.
Applsci 16 04897 g017
Figure 18. Cable Survey Environment.
Figure 18. Cable Survey Environment.
Applsci 16 04897 g018
Figure 19. Simulated Cable Survey Environment.
Figure 19. Simulated Cable Survey Environment.
Applsci 16 04897 g019
Figure 20. Path Planning of Four Algorithms in Simulated Cable Survey Environment.
Figure 20. Path Planning of Four Algorithms in Simulated Cable Survey Environment.
Applsci 16 04897 g020
Figure 21. Physical Experiment with the Robotic Arm.
Figure 21. Physical Experiment with the Robotic Arm.
Applsci 16 04897 g021
Table 1. The impact of APF on algorithms.
Table 1. The impact of APF on algorithms.
AlgorithmShape of the ObstacleSuccess RateAverage Path Length
Without APFSpherical68%1.9562
Traditional APFSpherical85%1.8454
Improving APFSpherical93%1.7968
Without APFcylindrical63%2.3213
Traditional APFcylindrical76%2.0981
Improving APFcylindrical88%1.9237
Table 2. Ablation experiment.
Table 2. Ablation experiment.
AlgorithmAverage Number of IterationsAverage Planning TimeAverage Path LengthAverage Number of Nodes
Complete algorithm38.0 ± 6.20.0613 ± 0.00851.2486 ± 0.052148.0 ± 7.3
Cancel target-biased sampling78.0 ± 10.30.1043 ± 0.01421.3517 ± 0.061489.0 ± 11.6
Cancel dynamic gravity step size67.0 ± 9.10.0895 ± 0.01171.3285 ± 0.058776.0 ± 9.8
Cancel the optimization of the potential field function59.0 ± 8.40.0817 ± 0.01031.3012 ± 0.055368.0 ± 8.9
Cancel simulated annealing73.0 ± 10.10.0992 ± 0.01351.3368 ± 0.060282.0 ± 10.7
Cancel Triangular Pruning + Smoothing47.0 ± 7.00.0698 ± 0.00921.3654 ± 0.063894.0 ± 12.4
Table 3. Comparison of Four Algorithms in 2D Environment.
Table 3. Comparison of Four Algorithms in 2D Environment.
AlgorithmAverage IterationsAverage TimeAverage Path LengthAverage Nodes
The Algorithm in Ref. [24]149 ± 250.1367 ± 0.0191.6245 ± 0.06331 ± 4.1
Bidirectional RRT179 ± 270.1739 ± 0.0241.7113 ± 0.06892 ± 13.3
RRT-APF Fusion382 ± 570.2649 ± 0.0371.8768 ± 0.07535 ± 5.4
Improved Algorithm152 ± 230.0907 ± 0.0131.5013 ± 0.06010 ± 2.5
Table 4. Comparison of Four Algorithms in 3D Environment.
Table 4. Comparison of Four Algorithms in 3D Environment.
AlgorithmAverage IterationsAverage TimeAverage Path LengthAverage Nodes
The Algorithm in Ref. [24]1245 ± 201.20.157 ± 0.0241.8749 ± 0.07535 ± 5.3
Bidirectional RRT1151 ± 173.40.129 ± 0.0181.8975 ± 0.07681 ± 11.1
RRT-APF Fusion4851 ± 728.80.477 ± 0.0671.9724 ± 0.07953 ± 7.2
Improved Algorithm576 ± 86.30.088 ± 0.0121.7919 ± 0.0727 ± 1.6
Table 5. Comparison of Four Algorithms in Simulated Cable Survey Environment.
Table 5. Comparison of Four Algorithms in Simulated Cable Survey Environment.
AlgorithmAverage IterationsAverage TimeAverage Path LengthAverage Nodes
The Algorithm in Ref. [24]65 ± 9.70.0758 ± 0.0111.2891 ± 0.05274 ± 10.2
BI-RRT62 ± 9.30.0943 ± 0.0131.3064 ± 0.052169 ± 24.3
APF-RRT121 ± 18.20.1954 ± 0.0271.3967 ± 0.05681 ± 11.1
Improved Algorithm41 ± 6.50.0621 ± 0.0091.2439 ± 0.05051 ± 7.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lin, L.; Chen, J. Path Planning of Cable Survey Robotic Arm Based on Improved Bidirectional RRT and APF Fusion Algorithm. Appl. Sci. 2026, 16, 4897. https://doi.org/10.3390/app16104897

AMA Style

Lin L, Chen J. Path Planning of Cable Survey Robotic Arm Based on Improved Bidirectional RRT and APF Fusion Algorithm. Applied Sciences. 2026; 16(10):4897. https://doi.org/10.3390/app16104897

Chicago/Turabian Style

Lin, Lei, and Jiong Chen. 2026. "Path Planning of Cable Survey Robotic Arm Based on Improved Bidirectional RRT and APF Fusion Algorithm" Applied Sciences 16, no. 10: 4897. https://doi.org/10.3390/app16104897

APA Style

Lin, L., & Chen, J. (2026). Path Planning of Cable Survey Robotic Arm Based on Improved Bidirectional RRT and APF Fusion Algorithm. Applied Sciences, 16(10), 4897. https://doi.org/10.3390/app16104897

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop