3.1. Target Region-Guided Phased Dynamic Adaptive Sampling Strategy
3.1.1. Target Point Region Constraint
The traditional target bias strategy combines sampling with the target point as the sampling point and random sampling.
For random sampling, for example, in a 2D map of size 30 × 50, this paper adopts the following strategy to generate random points: Randomly select coordinates from a certain buffer area inside the map to determine the position of the point. Specifically, the range of the map in the x-axis direction is [0, 30], and the range in the y-axis direction is [0, 50]. A buffer distance delta is set. The x-coordinate of the random point is obtained by uniform random sampling in the interval [delta, 30-delta], and the y-coordinate is obtained by uniform random sampling in the interval [delta, 50-delta]. Finally, the random point is returned in the form of a node, whose coordinates are the sampled (x, y) coordinates. The buffer safety distance delta set in this paper is 0.5.
For target bias sampling, the confidence probability p is generally set to 0.8; for each sampling, a point α in the interval [0, 1] is taken, and the sampling strategy β is determined according to the value range of α.
In contrast, the improved bias strategy proposed in this paper combines random sampling with generating sampling points that can be directly connected to the target point within a circle with the target point as the center and radius R. The confidence probability is set to p; for each sampling, a point α in the interval [0, 1] is taken, and the sampling strategy β is determined according to the value range of α.
Among them, A is random sampling, B is sampling with the target point as the sampling point, and C is sampling with the target point region as the sampling area.
This sampling strategy can achieve rapid path generation by generating sentinel nodes for transit when the target point is severely occluded, as shown in
Figure 4. The sentinel nodes are a and b, which are generated by sampling in the target point area and can be directly connected to the target point. It is only necessary to judge whether they can be connected to the random sampling tree to quickly find the target. If only the target point is used as the sampling point, a large number of nodes will be generated in front of obstacles, and the target node can only be found by random sampling.
3.1.2. Phased Adaptive Sampling Strategy
The target point region constraint strategy guides sampling through a geometric region (circle), which is more robust than simple target point bias. However, its parameter, the confidence probability p, is fixed during each run, meaning it lacks the ability to respond to dynamic changes in the environment. For example, when obstacles in front of the target point are very dense, a fixed confidence probability may still generate a large number of invalid sentinel nodes even with target circular region sampling. For the Informed-RRT* algorithm, the sampling process can be divided into two stages: the exploration stage when no initial path is found, and the optimization stage when the initial path is found. For different stages, the generation of p should consider different perspectives, and different confidence probability generation methods should be adopted. Even in the same stage, p should be dynamically changed to improve the ability to respond to dynamic changes in the environment.
To this end, this paper proposes making the confidence probability p an adaptive variable deeply coupled with the algorithm’s search stage and real-time state.
In the exploration stage, when no initial path is found, the goal is to quickly discover a feasible solution. At this time, p should be dynamically adjusted according to search feedback (such as the number of consecutive failures) to maintain an intelligent balance between adhering to target orientation and random exploration.
In the optimization stage, after finding the initial path, the goal is efficient optimization. At this time, p should be linked to the current path quality and dynamically adjusted to maintain an intelligent balance between exploring new path topologies and optimizing existing paths.
When the algorithm fails to find a path for a long time in the exploration stage, reduce the probability p of target bias and increase the proportion of random sampling to avoid falling into local minima (e.g., when the target point is severely occluded).
p is initially set to a high initial value p
initial (e.g., 0.8). A failure counter is defined to record the number of consecutive target bias samplings that fail to expand tree nodes. Once the algorithm is stuck (i.e., failures increase), it indicates that the target direction may be severely occluded. At this point, the algorithm should automatically reduce its focus on the target and increase the intensity of random exploration. The following formula is used to dynamically calculate p:
where p
initial is the initial confidence probability (e.g., 0.8), λ is the attenuation coefficient controlling the speed of probability decline, failures is the number of consecutive failures, and p
min is the minimum confidence probability (e.g., 0.5) to ensure that a certain target orientation is always retained. If a sampling expansion is successful, the failure counter is set to half of its original value instead of resetting to 0, which can avoid the influence of accidental sampling success events on the current confidence probability in some dense obstacle situations.
- 2.
Adaptive Confidence Probability p in the Optimization Stage
After finding the initial path, the algorithm enters the optimization stage. The traditional Informed-RRT* algorithm and most of its improved variants completely restrict sampling to the elliptical subset. However, this study finds that there is still room for optimization in the search strategy at this stage. The size of the elliptical subset is determined by the current optimal path cost Cbest, which itself contains rich information about path quality.
When the area of the elliptical subset is large, it indicates that the currently found path C
best is long and the path has severe detours. This means there is significant optimization potential, and multiple distinct and shorter feasible paths may exist in the search space. At this time, the sampling strategy of the exploration stage should be implemented within the elliptical subset, as shown in Equation (7). The only difference is that the sampling at this stage is constrained within the elliptical subset.
Among them, A is random sampling within the ellipse, and B is sampling in the intersection of the target point region and the ellipse.
When the area of the elliptical subset is small, it indicates that the current path Cbest is already short and close to the global optimal solution. At this time, the most effective strategy is to concentrate resources on fine search near the existing path inside the ellipse to further shorten the path.
To match the sampling strategy in the optimization stage with the path optimization potential, this paper innovatively proposes that the sampling strategy in the optimization stage should be intelligently adjusted based on the current path quality, and designs an adaptive confidence probability adjustment method based on the size of the elliptical subset.
The sampling strategy in the optimization stage combines the sampling strategy of the exploration stage within the entire elliptical subset and randomly selecting a point on the existing optimal path to generate a new sample by random offset within a circle of radius r.
Set the confidence probability as p; for each sampling, take a point α in the interval [0, 1] to determine the sampling strategy β according to the value range of α, as shown in Equation (8):
Among them, A represents the sampling strategy for the exploration phase within the elliptical subset, while B denotes the biased sampling within the circle defined by the optimal path neighborhood radius r.
The confidence probability p is intelligently adjusted according to the quality of the ellipse, as shown in the following formula:
where C
best is the current optimal path length; C
min is the Euclidean distance between the start point and the end point, which is the theoretical lower bound of the path length; C
init is the length of the first feasible path searched by the algorithm, serving as the initial benchmark for path optimization; and β is the smoothing adjustment factor that controls the sensitivity of probability change with path quality.
When the path quality is poor (i.e., ) is close to ) with a large ellipse area), the ratio approaches 0, and the exponential term tends to 1. Consequently, . At this time, the algorithm adopts an exploration-phase sampling strategy within the elliptical subset with high probability to actively search for new paths that can greatly shorten the path length.
When the path quality is good (i.e., ) is close to with a small ellipse area), the ratio approaches 1 and the exponential term reaches its minimum value. In this case, . The algorithm then performs local biased sampling in the neighborhood of the current optimal path with high probability, focusing on fine-tuning the existing path to accelerate convergence toward the optimal solution.
The adaptability of the proposed formula to the variability and extreme cases of the initial solution is analyzed as follows.
, the first feasible solution obtained by the algorithm in the current scenario, inherently reflects the inherent difficulty and optimization potential of the scenario. The optimization space corresponds to the maximum theoretical reduction in path length for the given scenario. Taking this as the benchmark enables adaptive matching between the sampling strategy and the optimization potential of the scenario.
To cope with the variability and extreme cases of , a triple robustness guarantee mechanism is embedded into the algorithm design to fundamentally avoid pathological behaviors:
Hard boundary constraints of confidence probability (ultimate safety net) Equation (9) explicitly set upper and lower bounds for the confidence probability: and . Regardless of the variation in , the value of p is always restricted within this interval. This hard constraint acts as an ultimate safety net for all extreme cases, ensuring that the algorithm never exhibits pathological behaviors of over-reliance on a single sampling strategy under any circumstances.
Nonlinear smoothing property of the exponential function Equation (9) employs an exponential function for adaptive adjustment. The nonlinear characteristic of the exponential function naturally provides a smoothing effect, which effectively buffers fluctuations in . Through sensitivity analysis, the optimal smoothing factor is determined. This value enables the adjustment curve to be sufficiently sensitive to respond to changes in path quality while remaining smooth enough to resist random fluctuations of the initial solution.
Phase separation and independent operation mechanism is only used in the optimization phase, whereas the sampling strategy in the exploration phase is completely independent of . No matter when the initial solution is found, the dynamic confidence probability adjustment mechanism in the exploration phase operates stably to ensure rapid discovery of the first feasible path. This design confines the variability of the initial solution to the optimization phase without affecting the initial path-searching performance, which is critical for the algorithm.
Quantitative analysis and experimental validation are conducted for extreme cases:
Strong random-seed-induced variability of the first feasible solution: When is significantly suboptimal (), the normalized factor , and thus . The algorithm performs global exploration with an 80% probability to actively search for better path topologies, which matches our expected behavior. As gradually decreases, p rises smoothly and the proportion of local optimization increases progressively, achieving a natural transition from global exploration to local optimization.
When is close to When the first feasible solution is nearly optimal (), the normalized factor , leading to .
The algorithm performs global exploration with an 80% probability to actively search for superior path topologies, during which the value of rarely changes. Nevertheless, the 20% path optimization sampling ensures that the algorithm never abandons refinement entirely. Even if the initial solution is a local optimum, there remains an opportunity to discover a better global path.
To verify the feasibility of the above analysis under the condition where the initial solution is strongly affected by random seeds, 100 repetitive experiments are conducted in a complex obstacle environment of size
, with the results presented as follows (
Table 1):
The initial solution is indeed strongly affected by random seeds:
The absolute standard deviation of the average initial path generation time is 1.58 s, with a relative fluctuation as high as 54.67%. This is an inherent characteristic of all stochastic sampling-based algorithms and is entirely within normal expectations.
The final performance of the algorithm is extremely stable: Despite large fluctuations in the initial solution, the absolute standard deviation of the average final path length is only 4.42 m, corresponding to a relative fluctuation of merely 3.07%. This indicates that regardless of whether the first obtained solution is good or poor, the final path length stabilizes within the range of 139.43 m to 148.27 m after optimization by the proposed algorithm, achieving highly consistent path quality.
The overall runtime fluctuation is controllable: The absolute standard deviation of the average runtime for each valid experiment is 3.56 s, with a relative fluctuation of only 8.33%. This demonstrates that the overall computational time of the algorithm remains within an acceptably stable range without extreme outliers.
These results strongly verify that the triple robustness mechanism proposed in this paper (hard boundary constraints, exponential smoothing adjustment, and phase separation) can effectively eliminate random disturbances from the initial solution, compressing large-amplitude fluctuations in the initial stage into a narrow range for the final outputs, and guarantee the reliability of the algorithm in practical applications.
3.1.3. Proof of Probabilistic Completeness and Asymptotic Optimality of the Improved Sampling Strategy
Probabilistic completeness and asymptotic optimality are the core theoretical foundations of sampling-based path planning algorithms. In this section, we systematically prove that the phased dynamic adaptive sampling strategy proposed in this paper fully preserves all convergence properties of the original Informed-RRT* algorithm.
Preliminary Knowledge and Core Sampling-Related Convergence Conditions
We first define the two core convergence properties and the critical sampling-dependent conditions for the convergence of the original Informed-RRT* algorithm:
Definition 1 (probabilistic completeness). Let
denote the free configuration space. For any feasible path , if the probability that the algorithm finds at least one feasible path approaches 1 as the number of iterations , the algorithm is said to be probabilistically complete.
Definition 2 (asymptotic optimality). Let
be the cost of the globally optimal path, and be the cost of the optimal path found by the algorithm at the n-th iteration. If the probability that approaches 1 as , the algorithm is said to be asymptotically optimal.
At the sampling level, the convergence of the original Informed-RRT* algorithm relies on two indispensable core conditions:
Global sampling ergodicity: Any point in the free space can be sampled infinitely often.
Optimal region coverage: The region containing the globally optimal path is continuously sampled, ensuring that points on the optimal path have infinite chances to be sampled.
The phased dynamic adaptive sampling strategy in this paper strictly satisfies the above two core conditions, thus completely inheriting the convergence properties of the original Informed-RRT* algorithm.
Proof of Probabilistic Completeness for the Improved Sampling Strategy
Theorem 1. The proposed phased dynamic adaptive sampling strategy satisfies the requirement of probabilistic completeness.
Proof. The sampling strategy is divided into the exploration phase (no initial path obtained) and the optimization phase (initial path obtained), both of which satisfy global sampling ergodicity. □
Global sampling ergodicity in the exploration phase: Sampling in the exploration phase covers the entire free space , and only the confidence probability p of sampling within the target region is dynamically adjusted. According to the parameter settings in this paper, the minimum value of p satisfies . This means the probability of sampling the target region is always no less than 50%, and the probability of global random sampling is always no more than 50%.
By the Borel–Cantelli lemma, if an event occurs with a non-zero probability in each independent trial, it will occur infinitely often as the number of trials tends to infinity. Therefore, any point in has a non-zero probability of being selected in each global random sampling, and will inevitably be sampled infinitely often as
Global sampling ergodicity in the optimization phase: Sampling in the optimization phase is mainly concentrated in a dynamically shrinking elliptical region with the start and goal points as foci and the current optimal path length as the major axis. To ensure global sampling ergodicity, a global random sampling ratio of is retained in the optimization phase.
This indicates that even in the optimization phase, any point in still has a non-zero probability of being sampled. According to the Borel–Cantelli lemma, these points will be sampled infinitely often as .
In summary, whether in the exploration or optimization phase, the proposed sampling strategy ensures that any point in the free space can be sampled infinitely often, satisfying the core condition for probabilistic completeness.
Proof of Asymptotic Optimality for the Improved Sampling Strategy
Theorem 2. The proposed phased dynamic adaptive sampling strategy satisfies the requirement of asymptotic optimality.
Proof. The core of asymptotic optimality is to guarantee that any point on the globally optimal path can be sampled infinitely often, so that parent node reselection and rewiring mechanisms can gradually optimize path costs and eventually converge to the global optimum. The proposed sampling strategy ensures this from three perspectives. □
Global sampling ergodicity enables sampling of optimal path points: The proposed sampling strategy retains a global random sampling ratio in all phases. Accordingly, any point on the globally optimal path has a non-zero sampling probability and will be sampled infinitely often as , which meets the necessary condition for asymptotic optimality.
Dynamically shrinking elliptical region ensures continuous coverage of the optimal region: The sampling region in the optimization phase is a dynamically shrinking ellipse determined by the current optimal path cost . Since is monotonically decreasing, the size of the elliptical region decreases monotonically and finally converges to the minimal ellipse enclosing the globally optimal path.
This means the region containing the globally optimal path is always taken as the primary sampling area, and more sampling resources are allocated to this region. This does not undermine asymptotic optimality; on the contrary, it accelerates the exploration of the optimal path and enables the rewiring mechanism to discover superior path topologies more rapidly.
Path-neighbor biased sampling does not damage convergence: The path-neighbor biased sampling introduced in the optimization phase only allocates partial sampling resources to the neighborhood of the current optimal path, without eliminating global random sampling. Hence, it does not affect global sampling ergodicity or cause the algorithm to fall into local optima.
In conclusion, the proposed sampling strategy ensures that any point on the globally optimal path can be sampled infinitely often, satisfying the core condition for asymptotic optimality.
3.2. Adaptive Step Size Guided by Gravity–Repulsion Synergy
In the traditional Informed-RRT* algorithm, the sampling step size is designed as a fixed value. If the candidate node Xnew generated with this step size collides with obstacles, this sampling will be directly invalidated. This mechanism is prone to generating a large number of invalid samples, resulting in a lack of random tree nodes and sparse distribution, making it difficult to efficiently complete initial path generation and subsequent path optimization.
Most existing improvement schemes for step size only adopt passive adjustment methods such as binary halving sampling and dynamic scaling of step size according to the number of iterations or collisions, which always stay at the shallow optimization level of step size values. Such methods completely fail to start from the essence of spatial geometric constraints and explore the positional relationship among the nearest node, random node and obstacles. They cannot fundamentally avoid invalid sampling and accurately guide the generation of effective nodes, thus making it difficult to solve the core problems of low sampling efficiency and poor path planning performance in complex obstacle environments.
To this end, this paper proposes an adaptive step size strategy guided by gravity–repulsion synergy [
23,
24,
25], which integrates the gravity–repulsion idea of the artificial potential field method with the sampling direction guidance mechanism. It innovatively focuses on the positional relationship among the nearest node, random node and obstacles, and realizes dynamic step size adjustment through only two core collision detections. While ensuring environmental adaptability, it controls the time complexity at the O (1) level, greatly improving sampling efficiency, as shown in
Figure 5.
First, define the core parameters: let be the node closest to the random sampling point in the random tree (extendable to for 3D scenarios); is the initial step size between Xnear and Xrand (i.e., the Euclidean distance between the two points); is the preset maximum step size (to avoid collision risks caused by excessive step size); is the preset minimum step size (to avoid iterative redundancy caused by too-small step size); is the shortest distance from the nearest obstacle on the path to Xnear; is the gravity coefficient (adjusting the guidance strength of the sampling point distance on the step size); is the repulsion coefficient (adjusting the constraint strength of obstacles on the path on the step size); is the collision detection function (returns 0 when there is no conflict and 1 when there is a conflict); and is the finally generated effective sampling node.
The specific process and core formulas of the adaptive step size guided by gravity–repulsion synergy are as follows:
Step 1: Calculation of initial step size and basic direction. First, calculate the initial step size
between
and
; the formula is:
At the same time, calculate the basic direction vector
from
to
; the formula is:
Step 2: Initial direct connection judgment and gravity–repulsion calculation. First, judge whether and can be directly connected without conflict: if , directly determine and complete this sampling; if there is a conflict, continue to perform gravity and repulsion calculation. Among them, gravity is generated by the sampling point , which is used to guide the step size to adapt to the direction of the sampling point, and its strength is proportional to the distance from to (the farther the distance, the stronger the gravity, and the step size tends to increase to fit the sampling direction); repulsion is generated by obstacles on the path , which is used to constrain the step size, and its strength is inversely proportional to the distance from the obstacle to (the closer the distance, the stronger the repulsion, and the step size tends to decrease to ensure safety).
Gravity strength
calculation formula:
where
is a small constant to avoid gravity being zero when
, and
is the Euclidean distance between
and
.
Repulsion strength
calculation formula: Obtain the distance
from the nearest obstacle on the path
to
along the path, and substitute it into the following formula to calculate repulsion:
where
is the preset safety distance. The core logic is that the closer the obstacle on the path
(the smaller
), the stronger the repulsion; when the obstacle distance on the path is less than
, abandon this sampling.
In this paper, the distance to the nearest obstacle along the path adopted for attractive–repulsive step size adjustment is precisely defined as the Euclidean distance from to the surface of the first obstacle along the direction of the line segment . If this line segment does not intersect any obstacle, .
All distance calculations are uniformly performed in the Cartesian workspace rather than the joint configuration space of the manipulator. This is the core design principle enabling the proposed algorithm to be efficiently extended to manipulators with arbitrary degrees of freedom (DoFs):
Distances in the workspace have explicit physical meaning, directly corresponding to the actual moving distance of the manipulator end-effector;
Calculation results are independent of the number of manipulator DoFs, ensuring cross-platform generality of the algorithm;
The exponential complexity of distance computation in high-dimensional configuration spaces is avoided.
Calculation Workflow for Different Scenarios
The Bresenham line traversal algorithm is used for distance calculation in all scenarios in this paper. As an efficient line traversal algorithm dedicated to discrete grid spaces, it uses only integer arithmetic with no floating-point computational overhead, and is a standard approach for collision detection in industrial robots.
The core idea of the Bresenham algorithm is to determine grids intersected by a straight line point-by-point via error-term accumulation:
Calculate the length differences in the line segment along the x- and y-axes (2D) or x-, y- and z-axes (3D).
Initialize the error term to 0 and start from the grid containing the starting point.
Add the directional length difference to the error term in each iteration. When the error term exceeds 0.5, move one grid in the corresponding direction and subtract 1 from the error term.
Repeat the above process until reaching the grid of the end point.
The advantages of this algorithm are as follows: it relies only on integer addition and comparison operations, achieving extremely fast computation; it traverses all grids actually crossed by the straight line without omission or repetition; and its computational complexity is only related to the length of the line segment, and completely independent of obstacle shape and complexity.
Since all obstacles are fixed and known in static environments, all grids are pre-classified into free grids and obstacle grids during environment initialization.
Prototype Experiments on 2D Grid Maps
The 2D Bresenham line traversal algorithm is implemented as follows:
Convert and into grid coordinates;
Starting from the grid containing , sequentially traverse all grids intersected by the line segment using the 2D Bresenham algorithm;
When the first obstacle grid is encountered, compute the Euclidean distance from the edge of this grid to , which is defined as ;
If no obstacle is detected after traversing all grids, set .
In a 2D grid with 1 m resolution, each traversal requires only 8–10 integer operations on average, with negligible computational overhead.
Simulation Experiments on Multi-DoF Manipulators
Following the exact same principle as the 2D scenario, the 3D workspace is discretized into uniform cubic grids, each pre-marked as free space or obstacle. Distance calculation adopts the 3D Bresenham ray-traversal algorithm, a direct extension of the 2D version with additional error-term calculation along the z-axis:
Convert and into 3D grid coordinates;
Starting from the grid containing , sequentially traverse all 3D grids intersected by the ray using the 3D Bresenham algorithm;
When the first obstacle grid is encountered, compute the Euclidean distance from the surface of this grid to , which is defined as ;
If no obstacle is detected after traversing all grids along the ray, set .
Handling of Arbitrary Non-Convex Obstacles
The grid-based method combined with the Bresenham algorithm inherently supports non-convex obstacles of arbitrary shapes without special processing:
Both convex and non-convex obstacles can be accurately represented by marking their spatial occupancy through 3D grids;
The ray-traversal algorithm only checks whether a grid is an obstacle, regardless of the specific shape and topological structure of obstacles;
Even for complex non-convex obstacles with holes and indentations, the algorithm can accurately locate the first collision point.
Step 3: Adaptive step size calculation and candidate node generation. Integrate the effects of gravity and repulsion to calculate the final adaptive step size
. Considering that gravity
is a proportional function of distance (the value may be large), normalization processing is introduced to ensure the rationality of step size adjustment. The formula is:
(Note: is the preset maximum gravity threshold, used to normalize to the interval to avoid step size runaway caused by excessive gravity; the min and max functions constrain the step size within the range ; and the term in the formula is associated with the distance characteristic between and . The farther the distance, the greater the normalized gravity, and the step size tends to increase; the term is associated with the distribution of path obstacles. The closer the obstacle, the greater the repulsion, and the step size tends to decrease. The two work together to achieve dynamic adaptation of comprehensive distance and obstacles.)
Based on the basic direction vector
and the adaptive step size
, generate the candidate node
; the formula is:
Step 4: Conflict verification and iteration termination. Perform collision detection on the candidate node (the second core detection), and judge the subsequent operation according to the return value of :
If (no conflict), determine and complete this sampling;
If (conflict), reduce the step size to 1/2 of the current , regenerate the candidate node and perform collision detection until the step size is less than (at this time, abandon this sampling).
3.3. Dynamic Boundary Smoothing Path Optimization Strategy Based on Dichotomy
Path cost optimization can be achieved by introducing the FindReachest process and CreateNode process of the F-RRT* algorithm. To further improve path smoothness, this paper proposes a smoothing improvement strategy based on the dichotomy algorithm to generate intermediate nodes q and p, whose core principle is shown in
Figure 6. The specific generation strategy is as follows.
First, define the core parameters: Let the key nodes of the original path be , , , and the centroid of the obstacle be ; denotes the Euclidean distance length of line segment , is the step size of the k-th dichotomy iteration, is the termination boundary of the dichotomy algorithm, is the search length of the k-th iteration; is the collision detection function, where when line segment conflicts with obstacles, and when there is no conflict; the finally generated boundary nodes are and the smooth intermediate nodes are , .
Step 1: Obstacle centroid localization. The centroid of an obstacle is its geometric center. If the obstacle is an n-sided polygon (with vertex coordinates
, and
), the calculation of its centroid
requires first solving the polygon area S, and then obtaining it through weighted summation. The formulas are as follows:
Step 2: Generation of boundary node x by binary search. Node x is located on line segment , with the goal of making line segment conflict-free with obstacles. The specific search process is as follows:
- (1)
Initial parameter calculation: First, calculate the total length
of line segment
(denoted as the initial length len); the formula is:
- (2)
Iteration initialization: Set the initial search length
to 1/2 of the total length of line segment
, and halve the step size
at the same time. The formulas are:
- (3)
Iteration adjustment: Starting from node a, search for a candidate point m along the direction of that is at a length of mid from node a. Judge the collision status of and adjust mid, then halve the step size len again. The formulas for step size update and mid adjustment in the k-th iteration are:
where
is the unit vector of line segment
. Through such binary search operations, the conflict-free
is obtained, and
can be obtained in the same way.
Step 3: Generation of smooth intermediate nodes p and q. Taking node x as the reference, solve for node p on line segment
via binary search to ensure that line segment
is collision-free. The length formula of line segment
is:
Then, taking node p as the reference, solve for node q on line segment
via binary search to ensure that line segment
is collision-free. The length formula of line segment
is:
The coordinate solving logic of nodes p and q is consistent with that of x and y.
Step 4: Smooth path construction. Replace node a in the original path with the generated intermediate nodes q and p, and construct new smooth line segments , , and . The line segment set of the final smooth path is: . Compared with the original path , the proposed path achieves improved smoothness and optimized obstacle proximity.