1. Introduction
Urban logistics delivery tasks include task assignment [
1], location selection of logistics centers [
2] and path planning and optimization of logistics routes [
3,
4,
5]. These tasks play an important role in reducing transportation costs, travel distance, and delivery time, as well as improving the operational efficiency of logistics distribution systems. In recent years, the rapid development of UAV technology has enabled UAVs to partially replace manned platforms for logistics and delivery tasks in urban environments [
6]. UAV logistics systems have advantages in terms of cost, delivery time, and space constraints, making them a promising technology for future logistics and delivery tasks [
7].
UAV path planning has received significant attention from many research institutions in recent years [
8,
9,
10]. In [
11], a sampling pool mechanism was introduced into the traditional RRT* algorithm, effectively shortening the length of the search path. In [
12], a path-planning method based on hybrid sampling was proposed, which uses non-uniform and uniform samplers to generate samples. Compared with traditional algorithms, it achieved better results in convergence speed, success rate, number of visited nodes, path length, and planning time. In [
13], a convolutional neural network was combined with the RRT* algorithm, and the A* algorithm was used to generate a training dataset consisting of map information and optimal paths, which was then used to guide subsequent sampling of the RRT* algorithm, greatly saving the time and memory consumed during the sampling process [
14]. In [
15,
16,
17,
18,
19,
20], the authors adopted a combination of RRT* and ant colony optimization, as well as a bidirectional RRT* algorithm, respectively, enabling faster convergence and improving the efficiency of path planning.
The above studies mainly focus on accelerating the convergence speed of path planning, reducing the length and time of the generated path, and improving the success rate of path generation in complex environments. However, there has been relatively little research on the feasibility of the generated path in complex environments and on planning a flyable path in the presence of potential obstacles. Recently, Gao et al. [
21] proposed CE-Bi-RRT*, a bidirectional RRT* algorithm with a cooperative expansion strategy, and applied cubic Bézier curves for path smoothing. Sheng et al. [
18] proposed AB-APF-RRT*, which integrates artificial potential fields into bidirectional RRT* search and uses cubic spline interpolation for path smoothing. A comprehensive survey by Zhou et al. [
22] highlights trajectory optimization as a critical component of UAV motion planning, particularly for ensuring smooth and dynamically feasible paths. Trajectory optimization methods, such as minimum-snap or model predictive control (MPC), formulate path planning as an optimization over time, producing smooth trajectories that satisfy dynamic constraints. However, they typically require a feasible initial guess and can be computationally intensive for real-time obstacle avoidance in cluttered environments. In contrast, our approach does not perform time optimization; instead, it generates a curvature-continuous geometric path that is kinematically feasible and can be tracked by any low-level controller. This decoupling keeps the planner lightweight and suitable for real-time replanning. However, the aforementioned methods primarily focus on global path optimization or local obstacle avoidance, and they do not explicitly address curvature continuity (
constraints) at segment joints, which is essential for the dynamic flyability of UAVs. In [
23,
24,
25], the authors used Bézier curves to optimize the pre-planned global path. Nevertheless, the flyability of the optimized path remains relatively low, and there are still some shortcomings in terms of curvature constraints, path turning-point optimization, and real-time obstacle avoidance.
Among the various RRT variants, several have become standard benchmarks in modern UAV path planning. RRT* [
26] introduces a rewiring procedure that guarantees asymptotic optimality, but its convergence is slow and the generated path remains piecewise linear, which does not satisfy the curvature continuity required for UAV flight. Theta-RRT (originally named Theta-RRT) proposed by Palmieri et al. [
27] hierarchically combines discrete any-angle search with continuous RRT motion planning, finding shorter trajectories faster than RRT and RRT*; however, it does not explicitly enforce curvature constraints, which may lead to abrupt turns that exceed the UAV’s dynamic limits. FN-RRT* (also known as RRT*FN) proposed by Adiyatov and Varol [
28] limits memory consumption by bounding the tree size while preserving near-optimal path quality, yet it inherits the piecewise-linear nature of RRT and cannot guarantee continuous curvature at segment joints. These algorithms have been widely adopted as benchmarks in recent UAV path-planning research [
29,
30]. Nevertheless, they share common limitations: the lack of curvature continuity and the inability to generate dynamically feasible paths. These same issues also plague global and piecewise Bézier optimization methods, which either cause re-collision after smoothing or produce curvature discontinuities at connections.
To address the above shortcomings, this paper proposes an optimization method that combines the RRT algorithm with Bézier curves for real-time path planning in UAV logistics delivery. First, an environment model for logistics delivery is constructed. The relatively complex urban environment model is simplified into a two-dimensional planar map, and various types of obstacles are processed into simple geometric shapes. Then, an improved RRT algorithm based on Bézier curves is proposed to address path smoothness and real-time obstacle avoidance, establishing a planning system that can avoid obstacles in real time and generate smooth, flyable paths. In the simulation section, we quantitatively compare our algorithm not only with traditional RRT and global/piecewise Bézier optimization methods but also with the above modern RRT variants (RRT*, Theta-RRT, and FN-RRT*). The simulation results demonstrate the advantages of the proposed algorithm in terms of real-time obstacle avoidance, path smoothness, curvature continuity, and overall flyability.
3. Improved RRT Algorithm Based on Bézier Curves
When existing studies apply Bézier curves to optimize the path generated by the traditional RRT algorithm, they typically first use the RRT algorithm to generate a complete path. Then, they perform a global Bézier curve optimization on the entire path [
31,
32]. However, this optimization method may lead to collision problems after optimization. Specifically, the RRT algorithm usually considers obstacle avoidance when generating the initial path. Nevertheless, during global path optimization, the endpoints of the generated RRT segments are directly used as the control points of the Bézier curve. As a result, the original path may successfully avoid obstacles, but after optimization, it may collide with them. This situation is illustrated in
Figure 5.
To address the above issue, this paper performs a point-by-point Bézier curve optimization. The two endpoints of a segment on the original path are used as the start point and end point of a Bézier curve. Then, two control points are randomly generated between these two points to form a third-order Bézier curve. During the generation process, a collision test is performed for each curve segment. When no collision occurs, the curve is selected for generation, thereby avoiding the post-optimization collision problem that occurs in global optimization.
However, this method still has its limitations, as shown in
Figure 6. After piecewise optimization, the curvature at the connection points of the generated curve may change abruptly. Moreover, due to the randomness of the generated control points, the curvature of a single curve segment often does not satisfy the curvature requirements for UAV flight in practical situations.
Therefore, to address the above issues, this paper proposes the following specific comprehensive improvement method:
3.1. Smoothing at Curve Segment Connections Based on Global Curvature Constraints
To satisfy the continuity of the tangent slope and curvature of the generated path at the connection points, this paper imposes continuity and continuity constraints at the curve connections.
continuity: the first derivatives of the two curves are continuous at the connection point, meaning that both the tangent direction and the velocity are continuous.
continuity: the second derivatives of the two curves are continuous at the connection point, meaning that both the curvature and the curvature change rate are continuous.
According to the formula for the first derivative of a Bézier curve:
Here,
are the control points of a cubic Bézier curve, and
denotes its first derivative.
To satisfy the requirement that the first derivatives of the two curves at the connection point are equal, the following condition must be met:
Then, from the above formula, we obtain the control point constraint, i.e., . Furthermore, since the two curves satisfy the continuity condition, we have , and the coordinates of the first control point can be obtained as . The first control point of the subsequent curve must lie at a position symmetric to the previous control point with respect to the connection point .
According to the formula for the second derivative of a Bézier curve:
is the second derivative.
If the second derivatives of the two curves at the connection point are equal, then the following condition must be satisfied:
The constraint for the control points needs to satisfy:
Therefore, the second control point of the second curve can be determined.
As shown in
Figure 7, to ensure a smooth connection between the generated curve and the previous curve while maintaining consistent tangent slope and curvature, when selecting the control points for the second Bézier curve, the endpoint
of the curve
is the new node. The start point
of the curve needs to coincide with the endpoint
of the previous curve. This node is the parent node of the new node corresponding to this curve segment and is also the closest node in the search tree
. Then, the two control points
and
are determined based on the
and
constraints. Thus, once
and
are determined under the
and
constraints, the second Bézier curve segment is fully specified.
3.2. Obstacle Avoidance Judgment and Curvature Constraint Design Based on Sampling Points
- (1)
Obstacle avoidance judgment based on sampling points
As shown in
Figure 8, the discrete sampling detection method performs discrete sampling at regular intervals on the planned path of the UAV to obtain a series of sampling points. Then, collision detection is performed for each sampling point. For circular obstacles, a geometric detection method is used to calculate the distance from the sampling point to the center of the circle. For rectangular obstacles, it is determined whether the sampling point is inside the rectangle. However, the accuracy of this method depends on the sampling interval. A smaller sampling interval leads to higher detection accuracy, but the computational complexity also increases accordingly.
First, a certain Bézier curve is divided into
N sampling points with a fixed step size of
. Assuming the horizontal axis range of the Bézier curve segment is
, then:
Here,
N is the number of sampling points per Bézier segment, and
is the sampling step. In this work, we set
.
Each point
is substituted into the Bézier curve formula to calculate the corresponding coordinates
. In this paper, the coordinates of each division point corresponding to the third-order Bézier curve are:
Then, collision detection is performed based on the set of sampling points generated with the step size, i.e.,
, to determine whether these points are inside the obstacles. For rectangular obstacles, it is determined whether each point in the point set meets the criteria.
Let and be the horizontal coordinates of the lower-left and upper-right endpoints of the rectangle, respectively, and let and be the vertical coordinates of the lower-left and upper-right endpoints of the rectangle, respectively.
For circular obstacles, it is determined whether the distance between a point in the point set and the center of the circle is less than or equal to the radius of the circular obstacle. If none of the points in the point set lie inside the obstacle, the Bézier curve is considered not to collide with the obstacle.
- (2)
Curvature constraint design based on sampling points
From Equations (
3) and (
5), the cross product of the first derivative and the second derivative of the Bézier curve at any sampling point can be obtained:
.
In a two-dimensional plane, the cross product of vectors
and
is a scalar, i.e.,
. Therefore:
Finally, substitute the above equation into the general curvature formula:
denotes the curvature at parameter
t, and the maximum allowable curvature is
.
The curvature at a specific point is obtained as follows:
Substitute the sampling point set into the above curvature formula to obtain the curvature at each sampling point. If the curvature at all sampling point is less than the maximum curvature, the curve is considered to satisfy the curvature constraint. Otherwise, the curve fails the curvature constraint detection.
- (3)
Implementation of curvature check within the RRT expansion loop
In our implementation, the curvature check is integrated into the RRT expansion loop as follows: For each candidate Bézier segment defined by the parent node
and the randomly sampled child node
, two intermediate control points
and
are randomly generated within the bounding box between
and
. The curve is then sampled at
equally spaced points using Equation (
9). For each sample point, the curvature
is computed using Equation (
13) by evaluating the first and second derivatives of the cubic Bézier curve. If any sample point lies inside an obstacle (checked via the environment collision model described in
Section 2.3) or its curvature exceeds the predefined threshold
, the segment is rejected and the current expansion attempt is discarded. Only segments that pass both checks are added to the search tree. This process corresponds to the segment generation step in the pseudocode of Algorithm 1. The total time for Bézier fitting and curvature checks over the whole path is reported in
Table 1 (see the “Bezier/Curv” column). The choice of
is justified by the sensitivity analysis in
Section 3.3 which shows that for
the collision detection error drops below 1% while computation time remains acceptable.
| Algorithm 1 An improved RRT algorithm based on Bézier curves |
Input: start: coordinates of the starting point; goal: coordinates of the target point; max_try: maximum number of attempts; max_dist: maximum attempt distance Output: a flyable path from start to goal - 1:
add start to closed_list - 2:
for i in max_try do - 3:
get a random node in the map - 4:
if in closed_list then continue - 5:
else - 6:
get the nearest node to from closed_list - 7:
, mid1, mid2 ← get_new_node() - 8:
end if - 9:
if then - 10:
add to closed_list - 11:
add mid1, mid2 to control_points - 12:
dist ← calculate the distance between and goal - 13:
if dist < max_dist and not is_collision(, goal) then - 14:
connect and goal - 15:
add goal to closed_list - 16:
extract path points (every point and its control_points) from closed_list - 17:
end if - 18:
end if - 19:
end for
|
3.3. Parameter Sensitivity Analysis
The proposed algorithm involves three key parameters: the number of sampling points per Bézier segment
N (which determines the sampling interval
), the curvature threshold
, and the maximum extension step size
(denoted as
max_dist in Algorithm 1). The implementation of the curvature check with
is detailed in
Section 3.2. To help users select appropriate values for new environments, we analyze the influence of these parameters on collision detection reliability, computation time, success rate, and path quality.
- (1)
Effect of sampling density N: Collision detection is performed by evaluating
N discrete points on each Bézier curve (see Algorithm 1). We evaluated
against a dense ground truth (
). The total error (false positives and false negatives) drops below
when
. Computation time scales linearly with
N;
incurs about
ms per collision check, while
increases the cost to
ms with negligible accuracy gain. The total time for Bézier fitting and curvature checks over the whole path is reported in
Table 1 (see the “Bezier/Curv” column). We recommend
as a practical trade-off. For environments with very thin obstacles, a larger
N (e.g., 40 or 50) can improve safety at the expense of higher computational load.
- (2)
Effect of curvature threshold : We varied
from
to
m
−1 in the medium-density obstacle environment. The success rate increases from about
at
m
−1 to over
at
m
−1, saturating beyond
m
−1. Meanwhile, the average path length grows by less than
when
is relaxed from
to
m
−1. The actual maximum curvature observed on the generated paths stays close to the threshold (e.g., mean
m
−1 for
m
−1, as reported in
Table 1). Therefore,
m
−1 provides a good balance between feasibility and path quality. For UAVs with tighter turning radius constraints (e.g., fixed-wing platforms),
m
−1 can be used, albeit with a lower success rate in dense environments.
- (3)
Effect of step size : We tested
m. A smaller step size (
m) yields a denser tree and tends to produce smoother curves, but increases the average planning time by about
. A larger step size (
m) accelerates the expansion at the cost of coarser paths and slightly higher curvature (mean
increases by approximately
m
−1). In our experiments we used
m as a reasonable compromise; the resulting planning time and path quality are reported in
Table 1.
Practical guidance for parameter selection in a new environment:
Default values: , m−1, m.
If success rate is low: Increase (up to m−1) or increase max_try; if the environment contains very narrow passages, increase N to 40–50.
If smoother paths are required (e.g., for fixed-wing UAVs): Decrease to 15 m or decrease to – m−1, but be aware of a possible success rate reduction.
If planning time is critical: Increase to 25 m and keep ; avoid increasing N beyond 30.
3.4. Algorithm Workflow Design
The specific algorithm is shown in Algorithm 1 (Pseudocode of the proposed algorithm.).
4. Numerical Simulation and Analysis
In this section, the fusion algorithm of RRT and Bézier curves is used to simulate UAV flight in various obstacle environments to verify the flyability of the path generated by the improved algorithm.
All experimental simulations were run on a PC equipped with an Intel(R) Core(TM) i7-14650HX processor, 8 GB of RAM, and the Windows 11 operating system. This hardware configuration meets the computational requirements of the experiments and ensures that the algorithm completes the path-planning process within a reasonable time. All experiments were conducted in the Python 3.10 environment, using efficient libraries for numerical computation, data processing, and visualization.
4.1. Scenario Modeling
In this section, two satellite images are captured as realistic prototypes of obstacles used in the simulation environment, including buildings of various shapes [
33,
34]. The rectangular and fan-shaped obstacles are simplified into rectangles and circles, respectively. The non-convex irregular obstacles are simplified into rectangles, and the polygonal obstacles are also simplified into rectangles. This is shown in
Figure 9.
The simplified obstacles are placed into the same virtual environment, and the starting point and target point of the path are marked on the virtual map. Then, a coordinate system is constructed in units of ten meters, and the virtual map environment is gridded to represent the coordinates of points in the space occupied by obstacles, as well as the coordinates of the starting point and target point.
4.2. Real-Time Obstacle Avoidance Verification
When planning the route of a UAV, the planning is typically based on prior environmental information. First, the improved RRT algorithm integrated with Bézier curves is used to generate an initial route. After the starting point and target point of the path are determined, a simple flyable path smoothed by a third-order Bézier curve is plotted, as shown in
Figure 10.
When a sudden obstacle is detected during UAV flight, as shown in
Figure 11, the UAV encounters an unexpected obstacle at position
. The UAV first captures the contour of the obstacle through its lidar and visual SLAM system, updates the obstacle to the global coordinate system, and refreshes the environmental grid map. Then, it re-plans the route for the updated environment, the starting point, and the target point, as shown in
Figure 12 and
Figure 13.
All path figures in this section show a typical outcome from 50 independent runs; statistical results are summarized in
Table 1.
As can be seen from the figures, the improved RRT algorithm can effectively avoid sudden obstacles in real time and promptly plan a new flight path in various situations where unexpected obstacles are detected.
4.3. Feasibility Verification in Environments with Different Obstacle Densities
To verify the performance of the proposed path-planning algorithm, low-, medium-, and high-density obstacle distribution scenarios were constructed on the simulation platform. The proposed algorithm was applied to these three scenarios and successfully generated a smooth and flyable route, as shown in
Figure 14 below.
4.4. Comparison with Other Algorithms
When exploring solutions to the path-planning problem, this paper conducts an in-depth study of the traditional RRT algorithm and proposes an improved algorithm based on it. Compared with the traditional algorithm and several other optimization methods based on it, the proposed improved algorithm has significant advantages in terms of the flyability of the planned route.
Figure 15 shows the route planned by the traditional RRT algorithm, which consists of multiple polyline segments. Not only is the smoothness insufficient to meet the flyability requirements of the UAV, but also the rate of change in the turning angle at the connection points is too strict for the acceleration rate of the UAV to satisfy the requirements of flying along the path in actual flight.
Figure 16 shows the method of applying Bézier curves to global path optimization, which greatly improves the smoothness of the generated route. However, since the smoothing optimization process is performed after the entire route is generated, there are always cases where the optimized path collides with obstacles again.
Piecewise Bézier curve optimization solves the problem of re-collision with obstacles after smoothing in global path optimization. However, when generating intermediate curve segments, the connection points of the Bézier curve segments are not processed, and the acceleration of the UAV is not considered, which limits the curvature. As a result, the curvature at the connection points and curve segments may change abruptly, as shown in
Figure 17.
The improved RRT algorithm proposed in this paper generates a route that can avoid obstacles in real time during flight, while optimizing the overall smoothness of the path as well as the smoothness and curvature at the connection points, enabling the UAV to successfully fly along the generated route. The effect is shown in
Figure 18.
4.5. Quantitative Performance Comparison
To rigorously evaluate the proposed algorithm, we conducted 50 independent runs in a medium-density obstacle environment (map size
m, start
, goal
). Seven algorithms were compared. The following metrics were recorded: success rate (SR), collision rate (CR), path length (mean ± std), maximum curvature (
, mean ± std), total planning time (ms, mean ± std), RRT tree building time (ms, mean ± std), Bézier fitting and curvature check time (ms, mean ± std), and smoothness (curvature integral
, mean ± std). The results are summarized in
Table 1.
All data are obtained from 50 independent runs in our simulation environment. The results are presented as mean ± standard deviation.
The proposed algorithm achieves 100% success rate, whereas the global Bézier method suffers from 18% collisions after smoothing. Our algorithm produces paths with substantially lower maximum curvature (
m
−1) compared to other methods (which typically exceed
m
−1), confirming its superior smoothness and compliance with curvature constraints. The average total planning time of our algorithm is
ms, which is higher than the fastest baselines (e.g.,
ms for Traditional RRT) but still acceptable for real-time applications where path quality is prioritized. The majority of this time (
ms) is spent on Bézier fitting and curvature checks, reflecting the computational cost of enforcing strict curvature constraints. For time-critical scenarios, parameters such as the sampling density
N can be reduced to trade off accuracy for speed (see
Section 3.3).
Decomposition of planning time: Over 50 independent runs, the average total planning time of our algorithm is ms. The Bézier fitting and curvature check time accounts for ms, while the RRT tree building time is only ms. This confirms that the smoothing procedure is the dominant factor, but it is necessary to achieve the significant reduction in path curvature. The raw timing data for each run are available from the corresponding author upon request.
4.6. Theoretical Analysis of Path Feasibility Under Kinematic Constraints
Before proceeding, we clarify three related concepts:
Path feasibility: the geometric path (sequence of waypoints) is collision-free.
Kinematic (dynamic) feasibility: The path respects the UAV’s motion limits, such as maximum curvature (minimum turning radius) and maximum acceleration. Our method explicitly enforces curvature continuity ( and ), which guarantees kinematic feasibility.
Trajectory tracking: A low-level control problem of following a time-parameterized trajectory. This paper focuses on generating a kinematically feasible path as a reference for a separate tracking controller.
In robotics, path planning and trajectory tracking are two decoupled problems. The path planner generates a reference path that satisfies kinematic constraints; a low-level controller subsequently tracks that path. Therefore, validating a path planner only requires demonstrating that the generated path can theoretically meet the UAV’s physical limits—full flight control simulation is not necessary.
- (1)
Satisfiability of Curvature Constraints
A typical fixed-wing or heavy-lift logistics UAV (e.g., DJI M600) has a minimum turning radius of approximately 5 m, corresponding to a maximum curvature . Our algorithm defaults to to maintain a high success rate in cluttered environments, yielding an actual mean curvature of m−1, which is well within the lateral acceleration limits of multirotor UAVs. For applications requiring , the curvature threshold parameter can be lowered; this will reduce the success rate in dense environments but still generate feasible paths where possible.
Section 3.2 provides the curvature calculation formula for Bézier curves. Because our method explicitly enforces
continuity between consecutive Bézier segments, the curvature is continuous at the joints and no spikes occur. In practice, one can further adjust the control points or increase the sampling density to ensure that the entire path satisfies
. In contrast, global RRT + Bézier and piecewise RRT + Bézier lack curvature constraints and are prone to curvature violations at the joints. Thus, our algorithm provides a feasible theoretical framework for satisfying curvature constraints.
- (2)
Lateral Acceleration Feasibility
Assuming a typical cruise speed , the required lateral acceleration is . If the path curvature satisfies , then , which is far below the typical limit of multirotor UAVs. Therefore, as long as the generated path meets the curvature constraint, its dynamic feasibility is guaranteed. The curvature controllability of our algorithm lays the foundation for satisfying this condition.
4.7. Software-in-the-Loop Validation with JMavSim
To further verify the flyability of the planned path in a realistic control loop, we conducted software-in-the-loop (SITL) simulations using the jMavSim simulator, which is officially supported by the PX4 autopilot ecosystem. The simulation environment is identical to that described in
Section 4.1 (map size
m, start
, goal
, with the same rectangular and circular obstacles). The planned Bézier path was sent to the simulated PX4 autopilot via MAVLink, and the UAV executed the path using the native position controller.
Figure 19 shows a snapshot of the simulation. Throughout the flight, the UAV remained stable, closely followed the reference path, and successfully avoided all obstacles without any collision. This SITL validation demonstrates that the planned path is dynamically feasible and can be accurately tracked by a standard autopilot.