As previously mentioned, traditional path planning algorithms for underwater 3D scenarios suffer from low search efficiency, poor path quality, and insufficient adaptability to dynamic environments. To address these issues, this paper proposes an improved path planning framework for AUVs, where the overall workflow is illustrated in
Figure 1. The improved algorithms jointly introduce an obstacle avoidance weight mechanism to accommodate the directional distribution characteristics of underwater obstacles. They also employ multi-round greedy pruning combined with linear interpolation as a unified path post-processing strategy. Additionally, they support periodic collision detection and dynamic replanning to cope with environmental changes. Within this unified framework, we introduce targeted optimizations for Informed-RRT*. These include hybrid ellipsoidal sampling, adaptive iteration, and local planning modes. For LazyTheta*, we introduce a collision detection caching mechanism. Both algorithms jointly adopt the obstacle avoidance weight guidance and multi-round greedy pruning strategies, thereby significantly improving computational efficiency and environmental adaptability while ensuring planning quality.
3.1.1. General Improvement Strategies
a) 3D Safety Margin Collision Detection Based on FCL: To address the issue of the planner neglecting the physical dimensions of the robot, this study adopts OctoMap as a probabilistic occupancy grid representation for the 3D environment [
30], combined with the Flexible Collision Library (FCL) to perform efficient collision queries on OctoMap voxels. The BlueROV2 is modeled as a cuboid collision volume with dimensions
, and a safety margin
is applied. The actual collision envelope of the robot is given by:
Given the robot pose
, the collision volume in the world coordinate frame is represented as:
where
is the rotation matrix and
is the translation vector.
As shown in
Figure 2, this improvement ensures that the planned path maintains a safety distance of no less than
from obstacles at all times, guaranteeing that the path is collision-free under the dual assurance of the robot’s actual geometric constraints and the safety margin. This fundamentally addresses the safety hazards caused by the mass point assumption.
b) Online Monitoring and Replanning Based on OctoMap: Underwater environments are dynamic, and the OctoMap is continuously updated as sonar perception progresses. Traditional algorithms perform only a single offline planning and cannot perceive the collision status of the path after map updates. When a planned path becomes invalid due to the emergence of new obstacles, the system lacks an autonomous response mechanism, posing serious safety hazards. To address this, this paper designs an online trajectory monitoring and replanning module. This module periodically detects the collision status between the currently executed path and the latest OctoMap at a configurable frequency (default 2 Hz).
For a trajectory consisting of
n waypoints
, the system uses the 3D Bresenham algorithm for discretized collision detection. For the line segment
, the algorithm samples uniformly along the segment. The positions of the sampling points are:
Here, the number of samples is
, and the sampling interval
is set according to the robot dimensions:
In this study,
. At each sampling point
, the orientation is computed via spherical linear interpolation (slerp):
The robot collision volume is then constructed, centered at
with orientation
and dimensions
. If the collision volume at any sampling point intersects with an obstacle, the path is considered to be in collision. The system immediately initiates replanning from the current robot position by invoking the corresponding planner to regenerate a safe and feasible path, thereby ensuring the safe navigation of the vehicle in complex dynamic environments. As shown in
Figure 3, online path monitoring and replanning can effectively respond to dynamic updates in unknown environments.
c) Obstacle Avoidance Weight Mechanism: The spatial distribution of underwater obstacles exhibits significant anisotropic characteristics: reef clusters typically extend horizontally, while structures such as pipelines and anchor chains may be vertically oriented. Moreover, limited by the forward-looking sonar field of view of the underwater vehicle, the visible range of obstacles ahead exhibits the characteristics shown in
Figure 4. Traditional path planning algorithms, aiming to generate the shortest path, often tend to choose vertical detour paths around obstacles. However, if the underwater vehicle fails to detect newly identified obstacles in time, it is highly likely to cause collision risks.
To address this issue, we introduce an obstacle avoidance weight parameter . It uniformly regulates the tendency of the planning algorithm between horizontal and vertical obstacle avoidance. In practical application scenarios, when obstacles are predominantly vertically distributed, the parameter is set to a value close to 0, and the algorithm prioritizes horizontal obstacle avoidance strategies. Conversely, when obstacles are predominantly horizontally distributed, the parameter is set to a value close to 1, and the algorithm prioritizes vertical obstacle avoidance strategies. Through this parameter configuration, a safer path can be generated for the AUVs.
d) Path Post-Processing: Paths generated by traditional planning typically contain redundant waypoints with uneven density. Directly using such paths for trajectory optimization increases the subsequent computational burden. This paper adopts a multi-round greedy pruning strategy: first, starting from the initial point, it greedily skips as many intermediate nodes as possible; then, reverse optimization is performed from the goal point to further eliminate redundancy; finally, linear interpolation is applied to the pruned path to provide uniformly distributed waypoints for subsequent trajectory optimization. The number of interpolation points is determined by the path segment length and the maximum allowable path segment length
:
The positions of the interpolated waypoints are given by:
3.1.2. A Planner with Targeted Improvements
a) The Informed-RRT* Algorithm with Adaptive Sampling (A-IRRT*): The traditional Informed-RRT* algorithm uses fixed elliptical parameters that cannot dynamically adjust the sampling range based on the obstacle distribution in the underwater environment, making it difficult to achieve a balance between sampling efficiency and global search capability. On the other hand, it does not incorporate dimension sampling preferences tailored to the obstacle avoidance requirements of AUVs 3D navigation, failing to adapt to the anisotropic characteristics of horizontally or vertically distributed underwater obstacles.
To address these issues, we propose targeted improvements and theoretical optimizations to the Informed-RRT* algorithm. These combine the topological characteristics of the underwater 3D environment with the dynamic navigation constraints of the AUVs. The core contributions are twofold: First, we integrate general improvement strategies such as safety margin collision detection and obstacle avoidance weight mechanism into the algorithm framework. This ensures that the sampling and path generation process fully satisfies the geometric constraints and safety obstacle avoidance requirements of the AUVs. Second, we propose a stage-adaptive hybrid sampling strategy and a distance-adaptive iteration control mechanism. In the early stage of path search, it adopts a hybrid mode of relaxed ellipsoidal sampling and free space sampling to expand the effective exploration range. After obtaining an initial path, it switches to adaptive-parameter ellipsoidal sampling, while dynamically adjusting the maximum number of iterations based on the Euclidean distance from the start to the goal. This achieves a dynamic balance between sampling efficiency and path search completeness. The improved adaptive Informed-RRT* algorithm not only solves the problem of traditional Informed-RRT* easily falling into local optima but also further enhances the convergence rate in complex underwater 3D environments. It enables more efficient generation of initial feasible paths that satisfy safety constraints for AUVs. The specific implementation is as follows.
During the initial phase of path search, when no feasible path has been found, this design adopts a hybrid sampling strategy, performing relaxed ellipsoidal sampling with a probability of 60% and free space sampling with a probability of 40%. The initial major axis of the relaxed ellipsoid is set to , i.e., 2.5 times the Euclidean distance from the start to the goal, to expand the early exploration range. Free space sampling ensures that the algorithm can discover feasible regions behind obstacles. Once an initial path is found, the algorithm switches to the standard Informed sampling mode.
This study incorporates the obstacle avoidance weight parameter
into the planning algorithm to adjust the algorithm’s preference for obstacle avoidance in the horizontal and vertical directions. This parameter controls the shape of the ellipsoid along the Z-axis (vertical direction), thereby enabling dimensionally adaptive sampling. The sampling points are transformed from the ellipsoid coordinate frame to the world coordinate frame via the rotation matrix
:
where
are random sampling points within a unit sphere.
When , the vertical (Z-axis) sampling is compressed to zero, and the ellipsoid degenerates into a horizontal two-dimensional ellipse, prioritizing the search for planar paths to avoid vertical perception blind spots. When , the ellipsoid maintains its full 3D shape, allowing full utilization of vertical space for obstacle avoidance.
To balance computational efficiency and path quality, the maximum number of iterations is dynamically adjusted based on the distance between the start and goal points:
where
is the minimum number of iterations,
is the maximum number of iterations, and
is a distance threshold.
For short-distance planning tasks, the algorithm uses fewer iterations to improve real-time performance. For long-distance tasks, the number of iterations is increased to ensure path quality. Simultaneously, to enhance the connectivity of explored regions, the planner incorporates a local exploration mechanism into the sampling strategy, performing local sampling near existing nodes with a probability of 20%. This strategy facilitates denser connections around obstacle boundaries, thereby improving path quality.
|
Algorithm 1: A-IRRT* |
 |
b) Improved Lazy Theta* Algorithm (I-LazyTheta*): When the traditional LazyTheta* algorithm is applied to 3D underwater environments based on OctoMap, it requires performing FCL bounding box collision detection on a large number of grid nodes. Due to the high computational complexity of the FCL collision query mechanism based on convex hull intersection, combined with the fact that nodes in 3D grid scenes are frequently revisited during multi-path search processes, a significant number of redundant collision detection operations occur, resulting in ineffective consumption of computational resources [
31]. This problem is particularly prominent in dense obstacle scenarios and becomes the main bottleneck restricting the planning speed of the algorithm. Furthermore, the floating-point computation mode employed in traditional line-of-sight detection further increases computational overhead and reduces the overall efficiency of path search.
To address the above issues, we propose targeted improvements and optimizations to the Lazy Theta* algorithm. These combine the grid map characteristics of the 3D underwater environment with the search properties of Lazy Theta*. The core contributions are twofold. First, based on integrating general improvement strategies such as safety margin collision detection and obstacle avoidance weight mechanism, we propose a hash table-based collision detection result caching mechanism. Using the grid coordinate triplet
as the unique key, the completed FCL collision query results are stored in a hash table. For repeatedly visited nodes, the cached results are directly retrieved, thereby completely eliminating the computational overhead of redundant collision detection. The cache is cleared before each planning invocation to ensure consistency between the cached results and the dynamically updated state of the current OctoMap. Second, we introduce the 3D Bresenham algorithm into the line-of-sight detection process. It utilizes integer operations to replace traditional floating-point computations, enabling rapid line-of-sight occlusion judgment in discrete grids. This significantly reduces the computational complexity of line-of-sight detection [
32]. In dense obstacle 3D underwater scenarios, the improved Lazy Theta* algorithm substantially reduces the total time consumption of collision detection. It also enhances the computational efficiency of line-of-sight detection, thereby achieving a significant increase in planning speed. This better adapts to the real-time requirements of AUVs 3D path planning. The specific implementation is as follows.
|
Algorithm 2: I-LazyTheta* |
 |
The obstacle avoidance weight parameter
is integrated into the planning algorithm, and a heuristic function that decouples the horizontal and vertical directions is designed. Let the current node be
and the goal node be
. The weighted heuristic function is given by:
where the horizontal and vertical distances and weights are defined as:
Here,
is the obstacle avoidance preference parameter. When
, the cost of vertical movement is amplified by a factor of 11, and the algorithm tends to circumvent obstacles in the horizontal direction. When
, the cost of horizontal movement is amplified, and the algorithm tends to utilize vertical space for obstacle avoidance.
To maintain consistency between the heuristic function and the cost function, the movement cost from node
to node
is defined as: