1. Introduction
With the continuous advancement of intelligent operation and maintenance in the nuclear power industry, robots are increasingly expected to undertake inspection, maintenance assistance, debris retrieval, and other tasks in hazardous or inaccessible areas. In nuclear power plants, however, robot motion planning is often performed in highly constrained workspaces characterized by dense equipment layouts, narrow passages, complex geometric boundaries, and stringent safety constraints. These features make it difficult for conventional path planning methods to simultaneously satisfy the requirements of efficiency, robustness, safety, and engineering deployability. Recent studies on nuclear inspection and decommissioning robotics have confirmed the growing demand for reliable autonomous navigation in such environments, while also indicating that path planning remains a major bottleneck in practical deployment [
1,
2,
3,
4].
Classical graph-search methods, such as A*, provide strong heuristic interpretability and can generate effective paths in discretized spaces [
5]. Nevertheless, when extended to high-dimensional continuous spaces with irregular obstacles and strict online response requirements, their computational burden and dependence on map discretization become increasingly restrictive. By contrast, the artificial potential field (APF) method is attractive because of its simple formulation, low computational cost, and good local responsiveness [
6]. However, despite these advantages, classical APF is well known to suffer from local minima, oscillation near obstacles, and poor path rationality in cluttered environments. Although improved APF variants, such as deterministic-annealing APF and subarea-based APF, have alleviated these problems to some extent, they still struggle to guarantee robust global feasibility in narrow and obstacle-dense environments [
7,
8].
Sampling-based planners, especially rapidly exploring random tree (RRT) and its variants, have therefore become an important technical route for robotic path planning because of their probabilistic completeness, flexibility in complex spaces, and relatively low dependence on explicit discretization [
9]. Bidirectional extensions further improve search efficiency by growing trees simultaneously from the start and goal states [
10]. However, existing studies have also shown that conventional RRT-type methods still suffer from excessive random exploration, slow convergence in narrow passages, and unsatisfactory initial path quality in cluttered environments. In response, recent research has focused on improving sampling mechanisms, including adaptive sampling, informative or hybrid sampling, density-guided expansion, and region-constrained search [
11,
12,
13,
14,
15,
16,
17,
18]. Although these studies have demonstrated that sampling optimization is an effective way to improve search efficiency, most of them are oriented toward general mobile robot scenarios, and relatively few address the coupled requirements of narrow passages, dense obstacles, bidirectional fast connections, and strict safety constraints that are typical of nuclear power plant maintenance environments.
To enhance the directionality of tree expansion, many researchers have attempted to integrate APF with RRT-based frameworks. Representative studies, including APF-IRRT*, improved bidirectional RRT*, BPFPS-RRT, and APF-guided RRT* variants, have shown that introducing potential-field information into sampling or expansion can accelerate convergence and improve path quality [
19]. Nevertheless, despite these advantages, the potential-field guidance used in most existing methods remains largely static. When the resultant force becomes weak, cancels out, or oscillates in narrow or obstacle-coupled regions, tree expansion may still stagnate or become trapped in a locally unproductive search state. In other words, although APF-guided RRT methods improve directional search efficiency, their ability to explicitly detect stagnation and adaptively escape local traps is still insufficient for highly cluttered industrial environments [
20].
A similar limitation exists in the bidirectional connection stage. Although bidirectional tree growth can substantially improve the probability of finding feasible paths, many existing methods still treat tree meeting as a largely geometric event, with limited consideration of connection safety margins, invalid long-distance connection attempts, or the consistency between potential-field attraction and the currently expanding tree [
21]. As a result, redundant growth near the target side, inefficient connection attempts, and unstable path quality may still occur in complex environments. This issue is particularly critical in nuclear inspection and maintenance tasks, where local clearance, collision reliability, and path executability are more important than merely obtaining a nominally feasible connection. Therefore, there remains a need for a planning framework that can simultaneously coordinate bidirectional exploration, local potential-field guidance, safe connection control, and stable performance in narrow spaces with dense obstacles.
In addition to algorithmic performance, engineering validation is also crucial for nuclear robotics. Digital twin technology has been widely recognized as an effective means to support simulation, verification, visualization, and decision-making in complex engineering systems [
22,
23,
24]. Recent studies have extended digital twin frameworks to nuclear inspection software stacks, robotic path planning, and intelligent assembly systems, demonstrating their value for performance evaluation and deployment-oriented testing [
25,
26,
27]. However, existing studies often emphasize either algorithm design or platform construction, while relatively few integrate a path planner specifically tailored to obstacle-dense and narrow nuclear maintenance scenarios with a digital twin-based validation framework. Consequently, there is still a clear research gap in developing a unified method that combines complex-environment adaptability, high planning efficiency, local escape capability, safe bidirectional connection, and engineering-oriented verifiability for nuclear power plant inspection and maintenance robots. Against this background, further research on an APF-guided bidirectional RRT framework is both necessary and meaningful.
This study aims to develop a path planning method for nuclear power plant inspection and maintenance robots that combines adaptability to complex environments, high efficiency, and engineering practicality. By integrating the bidirectional rapidly exploring random tree (Bi-RRT) with the artificial potential field (APF) method and incorporating a hybrid sampling strategy, a potential-field-guided perturbation mechanism, stagnation detection with dynamic target switching, and a constrained segmented connection strategy, the method enables efficient, safe, and stable path planning in narrow spaces with dense obstacles. In addition, a simulation and validation platform based on digital twin technology is developed to enhance the engineering applicability and verifiability of the proposed algorithm. The main contributions of this study can be categorized into methodological innovations and application-specific developments as follows:
- (i)
A hybrid sampling mechanism that integrates random sampling, goal-biased sampling, and potential-field-guided sampling is developed. A probabilistic scheduling scheme is introduced to improve search efficiency and bidirectional tree connectivity, alleviating insufficient exploration and redundant expansion caused by traditional single sampling strategies.
- (ii)
A potential-field-guided perturbation mechanism combined with a stagnation detection–adaptive escape strategy is proposed. Random perturbations are introduced, and sampling as well as potential-field parameters are dynamically adjusted when the resultant force approaches zero or oscillates, thereby enhancing the ability to escape local minima and avoid expansion stagnation.
- (iii)
A dynamic target switching mechanism and a constrained segmented connection strategy are designed to improve the coordination between bidirectional tree expansion and potential-field guidance. Distance constraints and segmented expansion enhance connection feasibility and safety, reduce ineffective connection attempts, and improve overall path quality and planning stability.
- (iv)
The above methodological framework is tailored and validated for path planning of inspection and maintenance robots in nuclear power plant environments characterized by narrow spaces and dense obstacles. A digital twin-based simulation platform is further developed to support scenario construction, algorithm validation, and performance evaluation, thereby enhancing the engineering applicability of the proposed approach.
The remainder of this paper is organized as follows:
Section 2 presents the fundamental theories of path planning, including the principles of RRT, Bi-RRT, and APF.
Section 3 introduces the integration and improvement of Bi-RRT and APF, including key techniques such as hybrid sampling, perturbation mechanisms, and connection strategies.
Section 4 constructs the digital twin model and implements the simulation platform.
Section 5 validates and analyzes the algorithm’s performance through simulations in both 2D and 3D scenarios. Finally,
Section 6 concludes the paper and outlines future research directions.
3. Integration and Improvement of APF and Bi-RRT Algorithms
The integration of APF and Bi-RRT combines the global path planning ability of Bi-RRT with the local path optimization capability of APF. Bi-RRT can reduce the search space and quickly find a path by expanding from both the start and goal points, while APF optimizes the path, especially in terms of obstacle avoidance and local adjustments, ensuring the robot avoids dead ends around obstacles and the path remains smooth and executable. The goal of the Bi-RRT algorithm is to find a path by expanding two trees from the start and goal points, respectively. However, the Bi-RRT algorithm may generate a path that is not smooth enough and may be disturbed by obstacles. The APF algorithm is used to perform local optimization on each expanded path, especially in areas where obstacles are dense or the path is curved. APF can guide the robot to avoid obstacles and move toward the goal using the potential field. By combining these two methods, both global planning and local obstacle avoidance can be addressed, thereby improving the efficiency and quality of path planning.
- (1)
Initialization of Bidirectional RRT Trees
Initialize two trees, Tstart and Tgoal, from the start point xstar and goal point xgoal, and set the maximum iteration count max_iter, step size α, and potential field parameters (attractive force coefficient katt and repulsive force coefficient krep).
- (2)
Bidirectional RRT Expansion
In each iteration, expansion starts from the end nodes of both trees. For each node, a random sampling point
xrand is generated, then the nearest node
xnear is selected based on the Bi-RRT rules, and the tree is expanded according to the formula shown in Equation (19).
- (3)
Calculation of Resultant Force and APF Optimization
During the expansion process, the artificial potential field method is used to calculate the resultant force at the current position. Each node is influenced by the attractive force of the goal and the repulsive force from obstacles. The formulas for calculating the goal’s attractive force and the obstacle’s repulsive force are shown in Equations (20) and (21), respectively. Here,
Urep(
x) is the repulsive potential of the obstacle;
xobstacle is the position of the obstacle;
krep is the coefficient of the repulsive field, controlling the strength of the repulsive force; and
d0 is a threshold that represents the influence range of the obstacle. The robot expands the path along the direction of the resultant force. The total resultant force
Ftotal(
x) is the sum of the goal’s attractive force and the obstacle’s repulsive force, as shown in Equation (22). The robot’s position update formula is shown in Equation (23). This ensures that the robot moves towards the goal point while avoiding obstacles.
- (4)
Path Connection
After expanding each node, check if the end nodes of the two trees meet. If they do, connect the two trees to form the complete path, as shown in Equation (24), where
ε is the threshold that defines when the trees meet.
- (5)
Path Smoothing Processing
Cubic B-spline interpolation is used in this study for post-processing path smoothing. The control points are selected from the ordered path nodes generated by the planner, and additional local refinement points are inserted only where the turning angle exceeds a preset threshold. Uniform knot spacing is adopted for implementation simplicity. During smoothing, the start and goal points are kept fixed, while the intermediate control points are adjusted under curvature-variation constraints to reduce sharp turns without changing the global path topology or violating obstacle-avoidance feasibility. By applying B-spline-based smoothing, the overall path shape remains unchanged, and only local adjustments are performed. Constraining the curvature variation Δ
ϕ prevents excessive velocity peaks. As shown in Equation (25),
P(
s) denotes the smoothed continuous path,
Ni,k(
s) is the
k-th order B-spline basis function, and Q
i represents the inserted or adjusted control points for local refinement without altering the global topology. The path curvature
κ(
s) is minimized in terms of its squared value to reduce sharp turns,
Pj denotes the key nodes of the original path to preserve global shape, and Δ
ϕ(
s) represents the directional angle change between adjacent segments to suppress velocity peaks and motion discontinuities.
Based on the Bi-RRT–APF fusion framework described above, this study proposes an improved APF-guided bidirectional RRT fusion algorithm to further enhance search efficiency and planning stability for nuclear power plant inspection and maintenance robots operating in equipment-dense and narrow environments. To address issues such as unstable sampling efficiency, local stagnation, and frequent invalid bidirectional connection attempts in complex environments, the proposed method incorporates a hybrid sampling strategy, a potential-field perturbation mechanism, stagnation detection with adaptive escape strategies, and a constrained segmented expansion connection scheme to enhance path feasibility and safety.
- (6)
Hybrid Sampling Strategy
Conventional Bi-RRT–APF methods typically adopt fixed ratios of random sampling and potential-field-guided sampling, which may lead to insufficient exploration or redundant expansion in narrow passages or obstacle-dense regions. To overcome this limitation, the sampling strategy is extended to three categories with probabilistic scheduling, allowing the algorithm to balance global exploration and rapid connectivity. Let the sampling point be denoted as
xrand, whose generation mechanism is defined in Equation (26). Here,
χ denotes the feasible state space, and
ξ1,
ξ2∼
U(0,1) are uniformly distributed random variables.
prand and
ptarget represent the probabilities of random sampling and goal-biased sampling, respectively. In the simulations,
prand = 0.5 and
ptarget = 0.3, while the remaining probability mass was assigned to potential-field-guided sampling. TargetBiasSample(
Tother) selects a node from the opposite tree
Tother as a guidance target to increase the probability of rapid bidirectional tree convergence.
α is the expansion step size,
is the normalized resultant force direction, and
δ is a perturbation term introduced to enhance local escape capability (see the next subsection). This hybrid sampling mechanism improves connectivity in typical nuclear inspection and maintenance environments: random sampling ensures global exploration, goal-biased sampling accelerates bidirectional tree connection, and potential-field-guided sampling enhances local expansion efficiency and directionality in obstacle-dense regions.
- (7)
Potential-Field-Guided Perturbation Mechanism
Equipment-dense regions in nuclear power plants often contain narrow passages, where potential-field guidance may suffer from stagnation or oscillations due to resultant force cancellation. To enhance algorithm stability under complex obstacle configurations, a perturbation term
δ is introduced into potential-field-guided sampling, as defined in Equation (27). In implementation,
δ is sampled from a zero-mean Gaussian distribution, where
σ controls the perturbation magnitude. The perturbation is activated only during potential-field-guided sampling and is updated at every eligible expansion step. In the simulations,
σ = 0.3. Consequently, sampling points expand along the resultant force direction while retaining stochastic disturbances, preventing prolonged confinement near the same potential-field trajectory and increasing the probability of escaping local minima.
- (8)
Dynamic Target Switching Mechanism
Due to the alternating expansion of bidirectional trees, using
xgoal as the attractive center when expanding from the goal tree may lead to redundant growth near the target. To ensure consistency between potential-field guidance and bidirectional expansion, a dynamic target switching mechanism is adopted: when expanding the start tree, the guidance target is
xgoal; when expanding the goal tree, the target is switched to
xstar. The target definition is given in Equation (28).
- (9)
Stagnation Detection Mechanism
In nuclear inspection and maintenance scenarios, narrow passages coupled with multiple obstacles can easily cause local stagnation during tree expansion. To improve planning stability, a stagnation detection mechanism is introduced by recording the most recent
M expanded nodes {
xk−M+1,…,
xk} and computing the maximum displacement as defined in Equation (29). In this study,
M is selected as a short sliding-window length that balances sensitivity and robustness: if
M is too small, transient oscillations or short unsuccessful expansions may be misclassified as stagnation; if
M is too large, the trigger becomes insensitive and may delay escape from a true local trap. Considering that the tree expands with a fixed step size
α,
M was set such that the buffered trajectory covers a limited local neighborhood rather than a long-range motion history. In the simulations,
M = 8 was adopted after empirical sensitivity tests in typical 2D and 3D cluttered scenarios, where it provided stable stagnation recognition without causing frequent false triggering. Accordingly, when Δ
max <
α, the expansion is considered to be trapped in a local stagnation region. The rationale is that
α is the nominal single-step expansion length of the tree. Therefore, if the maximum displacement covered by the most recent
M nodes is still smaller than one nominal expansion step, the buffered trajectory has failed to produce effective outward progress and is likely oscillating or drifting within a confined local region. This criterion provides a scale-consistent stagnation indicator linked directly to the planner step size.
- (10)
Constrained Segmented Connection Strategy
To avoid blind connection attempts when the distance between bidirectional tree endpoints is excessive, distance constraints are imposed during the connection phase, together with a segmented expansion connection scheme. Let the candidate connection point be
xnew, and the terminal node of the target tree be
xend. Connection is permitted only when the condition in Equation (30) is satisfied, where
η denotes the connection distance threshold. During the connection process, segmented expansion with step size
α is applied, as expressed in Equation (31). Collision checking is implemented in a discretized manner along each expansion segment. Specifically, each segment is uniformly sampled at a fixed spatial interval, and collision tests are performed at all sampled points against the obstacle model. A segment is accepted only if all sampled points are collision-free. Thus, the present study adopts a discrete approximation to continuous collision checking, with the sampling interval chosen sufficiently small relative to the obstacle size and expansion step. This strategy reduces invalid connection attempts and improves the feasibility and safety margin of generated paths, better satisfying the stringent obstacle-avoidance reliability requirements of nuclear inspection and maintenance tasks. The pseudocode of the improved APF–Bi-RRT fusion algorithm is presented in Algorithm 1.
| Algorithm 1: Improved APF–Bi-RRT fusion algorithm |
Input: xstart, xgoal, α, max_iter, katt, krep, d0, ε, prand, ptarget, M, η, σ Output: Optimized path Popt 1: Initialize Tstart←{xstart}, Tgoal←{xgoal} 2: Initialize position buffer B←∅ 3: for i = 1 to max_iter do 4: for each tree T∈{Tstart,Tgoal} do 5: Determine attractive target xatt by Equation (28) 6: Generate xrand using hybrid sampling by Equation (26) 7: if xrand is inside obstacles then continue 8: xnear←NearestNode(T, xrand) 9: xnew←xnear + α⋅Normalize(xrand − xnear) 10: Compute Fatt(xnear), Frep(xnear) by Equations (20) and (21) 11: Compute Ftotal(xnear) by Equation (22) 12: Compute xnew by Equation (23) 13: if CollisionFree(xnear, xnew) then 14: AddNode(T, xnew) 15: Update buffer B←B∪{xnew} 16: if ∣B∣≥M| then 17: Compute stagnation metric Δmax by Equation (29) 18: if Δmax < α then 19: Trigger adaptive escape: increase prand, adjust (katt, krep), reset B←∅ 20: end if 21: end if 22: end if 23: end for 24: if Distance(End(Tstart), End(Tgoal) < ε then 25: Attempt constrained segmented connection using Equations (30) and (31) 26: P←ConnectPaths(Tstart, Tgoal) 27: break 28: end if 29: end for 30: Popt←SmoothPath by Equation (25) 31: Return Popt |
4. Digital Twin Implementation of the Algorithm
This section implements the above algorithm through digital twin technology. First, based on the five-dimensional digital twin model for intelligent manufacturing, a five-dimensional digital twin model suitable for path planning in the nuclear power plant robot maintenance process is established, as shown in Equation (32).
In this equation,
CP represents the physical entity of the nuclear power plant robot in the maintenance scenario;
CV represents the virtual model, including scene modeling (Scene Model), mobile chassis modeling (Mobile Chassis), and robot arm modeling (Robot Arm);
CS refers to the service system for path planning in both the movement and operation processes;
DD represents twin data, including both global and local path and motion planning;
CN represents the connections between components, with different meanings for the connections between different elements. The physical space of the nuclear power plant robot path planning is centered around the physical entity of the construction robot (
CM). In this scene, the mobile chassis and robot arm in the physical entity layer are critical. This layer forms the foundation of the digital twin framework and provides the necessary data for physical–virtual interaction. The virtual model (
CV) is the virtual representation of the physical entity, and the key to accurate mapping lies in the integration of multidisciplinary knowledge. A high-precision digital virtual model is constructed based on the physical entity, which is the core of the digital twin concept. The model construction work can be carried out in collaboration with SolidWorks (2024), 3D Max, Unity, MATLAB, ROS, and others. In the virtual model layer of this scenario, scene modeling (Scene Model), mobile chassis modeling (Mobile Chassis), and robot arm modeling (Robot Arm) are crucial. The models must integrate geometry, physics, behavior, and rules in both functionality and structure, such as considering the steering geometry principles of the mobile chassis and the kinematic model of the robot arm. Using object-oriented features to modify model attributes allows the model to align with the movement of the physical entity, providing a 3D visualization foundation for the robot’s simulation, modeling, prediction, and deduction work. Data (
DD) are the basis for interaction between the physical entity (
CM) and the virtual model (
CV), driving the operation of the digital twin system. In this scenario, the main twin data include global planning data and local planning data. Global planning data consist of the coordinates of the start tree, goal tree, nearest-neighbor nodes, and expansion step size in the Bi-RRT algorithm, while local planning data include obstacle coordinates as well as attractive-force and repulsive-force values in the APF algorithm. In the present study, these data are updated online within the MATLAB-based simulation loop and synchronized with the virtual scene for algorithm execution, state display, and trajectory replay. Therefore, the “global planning data” are not used only for post-simulation visualization; rather, they participate in the iterative planning process inside the simulation environment. However, because the current framework is not yet connected to a physical robot controller or field sensors, the real-time updating described here should be understood as simulation-time synchronization within the virtual test platform rather than hardware-level physical–virtual closed-loop synchronization. The application services (
CS) of the nuclear power plant maintenance robot path planning digital twin system focus on its functional capabilities, including visualization of the robot’s state, accurate feedback of path and motion planning, real-time monitoring, and providing maintenance decision support for operators. The digital twin of the nuclear power plant maintenance robot path planning is shown in
Figure 1. In this study, the digital twin serves as a virtual testing and verification platform for the Bi-RRT-APF algorithm, not as a physical robot system. It mirrors the robot’s kinematic parameters, workspace geometry, and obstacle environment in real time to verify the algorithm’s performance before deployment. In this study, the term ‘digital twin’ is used in a simulation-oriented sense, i.e., as a virtual testing and verification environment that synchronizes robot kinematics, environment geometry, and planning-state data within the simulation loop. It does not yet represent a full physical–virtual closed-loop twin connected to online sensors, controllers, or a deployed robot platform.
A workflow diagram is shown in
Figure 1. The workflow includes (i) environment and robot model initialization; (ii) generation of global and local planning data; (iii) bidirectional tree expansion with APF-guided sampling and stagnation monitoring; (iv) collision checking and constrained connection; (v) path smoothing and performance evaluation; and (vi) synchronized visualization and trajectory replay in the virtual scene. This diagram helps distinguish the functional role of the digital twin platform from the core path planning algorithm.
5. Simulation Validation and Discussion of Results
Based on the proposed algorithmic framework and in combination with digital twin technology, path planning for nuclear power plant inspection and maintenance robots is implemented. The proposed Bi-RRT–APF fusion algorithm is compared with existing algorithms to evaluate its advantages in path planning performance. The Debris Retrieval Robot for the Pressure Vessel Bottom was selected as a representative example. This robot is typically used for inspection and foreign object removal tasks in the primary circuit and the bottom region of the reactor pressure vessel (RPV), particularly during refueling outages. During debris retrieval at the bottom of the pressure vessel, the robot is required to perform two-dimensional path planning for the mobile chassis and three-dimensional path planning for the end effector within dense and confined control rod drive mechanism (CRDM) structures. The environment also contains both static and dynamic obstacles, such as bolts, gaskets, metal fragments, and welding slag. To reduce the computational complexity of path planning and collision detection, a conservative safety margin is adopted. Complex obstacles are simplified using hexahedral bounding models, as illustrated in
Figure 2 and
Figure 3. It should be noted that the hexahedral representation is used for collision-checking efficiency in the present simulations rather than as a theoretical restriction of the proposed planner. In principle, the Bi-RRT–APF framework can also handle non-convex obstacles, provided that they are represented either by unions of convex bounding volumes or by sufficiently fine collision-checking primitives. Under such a representation, non-convex geometry is converted into multiple local obstacle constraints, and the planner still performs expansion, collision checking, and connection in the same manner. However, like other sampling-based planners, the method cannot theoretically guarantee complete avoidance of local difficulty in extremely narrow non-convex traps; instead, the proposed perturbation and stagnation-escape mechanisms are intended to reduce the probability of becoming trapped and improve practical escape capability in such environments. All experiments are conducted on the MATLAB R2023b simulation platform. The selected performance evaluation metrics are as follows:
- (1)
Average total path length: the distance traveled by the mobile chassis or manipulator from the start point to the target. A shorter path length indicates a more direct and efficient planning result, effectively reducing unnecessary detours.
- (2)
Computation time: the time required for the algorithm to compute a complete path. A shorter computation time indicates better computational efficiency.
- (3)
Number of iterations: the number of iterations required by the algorithm to generate a feasible path from the initial state. This metric reflects convergence speed and search efficiency.
- (4)
Success rate: the ratio of successful planning trials to the total number of trials under the same scenario settings. This metric reflects the robustness of the algorithm in cluttered environments.
- (5)
Path smoothness: quantified by the cumulative turning-angle variation along the generated path after discretization. Lower values indicate fewer abrupt directional changes and better motion continuity.
Figure 2.
Debris Retrieval Robot for the Pressure Vessel Bottom.
Figure 2.
Debris Retrieval Robot for the Pressure Vessel Bottom.
Figure 3.
Simplified obstacle modeling of the pressure vessel in a three-dimensional environment.
Figure 3.
Simplified obstacle modeling of the pressure vessel in a three-dimensional environment.
To verify algorithm feasibility, MATLAB (R2023b) was used to construct environments in which static and dynamic obstacles were configured using a hybrid strategy of random generation combined with manual refinement. The positions and distributions of obstacles were varied across different simulation cases to evaluate the adaptability of the path planning algorithms to changing environment configurations. It should be emphasized that these tests correspond to scenario-varying obstacle settings rather than fully online dynamic obstacle avoidance within a single planning run. The RRT, Bi-RRT, and Bi-RRT–APF algorithms were implemented using a digital twin-based framework integrated with MATLAB. In the two-dimensional environment, the start point was set to (0, 0) and the goal point to (100, 100), while in the three-dimensional environment, the start point is set to (0, 0, 0) and the goal point to (100, 100, 100). All algorithms were tested in the same environment, with each algorithm repeated for 50 trials. The maximum number of iterations was set to 1000, with initial parameters
katt = 1.0 and
krep = 100. Representative path comparison results and step-time comparisons are shown in
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8 and
Figure 9.
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8 and
Figure 9 are generated from MATLAB simulation results. Each case corresponds to a single random sampling experiment, where environmental conditions (start point, goal point, and parameter settings) are kept identical, and only the obstacle distribution random seed varies. After simulation completion, path trajectories were exported using the MATLAB visualization module to ensure result consistency and reproducibility.
As shown in
Figure 4 and
Figure 5, compared with RRT and Bi-RRT, Bi-RRT–APF exhibits stronger search focus and a more stable connectivity trend in both 2D and 3D scenarios. Tree expansion tends to advance toward the goal along feasible corridors, while detours in obstacle-dense regions are more coherent, and redundant branches are reduced. This observation is supported by the “outward divergent expansion” behavior of RRT in
Figure 4a and the inefficient exploration or even stagnation of 3D RRT in
Figure 5a. As shown in
Figure 4b and
Figure 5b, Bi-RRT accelerates start–goal connection but still suffers from locally redundant growth and limited path smoothness under randomly distributed obstacles. In contrast, the Bi-RRT–APF trajectories in
Figure 4c and
Figure 5c follow corridor structures more closely, resulting in more continuous obstacle-avoidance trajectories and fewer invalid explorations. This improvement mainly arises from the hybrid sampling strategy, which preserves both global exploration and rapid bidirectional connection within the same iterative framework. Random sampling ensures spatial coverage, goal-biased sampling increases the probability of tree meeting, and potential-field-guided sampling enhances local expansion directionality near obstacles. Consequently, insufficient exploration or redundant expansion caused by fixed-ratio sampling in constrained spaces is mitigated, and the convergence process becomes more stable. In addition, the 3D comparison results in
Figure 5 further indicate that Bi-RRT–APF presents a lower risk of stagnation under equipment-dense and narrow-passage conditions, and the expansion process shows fewer back-and-forth probing behaviors or oscillatory patterns. This trend is reflected by the fact that 3D RRT tends to exhibit locally inefficient expansion in some cases, while Bi-RRT may still generate redundant growth due to obstacle coupling. By comparison, Bi-RRT–APF more readily forms feasible paths with continuous progress toward the goal. This behavior can be attributed to the synergy between the potential-field perturbation mechanism and the stagnation detection–escape strategy. When the resultant potential-field force is cancelled in obstacle-dense regions, leading to oscillations or a near-zero resultant force, the perturbation term
δ introduces small random disturbances to prevent sampling points from being locked near the same potential-field trajectory. Meanwhile, stagnation detection triggers an escape strategy based on a displacement threshold over the most recent
M expansions, increasing the proportion of random sampling and adjusting potential-field weights. This design enhances the ability to escape local minima or narrow “dead zones”, thereby improving planning stability under complex operating conditions.
From
Figure 6, it can be observed that the Bi-RRT–APF algorithm exhibits significantly improved computational efficiency compared with both RRT and Bi-RRT. This is evidenced by the substantial reduction in average iteration count from 533 (RRT) and 329 (Bi-RRT) to 185, as well as the decrease in computation time from 20.5 and 9.5 to 4.9, respectively. In particular, the iteration count is reduced by 65.3% and 43.8%, while the computation time is reduced by 76.1% and 48.4%. This is because the proposed algorithm enhances search directionality through the integration of potential-field guidance and bidirectional expansion and hence reduces redundant exploration and accelerates convergence toward feasible paths. In addition, it is also observed from
Figure 6 that the Bi-RRT–APF algorithm achieves higher success rates and improved path smoothness compared with the other methods. This is confirmed by the success rate increasing to 95%, compared with 82% for RRT and 93% for Bi-RRT, and the path smoothness metric decreasing to 2.9 from 5.3 and 3.3. This is attributed to the hybrid sampling strategy and stagnation detection–escape mechanism, which improve the robustness of path planning in obstacle-dense environments, for which unstable expansions and local oscillations are effectively mitigated. A notable observation from
Figure 6 is that the efficiency improvement trend remains consistent across different evaluation metrics, indicating that the proposed method achieves a balanced optimization between computational cost and path quality. This can be evidenced by the simultaneous reduction in iteration count and computation time without sacrificing success rate or smoothness. The reason for this phenomenon is that the dynamic target switching mechanism ensures consistency between the attractive potential field and the currently expanding tree, thereby avoiding redundant growth and improving bidirectional coordination. Considering these findings, it can be concluded that the proposed Bi-RRT–APF fusion algorithm significantly improves path planning efficiency while maintaining high solution quality and robustness in complex environments.
To comprehensively evaluate the impact of each key module in the improved Bi-RRT-APF algorithm on overall performance, in this section, an ablation study is designed and conducted in a typical nuclear maintenance environment with dense obstacles and narrow passages. The contribution of each module to path planning performance is analyzed by progressively replacing key modules with baseline methods. Since the effectiveness of the Bi-RRT and APF hybrid framework compared with single algorithms has been validated in previous experiments, this section focuses on the ablation analysis of three types of improvement modules. First, the hybrid sampling strategy (random sampling, goal-biased sampling, and potential-field-guided sampling) is replaced with the conventional uniform random sampling mechanism. Second, the potential-field-guided perturbation mechanism, stagnation detection mechanism, and adaptive escape strategy (perturbation and stagnation-avoidance mechanism) are removed, and the standard APF guidance method is adopted. Third, the dynamic target switching mechanism and constrained segmented connection strategy are removed, reverting to fixed-goal guidance and direct connection. The ablation experiments are conducted in identical 2D and 3D simulation environments, with the same start and goal points, iteration limits, and algorithm parameters. The path planning results under different module combinations are shown in
Figure 7,
Figure 8 and
Figure 9. As shown in
Figure 7,
Figure 8 and
Figure 9, removing the hybrid sampling strategy leads to a clear divergence in the search process, with significantly increased redundant expansions. The computation time increases by approximately 15.9%, while the convergence speed decreases by 34.7%. This occurs because uniform random sampling lacks goal guidance and local directionality, resulting in a large amount of ineffective exploration. In addition, removing the perturbation and stagnation detection mechanisms makes the algorithm more likely to fall into local oscillation or stagnation in obstacle-dense regions, leading to interrupted path generation or repeated searches and a reduced success rate. This is because the traditional APF lacks the ability to escape in regions where the resultant force approaches zero. Furthermore, removing the dynamic target switching and constrained segmented connection strategies results in more ineffective connection attempts during the bidirectional tree linking phase, reduces path safety margins and connection efficiency, and increases path discontinuity and local collision risk. Overall, each improvement module plays a critical role in enhancing search efficiency, improving local escape capability, and ensuring path feasibility.
In further comparisons with representative high-efficiency algorithms,
Figure 10 and
Figure 11 show that Bi-RRT–APF maintains superior performance in key efficiency metrics. Compared with Quad-RRT and KB-RRT*, the average number of iterations is reduced by 29.3% and 8.4%, and the average computation time is reduced by 25.2% and 10.3%, respectively. This improvement is mainly attributed to the force-guided expansion of sampled nodes, which enables the robot to better adapt to complex nuclear inspection and maintenance environments and promotes the generation of higher-quality paths. The constrained segmented connection strategy reduces invalid attempts caused by blind long-distance connections and collision failures during bidirectional tree meeting. Specifically, connection is triggered only when the endpoint distance satisfies the threshold
η, and segmented expansion with step size
α is performed with collision checking for each segment. This design strengthens feasibility assessment and safety margins during path generation, reduces the extra cost of “failed connection–rollback–retry”, and makes both computation time and iteration count more controllable. Overall, based on
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8,
Figure 9,
Figure 10,
Figure 11 and
Figure 12, the results in this section indicate that the proposed improved Bi-RRT–APF method enhances both the directionality of tree expansion and the continuity of the generated path in typical 2D/3D complex nuclear inspection and maintenance environments. Moreover, the combined effects of hybrid sampling, perturbation with stagnation escape, dynamic target switching, and constrained segmented connection significantly improve convergence stability, reduce the risk of local stagnation, and enhance safety and feasibility during the connection stage. These improvements are reflected in fewer iterations and shorter computation time.