1. Introduction
The rapid development in autonomous driving technology has provided many conveniences to people’s lives and reduced traffic accidents [
1]. Among them, path planning is one of the core research areas of autonomous driving technology, aiming to plan a path for the vehicle to reach the destination safely and ensure the avoidance of obstacles [
2]. Although autonomous driving technology has been commercialized in some scenarios, it still faces greater challenges in path planning. In particular, there are avoidance of high-density obstacles under restricted and narrow working conditions, precise kinematic constraint handling, and real-time requirements. Path planning methods can be classified according to different technical means, including graph search-based methods, optimization methods, sampling-based methods, and machine learning methods. Among them, Dijkstra’s algorithm [
3] and A-star algorithms [
4,
5], as the classical algorithms of a graph search, need to preform a path search on a discrete map to find the optimal path. Optimization methods utilize mathematical optimization techniques [
6,
7], such as linear programming and nonlinear programming [
8], that are capable of handling complex dynamic environments and multi-objective constraints. Sampling-based methods such as RRT (Rapid Exploration Random Tree) and its variants [
9,
10] generate path candidates by random sampling and filter the optimal paths to be suitable for high-dimensional spaces and complex obstacle environments.
Dmitri Dolgov first proposed the hybrid A-star method, Sebastian Thrun et al., at Stanford University in 2008 [
11]. Hybrid A-star combines the A-star algorithm, which “takes obstacles into account without considering motion constraints”, with the Reeds–Shepp curve, which “takes obstacles into account without considering motion constraints”. The hybrid A-star combines the A-star algorithm “considering obstacles without motion constraints” with the Reeds–Shepp curve [
12] “considering motion constraints without obstacles”. Therefore, compared with other algorithms, the hybrid A-star is more suitable for trajectory planning at low speeds in restricted spaces. After years of development, hybrid A-star is improved to be applied in different working scenarios. Meng et al. [
13] enhance the performance of hybrid A-star algorithms through a safety-enhanced design and an efficiency-enhanced design. The safety-enhanced design integrates the Voronoi field potential function in the path search phase to better consider the safety of the path. The efficiency-enhanced design proposes a multi-stage dynamic optimization strategy that divides the path planning into multiple stages and performs dynamic optimization at each stage. The problem that the output paths of the hybrid A-star algorithm often contain unnecessary steering maneuvers, and the paths are close to obstacles, is addressed. Tang et al. [
14] propose a method that applies the concept of an artificial potential field to optimize the hybrid A-star algorithm. The generated paths not only satisfy the vehicle’s non-integrity constraints, but also smooth and maintain a comfortable distance from obstacles. Tian et al. [
15] proposed a hybrid A-star path planning method based on hierarchical clustering and trilateration to solve the problems of poor path smoothness and long paths of self-driving cars in narrow areas. The method uses the Prewitt operator to identify obstacle boundaries and discretize them; a single-link hierarchical clustering algorithm is used for obstacle clustering; a convex packet algorithm is used to envelop the clustered points and extend the car to solve the problem of a traditional hybrid A-star algorithm’s extension in U-shape obstacle clusters; and, finally, the node extension strategy is improved based on the method of trichotomies. Jing et al. [
16] proposed an enhanced hybrid A-star (EHA) algorithm to solve the problem of high computational cost or inability to find a suitable initial guess in narrow and complex environments. The EHA consists of four steps: first, the global rough trajectory is quickly obtained using traditional A; then, the driving corridor is constructed along the rough trajectory, and each channel node is evaluated; then, the channel boundary points are extracted; and finally, the boundary points are connected by hybrid A that generates a feasible initial guess for the OCP (Optimal Control Problem). Dang et al. [
17] improved the RS method in the hybrid A-star algorithm by providing multiple curvature choices to improve safety and introducing a cost function that evaluates the risk of collision and the cost of motion. In addition, by fine-tuning the motion primitives in the forward search phase, unnecessary turning points are reduced, resulting in smoother paths.
Numerous scholars mentioned above pin the hybrid A-star algorithm with different improvements, and there exists a significant improvement in path smoothing, search efficiency, and obstacle avoidance ability. However, for actual tracking control of its planned path, it is necessary to assign desired vehicle speed and acceleration to each discrete path point, i.e., speed planning. Therefore, this paper proposes a method to improve the search efficiency of the hybrid A-star algorithm while performing back-end processing on its planned trajectories. Smoothing of the hybrid A-star planned trajectories and mapping the planned speeds to discrete path points are realized. An optimal trajectory containing position, heading, speed, and acceleration is planned. The main major contributions and innovations of this paper are as follows:
Pre-processing using Dijkstra’s algorithm searches for the shortest path between the start and endpoints that can avoid obstacles. The hybrid A-star searches the path by calculating the estimated cost h(n) based on this shortest path to provide the correct direction guidance for the search. In addition, the node expansion strategy with variable step length and variable angle is designed according to the environment complexity and path completion.
Consider the smoothing cost, discrete path point compact cost, and path geometric similarity cost to construct the quadratic programming problem. By designing constraints to ensure the bit position continuity at the articulation of the forward and reverse segments, the segmental smoothing of the planned path is realized.
Design the speed planner according to the S-curve to carry out speed planning for the smoothed path, according to the characteristics of the path design speed planner adaptive system parameters’ adaptive strategy.
This paper consists of the following main sections in addition to this section: the second section describes the improvement in the hybrid A-star algorithm; the third section performs the back-end smoothing of the planning path; the fourth section is the velocity planning of the planning path; the fifth section validates the method proposed in this paper through simulations and experiments; and the last section gives the conclusions.
2. Improvement in the Hybrid A-Star Algorithm
Unlike the traditional search class algorithms Dijkstra and A-star algorithms, the hybrid A algorithm will consider the vehicle’s kinematic model constraints when performing the node expansion, which extends the two-dimensional planar search to the three-dimensional space [x, y, yaw], where yaw denotes the vehicle’s heading information, as shown in
Figure 1. Hybrid A is able to plan the continuous positional changes in the vehicle in a discrete grid, making it practical and accurate in restricted spaces and narrow environments. In order to improve the utility of the hybrid A-star algorithm in path planning, this paper improves both the node expansion method and the cost function calculation method based on the traditional hybrid A-star algorithm to improve search efficiency and path quality, where the path quality mainly refers to the path length and curvature change.
2.1. Improving Node Expansion
In terms of node expansion methods, short-distance mobility has better flexibility and obstacle-bypassing ability, but it leads to an increase in the number of node expansions. While long-distance mobility has poor obstacle avoidance ability, it can approach the target point faster and reduce the number of node expansions. In this paper, we redesign the node expansion strategy by introducing the concepts of environmental complexity and planning completion. The advantages of short- and long-distance mobility methods are combined.
As shown in
Figure 2 for the vehicle at the current node, set the current node as
. Traverse the raster range as a circle centered at the current node with radius r. Calculate the percentage of the circle occupied by obstacles
:
where
is the total number of grids in the circle; and
is the number occupied by obstacles; for each grid, whose centroid coordinates are
inside the circle, by calculating the distance from the center of the grid to the center of the circle
,
If
, the raster is determined to be inside the circle. Define the function
to describe the environment complexity. The complexity of the environment refers to the proportion of occupied rosters around the current node to the total number of rasters.
where
is the environmental complexity factor, and the Euclidean distance from the current node to the endpoint is
. Then, according to the environmental complexity and the planning progress, the dynamic extended distance step is defined as
where
is the base search step;
is the maximum search angle step;
and
are adjustment coefficients used to balance the environment complexity and path planning progress;
is the Euclidean distance from the current node to the starting point; and
is a small positive constant to avoid an infinite situation. Similarly, for the dynamic extended angle step,
where
is the base search angle step;
is the maximum search angle step.
When searching in three-dimensional space, the step length decreases when the complexity of the environment increases, ensuring a more detailed search in complex environments; when the distance from the target point is far, the step length is relatively large. To quickly approach the target point, and as the distance to the target point decreases, the step length gradually decreases to improve the accuracy of the path. Equations (4) and (5) demonstrate that when the distance to the target point is larger, and the environment is less complex, the step size of node expansion becomes more larger. To prevent overlooking small obstacles due to the large step size, we set upper limits for the search step sizes, and . These upper limits are adjusted based on the size of the vehicle.
Remark 1. The choice of parameters regarding the adjustment coefficients α and β is related to the degree of conservatism of the algorithm. A more significant α means that the complexity of the environment is scaled up accordingly, and the step size of the expansion becomes relatively more minor. The larger β means amplifying the distance from the current node to the endpoint, and the step size of the expansion becomes relatively more significant. These two coefficients constrain each other, and the algorithm’s performance can be improved by choosing appropriate parameters.
2.2. Heuristic Improvements
For search class algorithms, the heuristic function plays a crucial role in (1) guiding the search direction, (2) improving the search efficiency, (3) reducing unnecessary extensions, etc. Dijkstra’s algorithm, the classical method of search class planning, searches for paths based on the actual cost g(
n) from the starting point to the current node, so the search scope is wider and less efficient. At the same time, the A-star algorithm combines the actual cost g(
n) and the estimated cost h(
n) and guides the search direction by a heuristic function so as to improve the search efficiency. The heuristic for the hybrid A-star algorithm, combined with the heuristic for the A-star algorithm, is designed as f(
n) = g(
n) + h(
n). In this formulation, g(
n) represents the actual cost, incorporating penalties for the length to the parent node, steering, steering changes, and reversals. The estimation of the cost h(
n) includes the Manhattan distance from the current node to the target node and the length of the Reeds–Shepp curve [
18] connection between the current node and the target node. Both of these penalties ignore the presence of obstacles. In complex environments (e.g., regions with dense obstacles or complex terrain), these simple heuristics do not accurately reflect the actual optimal path. This leads to a decrease in search efficiency or the generation of suboptimal paths. In order to improve the search efficiency and planning accuracy of the hybrid A-star algorithm in a narrow space, the estimation cost h(
n) in it is improved:
where
is the Manhattan distance from the pre-point node to the target node, defining the end position as
:
Distance from the current node to the nearest discrete point in the shortest path
:
where dijstra_path is the set of discrete points in the shortest path pre-searched by Dijkstra. The length of the curve from the nearest discrete point to the target node
:
where
is the closest discrete point to the current node in the shortest path, as shown in
Figure 3, being a schematic diagram of each of the h(
n):
To ensure the planned path is optimal while meeting the vehicle’s kinematic characteristics and environmental constraints, a Reeds-Shepp curve is used to connect to the target point when the node expansion is close to the target, generating a smooth and feasible path. However, if the shape of the Reeds–Shepp curve at the end of the path is not considered when mixing the paths searched by the A-star, the curve at the end of the path will appear as a path with frequent reversals. The final design estimated cost h(
n) is
4. Speed Planning
The path planned by the hybrid A-star contains information about the position and heading of the path points. To obtain a trajectory that can be used for tracking, speed planning is required on top of the path. Since the proposed method in this paper targets the scenario of low-speed traveling under restricted working conditions, Double S-type speed planning is selected [
20].
Double S-type speed planning solves the problem of acceleration discontinuity by using a combination of two linear segments of intervals. Furthermore, parabolic transitions are used at the endpoints of the linear segments to ensure that the acceleration profile at the connection is continuous. The speed profile of Double S-type speed planning is shown in
Figure 6. The overall speed can be divided into three processes, “A”, “M”, and “D”, which are the acceleration phase (AP), maximum speed phase (MP), and deceleration phase (DP). A parabolic fit is used at the endpoints of the AP and DP segments, thus avoiding sudden changes in speed.
Speed planning parameters are constraints on the shape and trend of the speed profile, and different planning effects are realized through different parameter settings. The parameters in Double S-type speed planning can be divided into input parameters and system parameters. The input parameters are displacement at the planning start point, displacement at the planning endpoint, initial speed at the planning start point, and speed at the planning endpoint. The input parameters are set in real-time according to different path lengths to realize different dynamic speed planning. The system parameters are upper and lower speed limits (, ), limit acceleration (, ), and limit jerk (, ). The system parameters depend on the performance requirements and design specifications of the system, and they affect the response speed, stability, and accuracy of the mechanical system.
It is assumed that
; i.e., the vehicle is in the forward state for the starting and ending displacements. The speed planning problem is now derived based on this assumption.
Figure 7 shows the three phases of speed planning acceleration and acceleration changes in different phases of acceleration.
In
Figure 7,
is the high and low pulse time of the first stage;
is the high and low pulse time of the second stage;
is the time of the acceleration stage
;
is the time of the deceleration stage
; and
is the time of the uniform speed stage. In addition, the total planning time
. If a constant speed phase exists, the maximum speed of the actual plan
equals the set maximum speed. The actual planned maximum acceleration
. It is worth noting that not all planning parameters are amenable to Double S-type speed planning. In some limit cases, there is only acceleration or deceleration, i.e., one positive and one negative plus acceleration pulse. The basic condition for planning is to complete at least one “S” curve, and the time taken for a single pulse of the S-curve is
, which is categorized into two cases depending on whether or not the acceleration reaches the maximum acceleration during the run:
is taken as the minimum of the final failure to reach the maximum acceleration and the time to reach the maximum acceleration. Suppose the additive acceleration of the system is considered to be infinite. In that case, i.e., the maximum acceleration can be reached instantaneously at the starting point of planning, then there are the following plannable displacement constraints:
The ultimate goal of Double S planning is to rationalize the allocation of time among the three phases of A.M.D. to accomplish speed planning.
4.1. Calculation of Speed Planning Parameters
The key to accomplishing Double S-type speed planning is the calculation of the parameters, which need to be calculated as the time parameters , , , , and and the actual running parameters and .
4.1.1. Time Parameter
The time parameter calculation is divided into two cases:
That is, the existence of a homogeneous phase and the absence of a homogeneous phase throughout.
(1) Assuming that the (
,
) segment exists, first determine whether the accelerated segment reaches the maximum acceleration and then calculate. Calculate the parameters of the segment:
If Equation (30) holds, i.e., the maximum acceleration has not been reached, and there is no uniform phase,
If Equation (31) does not hold, i.e., the planning process reaches the maximum acceleration,
On
segment parameter calculation,
If Equation (36) holds, the maximum deceleration has not been reached, and there is no homogeneous segment:
If Equation (36) does not hold, the maximum deceleration is reached:
According to
, the uniform time is
.
4.1.2. Actual Operating Parameters
In determining the time, this parameter is divided into a variety of scenarios, so in the system, parameters may change under the current time parameters. To ensure the feasibility of speed planning, it is necessary to modify the desired system parameters:
down to
, and
down to
. The procedure for calculating the actual operation of this parameter according to time is as follows:
At this time, all parameters used for speed planning are calculated.
4.2. Segmented Expression
To ensure a smooth transition of speed and acceleration during motion and to avoid sudden changes in acceleration, segmented calculations using different motion curves for different stages are employed. The acceleration phase (AP) is divided into three stages: increasing acceleration, constant acceleration, and decreasing acceleration. Similarly, the deceleration phase (DP) is divided into three stages: increasing deceleration, constant deceleration, and decreasing deceleration. The solution for each stage is as follows:
At time
,
, and acceleration from 0 gradually increased to the maximum value, forming an S-shaped curve half, jerk is positive. The calculation process is as follows:
- 2.
Constant Acceleration Phase
At the time
,
, after the acceleration reaches its maximum value, the acceleration is kept constant until it needs to be reduced. The calculation process is as follows:
- 3.
Decreasing Acceleration Phase
At time
,
, in this phase, the acceleration gradually decreases to 0, completing the other half of an S-curve, plus the acceleration is negative. The calculation process is as follows:
- 4.
Constant Speed Phase
At the time
,
, the speed remains constant and does not change anymore. The calculation process is as follows:
- 5.
Increasing Deceleration Phase
After the time
,
, uniform phase, the acceleration gradually increases from 0 to a negative maximum, and jerk is positive, but the speed is decreasing. The calculations are as follows.
- 6.
Constant Deceleration Phase
At time
,
, after the acceleration reaches a negative maximum, keep the acceleration constant until the acceleration begins to decrease. The calculation process is as follows:
- 7.
Decreasing Deceleration Phase
During time
,
, the acceleration gradually decreases from the negative maximum value to 0, completing the entire deceleration process. The calculation process is as follows:
The above planning processes are all performed under the premise that
. Now, considering
, this paper proposes a conversion method that makes it unnecessary to distinguish between these two cases when dealing with speed planning, thus simplifying the implementation of the algorithm. Firstly, the initial values are converted as follows:
where
is the sign factor;
and
are the original input start and end displacements; and
and
are the original input start and end velocities, respectively. By the above operation, any case can be converted uniformly into the form of
; after completing the initial value conversion, further convert the planning parameters such as speed, acceleration, and jerk. The specific conversion formulas are as follows:
Finally, after obtaining the results of the speed planning, the results need to be converted back to the original directions:
Through the conversion of the above steps, different situations in speed planning can be handled uniformly, making the algorithm more concise and general. This not only improves the computational efficiency but also ensures the smooth transition and stable operation of the system under different initial conditions. The method of unified initial value and planning parameter conversion provides an effective solution for dealing with complex motion control problems.
4.3. Parameter Settings
Since the trajectory planned by the hybrid A-star algorithm includes both forward and backward paths, segmented planning is required, and the speed at the endpoint of each path segment should be zero. If a path segment is too short, i.e.,
is smaller than a certain threshold,
may arise. To ensure the ride comfort of the autonomous vehicle and to avoid mechanical loss caused by rapid acceleration and deceleration, a mechanism is designed to dynamically adjust system parameters according to the path length. This ensures that the speed planning protocol always includes a constant speed phase. First, the path curve length is calculated:
where
is the curve passing length of each path segment;
is the number of discrete points of the path. The system parameters
,
(vehicle in forward direction),
,
(vehicle in backward direction), and
are set according to the dynamic path length. The system parameters maximum speed
and maximum acceleration
are dynamically adjusted as follows:
where
is the system base speed,
is the speed gain coefficient,
is the system base acceleration, and
is the acceleration gain coefficient. Both
and
are set according to the system’s minimum acceleration requirements. Additionally, the system parameters in this paper are set symmetrically as follows:
Since Double S planning is one-dimensional, the speed and acceleration need to be discretized according to the number of discrete path points. The final mapping to the discrete points of the planned path results in a trackable trajectory containing position, attitude, speed, and acceleration information.
6. Conclusions
In this paper, an optimal trajectory planning method under restricted narrow space is proposed. The traditional hybrid A-star algorithm is improved based on the traditional hybrid A-star algorithm, and the search capability is improved by more than 50% in different scenarios. At the same time, back-end smoothing is performed on the searched paths. The improved hybrid A-star algorithm has higher adaptability and robustness in dealing with complex continuous obstacles and irregular obstacles. The simulation analysis and real-vehicle experiment show that the improved algorithm in this paper performs well in a variety of complex scenarios, which not only significantly reduces the computation time of path planning but also significantly improves the smoothness and safety of the path. In addition, the introduction of speed planning further optimizes the motion trajectory of the autonomous vehicle so that it can adaptively adjust the driving speed under different working conditions to improve overall driving efficiency and ride comfort. After the processing of path planning and speed planning, an optimized trajectory is obtained with the comprehensive consideration of path smoothness and speed control.
It is worth noting that the method proposed in this paper relies on a raster search class algorithm. Although the method improves in some aspects, it still demands significant memory and time. Consequently, this method is more suitable for fixed scenarios like car parks, warehouses, and other limited-area environments. Additional optimization and adaptation may be necessary for large-scale or dynamic environments (e.g., urban planning). Future work will explore more efficient algorithms and optimization strategies to enhance applicability in complex and dynamic environments.