Next Article in Journal
Analysis of Natural Characteristics of the Dual-Path Nutation Face Gear Transmission System
Previous Article in Journal
Dynamic Assessment of Water Ecosystem Service Value in the North China Plain and Study of Its Multidimensional Driving Mechanisms
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A 3D UAV Path Planning Algorithm Based on Bidirectional RRT* with Adaptive Directional Sampling and Cooperative Dual-Tree Expansion

School of Electrical and Electronic Engineering, Hubei University of Technology, Wuhan 430068, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(10), 5065; https://doi.org/10.3390/app16105065
Submission received: 23 April 2026 / Revised: 15 May 2026 / Accepted: 16 May 2026 / Published: 19 May 2026
(This article belongs to the Section Robotics and Automation)

Abstract

UAV path planning in complex three-dimensional obstacle environments requires a balance between search efficiency and flight feasibility. However, existing RRT*-based methods often fail to satisfy this requirement, as their random sampling lacks directional guidance and makes limited use of environmental information. To this end, this paper proposes an environment-aware cooperative bidirectional RRT* algorithm (EAC-Bi-RRT*). In the sampling stage, the sampling probability of each direction is adaptively adjusted according to the obstacle distribution across 26 directional sectors and the relative goal orientation, so that the search receives stronger directional guidance. During bidirectional expansion, the two trees are assigned leader and follower roles according to the local expandability on the start and goal sides, and their cooperative search is combined with an environment-adaptive step size and a climbing-angle constraint to balance search efficiency and flight reachability. When an expanding node approaches an obstacle, a repulsive-only local directional correction suppresses oscillation, and the initial path is then smoothed by a curvature-constrained B-spline to form a continuous flight trajectory. Across all test scenarios, EAC-Bi-RRT* achieves a 100% planning success rate. Compared with the baseline algorithms, it reduces planning time by approximately 54–90% and path length by approximately 5–18% while maintaining low average turning angles, which demonstrates competitive overall performance.

1. Introduction

Unmanned Aerial Vehicles (UAVs) are widely used in urban logistics [1,2], disaster search and rescue [3,4], infrastructure inspection [5,6], and confined-space operations [7,8]. Unlike ground robots that mainly operate in a 2D plane, UAVs performing these tasks must plan paths in three-dimensional space [9]. The planner needs to consider collision risks from different directions, vertical occlusion caused by obstacle heights, and the kinematic constraints imposed by climbing capability [10,11]. When the search space extends from two dimensions to three, the geometric and topological relationships among obstacles become more complex, and feasible trajectory generation is subject to stricter constraints [12].
In complex 3D environments, sampling-based methods remain widely used for path planning because they adapt well to high-dimensional spaces [13]. RRT [14] and RRT* [15] are two of the most commonly used algorithms in this category. RRT is simple to implement and does not require environment preprocessing, but its random expansion process provides little control over path quality and often produces redundant paths [16,17]. RRT* improves path quality through parent selection and rewiring, yet in cluttered 3D environments its uniform random sampling and fixed-step expansion still limit search efficiency [18]. The piecewise linear paths generated in this way also make it difficult to satisfy kinematic constraints such as the climbing-angle requirement of UAVs. Although many improved variants enhance RRT* from different aspects, they still do not jointly balance search efficiency, path quality, and environmental adaptability in complex 3D workspaces.
In the sampling stage, Gammell et al. [19] proposed Informed-RRT*, which restricts sampling to the heuristic region defined by the current best solution and reduces invalid samples. HBAI-RRT* [20] and G-RRT* [21] further compress the sampling domain by incorporating segmented informed regions or heuristic cost information, thereby improving sampling efficiency. These methods mainly improve the sampling range, but their direct guidance on tree expansion direction remains limited. Jiang et al. [22] proposed FS-RRT, which constrains subsequent sampling angles according to collision feedback generated during expansion. The directional deflection sampling strategy [23] further adjusts the sampling deflection angle according to obstacle distribution along the goal direction to improve the success rate of expansion. Overall, existing methods improve sampling guidance from different perspectives, but how sampling resources should be organized and allocated across different directions in 3D space is still not sufficiently discussed.
In bidirectional search, B-RRT* [24] preserves the asymptotic optimality of RRT* within a dual-tree expansion framework while reducing computational cost through heuristic strategies. IB-RRT* [25] mainly improves the connection process between the two trees, using an intelligent sample insertion mechanism to speed up their connection. These methods shorten the time required to obtain an initial feasible path, but the connection process is still sensitive to randomness and may introduce additional computational overhead. CBQ-RRT* [26] further improves path smoothness by introducing kinematic constraints into bidirectional expansion and optimizing connection quality during tree merging. Cao et al. [27] combined an artificial potential field with a variable-step expansion strategy and adaptively adjusted the expansion direction and step size according to feedback on the distance between nodes and obstacles, thereby improving search efficiency and obstacle avoidance capability in cluttered environments. These methods improve the performance of bidirectional search, but most of them still apply similar sampling and expansion rules to both trees, making it difficult to fully exploit the different local obstacle distributions on the start side and the goal side.
For expansion guidance and obstacle avoidance, combining the artificial potential field with RRT* is a common improvement strategy. Qureshi and Ayaz [28] incorporated the artificial potential field into the random sampling process and used the potential-function gradient to steer samples toward the goal, thereby reducing invalid sampling and accelerating convergence. PF-RRT* proposed by Fan et al. [29] considers the combined effect of random points, the goal, and obstacles during new node generation to further improve convergence speed and path quality. HMA-RRT* [30] further integrates dynamic-region sampling, a hierarchical escape mechanism, heading-angle constraints, and adaptive step-size adjustment to improve search efficiency and planning feasibility in complex environments. The artificial potential field itself is still susceptible to local minima and oscillation near the goal region. Kilic et al. [31] introduced tangential forces, inertial heuristic forces, local minimum detection, and dynamic coefficient adjustment to enhance stable obstacle avoidance in complex environments. Even so, most existing APF-RRT* hybrid methods still retain the dominant role of the attractive term in global expansion; when this mechanism is combined with goal-biased guidance, the two can overlap functionally and may further intensify oscillatory behavior near the goal region.
To address the aforementioned issues, this paper proposes an environment-aware cooperative bidirectional RRT* (EAC-Bi-RRT*) algorithm for UAV path planning in complex 3D environments. The main contributions of this work are summarized as follows:
(1)
An adaptive directional sampling strategy is proposed. The strategy partitions the 3D sampling space into 26 spherical sectors, assigns differentiated sampling probabilities by integrating obstacle density and goal-direction information, and further introduces a distance-adaptive goal-bias probability, which raises the effective sampling rate while preserving global exploration capability.
(2)
A cooperative dual-tree expansion strategy is developed. It incorporates an adaptive variable step-size mechanism and realizes a one-time automatic assignment of the leader and follower roles based on a local expandability assessment at the start and goal states. In addition, the maximum climbing angle of the UAV is embedded into the expansion process as a hard constraint to ensure the kinematic feasibility of each expansion segment.
(3)
A repulsive-only local potential field correction mechanism is introduced. In the vicinity of obstacles, the mechanism uses the repulsive term for directional correction and incorporates a bounded goal influence factor so that the repulsive effect gradually weakens as the node approaches the goal. This design mitigates path oscillation near the goal region.
The paper is organized as follows. Section 2 sets up the 3D path planning problem together with the notation used throughout. RRT* and its main extensions are reviewed in Section 3. Section 4 describes the proposed EAC-Bi-RRT* algorithm, focusing on its three core mechanisms. Simulation studies and their interpretation are given in Section 5, and Section 6 closes the paper with conclusions and directions for further work.

2. Problem Definition

Let the 3D bounded workspace be X R 3 , the obstacle region be X o b s X , and the free space be X f r e e = X X o b s . Given a start point x s t a r t X f r e e and a goal point x g o a l X f r e e , the goal region is defined as
X g o a l = x X f r e e | x x g o a l r g o a l ,
where r g o a l > 0 is the arrival tolerance radius.
A path is defined as an ordered sequence of K + 1 waypoints σ = { x 0 , x 1 , , x K } , where x k = ( x k , y k , z k ) T , x 0 = x s t a r t , and  x K X g o a l . Consecutive waypoints are connected by straight-line segments to form a piecewise-linear path. For any two consecutive waypoints x k and x k + 1 , the climb angle is defined as
γ k = arctan z k + 1 z k ( x k + 1 x k ) 2 + ( y k + 1 y k ) 2 .
Definition 1.
A path σ is feasible if every waypoint and connecting segment lies within the free space, i.e.,  x k X f r e e and x k x k + 1 ¯ X f r e e for k = 0 , 1 , , K 1 , and the climb angle of every segment satisfies | γ k | γ m a x , where γ m a x is the maximum allowable climb angle. Let Σ denote the set of all feasible paths.
Definition 2.
The optimal path σ * minimizes the cost over all feasible paths:
σ * = arg min σ Σ k = 0 K 1 x k + 1 x k .

3. Related Works

3.1. RRT

RRT [14] is one of the foundational algorithms in sampling-based path planning and serves as the basis of the proposed method. Given the start configuration x s t a r t , the algorithm initializes a search tree T rooted at x s t a r t . At each iteration, a sample x r a n d is drawn uniformly from the free space, and the node x n e a r e s t in T that is closest to x r a n d in Euclidean distance is identified. A new node x n e w is then generated by extending from x n e a r e s t toward x r a n d with a fixed step size η . The algorithm first checks whether the segment between x n e a r e s t and x n e w is collision-free. If no collision is detected, x n e w is added to T; otherwise, the current expansion is not executed. The algorithm terminates when the newly generated x n e w enters the prescribed radius of the goal x g o a l and the connecting segment is collision-free. The feasible path is then obtained by tracing the parent pointers from this node back to the root.

3.2. RRT*

RRT* is an asymptotically optimal extension of RRT, and its overall procedure is summarized in Algorithm 1. After generating x n e w through the same sampling and expansion procedure as RRT, RRT* no longer connects it directly to x n e a r e s t , but instead performs two additional optimization operations within the overall framework, as illustrated in Figure 1. The first is parent selection (ChooseParent, Algorithm 2), which identifies all neighboring nodes within a given radius of x n e w , evaluates the cumulative cost from the start node to x n e w through each neighbor, and selects the collision-free node with the minimum cost as the parent of x n e w . The second is rewiring (Rewire, Algorithm 3), which checks whether routing through x n e w yields a lower-cost path to any neighboring node; if so, and if the connection is collision-free, that node is rewired through x n e w . By continuously performing parent selection and rewiring, RRT* gradually reduces the cost of the best path found so far and asymptotically converges to the global optimum as the number of samples becomes sufficiently large.
Algorithm 1 RRT*
Input:  x s t a r t , x g o a l , X o b s , η , N
Output: Path σ or ∅
  1: T { V = { x s t a r t } , E = }
  2: for  i = 1   N  do
  3:     x r a n d SAMPLEFREE ( X f r e e )
  4:     x n e a r e s t NEAREST ( T , x r a n d )
  5:     x n e w STEER ( x n e a r e s t , x r a n d , η )
  6:    if  COLLISIONFREE ( x n e a r e s t , x n e w , X o b s )  then
  7:          Q n e a r NEAR ( T , x n e w , r n )
  8:          x p a r e n t CHOOSEPARENT ( Q n e a r , x n e a r e s t , x n e w )
  9:          V V { x n e w } E E { ( x p a r e n t , x n e w ) }
10:          REWIRE ( T , Q n e a r , x n e w )
11:    end if
12: end for
13: return  EXTRACTPATH ( T )
Algorithm 2 ChooseParent
Input:  Q n e a r , x n e a r e s t , x n e w
Output:  x p a r e n t
1: x p a r e n t x n e a r e s t c m i n COST ( x n e a r e s t ) + x n e a r e s t x n e w
2: for each  x n e a r Q n e a r   do
3:     c COST ( x n e a r ) + x n e a r x n e w
4:    if  c < c m i n and COLLISIONFREE ( x n e a r , x n e w , X o b s )  then
5:          x p a r e n t x n e a r c m i n c
6:    end if
7: end for
8: return  x p a r e n t
Algorithm 3 Rewire
Input:  T = ( V , E ) , Q n e a r , x n e w
Output: Updated T
1: for each  x n e a r Q n e a r   do
2:     c COST ( x n e w ) + x n e w x n e a r
3:    if  c < COST ( x n e a r ) and COLLISIONFREE ( x n e w , x n e a r , X o b s )  then
4:         E E { ( PARENT ( x n e a r ) , x n e a r ) } { ( x n e w , x n e a r ) }
5:    end if
6: end for
7: return  T

3.3. APF-RRT*

To alleviate the uninformed expansion behavior of RRT*, APF-RRT* incorporates an artificial potential field (APF) into the tree expansion process. The basic idea is derived from a physical field analogy: the goal is modeled as an attractive source that pulls each node toward the target, while obstacles are modeled as repulsive sources that push the node away once it falls within a preset influence radius. The repulsive effect acts only in the vicinity of obstacles and becomes stronger as the node moves closer to an obstacle. The expansion direction is determined by the combined action of the attractive and repulsive fields, allowing the tree to move toward the goal while bypassing regions with dense obstacles. The pseudocode is given in Algorithm 4.
Algorithm 4 APF-RRT*
Input:  x s t a r t , x g o a l , X o b s , η , N, k a t t , k r e p , ρ 0
Output: Path σ or ∅
  1: T { V = { x s t a r t } , E = }
  2: for  i = 1   N  do
  3:     x r a n d SAMPLEFREE ( X f r e e )
  4:     x n e a r e s t NEAREST ( T , x r a n d )
  5:    {APF-guided expansion}
  6:     F a t t ATTRACTION ( x n e a r e s t , x g o a l , k a t t )
  7:     F r e p REPULSION ( x n e a r e s t , X o b s , k r e p , ρ 0 )
  8:     F t o t a l F a t t + F r e p
  9:     x n e w x n e a r e s t + η · F t o t a l / F t o t a l
10:    if  COLLISIONFREE ( x n e a r e s t , x n e w , X o b s )  then
11:         Q n e a r NEAR ( T , x n e w , r n )
12:         x p a r e n t CHOOSEPARENT ( Q n e a r , x n e a r e s t , x n e w )
13:         V V { x n e w } E E { ( x p a r e n t , x n e w ) }
14:         REWIRE ( T , Q n e a r , x n e w )
15:    end if
16: end for
17: return  EXTRACTPATH ( T )

3.4. Bi-RRT*

Bidirectional search is a common way to improve search efficiency. Bi-RRT* builds two search trees, T 1 and T 2 , from the start point x s t a r t and the goal point x g o a l , respectively, and brings them gradually closer through alternating expansion. Taking T 1 as an example, each iteration consists of sampling, nearest-neighbor search, and node expansion. If the expanded segment passes collision checking, the new node x n e w is inserted into tree T 1 . ChooseParent and Rewire are then applied to optimize the local tree structure. The algorithm then searches in T 2 for the node x c l o s e that is nearest to x n e w . If the distance between them is smaller than a predefined connection threshold and the connecting segment is collision-free, the two partial paths are concatenated to form a complete path from the start to the goal. Otherwise, the roles of T 1 and T 2 are exchanged in the next iteration, and the process continues until the two trees are connected or the iteration budget is exhausted. Algorithm 5 outlines the full procedure of Bi-RRT*. By growing from both ends, bidirectional search approximately halves the distance that a single tree needs to traverse and can significantly accelerate the discovery of an initial feasible path. However, the two trees use identical sampling strategies and step-size parameters, which prevents them from adapting to local environmental differences. In addition, their connection still relies entirely on random sampling, without any active mechanism for tracking the frontier of the other tree, leaving considerable room for improvement in obstacle-rich environments.
Algorithm 5 Bi-RRT*
Input:  x s t a r t , x g o a l , X o b s , η , η c o n n e c t , N
Output: Path σ or ∅
  1: T 1 { V 1 = { x s t a r t } , E 1 = } T 2 { V 2 = { x g o a l } , E 2 = }
  2: for  i = 1   N  do
  3:    {Expand T 1 }
  4:     x r a n d SAMPLEFREE ( X f r e e )
  5:     x n e a r e s t NEAREST ( T 1 , x r a n d )
  6:     x n e w STEER ( x n e a r e s t , x r a n d , η )
  7:    if  COLLISIONFREE ( x n e a r e s t , x n e w , X o b s )  then
  8:         Q n e a r NEAR ( T 1 , x n e w , r n )
  9:         x p a r e n t CHOOSEPARENT ( Q n e a r , x n e a r e s t , x n e w )
10:         V 1 V 1 { x n e w } E 1 E 1 { ( x p a r e n t , x n e w ) }
11:         REWIRE ( T 1 , Q n e a r , x n e w )
12:        {Attempt connection}
13:         x c l o s e NEAREST ( T 2 , x n e w )
14:        if  x n e w x c l o s e   < η c o n n e c t and COLLISIONFREE ( x n e w , x c l o s e , X o b s )  then
15:             return  MERGEPATH ( T 1 , T 2 , x n e w , x c l o s e )
16:        end if
17:    end if
18:     SWAP ( T 1 , T 2 ) {Alternate trees}
19: end for
20: return  ∅

4. The Proposed EAC-Bi-RRT* Algorithm

4.1. Overall Algorithmic Framework

This section presents the EAC-Bi-RRT* algorithm. The proposed method adopts bidirectional RRT* as the basic framework and embeds environment-aware mechanisms into key stages including sampling, tree expansion, near-obstacle correction, and path postprocessing, thereby forming an integrated planning pipeline for complex 3D obstacle environments.
During the sampling stage, the algorithm partitions the local 3D directional space around the expansion node into spherical sectors and assigns differentiated sampling probabilities by jointly considering obstacle distribution and goal-direction information. A distance-adaptive goal bias is further introduced to suppress invalid expansions when the goal direction is obstructed. During the dual-tree expansion stage, the expansion step size is adaptively adjusted according to the local environmental complexity. The leader/follower roles are assigned once at initialization based on a local expandability assessment, so as to enhance the coordination between the two trees and promote rapid connection. In near-obstacle regions, a local potential field containing only a repulsive term corrects the expansion direction, while a climb-angle constraint ensures the physical executability of each expansion. After the two trees are successfully connected, the initial polyline path is further processed by curvature-constrained B-spline smoothing with collision-safe fallback, so as to improve path quality and kinematic feasibility. Figure 2 illustrates the overall workflow of EAC-Bi-RRT*.
On this basis, Algorithm 6 presents the main pseudocode of EAC-Bi-RRT* in order to further clarify the calling relationships and execution order of the constituent modules within the overall planning loop. The following subsections describe the design principles and implementation details of each key mechanism.
Algorithm 6 EAC-Bi-RRT*
Input:  x s t a r t , x g o a l , X o b s (obstacles), X (workspace), N (max iterations)
Output:  Optimized path σ *
  1: {Initialization}
  2: T 1 { V 1 = { x s t a r t } , E 1 = } T 2 { V 2 = { x g o a l } , E 2 = }
  3: d i n i t i a l x s t a r t x g o a l
  4: η m a x g l o b a l η 0 · ( 1 R v ) / e R n {Global complexity assessment, Equation (14)}
  5: {Environment-aware role assignment}
  6: η s ADAPTIVESTEP ( x s t a r t , X o b s ) η g ADAPTIVESTEP ( x g o a l , X o b s ) {Equation (18)}
  7: if  η s η g   then
  8:        T L e a d e r T 1 T F o l l o w e r T 2
  9: else
10:        T L e a d e r T 2 T F o l l o w e r T 1
11: end if
12: {Main loop}
13: for  i = 1   N  do
14:        ( σ , f o u n d ) COOPERATIVEEXPAND ( T L e a d e r , T F o l l o w e r , X o b s )
15:       if  f o u n d  then
16:             σ * GREEDYSHORTCUT ( σ , X o b s ) {Greedy path pruning}
17:             σ * BSLINESMOOTH ( σ * , X o b s , κ m a x ) {Curvature-constrained smoothing, Equation (28)}
18:            return  σ *
19:      end if
20: end for
21: return ∅ {Failure}

4.2. Adaptive Directional Sampling Strategy

We define a local spherical coordinate system centered at the current expansion node x n e a r . A spatial direction is described by an azimuth angle θ [ 0 , 2 π ) and an elevation angle ϕ [ π / 2 , π / 2 ] . Here, θ measures the horizontal direction counterclockwise from the positive x-axis, and  ϕ gives the angular deviation from the horizontal plane, with upward taken as positive. This local frame is used only to parameterize the candidate expansion directions, while all node positions and collision-free checks remain in the global Cartesian frame.
This partition follows the classical 26-neighborhood connectivity in discrete 3D space. The spherical space is divided into five elevation layers. The upper, middle, and lower layers each contain eight azimuthal sectors spaced at 45 ° , while the two polar caps are not further subdivided. Table 1 gives the partitioning scheme, and Figure 3 shows the overall structure.
The center direction vector d i specifies sector S i . The center directions of the top and bottom polar caps are d 0 = [ 0 , 0 , 1 ] T and d 25 = [ 0 , 0 , 1 ] T , respectively. For the upper, middle, and lower layers, the sector center direction depends on the layer elevation parameter ϕ l a y e r and the azimuth index j = 0 , 1 , , 7 :
d l a y e r , j = cos ϕ l a y e r cos ( j · 45 ° + 22.5 ° ) cos ϕ l a y e r sin ( j · 45 + 22.5 ° ) sin ϕ l a y e r ,
where the upper layer takes ϕ u p p e r = 45 , the middle layer takes ϕ m i d d l e = 0 ° , and the lower layer takes ϕ l o w e r = 45 ° .
The sampling probability assigned to each sector depends on the obstacle distribution within that sector. To this end, obstacles are first counted within the spherical region centered at x n e a r with radius R s e n s e and denoted as
O s e n s e = O j | c j x n e a r R s e n s e ,
where c j is the center coordinate of the j-th obstacle. For each O j O s e n s e , the vector from the expansion node to the obstacle center is defined as v j = ( v x , v y , v z ) T = c j x n e a r . Its azimuth and elevation angles are computed as
θ j = arctan v y v x , v x > 0 , v y 0 , arctan v y v x + 2 π , v x > 0 , v y < 0 , arctan v y v x + π , v x < 0 , π 2 , v x = 0 , v y > 0 , 3 π 2 , v x = 0 , v y < 0 , ϕ j = arctan v z v x 2 + v y 2 .
The angle ϕ j determines the elevation layer of obstacle O j . Within that layer, θ j determines its azimuthal sector. In this way, O j is assigned to the corresponding sector S i . After all obstacles are assigned to sectors, the obstacle density of each sector can be written as
ρ i = | O i | N t o t a l ,
where | O i | is the number of obstacles assigned to sector S i , and  N t o t a l = | O s e n s e | is the total number of obstacles in the sensing region. A larger ρ i means that the direction of sector S i is more crowded with obstacles.
Obstacle distribution alone is not sufficient to determine the sampling probability, and the goal direction also needs to be taken into account. To measure the alignment between each sector and the goal direction, the cosine between the sector center direction d i and the goal direction is computed as
cos Θ i = d i · d g o a l ,
where d g o a l = ( x g o a l x n e a r ) / x g o a l x n e a r is the unit vector pointing from the current node to the goal.
Combining the sector obstacle density ρ i and the goal-direction cosine cos Θ i , the sampling probability of each sector is defined as
P s e c t o r ( i ) = e α · ρ i · ( 1 + β · cos Θ i ) j = 0 25 e α · ρ j · ( 1 + β · cos Θ j ) ,
where α > 0 is the obstacle sensitivity coefficient and β ( 0 , 1 ) is the goal orientation coefficient.
The sampling process consists of two stages: sector selection and intra-sector sampling. First, a target sector S k is selected according to the probability distribution P s e c t o r via roulette wheel selection. Then, the azimuth angle θ s and elevation angle ϕ s are uniformly sampled within the angular range of S k , and the radial distance r = R s a m p l e · u 1 / 3 ( u U ( 0 , 1 ) ) is computed with a cube-root transformation to ensure volumetric uniformity inside the sphere. The resulting sample point is
x s a m p l e = x n e a r + r · [ cos ϕ s cos θ s , cos ϕ s sin θ s , sin ϕ s ] T .
On top of the sector-based directional bias sampling, a distance-adaptive goal-bias probability is further introduced. Before each sampling step, the algorithm selects the goal point directly as the sample with probability P g o a l and enters the sector-based directional bias sampling procedure with probability 1 P g o a l . The value of P g o a l is dynamically adjusted according to the distance from the current search tree to the goal:
P g o a l ( t ) = P m i n + ( P m a x P m i n ) · d c u r r e n t d i n i t i a l ,
where d i n i t i a l is the initial distance from the start to the goal, d c u r r e n t is the distance from the nearest node in the current search tree to the goal, and  P m i n and P m a x are the lower and upper bounds of the goal-bias probability, respectively.
The sector-based directional bias sampling and the distance-adaptive goal-bias strategy together constitute the adaptive directional sampling strategy. The complete procedure is summarized in Algorithm 7.
Algorithm 7 Adaptive directional sampling
Input:  T (search tree), x t a r g e t (sampling target), X o b s , d i n i t i a l
Output:  Sampled point x s a m p l e
  1: {Stage 1: Distance-adaptive goal-bias probability}
  2:  d c u r r e n t min v V v x t a r g e t
  3: P g o a l P m i n + ( P m a x P m i n ) · d c u r r e n t / d i n i t i a l {Equation (11)}
  4: if  rand ( ) < P g o a l   then
  5:      return  x t a r g e t
  6: end if
  7: {Stage 2: 26-sector direction-biased sampling}
  8: x n e a r arg min v V v x t a r g e t
  9: d g o a l ( x t a r g e t x n e a r ) / x t a r g e t x n e a r
10: for  i = 0  to 25 do
11:        ρ i | O i | / | O s e n s e | {Obstacle density of sector S i }
12:        cos Θ i d i · d g o a l {Goal alignment, d i from Equation (4)}
13:        w i exp ( α · ρ i ) · ( 1 + β · cos Θ i ) {Equation (9)}
14: end for
15: P i w i / j = 0 25 w j , i { 0 , , 25 } {Normalize}
16: {Stage 3: Sector selection and intra-sector sampling}
17: S * ROULETTESELECT ( { P 0 , , P 25 } )
18: Sample θ s , ϕ s uniformly within the angular range of S *
19: r R s a m p l e · u 1 / 3 , u U ( 0 , 1 ) {Cube-root for volumetric uniformity}
20: x s a m p l e x n e a r + r · [ cos ϕ s cos θ s , cos ϕ s sin θ s , sin ϕ s ] T {Equation (10)}
21: return  x s a m p l e

4.3. Environment-Adaptive Variable-Step-Size Mechanism

A large step size increases the risk of collision when the search tree expands through narrow passages or obstacle-dense regions. A small step size improves local obstacle avoidance, but it also creates many redundant nodes in open areas and reduces overall search efficiency. The expansion step size therefore follows a three-level adjustment scheme and changes with the local environment.
The 3D volumetric occupancy ratio of the workspace is defined at initialization as
R v = i = 1 N o b s V o b s , i V t o t a l ,
where V o b s , i and V t o t a l denote the volume of the i-th obstacle and the total workspace volume, respectively.
An obstacle number density is further introduced as
R n = N o b s · V u n i t V t o t a l .
where N o b s is the total number of obstacles and V u n i t is the unit volume.
This gives the global upper bound of the step size as
η m a x g l o b a l = η 0 · ( 1 R v ) e R n ,
where η 0 is a nominal step size related to the map scale.
At each expansion step, the 3D distance from the current node x n e a r to the nearest obstacle surface is computed as d o b s 3 D ( x ) = min i O ( x c i r i ) . Let this distance be denoted by d. The locally adaptive step size is then written as
η b a s e = η m a x g l o b a l , d D s a f e , η m i n + ( η m a x g l o b a l η m i n ) d D s a f e κ , d < D s a f e ,
where D s a f e sets the safety distance threshold, κ controls the curvature of the mapping, and  η m i n sets the minimum step size.
If multiple obstacles fall within the sensing range, a local density correction further reduces the step size:
η a d j u s t e d = η b a s e 1 + β l o c a l · max ( 0 , n l o c a l 1 ) ,
where n l o c a l counts the obstacles within the safety distance range, and  β l o c a l controls the local density decay.
When an expansion results in a collision, a bisection search along the expansion direction is performed to find the farthest collision-free point:
x f a l l b a c k ( k ) = x n e a r + η a d j u s t e d 2 k · d , k = 1 , 2 , , k m a x .
The algorithm halves the step size progressively and accepts the first expansion point that is collision-free and satisfies x f a l l b a c k ( k ) x n e a r η m i n . If no valid point is found after k > k m a x iterations, the current expansion attempt is abandoned.

4.4. Cooperative Dual-Tree Expansion Strategy

In conventional bidirectional RRT*, the two search trees adopt symmetric expansion behavior, sharing the same step size, sampling strategy, and expansion rules without any division of labor. To address this limitation, a cooperative dual-tree expansion strategy is developed that enhances the collaboration efficiency of the two trees through a one-time asymmetric role assignment and a dynamic connection threshold.
During algorithm initialization, the adaptive step sizes at the start and goal states are computed as
η s t a r t = AdaptiveStep ( x s t a r t ) η g o a l = AdaptiveStep ( x g o a l )
The role assignment is then determined as follows:
( Leader , Follower ) = ( T 1 , T 2 ) , η s t a r t η g o a l , ( T 2 , T 1 ) , η s t a r t < η g o a l ,
where the tree with the larger step size is designated as the leader and the other as the follower.
During the planning process, the step sizes of both trees are independently computed by the variable step-size mechanism based on the local environment of their respective current nodes:
η L e a d e r = AdaptiveStep ( x n e a r , L e a d e r ) η F o l l o w e r = AdaptiveStep ( x n e a r , F o l l o w e r )
The leader tree uses the sampling strategy described in Section 4.2 to sample toward its natural target direction. The follower tree selects the most recently expanded node of the leader tree x L e a d e r , n e w as its sampling target with probability P b i a s , and performs random sampling with probability 1 P b i a s . The connection test between the two trees uses a dynamic threshold that is coupled with the current step sizes:
η c o n n e c t = γ c · min ( η L e a d e r , η F o l l o w e r ) ,
where γ c is the connection threshold coefficient.
The role assignment, sampling target selection, and dynamic connection test together constitute the cooperative dual-tree expansion strategy. The complete procedure is summarized in Algorithm 8.

4.5. Climb-Angle Constraint

The vertical maneuverability of a UAV is strictly limited by its thrust and power budget. To ensure the physical executability of the planned path, this paper embeds the maximum climb angle γ m a x as a hard constraint into the expansion process. Given the original expansion direction d r a w = [ d x , d y , d z ] T , its climb angle is defined as
γ = arctan d z d x 2 + d y 2 .
The direction is kept unchanged when | γ | γ m a x . When | γ | > γ m a x , the direction is projected onto the boundary of the feasible cone:
d constrained = d d , d = d x d y sign ( d z ) h x y tan γ m a x ,
where h x y = d x 2 + d y 2 is the magnitude of the horizontal component and γ m a x is the maximum allowable climb angle of the UAV.
Algorithm 8 Cooperative dual-tree expansion
Input:  T L (leader tree), T F (follower tree), x g o a l , X o b s
Output:  Connection flag, path σ
  1: {Phase 1: Leader tree expansion}
  2: x s a m p l e ADAPTIVEDIRECTIONALSAMPLING ( T L , x g o a l , X o b s ) {Algorithm 7}
  3: x n e a r L Nearest ( T L , x s a m p l e )
  4: η L ADAPTIVESTEP ( x n e a r L , X o b s ) {Equations (15) and (16)}
  5: d ^ STEER ( x n e a r L , x s a m p l e )
  6: d ^ REPULSIVECORRECTION ( x n e a r L , d ^ , x g o a l , X o b s ) {Equations (24)–(27)}
  7: d ^ CLIMBANGLECLAMP ( d ^ , γ m a x ) {Equation (23)}
 8: ( x n e w L , o k L ) EXTEND ( x n e a r L , d ^ , η L , X o b s ) {with bisection fallback, Equation (17)}
  9: if  o k L   then
10:       T L INSERTANDREWIRE ( T L , x n e w L , X o b s )
11: end if
12: {Phase 2: Follower tree expansion}
13: if  o k L   then
14:       x t a r g e t x n e w L
15: else
16:       x t a r g e t Nearest ( T L , T F . latest )
17: end if
18: if  rand ( ) < P b i a s   then
19:       x s a m p l e F x t a r g e t {Biased toward leader}
20: else
21:       x s a m p l e F RANDOMSAMPLE ( X )
22: end if
23: x n e a r F Nearest ( T F , x s a m p l e F )
24: η F ADAPTIVESTEP ( x n e a r F , X o b s )
25: ( x n e w F , o k F ) STEERANDEXTEND ( x n e a r F , x s a m p l e F , η F , x g o a l , X o b s )
26: if  o k F   then
27:       T F INSERTANDREWIRE ( T F , x n e w F , X o b s )
28: end if
29: {Phase 3: Dynamic connection detection}
30: η c o n n γ c · min ( η L , η F ) {Equation (21)}
31: for each ( o k , x n e w , T o w n , T o t h e r ) { ( o k L , x n e w L , T L , T F ) , ( o k F , x n e w F , T F , T L ) }  do
32:      if  o k  then
33:          x c Nearest ( T o t h e r , x n e w )
34:         if  x n e w x c η c o n n and COLLISIONFREE ( x n e w , x c , X o b s )  then
35:            return  ( true , MERGEPATH ( T L , T F , x n e w , x c ) )
36:         end if
37:      end if
38: end for
39: return  ( false , )

4.6. Repulsive-Only Local Potential Field Correction

Since the sampling strategy in Section 4.2 already provides global directional guidance, this paper removes the attractive term from the conventional APF formulation and activates the repulsive correction only when a node enters the influence range of an obstacle ( ρ < ρ 0 ). This design avoids the functional overlap between the attractive term and the sampling strategy, as well as the path oscillation that arises near the goal region.
The repulsive force is defined as
F r e p ( x ) = k r e p 1 ρ 1 ρ 0 2 · ψ ( d ) · n o b s , ρ < ρ 0 , 0 , ρ ρ 0 ,
where ρ denotes the distance from the current node to the nearest obstacle, and ρ 0 denotes the repulsive influence radius. k r e p is the repulsive gain coefficient, and n o b s is the unit vector pointing from the obstacle toward the current node.
The goal influence factor ψ ( d ) can be written as
ψ ( d ) = d n 1 + d n ,
where d = x x g o a l is the distance from the current node to the goal and n is the shape parameter.
Within the near-obstacle range, the correction strength follows a distance-decaying weight
w = ρ 0 d o b s ρ 0 2 ,
where d o b s represents the distance from the current node to the nearest obstacle. The corrected expansion direction is obtained by
d o u t = d s a m p l e + w · F r e p d s a m p l e + w · F r e p ,
where d s a m p l e stands for the normalized sampling direction returned by the sampling strategy.

4.7. Path Smoothing and Safety Fallback

The piecewise-linear path generated by RRT* usually contains large turning-angle changes, which can affect the smoothness of trajectory tracking in UAV flight. A cubic B-spline is therefore used to smooth the planned path.
Using the waypoint sequence { x 0 , x 1 , , x K } of the piecewise-linear path as control points, the cubic B-spline curve is expressed as
C ( t ) = i = 0 K N i , 3 ( t ) x i ,
where N i , 3 ( t ) is the cubic B-spline basis function, and t serves as the curve parameter.
The smoothed curve must satisfy the maximum curvature constraint κ ( t ) κ m a x = 1 / R m i n . The curve is then discretized at equal arc-length intervals, and the sampled points are checked against the free space. If a smoothed segment intersects an obstacle, that segment is discarded and replaced with the corresponding segment of the original piecewise-linear path so that the final output path remains collision-free.

4.8. Computational Complexity Analysis

The time cost of the proposed EAC-Bi-RRT* algorithm is primarily affected by the nearest-node search, the near-node search, obstacle density estimation, collision detection, and local rewiring. Let T denote the maximum number of iterations, N the number of nodes in the bidirectional trees, M the number of obstacles in the environment, and S = 26 the fixed sector count of the adaptive directional sampling. In each iteration, the nearest-node search and the near-node search are performed via a linear traversal of the tree nodes, with a per-iteration cost of O ( N ) . The obstacle density estimation, collision detection, and local repulsive potential field correction scale linearly with the obstacle count, yielding a worst-case complexity of O ( M ) . The adaptive directional sampling only computes sampling probabilities over a fixed set of 26 sectors, giving a constant complexity of O ( S ) = O ( 1 ) . The cost of local rewiring is determined by the number of near nodes, and is already absorbed into the near-node search and collision detection steps above.
Consequently, the overall time complexity of EAC-Bi-RRT* can be expressed as O T · ( N + M ) , where T represents the maximum number of iterations. The proposed adaptive directional sampling, variable step-size, climb-angle constraint, and repulsive-only APF correction modules primarily introduce constant or local environment evaluation overhead, and therefore do not change the asymptotic order of complexity relative to standard RRT* and Bi-RRT*. If spatial indexing structures such as k-d trees or R-trees are introduced, the practical computational cost of the nearest-node search and obstacle queries can be further reduced.

5. Results and Discussion

To evaluate the planning performance of EAC-Bi-RRT* in different 3D obstacle scenarios, this section constructs four simulation environments. All experiments are conducted on the Windows 11 platform with an Intel Core i7-14650HX processor and 16 GB of memory, and MATLAB R2025a is used as the simulation software. To thoroughly validate the effectiveness of the proposed method, all simulations are implemented within a unified RRT* code framework, and EAC-Bi-RRT* is compared with five baseline algorithms, namely GB-RRT*, Bi-RRT*, Bi-APF-RRT*, AAE-RRT* [32], and DPF-Bi-RRT* [33].
Figure 4 illustrates the four types of 3D simulation environments used in this section. Environment 1 is a dense spherical obstacle environment, which is mainly used to evaluate the spatial search capability and local obstacle avoidance performance of the algorithm under densely distributed spherical obstacles. Environment 2 is a regular cylindrical array environment, which is mainly used to examine the corridor selection and path optimization capability of the algorithm in structured and constrained spaces. Environment 3 is a multi-layer building environment, which is mainly used to verify the constrained-space traversal capability and complex-space search performance of the algorithm under multi-level enclosed structures and narrow openings. Environment 4 is a large-scale random obstacle environment, which is mainly used to assess the global search capability and stability of the algorithm in large unstructured spaces.
The unified parameter settings used in the experiments are as follows. For all algorithms, the maximum number of iterations is set to 5000, and each algorithm is independently run 100 times in each environment. For GB-RRT*, Bi-RRT*, Bi-APF-RRT*, and DPF-Bi-RRT*, the fixed expansion step sizes in Environments 1–4 are set to 5 m, 10 m, 12 m, and 30 m, respectively. For AAE-RRT*, the basic step sizes are set in the same way, while its adaptive step-size ranges in Environments 1–4 are set to [ 1 , 10 ] m, [ 1 , 14 ] m, [ 2 , 20 ] m, and [ 5 , 60 ] m, respectively. EAC-Bi-RRT* adopts an environment-aware adaptive step-size strategy, in which the expansion step size is automatically adjusted according to the global environmental complexity and the local obstacle density. The evaluation metrics used in the experiments are path length, planning time, success rate, and average turning angle. Specifically, path length measures the total cost of the planned result, and planning time reflects the search efficiency. Success rate evaluates the ability to obtain a feasible path under given conditions, while the average turning angle quantifies the geometric smoothness of the path. The complete parameter settings used in our experiments, including the key parameters of the proposed EAC-Bi-RRT* and those of all baseline algorithms across the four environments, are summarized in Appendix A (Table A1, Table A2 and Table A3).

5.1. Dense Spherical Obstacle Environment

The workspace size in this scenario is 200 × 200 × 200 . Approximately 130 spherical obstacles of different scales are placed in the scene to construct a multi-scale and densely distributed 3D obstacle space. The start point is set to ( 0 , 0 , 0 ) , and the goal point is set to ( 200 , 200 , 200 ) . Statistics and paths are shown in Table 2 and Figure 5, respectively.
In the dense spherical obstacle environment, the obstacle sizes and distributions are highly random, and the random tree is prone to search oscillation and repeated expansion during local obstacle avoidance. Table 2 shows that EAC-Bi-RRT* achieves an average planning time of only 0.039 s. This represents reductions of 87.34%, 90.05%, and 81.86% relative to GB-RRT*, Bi-RRT*, and Bi-APF-RRT*, respectively, and is also significantly lower than those of AAE-RRT* and DPF-Bi-RRT*. In terms of path smoothness, EAC-Bi-RRT*, DPF-Bi-RRT*, and AAE-RRT* all achieve average turning angles below 2°, which are significantly better than those of GB-RRT*, Bi-RRT*, and Bi-APF-RRT*. This improvement comes from two aspects. The cooperative dual-tree expansion reduces ineffective search in densely obstructed regions. Meanwhile, the adaptive step size adjusts the expansion scale according to the local obstacle distribution. Together, these two mechanisms improve planning efficiency while preserving obstacle avoidance accuracy. Although the average path length and average turning angle of EAC-Bi-RRT* are comparable to those of AAE-RRT* and DPF-Bi-RRT*, its planning time is substantially shorter while maintaining comparable path quality and smoothness.

5.2. Regular Cylindrical Array Environment

The workspace size in this scenario is 500 × 500 × 200 . A total of 62 regularly arranged vertical column obstacles are placed in the scene, forming a continuous cylindrical array corridor structure. The start point is set to ( 0 , 0 , 0 ) , and the goal point is set to ( 500 , 500 , 150 ) . The corresponding statistical results are reported in Table 2.
The main challenge in the regular cylindrical array environment is that the algorithm needs not only to find a feasible path, but also to determine an appropriate traversal direction as quickly as possible within continuously constrained corridors. Figure 6 indicates that some baseline algorithms still produce clear backtracking and detours between the columns, while the path generated by EAC-Bi-RRT* stays closer to the main corridor direction. The quantitative results in Table 2 are consistent with this observation. EAC-Bi-RRT* records an average path length of 768.46 m and an average planning time of 0.184 s, both lower than those of the compared algorithms. The path length reductions are 12.97%, 18.04%, 13.47%, 5.57%, and 11.27% relative to GB-RRT*, Bi-RRT*, Bi-APF-RRT*, AAE-RRT*, and DPF-Bi-RRT*, respectively. This result suggests that EAC-Bi-RRT* can advance more efficiently along feasible passages in the regular cylindrical corridor environment while avoiding unnecessary detours between columns. The adaptive directional sampling strategy steers the random tree along corridor-compatible directions and reduces back-and-forth oscillation as well as repeated search between columns.

5.3. Multi-Layer Building Environment

The workspace size in this scenario is 550 × 550 × 400 . The scene contains multi-layer floor slabs, through-columns, guard columns, and block obstacles of different heights, which together form a complex 3D enclosed space with narrow openings. The start point is set to ( 0 , 0 , 0 ) , and the goal point is set to ( 550 , 550 , 400 ) . Table 2 reports the statistics, and Figure 7 shows the planned paths.
The multi-layer building environment involves the coupled constraints of floor-slab blockage, narrow openings, and 3D obstacles. When expansion toward the goal direction is repeatedly blocked, the random tree tends to remain trapped in locally enclosed regions, which leads to planning failure. Table 2 shows that the success rate of GB-RRT* in this environment is only 6%, while AAE-RRT* reaches only 40%, indicating that relying only on goal bias or adaptive step size is still insufficient for stable traversal in multi-layer constrained spaces. In contrast, EAC-Bi-RRT* achieves a success rate of 100%, demonstrating stronger traversal capability and search stability in complex enclosed environments. EAC-Bi-RRT* also attains the best average path length of 981.90 m. This is 17.95%, 14.01%, and 3.33% shorter than those of Bi-RRT*, Bi-APF-RRT*, and DPF-Bi-RRT*, respectively. Its average turning angle is only 5.48°, which is also markedly lower than the 6.50°–22.10° reported for the above algorithms. In terms of time cost, the average planning time of EAC-Bi-RRT* is 0.805 s. Although this value is not the lowest in this environment and is higher than those of Bi-RRT*, Bi-APF-RRT*, and DPF-Bi-RRT*, it remains lower than those of GB-RRT* and AAE-RRT*. This result indicates that the proposed algorithm does not simply pursue local search speed in strongly constrained 3D scenes, but instead trades a small amount of time for more stable search guidance, a higher success rate, and better path quality. The key reason is that the adaptive goal-bias mechanism actively reduces the bias probability based on local obstacle density when the goal direction is persistently blocked. This causes the random tree to fall back to sector-based directional exploration sampling, enabling it to escape locally constrained regions.

5.4. Large-Scale Random Obstacle Environment

The workspace size in this scenario is 2000 × 2000 × 400 . Various obstacles, including cuboids and cylinders, are randomly distributed in the scene to construct a large-scale unstructured environment with nonuniform distribution and local clustering characteristics. The start point is set to ( 0 , 0 , 0 ) , and the goal point is set to ( 2000 , 2000 , 50 ) . The corresponding statistical results are reported in Table 2.
The large-scale random obstacle environment is characterized by a vast search space, uneven obstacle distribution, and pronounced local clustering. As a result, the algorithm needs not only strong global exploration capability, but also the ability to avoid excessive invalid detours in locally cluttered regions. As shown in Figure 8, GB-RRT*, Bi-RRT*, Bi-APF-RRT*, AAE-RRT*, and DPF-Bi-RRT* all exhibit path deviations of varying degrees when traversing locally clustered obstacle regions, whereas the path generated by EAC-Bi-RRT* is more direct overall. Table 2 shows that EAC-Bi-RRT* maintains a success rate of 100% in this environment and achieves the shortest average path length of 2960.57 m and the fastest average planning time of 0.256 s. Compared with GB-RRT*, Bi-RRT*, and Bi-APF-RRT*, its average path length is reduced by 17.34%, 17.98%, and 12.80%, respectively. Compared with AAE-RRT* and DPF-Bi-RRT*, the average planning time is reduced by 84.48% and 54.44%, respectively. The path quality remains comparable, yet the search efficiency is markedly higher. Specifically, the sector-based sampling provides persistent directional guidance that reduces unnecessary detours in the vast search space. Meanwhile, the adaptive step-size mechanism enables faster expansion in open regions and finer obstacle avoidance in locally clustered areas.

5.5. Statistical Reliability Analysis

To further assess the run-to-run reliability of the experimental results, the coefficient of variation (CV) of path length across the 100 independent trials is summarized in Table 3. The CV is defined as the ratio of standard deviation to mean, with lower values indicating higher run-to-run consistency.
As shown in Table 3, EAC-Bi-RRT* maintains a path-length CV below 3% in all four environments while preserving a 100% success rate, indicating high run-to-run consistency across both densely cluttered and large-scale scenarios. It attains the lowest path-length CV in Environments 2 and 4. In contrast, GB-RRT* and Bi-RRT* exhibit path-length CV values exceeding 5% in the complex environments (Environments 3 and 4), reflecting larger run-to-run variability. The medians of the continuous metrics are close to the corresponding means reported in Table 2, suggesting approximately symmetric distributions without significant long-tail outliers.

5.6. Discussion

Figure 9 compares the average planning time, average path length, and average turning angle of all algorithms in the four environments. From the global statistics, the success rates of GB-RRT* in Environments 2–4 are only 73%, 6%, and 84%, respectively, while AAE-RRT* reaches only 40% in Environment 3. In contrast, EAC-Bi-RRT* maintains a success rate of 100% in all four environments. Compared with Bi-RRT* and Bi-APF-RRT*, the average path length of EAC-Bi-RRT* is reduced by 16.23% and 11.55%, respectively, across the four environments. In Environments 1, 2, and 4, the average planning time of EAC-Bi-RRT* is reduced by 80.98% and 57.49% relative to AAE-RRT* and DPF-Bi-RRT*, respectively. This difference reflects a clear efficiency advantage. In Environment 3, due to the special constraints imposed by the multi-layer enclosed structure, the proposed algorithm trades a higher time cost for a complete success rate and the best path quality, which indicates that its search strategy gives priority to reachability and path cost in strongly constrained scenes.
Figure 10 gives the boxplots of the key metrics of EAC-Bi-RRT* across the four environments. In Environment 1, all metrics show relatively compact boxplots. This suggests good repeatability across runs. In Environment 2, both planning time and path length show low median values with limited dispersion, suggesting that the search process remains stable in the regular corridor environment. In Environment 3, the coupled constraints of multi-layer floor slabs and narrow openings increase the uncertainty of the search path and lead to greater variation in planning time. Nevertheless, the distributions of path length and turning angle remain relatively concentrated, which indicates that the algorithm still maintains good robustness in strongly constrained enclosed spaces. In Environment 4, the boxes for path length and planning time remain compact, confirming stable global search performance in the large-scale unstructured environment.

6. Conclusions

UAV path planning in complex 3D obstacle environments requires not only fast generation of collision-free paths, but also satisfactory path smoothness and kinematic feasibility. To meet these requirements, this paper proposes the EAC-Bi-RRT* algorithm. Built on bidirectional RRT*, the proposed method introduces an environment-aware mechanism to regulate the search process. The result is improved adaptability in complex spaces. Experimental validation in four representative 3D obstacle environments shows that EAC-Bi-RRT* achieves strong stability and environmental adaptability in challenging scenes while maintaining both path quality and path smoothness.
Nevertheless, this study still leaves room for further improvement. The proposed method has several limitations that will be addressed in future research:
(1)
Embedded onboard deployment and computational profiling: The proposed method targets embedded onboard computing platforms rather than low-level flight-control microcontrollers. The current MATLAB R2025a prototype runs on a desktop CPU, and systematic profiling of onboard CPU, RAM, and real-time scheduling is left for future work.
(2)
Perception uncertainty and real-time replanning: The current simulations focus on static 3D environments and do not yet model sensing noise, localization errors, or dynamic obstacles. Future work will investigate uncertainty-aware environment representation and real-time replanning.
(3)
Real-world flight validation: All evaluations in this paper are conducted in MATLAB-based simulation, which cannot reproduce the perception, actuation, and disturbance characteristics of physical flight. Future work will integrate the planner with onboard perception, state estimation, and the flight-control loop, advancing from hardware-in-the-loop testing to outdoor physical-flight experiments.

Author Contributions

Conceptualization, Y.Z. and W.H.; methodology, Y.Z. and W.H.; software, Y.Z.; validation, Y.Z., Y.C. and Z.Q.; formal analysis, Y.Z. and Y.C.; investigation, Y.Z. and Z.Q.; resources, W.H.; data curation, Y.Z. and Z.Q.; writing—original draft preparation, Y.Z.; writing—review and editing, W.H., Y.C. and Z.Q.; visualization, Y.Z. and Y.C.; supervision, W.H. and Y.C.; project administration, W.H.; funding acquisition, W.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China, grant number 62473133, and the Natural Science Foundation of Wuhan, grant number 2025040601020155.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

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

Acknowledgments

The authors would like to thank the School of Electrical and Electronic Engineering, Hubei University of Technology, for its support and resources.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
3DThree-dimensional
UAVUnmanned Aerial Vehicle
RRTRapidly exploring random tree
RRT*Rapidly exploring random tree star
APFArtificial potential field
EAC-Bi-RRT*Environment-aware cooperative bidirectional RRT*

Appendix A

Table A1. Key parameters used in the proposed EAC-Bi-RRT* algorithm.
Table A1. Key parameters used in the proposed EAC-Bi-RRT* algorithm.
GroupSymbolMeaningValueNotes
Adaptive step size η min Minimum step size 0.25 η max Lower bound
β local Local density decay0.15Step reduction coefficient
Spherical sector sampling P min Min goal-bias probability0.05Lower bound
P max Max goal-bias probability0.40Upper bound
APF local repulsion k rep Repulsion coefficient0.5Obstacle avoidance gain
Bi-tree cooperation γ c Connection threshold coeff.1.5Dynamic merge criterion
P bias Follower bias probability0.6Toward leader tree
Path optimization κ max Maximum curvature 1 / 80 Min turning radius = 80 m
α th Sharp turn threshold 120 ° Control point insertion
Global constraints γ max Maximum climb angle 30 ° 3D flight envelope
N max Maximum iterations5000Termination condition
Table A2. Shared parameters for all baseline algorithms across environments.
Table A2. Shared parameters for all baseline algorithms across environments.
ParameterSymbolEnvironment 1Environment 2Environment 3Environment 4
Step size η 5101230
Rewire radius γ 202535120
Connection tolerance d conn 571030
Collision resolution Δ col 1124
Maximum iterations N max 5000500050005000
Table A3. Algorithm-specific parameters for baseline algorithms.
Table A3. Algorithm-specific parameters for baseline algorithms.
MethodParameterSymbolEnvironment 1Environment 2Environment 3Environment 4
GB-RRT*Goal bias P g 0.20
Bi-RRT*Swap probability P s 0.50
Bi-APF-RRT*Goal bias P g 0.10
Repulsion coefficient k rep 0.30
Repulsion range d rep 10142060
AAE-RRT*Attraction gain λ a 200100010001000
Repulsion gain λ r 100500500500
Safe distance R safe 571030
Adaptive step range [ η min , η max ] [1, 10][1, 14][2, 20][5, 60]
Collision decay/growth λ col / λ ncol 0.6/2.0
DPF-Bi-RRT*Attraction coefficient k att 2.0
Repulsion coefficient k rep 0.8
Repulsion range d rep 150
Greedy shortcut window n g 12

References

  1. Boysen, N.; Fedtke, S.; Schwerdfeger, S. Last-mile delivery concepts: A survey from an operational research perspective. OR Spectr. 2021, 43, 1–58. [Google Scholar] [CrossRef]
  2. Mohamed, A.; Mohamed, M. Unmanned Aerial Vehicles in Last-Mile Parcel Delivery: A State-of-the-Art Review. Drones 2025, 9, 413. [Google Scholar] [CrossRef]
  3. Ishiwatari, M. Leveraging Drones for Effective Disaster Management: A Comprehensive Analysis of the 2024 Noto Peninsula Earthquake Case in Japan. Prog. Disaster Sci. 2024, 23, 100348. [Google Scholar] [CrossRef]
  4. Lyu, M.; Zhao, Y.; Huang, C.; Huang, H. Unmanned Aerial Vehicles for Search and Rescue: A Survey. Remote Sens. 2023, 15, 3266. [Google Scholar] [CrossRef]
  5. Luo, Y.; Yu, X.; Yang, D.; Zhou, B. A survey of intelligent transmission line inspection based on unmanned aerial vehicle. Artif. Intell. Rev. 2023, 56, 173–201. [Google Scholar] [CrossRef]
  6. Lyu, C.; Lin, S.; Lynch, A.; Zou, Y.; Liarokapis, M. UAV-based deep learning applications for automated inspection of civil infrastructure. Autom. Constr. 2025, 177, 106285. [Google Scholar] [CrossRef]
  7. Li, J.; Xiong, X.; Yan, Y.; Yang, Y. A Survey of Indoor UAV Obstacle Avoidance Research. IEEE Access 2023, 11, 51861–51889. [Google Scholar] [CrossRef]
  8. Pan, Y.; Hu, K.; Huang, X.; Ying, W.; Xie, X.; Ma, Y.; Zhang, N.; Kang, H. Developing Smart MAVs for Autonomous Inspection in GPS-Denied Constructions. arXiv 2024, arXiv:2408.06030. [Google Scholar] [CrossRef]
  9. Ghambari, S.; Golabi, M.; Jourdan, L.; Lepagnot, J.; Idoumghar, L. UAV Path Planning Techniques: A Survey. RAIRO-Oper. Res. 2024, 58, 2951–2989. [Google Scholar] [CrossRef]
  10. Freitas, E.J.R.; Cohen, M.W.; Neto, A.A.; Guimarães, F.G.; Pimenta, L.C.A. DE3D-NURBS: A Differential Evolution-Based 3D Path-Planner Integrating Kinematic Constraints and Obstacle Avoidance. Knowl.-Based Syst. 2024, 300, 112084. [Google Scholar] [CrossRef]
  11. Liu, Y.; Zhang, H.; Zheng, H.; Li, Q.; Tian, Q. A Spherical Vector-Based Adaptive Evolutionary Particle Swarm Optimization for UAV Path Planning under Threat Conditions. Sci. Rep. 2025, 15, 2116. [Google Scholar] [CrossRef]
  12. Jiang, Y.; Xu, X.-X.; Zheng, M.-Y.; Zhan, Z.-H. Evolutionary Computation for Unmanned Aerial Vehicle Path Planning: A Survey. Artif. Intell. Rev. 2024, 57, 267. [Google Scholar] [CrossRef]
  13. Elbanhawi, M.; Simic, M. Sampling-Based Robot Motion Planning: A Review. IEEE Access 2014, 2, 56–77. [Google Scholar] [CrossRef]
  14. LaValle, S.M. Rapidly-Exploring Random Trees: A New Tool for Path Planning; Technical Report TR 98-11; Computer Science Department, Iowa State University: Ames, IA, USA, 1998; pp. 1–4. [Google Scholar]
  15. Karaman, S.; Frazzoli, E. Sampling-Based Algorithms for Optimal Motion Planning. Int. J. Robot. Res. 2011, 30, 846–894. [Google Scholar] [CrossRef]
  16. Xu, T. Recent Advances in Rapidly-Exploring Random Tree: A Review. Heliyon 2024, 10, e32451. [Google Scholar] [CrossRef] [PubMed]
  17. Muhsen, D.K.; Raheem, F.A.; Sadiq, A.T. A Systematic Review of Rapidly Exploring Random Tree RRT Algorithm for Single and Multiple Robots. Cybern. Inf. Technol. 2024, 24, 78–101. [Google Scholar] [CrossRef]
  18. Huang, T.; Fan, K.; Sun, W. Density Gradient-RRT: An Improved Rapidly Exploring Random Tree Algorithm for UAV Path Planning. Expert Syst. Appl. 2024, 252, 124121. [Google Scholar] [CrossRef]
  19. Gammell, J.D.; Srinivasa, S.S.; Barfoot, T.D. Informed RRT*: Optimal Sampling-based Path Planning Focused via Direct Sampling of an Admissible Ellipsoidal Heuristic. In Proceedings of the 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Chicago, IL, USA, 14–18 September 2014; pp. 2997–3004. [Google Scholar] [CrossRef]
  20. Lin, Y.; Zhang, L. An Improved Quick Informed-RRT* Algorithm Based on Hybrid Bidirectional Search and Adaptive Adjustment Strategies. Intell. Serv. Robot. 2024, 17, 847–870. [Google Scholar] [CrossRef]
  21. Kyaw, P.T.; Le, A.V.; Mohan, R.E.; Kelly, J. Greedy Heuristics for Sampling-Based Motion Planning in High-Dimensional State Spaces. arXiv 2025, arXiv:2405.03411v3. [Google Scholar]
  22. Jiang, X.; Wang, Z.; Dong, C. A Path Planning Algorithm Based on Improved RRT Sampling Region. Comput. Mater. Contin. 2024, 80, 4303–4322. [Google Scholar] [CrossRef]
  23. Guo, S.; Gong, J.; Shen, H.; Yuan, L.; Wei, W.; Long, Y. DBVSB-P-RRT*: A Path Planning Algorithm for Mobile Robot with High Environmental Adaptability and Ultra-High Speed Planning. Expert Syst. Appl. 2025, 266, 126123. [Google Scholar] [CrossRef]
  24. Jordan, M.; Perez, A. Optimal Bidirectional Rapidly-Exploring Random Trees; MIT CSAIL Technical Report, MIT-CSAIL-TR-2013-021; MIT: Cambridge, MA, USA, 2013. [Google Scholar]
  25. Qureshi, A.H.; Ayaz, Y. Intelligent Bidirectional Rapidly-Exploring Random Trees for Optimal Motion Planning in Complex Cluttered Environments. Robot. Auton. Syst. 2015, 68, 1–11. [Google Scholar] [CrossRef]
  26. Ye, L.; Li, J.; Li, P. Improving Path Planning for Mobile Robots in Complex Orchard Environments: The Continuous Bidirectional Quick-RRT* Algorithm. Front. Plant Sci. 2024, 15, 1337638. [Google Scholar] [CrossRef]
  27. Cao, M.; Mao, H.; Tang, X.; Sun, Y.; Chen, T. A Novel RRT*-Connect Algorithm for Path Planning on Robotic Arm Collision Avoidance. Sci. Rep. 2025, 15, 2836. [Google Scholar] [CrossRef] [PubMed]
  28. Qureshi, A.H.; Ayaz, Y. Potential Functions Based Sampling Heuristic for Optimal Path Planning. Auton. Robot. 2016, 40, 1079–1093. [Google Scholar] [CrossRef]
  29. Fan, J.; Chen, X.; Wang, Y.; Chen, X. UAV Trajectory Planning in Cluttered Environments Based on PF-RRT* Algorithm with Goal-Biased Strategy. Eng. Appl. Artif. Intell. 2022, 114, 105182. [Google Scholar] [CrossRef]
  30. Jiang, Z.; Liu, Q.; Wang, E.; Wang, Y.; Wang, J. HMA-RRT*: A Hybrid Multi-Strategy Adaptive RRT* Algorithm for USV Path Planning in Complex Maritime Environments. J. King Saud Univ. Comput. Inf. Sci. 2025, 38, 15. [Google Scholar] [CrossRef]
  31. Kilic, K.I.; Desoeuvres, A.; Pedersen, C.B.; Vasegaard, A.E.; Nielsen, P. Adaptive Artificial Potential Field Method for Small Autonomous Vehicles. Robot. Auton. Syst. 2026, 198, 105364. [Google Scholar] [CrossRef]
  32. Huang, H.; Shang, Y.; Liu, X.; Liu, X.; Qi, P. An Improved Bi-RRT*-Based Path Planning Algorithm with Adaptive Search Strategy Assignment Mechanism for Ultra-Low-Altitude Penetration of Fixed-Wing Aircraft. Aerosp. Sci. Technol. 2024, 152, 109363. [Google Scholar] [CrossRef]
  33. Ge, L.; Phang, S.K.; Sariff, N. DPF-Bi-RRT*: An Improved Path Planning Algorithm for Complex 3D Environments with Adaptive Sampling and Dual Potential Field Strategy. IEEE Access 2025, 13, 35958–35972. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of RRT* extension. (a) Among all neighbors of q n e w , q m i n with the lowest cumulative cost is selected as its parent instead of q n e a r e s t . (b) After inserting q n e w , the neighbor q j is rewired from q o l d (red dashed) to q n e w (green dashed) because the path through q n e w has a lower cost.
Figure 1. Schematic diagram of RRT* extension. (a) Among all neighbors of q n e w , q m i n with the lowest cumulative cost is selected as its parent instead of q n e a r e s t . (b) After inserting q n e w , the neighbor q j is rewired from q o l d (red dashed) to q n e w (green dashed) because the path through q n e w has a lower cost.
Applsci 16 05065 g001
Figure 2. Overall flowchart of the EAC-Bi-RRT* algorithm.
Figure 2. Overall flowchart of the EAC-Bi-RRT* algorithm.
Applsci 16 05065 g002
Figure 3. Partitioning of the 3D sampling space into 26 sectors.
Figure 3. Partitioning of the 3D sampling space into 26 sectors.
Applsci 16 05065 g003
Figure 4. Four 3D simulation environments used in this study. (a) Dense spherical obstacle environment. (b) Regular cylindrical array environment. (c) Multi-layer building environment. (d) Large-scale random obstacle environment. The red marker indicates the start position and the green marker indicates the goal position.
Figure 4. Four 3D simulation environments used in this study. (a) Dense spherical obstacle environment. (b) Regular cylindrical array environment. (c) Multi-layer building environment. (d) Large-scale random obstacle environment. The red marker indicates the start position and the green marker indicates the goal position.
Applsci 16 05065 g004
Figure 5. Path planning results of six algorithms in Environment 1.
Figure 5. Path planning results of six algorithms in Environment 1.
Applsci 16 05065 g005
Figure 6. Path planning results of six algorithms in Environment 2.
Figure 6. Path planning results of six algorithms in Environment 2.
Applsci 16 05065 g006
Figure 7. Path planning results of six algorithms in Environment 3.
Figure 7. Path planning results of six algorithms in Environment 3.
Applsci 16 05065 g007
Figure 8. Path planning results of six algorithms in Environment 4.
Figure 8. Path planning results of six algorithms in Environment 4.
Applsci 16 05065 g008
Figure 9. Overall comparison of average planning time, path length, and turning angle of all algorithms across four environments.
Figure 9. Overall comparison of average planning time, path length, and turning angle of all algorithms across four environments.
Applsci 16 05065 g009
Figure 10. Boxplot distributions of key metrics of EAC-Bi-RRT* in the four environments.
Figure 10. Boxplot distributions of key metrics of EAC-Bi-RRT* in the four environments.
Applsci 16 05065 g010aApplsci 16 05065 g010b
Table 1. Partitioning of the 26 spherical sectors.
Table 1. Partitioning of the 26 spherical sectors.
LayerSectorsElevation RangeCountDescription
Top cap S 0 67.5 ° ϕ 90 ° 1Steep-climb cone
Upper S 1 S 8 22.5 ° ϕ < 67.5 ° 8Primary climbing directions
Middle S 9 S 16 22.5 ° < ϕ < 22.5 ° 8Near-horizontal cruise zone
Lower S 17 S 24 67.5 < ϕ 22.5 8Descending directions
Bottom cap S 25 90 ° ϕ < 67.5 1Steep-descent cone
Table 2. Simulation data of six algorithms in different environments.
Table 2. Simulation data of six algorithms in different environments.
EnvironmentAlgorithmSuccess RatePath Length (m)Time (s)Avg. Turning Angle (°)
Environment 1GB-RRT*100%367.20 ± 7.940.308 ± 0.1367.33 ± 1.19
Bi-RRT*100%403.07 ± 25.630.392 ± 0.14812.50 ± 2.00
Bi-APF-RRT*100%381.56 ± 13.740.215 ± 0.09110.44 ± 1.61
AAE-RRT*100%355.95 ± 6.910.214 ± 0.0841.40 ± 1.16
DPF-Bi-RRT*100%357.98 ± 7.740.122 ± 0.0731.39 ± 0.88
EAC-Bi-RRT*100%358.94 ± 7.750.039 ± 0.0171.61 ± 0.79
Environment 2GB-RRT*73%882.96 ± 51.130.950 ± 0.60020.52 ± 1.96
Bi-RRT*100%937.65 ± 64.210.431 ± 0.15122.84 ± 2.28
Bi-APF-RRT*100%888.12 ± 34.460.298 ± 0.11020.39 ± 1.44
AAE-RRT*100%813.78 ± 16.200.789 ± 0.12111.75 ± 1.64
DPF-Bi-RRT*100%866.05 ± 27.210.368 ± 0.1718.96 ± 1.88
EAC-Bi-RRT*100%768.46 ± 11.880.184 ± 0.0648.56 ± 0.82
Environment 3GB-RRT*6%1195.45 ± 114.801.681 ± 0.70118.32 ± 1.91
Bi-RRT*100%1196.76 ± 96.820.316 ± 0.22222.10 ± 2.17
Bi-APF-RRT*100%1141.89 ± 75.740.330 ± 0.22819.46 ± 1.77
AAE-RRT*40%989.03 ± 23.710.985 ± 0.4005.55 ± 1.12
DPF-Bi-RRT*99%1015.73 ± 50.860.371 ± 0.2126.50 ± 1.21
EAC-Bi-RRT*100%981.90 ± 26.210.805 ± 0.4465.48 ± 0.81
Environment 4GB-RRT*84%3581.47 ± 205.561.377 ± 0.56125.81 ± 2.43
Bi-RRT*100%3609.52 ± 245.021.158 ± 0.40525.26 ± 2.67
Bi-APF-RRT*100%3395.17 ± 133.101.030 ± 0.36923.16 ± 2.17
AAE-RRT*100%3076.69 ± 84.061.649 ± 0.3919.46 ± 1.84
DPF-Bi-RRT*100%3061.84 ± 101.890.562 ± 0.2297.26 ± 1.47
EAC-Bi-RRT*100%2960.57 ± 46.970.256 ± 0.0495.98 ± 1.40
Table 3. Coefficient of variation (CV, %) of path length over 100 independent trials in the four environments.
Table 3. Coefficient of variation (CV, %) of path length over 100 independent trials in the four environments.
AlgorithmEnvironment 1Environment 2Environment 3Environment 4
GB-RRT*2.165.799.605.74
Bi-RRT*6.366.858.096.79
Bi-APF-RRT*3.603.886.633.92
AAE-RRT*1.941.992.402.73
DPF-Bi-RRT*2.163.145.013.33
EAC-Bi-RRT*2.161.552.671.59
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

Zhao, Y.; Huang, W.; Chang, Y.; Qin, Z. A 3D UAV Path Planning Algorithm Based on Bidirectional RRT* with Adaptive Directional Sampling and Cooperative Dual-Tree Expansion. Appl. Sci. 2026, 16, 5065. https://doi.org/10.3390/app16105065

AMA Style

Zhao Y, Huang W, Chang Y, Qin Z. A 3D UAV Path Planning Algorithm Based on Bidirectional RRT* with Adaptive Directional Sampling and Cooperative Dual-Tree Expansion. Applied Sciences. 2026; 16(10):5065. https://doi.org/10.3390/app16105065

Chicago/Turabian Style

Zhao, Yaoyu, Wencong Huang, Yufang Chang, and Ziyu Qin. 2026. "A 3D UAV Path Planning Algorithm Based on Bidirectional RRT* with Adaptive Directional Sampling and Cooperative Dual-Tree Expansion" Applied Sciences 16, no. 10: 5065. https://doi.org/10.3390/app16105065

APA Style

Zhao, Y., Huang, W., Chang, Y., & Qin, Z. (2026). A 3D UAV Path Planning Algorithm Based on Bidirectional RRT* with Adaptive Directional Sampling and Cooperative Dual-Tree Expansion. Applied Sciences, 16(10), 5065. https://doi.org/10.3390/app16105065

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