1. Introduction
The intelligent transportation system is a real-time, accurate, efficient, and comprehensive transportation management system that plays a role in various directions [
1]. It can effectively improve road capacity, reduce traffic accidents, improve transportation efficiency, and alleviate traffic congestion [
2,
3]. Meanwhile, it can also reduce energy consumption and improve environmental pollution [
4,
5]. Therefore, it has become the future development direction of the transportation system and has attracted more and more attention from all countries. As a component, the autonomous vehicle plays an essential role in the intelligent transportation system. It consists of an environmental perception layer, a path planning layer, and a path tracking control layer, and the study of path planning has always been a core problem. Commonly, path planning refers to efficiently finding a collision-free and feasible path from a starting point to a target point in a workspace [
6,
7,
8]. In practical usage, the quality of the planned path will directly affect the vehicle’s driving performance, so how to plan a passable path that can be tracked is very important for autonomous vehicles.
Scholars have carried out much research on path planning, and new path-planning algorithms are constantly emerging and developing. In the previous studies, five common categories of path planning algorithms can be found: geometric algorithms [
9,
10], graph search algorithms [
11,
12], intelligent bionic algorithms [
13,
14], the artificial potential field algorithm [
15], and sampling-based search algorithms. Sampling-based search algorithms, including the rapidly exploring random tree (RRT) and the probability roadmap, have effectively solved many challenging planning problems, especially in complex environments [
16,
17]. In path planning, the basic RRT algorithm is widely used for actuators with nonholonomic constraints because of the advantages, including probability completeness, low computational cost, and no need to model search space [
18,
19,
20]. However, the basic RRT only focuses on finding a path, with less regard to the convergence speed, the search efficiency, and the path optimality [
21,
22,
23]. To overcome the basic RRT’s shortcomings, some scholars made many improvements. The biased RRT uses target-biased search to form an extended mode of nonrandom sampling, thus improving planning efficiency [
24]. The bidirectional RRT (Bi-RRT) can simultaneously generate two trees from the starting point and the target point to explore the search space, improving the algorithm’s search efficiency [
25]. The RRT-connect, a Bi-RRT version fusing a greedy function, generates two trees from the starting point and the target point, respectively, which reduces the search space and accelerates the convergence speed of the algorithm [
26]. The RRT* uses new steps, including reselecting the parent node and rewiring the neighboring nodes of the newly inserted node to change search mode, thus generating a path with the optimal or approximate optimal length [
27]. These algorithms improve the performance in planning speed and path length, respectively. However, they do not take the steering constraints of the wheels into account, resulting in them not being applied to the path planning of the autonomous vehicle directly.
When local practical environments are partially known or dynamic, supposing that some unknown or dynamic obstacles occupy the pre-generated global path at a certain moment, the autonomous vehicle will collide with the obstacles while tracking the path. Therefore, to avoid dynamic obstacles, the autonomous vehicle needs to regenerate a feasible path in real-time according to the environmental information obtained from its perception module. Park et al. constructed an algorithm combining the A* method and the artificial potential field method to solve online local path planning problems in the campus environment, guaranteeing real-time performance and the shortest path generation [
28]. Chen et al. use a two-layered path planning model structure consisting of the modified Bi-RRT based on the steering constraint and a vector field histogram-guided polynomial planning method to plan a safe and smooth path meeting the real-time requirement [
29]. Ge et al. utilized the resultant force of the potential field, the separating axis theorem, and the cubic B-spline to improve the Bi-RRT* and take the vehicle constraints into account, resulting in obtaining the smoothest path by taking the shortest time in practice the complicated environment [
30]. Qi et al. utilized a modified RRT* to obtain an initial path, regard the state tree structure as prior knowledge, and design an approach to choose the best node among several candidates to regenerate the path quickly, resulting in planning a path avoiding dynamic obstacles [
31]. Zou et al. proposed a path-planning algorithm based on RRT and reinforcement learning optimization, which can generate a smooth and steady path in complex and unknown environments without collision with obstacles [
32]. Li et al. presented a real-time RRT-based path planning strategy consisting of a pre-processing RRT path planner and a real-time planner, which can modify the path rather than regenerate a path to avoid the unknown moving obstacle [
33]. Peng et al. introduced a new way to choose candidate nodes, incremental step size, and the rapidly exploring random vines with a trajectory parameter space to form a kinematically constrained RRT-based path planning algorithm, which can find collision-free and kinematically feasible paths in various environments, such as dense environments and environments with narrow passages [
34]. Wen et al. employed environmental knowledge to guide the planning procedure of the optimal RRT* method to propose a heuristic dual sampling domain reduction-based optimal RRT scheme including a layered online path planning framework in accordance with the model predictive control method, which outperforms traditional reduction schemes in terms of improving the execution efficiency of RRT* and is more reliable [
35]. Niu et al. proposed a global dynamic path planning method based on an improved A* algorithm and combine it with the dynamic window method to improve the real-time performance of the dynamic obstacle avoidance of the intelligent vehicle [
36]. Wu et al. utilized the genetic algorithm to optimize the path length and turning angle to obtain a short and smooth path [
37]. The above path planning algorithms have improved the length and smoothness of the path and can be applied in a dynamic environment. However, they seldomly consider the curvature consistency of paths in multiple frames which refers to the fact that there is no sudden change between the path planned in the current frame and the path planned in the previous frame.
Furthermore, path optimization can effectively reduce the control difficulty of autonomous vehicles with nonholonomic constraints. Ge et al. used the cubic B-spline directly to optimize the path, resulting in the planned path with more turns [
30]. Lu et al. utilized Dubins curves to generate a path, but the curvature of the generated path is discontinuous [
38]. Yang et al. used path pruning to delete unnecessary path nodes without considering the included angles between line segments between path nodes, resulting in excessive curvature of the final planned path [
39]. Chen et al. adopted path pruning based on inserted points to solve the initial path without considering the influence of inserted points on the path length, causing the length of the final planned path may not be optimal [
29]. Thus, developing a path optimization method that can consider both path pruning and smoothing is necessary.
Therefore, in this article, an improved heuristic Bi-RRT path planning algorithm is proposed to solve local path planning problems of the dynamic environment by considering path length and the continuity of path curvature between frames. The improved heuristic Bi-RRT algorithm has contributed to node sampling, node selection, node extension, the interconnection mode of two trees, path organization, and the coherence of path curvature between frames.
The multiple-sampling states plus a guided method biased towards the target point are designed to reduce the blind growth of the random trees, and the node extension mechanism integrating the greedy algorithm, namely the adaptive greedy step size considering the target direction, can effectively accelerate the growth of two random trees.
The nearest node selection mechanism considering the kinematic constraint of the vehicle and the target state is put forward to reduce the effect of random sampling on path smoothness and speed up the growth of the random trees.
An amplifying vehicle constraint considering the driver’s driving habit is introduced to make the vehicle move more safely, and the obstacle-free direct connection mode of two trees is introduced to further accelerate the execution of the algorithm.
A path reorganization process is designed to optimize the initial path to decrease the length of the final planned path to the maximum extent while ensuring path smoothness.
A novel path coherence method considering the inter-frame correlation of paths is used to ensure the curvature continuity of the path and make the vehicle be controlled easily and move more steadily.
The article is organized as follows:
Section 2 discusses the Bi-RRT path planning algorithm, the simplified vehicle model, and the differences in path planning between front and back frames. The improved heuristic Bi-RRT algorithm is presented in
Section 3.
Section 4 presents simulation experiments to demonstrate the effectiveness and practicability of the proposed algorithm.
Section 5 presents the discussion about its performance, and conclusions are provided thereafter.
3. Improved Heuristic Bi-RRT Algorithm
Based on the above analysis, this section proposes an improved heuristic Bi-RRT algorithm for path planning in a dynamic obstacle avoidance environment.
Figure 4 illustrates the model structure of the improved heuristic Bi-RRT. The input of the proposed model is a local driving environment and positioning information. The proposed algorithm model based on heuristic random sampling, heuristic nearest neighbor, heuristic extension, collision detection, direct connection detection, and path organization quickly generates a differentiable and collision-free path. Algorithm 3 shows the specific steps of the improved heuristic Bi-RRT algorithm.
The improved heuristic Bi-RRT algorithm obtains an initial point by the function
and initializes two random trees
and
in the same manner as they are in the basic Bi-RRT (Lines 1–2). Once the two random trees cannot be directly interconnected, the improved heuristic Bi-RRT begins its iterative processing by picking a random point in the feasible domain space through a sampling function
(Lines 4–5). Then, the parent node
from tree
is found by the function
, and the new tree node
is generated by the function
(Lines 6–7). If there are no obstacles between
and
, the new tree node
is added to the random tree
, and the nearest node
from tree
is found (Lines 8–11). Subsequently, the iterative processing ends if there are no obstacles between
and
, namely
and respectively (Lines 13–15). Otherwise, random trees
and
are swapped, and the procedures mentioned above are executed on the other random tree
again (Line 16). Afterward, an initial path is generated by the function
(Line 20). Path organization, including path node reconnection and path smoothing, processes the initial path to obtain a feasible path (Lines 21–22).
Algorithm 3: Build Improved Heuristic Bi-RRT (,) |
1: ; 2: ;; 3: ;; 4: while do 5: ; 6: ; 7: ; 8: if then 9: 10: ; 11: ; 12: ; 13: if then 14: 15: 16: else 17: end if 18: end if 19: end while 20: ; 21: ; 22: ; |
The improved heuristic Bi-RRT algorithm contains a set of heuristic methods to the benefit of path planning of the autonomous vehicle. The improvements in the connective mode of two random trees, node sampling, node selection, and node expansion based on the Bi-RRT framework are used to generate an initial path quickly. Additionally, then, path reorganization, including path reconnection and path smoothing, is employed to improve the quality of the initial path, making it suitable for tracking by the autonomous vehicle. The improved constraints containing the improved road environment and the improved vehicle constraint are conducive to generating a feasible path complying with the driver’s driving habit. In addition, a novel path coherence method is introduced to make the generated path smoothly connected when planning a dynamic obstacle avoidance path. Specific methods of the algorithm are described as follows in detail.
3.1. Connective Mode of Two Random Trees
In order to further accelerate the running speed of the algorithm, the connective mode of two random trees can change from how the distance between two random trees is less than a certain distance threshold to the way of obstacle-free direct connection, as shown in
Figure 5. After expanding the random tree
to obtain a new tree node
, the nearest node
on the random tree
closest to the node
is calculated, and whether the area between
and
is passable is checked. If there are no obstacles between
and
,
and
are directly connected, and the initial path planning is complete. Otherwise, the algorithm continues to execute until the two random trees are connected successfully.
3.2. Heuristic Target Bias Sampling Method
The basic Bi-RRT usually adopts random searches in the global scope during the random sampling process, which will cause the generation of random points without guidance and too much unnecessary computation. As to this problem, a heuristic bias sampling strategy composed of a multiple-sampling method and a target bias method is adopted to make the random tree grow in a biased direction, enabling the initial state and the goal state to meet more effectively and faster. Equations (3) and (4) demonstrate how to calculate the random sampling state
.
where
is the random sampling state generated by the multiple-sampling method,
is the target point defined in each sampling process, and
is the biased step size.
and
are the distance from the random point
to the obstacle and the distance threshold from the obstacle, respectively.
3.2.1. Heuristic Random Sampling
With the knowledge of the initial and goal state, to make the sampling random point close to the target state, the function generates several random points instead of one random point generated by the basic Bi-RRT algorithm in the free region using the function. The multiple-sampling point function does not include the probability of bias to the target, hence avoiding the local minimum problem. Additionally, then, the introduction of the function is used to select the random state closer to the goal from several candidate sampling points. The random point out of these candidate sampling points closest to the target becomes the chosen random state , causing the Bi-RRT to search toward the target point. The number of random states to be selected was set to two after simulation results showed the best performance when the number of random states was limited to two.
3.2.2. Heuristic Target Bias
After obtaining the chosen random state , the target bias method is introduced. It can make the random point expand a step size along the direction from it to the target state to generate the random sampling point further closer to the target state, resulting in making the random tree grow more directionally and improving computational efficiency. When is less than , if the generated random sampling point is still closer to the target state, it will make the newly generated tree node easy to collide with the obstacle, resulting in sampling failure and directly affecting the solution speed. Therefore, the target bias method introduces the distance threshold , which is the projection distance of the semi-major axis of the expanded safety ellipse on the axis of the coordinate reference frame. When , that is, the chosen random state is close to the obstacle, is regarded as the generated random sampling point , when , that is, the chosen random state is far from the obstacle, is generated from the target bias function. This strategy can maintain the balance between exploration and search speed.
Based on the basic Bi-RRT sampling function framework, the novel target bias sampling method changes the generation mode of the sampling point to make the generated sampling points more directional and effective, improving search efficiency and accelerating the algorithm’s convergence. Algorithm 4 outlines the working of the function
. The improved heuristic Bi-RRT obtains candidate sampling points through the sampling function
and selects the sampling point with the minimum distance cost as the current sampling point
(Lines 1–3). Then, according to the distance between the current sampling point
and the obstacle, the current sampling point
is processed by the heuristic target bias method to obtain the final sampling point
(Lines 4–7). This procedure is performed in each sampling process.
Algorithm 4: Function |
1: ; 2: ; 3: ; 4: if then 5: ; 6: else 7: ; 8: end if |
3.3. Heuristic Parent Node Selection Method
In the basic Bi-RRT algorithm, the nearest tree node is measured by the Euclidean distance from the random point to the tree node, which may generate a polyline path with sharp included angles between connecting line segments of path nodes. Even if the polyline line path is smoothed, it cannot be successfully followed by vehicles. Because the vehicle has a minimum steering radius in actual motion, the Euclidean distance should not be the only factor to consider during each node selection process. As shown in
Figure 6, the current vehicle state is a solid rectangle containing a yellow vehicle with three alternative driving states shown as dashed rectangles. In order to find the nearest driving state for the current vehicle, if the Euclidean distance is only considered, there is no doubt that the first driving state is the closest with a Euclidean distance of zero and the second driving state takes second place. However, the first and second driving states, also named in situ steering and lateral translation, are not possible for the vehicle due to the minimum steering radius. Hence, the third driving state is more reasonable.
Given the above analysis, the steering radius of the vehicle needs to be considered to choose the near tree node, namely the parent tree node. Therefore, a heuristic selection method of the parent tree node, namely a comprehensive measurement index considering the distance factor and angle factor, is introduced to make the generated path gentler and easily tracked by the vehicle. Furthermore, it can speed up the algorithm convergence and reduce the calculation time. Equations (5)–(11) show the calculation process when selecting the near tree node. The near tree node
is determined as the tree node corresponding to the maximum comprehensive measurement index.
where
and
are weighted coefficients of the distance index
and the angle index
, respectively.
and
are the normalized values of the distance
and the angle
, respectively. The diagrammatic presentation of the angle
is shown in
Figure 7.
is the weighted sum of the distance
and the distance
,
and
are the weighted coefficients of
and
, respectively.
represents the distance from each tree node to the random sampling node, and
represents the distance from each tree node to the target state. The introduce of the distance
can make the selected near tree node have a trend close to the target state to increase the computational efficient.
The transition from Euclidean distance to the comprehensive measurement index changes the growing characteristic of the random tree. The introduction of the comprehensive measurement index hinders the pure expansion of the random tree growth towards the configuration region. On the contrary, it drives the tree growth towards the direction associated with the target state and the gentle trend. As a result, it improves the running speed of the algorithm to some extent, and there is a natural trade-off between quick tree growth and better path quality.
3.4. Heuristic Node Extension Method
Expanding the near tree node to the random point usually adopts a fixed step size in the basic Bi-RRT. The large fixed step size tends to make the new node difficult to extend in the surrounding area of the obstacle, especially dense obstacle areas, resulting in extension failure and reducing the growth rate of the random tree. The small fixed step size could lead to a slow convergence speed of the algorithm. In other words, the fixed step size has the disadvantages of low flexibility and low security. In addition, the expansion direction of the tree node is along the vector direction from
to
. When utilizing the large step size to extend the parent tree node along the expansion direction of the tree node deviating from the target state, an invalid and unnecessary node could be generated, resulting in the low quality of the generated path, and affecting the running speed of the algorithm. Thus, to solve these two problems, a heuristic node extension method, namely the adaptive greedy step size, is introduced. ‘Adaptive’ is reflected in the pattern that the step size is dynamically and gradually changing rather than fixed, and ‘greedy’ is reflected in the pattern that the greater the extent of the node expansion direction approaching the direction of the target state, the larger the step size. Equations (12)–(16) show the calculation of the adaptive greedy step size, and its simple legend is shown in
Figure 8.
where
is the basic lower bound of the step size,
and
are unit vectors from
to
and from
to
, respectively.
is the included angle between
and
,
is the cotangent of
,
is a constant as a regulating coefficient, and
is the distance from
to the obstacle. Far away from the obstacle means
.
Compared with the traditional fixed step size, the adaptive greedy step size is no longer a constant. Its size is not only related to the distance from the obstacle but also to the included angle of the vector towards the target state. In this way, when near an obstacle, a small step size can be used for the basic extension, making the search path more detailed and safer. When far from an obstacle, the step size can be greedily adjusted as the included angle changes, making the random tree adopt the larger step size to expand rapidly along the extension direction closer to the target state and reduce some blind expansions. As a result, the greedy mode of the step size accelerates the growth of the random tree and makes the growth of the path tend to approach the target state to a certain extent. It is exactly because of its dynamic adjustability that the adaptive greedy step size extension can often pass the obstacle detection when approaching the obstacle, unlike the fixed step size extension. Using the adaptive greedy step size can significantly improve the success rate of new node generation and accelerate overall search efficiency effectively.
3.5. Improved Constraints
Suppose a path can be successfully and effectively tracked by an autonomous vehicle. In that case, the path should not only meet the obstacle constraints but also comply with the driving characteristics of the actual driver, resulting in avoiding causing excessive tension and discomfort to the driver and passengers. The obstacle constraints include the road environment and the environmental constraint formed by the vehicle being regarded as an obstacle, namely, the vehicle constraint. Therefore, the road environment and the vehicle constraint are improved to obtain a feasible path meeting the driving habits of the actual driver.
3.5.1. Improved Road Environment
In order to generate a practical path, the path nodes need to meet the constraints of road environments when planning. The road environment restricts the planned path more effectively by considering the vehicle width to avoid collision between the vehicle and the road edge. Thus, the newly extended nodes need to meet the requirements of the following Equation (17), and the schematic diagram of the road environment is shown in
Figure 9.
where
and
are the
coordinates of the initial point and the goal point in the reference coordinate frame, respectively.
and
are the left and right boundaries of the road, and
is the width of the host vehicle.
3.5.2. Improved Vehicle Constraint
In order to express the constraint generated by the obstacle vehicle conveniently, a safety ellipse is introduced to envelop the obstacle vehicle. When considering the subjective comfort of the driver and passengers, a planned path needs to be able to avoid the obstacle vehicle in advance, that is, avoiding the generation of excessive path curvature when approaching the obstacle vehicle. In this case, the planned path can avoid causing discomfort to the driver and passengers and be easily tracked by the vehicle. Therefore, on the basis that half of the vehicle length is used as the semi-major axis of the safety ellipse, the advanced obstacle avoidance distance is added to the semi-major axis to ensure that the vehicle obstacle avoidance occurs at a long distance. Equation (18) expresses the condition that the newly expanded node needs to meet, and the schematic diagram of the vehicle constraint is shown in
Figure 10.
where
is the point on the connecting segment between the newly extended node
and its parent node
,
is the position of the obstacle vehicle,
and
are the length and width of the obstacle vehicle, respectively.
and
are the expansion coefficients of the semi-major axis and the semi-minor axis of the safety ellipse, respectively,
is the speed of the host vehicle,
is the friction coefficient,
is the acceleration of gravity, and
is the advanced obstacle avoidance distance.
To sum up, during the process of the specific node extension, the improved constraints, including the improved road environment and the improved vehicle constraint, can make the planned path meet the actual driving requirement of the vehicle, namely, the path feasibility and the characteristics of avoiding the obstacle in advance.
3.6. Path Reorganization Method
Because the basic Bi-RRT algorithm adopts random sampling, the obtained path, also named the initial path, often has poor quality, mainly reflecting in containing too many unnecessary turn points and the discontinuity of path curvature. When tracking the initial path, the autonomous vehicle has to stop and change its driving direction so that it cannot drive smoothly and has unnecessary mechanical wear. Thus, a path reorganization method is needed to optimize the initial path, that is, to remove unnecessary turn points and smooth the path.
After obtaining an initial path by the function
, as shown in Algorithm 2, the path reorganization method containing path node reconnection and path smoothing is used to process it. The path node reconnection is utilized to remove unnecessary turn nodes and insert path nodes to replace some necessary path nodes. As a result, it can make the included angles of the connecting line between path points meet the vehicle steering requirement, decreasing the control difficulty of the autonomous vehicle while reducing the path distance to the maximum extent. Additionally, then, the path obtained by the path node reconnection is a broken line composed of discrete path nodes; thus, it needs a further smoothing process to make the vehicle drive smoothly and steadily. Algorithm 5 describes the pseudocode of the path reorganization method.
Algorithm 5: Function |
1: 2: ; 3: ; ; ; 4: ; 5: ; 6: while do 7: for do 8: if then 9: ; 10: else 11: ; 12: if then 13: ; ; ; ; 14: ; 15: else 16: while 1 do 17: ; 18: if and and and then 19: ; ; ; ; 20: ; 21: ; 22: 23: end if 24: end while 25: end if 26: end if 27: end for 28: end while 29: if then 30: ; 31: else 32: while 1 do 33: ; 34: if and and and and then 35: ; 36: ; 37: ; 38: ; 39: ; 40: ; 41: end if 42: end while 43: end if 44: ; 45: |
3.6.1. Path Node Reconnection
A path obtained by the function usually has poor connectivity due to the random attribute of the algorithm. Furthermore, there are many redundant turning segments in the path. As a result, it is often not continuously differentiable and infeasible. Thus, the path needs the path node reconnection to meet the prerequisite of path smoothing. Path node reconnection shown in lines 1–43 of Algorithm 5 is conducted to remove redundant path nodes and insert path nodes to replace some existing path nodes for obtaining a new path with maximum length reduction and no collision with obstacles. Moreover, it can ensure that the complementary angles of the included angles of line segments between path nodes are less than the steering angle of the front wheel. The function is used to obtain a path node set of the initial path from the forward node of the goal node to the root node of the initial node (Line 2). The first path node is defined as the root node , the second path node is defined as the parent node , and the third path node is defined as the current node (Line 3). A line segment connects the current node and the first subsequent path node from the set . Additionally, then, connecting this current node and one of all subsequent path nodes from the set through a line segment successively in sequence is conducted until a collision occurs between the line segment and the obstacle (Lines 7–10). In this case, the path nodes between the line segment are removed, and the parent node of the path node that results in the collision with the obstacle is defined as the previous forward node (Line 11). Meanwhile, the complementary angle of the included angle between the vector and the vector is calculated. When the complementary angle is less than the steering angle constraint , is redefined as the previous root node , is redefined as the new root node , is redefined as the new parent node , and is redefined as the new current node (Lines 12–13). On the contrary, a path node is inserted between the parent node and the previous forward node to replace the current node and meet the conditions that the complementary angle of the included angle between the vector and the vector and the complementary angle of the included angle between the vector and the vector are less than the steering angle constraint , and the line segment connecting the parent node and the inserted node and the line segment connecting the inserted node and the previous forward node do not collide with the obstacle (Lines 17–18). After that, is redefined as the previous root node , is redefined as the new root node , is redefined as the new parent node , and is redefined as the new current node (Line 19). The above operations are applied to the remaining path nodes in the set in sequence until the path node is found. Finally, suppose the complementary angle of the included angle between the line segment connecting the finally defined and the finally defined and the line segment connecting the finally defined and is less than the steering angle constraint . In that case, is added to the set (Lines 29–30). Otherwise, the final path node is added to the set after meeting the conditions that the complementary angle of the included angle between the line segment connecting the finally defined and the finally defined and the line segment connecting the finally defined and the inserted node , the complementary angle of the included angle between the line segment connecting the inserted node and the finally defined and the line segment connecting the inserted node and the finally defined , and the complementary angle of the included angle between the line segment connecting the finally defined and the inserted node and the line segment connecting the finally defined and the final node are less than the steering angle constraint , and the line segment connecting the finally defined and the inserted point and the line segment connecting the inserted point and the finally defined do not collide with the obstacle (Lines 31–43).
The path node reconnection process is illustrated in
Figure 11 specifically. The solid black line is the initial path obtained by the function
. The connecting line segments between the black nodes
,
,
,
,
, and
, which are obtained by the process of the path node reconnection, constitute a path to be smoothed in the next step, which is represented as the red solid line. The connecting line segments between the black nodes
,
,
, and
do not intersect with the obstacle, removing the redundant nodes between them, namely, the green path nodes.
, a path node from the initial path, can directly connect with
and
. However, the complementary angle of the included angle between the line segment connecting
and
, and the line segment connecting
and
is more than the steering angle constraint
. As a result, a node, namely, node
, is inserted between
and
based on the constraint
to replace the node
for obtaining a relatively gentle path with the maximum length reduction, namely the red path. Furthermore, the complementary angles of the included angles of line segments consisting of these black nodes are less than
, that is,
,
,
, and
are less than
. Thus, the path node reconnection method can reduce the length of the initial path to the greatest extent and obtain a path convenient for further smoothing.
3.6.2. Path Smoothing
After the path node reconnection process, a simplified path, the solid red line in
Figure 11, is obtained, but the path contains some necessary turning nodes. As a result, the path is still not continuously differentiable such that it cannot be directly tracked by the vehicle. Thus, the obtained path should be further smoothed to make it be successfully tracked by the vehicle [
40]. The cubic B-spline curve can move a control point to make the local modification without affecting the overall shape of the path and have a simple implementation and relatively low computational cost to ensure kinematic feasibility while avoiding an obstacle [
41]. In addition, it is also often adopted to obtain a continuously differentiable cure [
42]. Therefore, the cubic B-spline curve can be used to optimize the obtained path.
Supposing there are
control points
, the cubic B-spline curve is expressed as
where the basic function
is defined as
In order to make the cubic B-spline curve start from , tangent to the vector , end at , and tangent to the vector , the control points and are added to meet the conditions and .
The path node organization method can make the generated path continuously differentiable while reducing path length to the maximum extent. Meanwhile, the generated path does not have unnecessary steering and meets the tracking requirement of the vehicle.
3.7. Path Coherence Method
Due to the randomness of the algorithm, the difference in the planned paths between two adjacent frames could easily cause the vehicle to shake during driving, If the difference is too large, it may even cause the vehicle to collide with an obstacle. Hence, to solve this path planning problem in dynamic environments, the interframe path coherence method is introduced to guarantee the smooth connection of planned paths between frames. The interframe path coherence method refers to the need to consider the information of the planned path of the previous frame when planning a path in the current frame. Its main idea is that at the beginning of each new planning cycle, the root node
of the new planning cycle is the position whose distance from the root node in the trajectory planned in the previous planning cycle is equal to
. At the same time, a point along the tangent line of the newly generated root node is selected as the new search starting node
. Equations (21) and (22) express the calculation of the root node
. Equation (23) shows how to calculate
.
where
is the root node of the previous planning cycle,
is the offset distance of the root node
, and
is the coefficient of proportionality.
is more than the preview distance of the vehicle to ensure that the preview point is still on the trajectory of the previous frame. As a result, there is no need to make more tracking control adjustments.
is the right intersection point of the cubic B-spline curve and the designed circle.
is the slope of the cubic B-spline curve at the intersection point,
is the included angle between the tangent line and the
axis at the intersection point, and
is the offset distance along the direction of the tangent line.
and
are introduced to ensure that the trajectory generated in the current frame is tangent to the tangent line at the intersection point
and passes through the intersection point
. Thereby, there are smooth connections in the interframe paths. As seen in
Figure 12, the solid green line refers to the broken line formed by the path control points of the previous frame, and the solid black line is the broken line formed by the path control points of the current frame. The red curve represents the trajectory generated in the previous frame, the blue curve represents the trajectory generated in the current frame, and both curves are tangent to the vector
at the root node
. Hence, those two paths are smoothly connected at
.
The path coherence method can significantly eliminate the difference between interframe trajectories and make the planned trajectory smooth and continuous, resulting in maintaining the vehicle’s overall stability during driving.
5. Discussion
The path planning of the vehicle in dynamic scenarios often pays attention not only to the quality of each frame path but also to the difference in paths between frames. In addition, the Bi-RRT algorithm, a variant of the basic RRT algorithm, is often used for path planning because of its probability completeness and rapidity. However, its planned path is not differentiable and relatively poor in length. Based on those facts, some improved heuristic methods are introduced to the Bi-RRT algorithm to make it suitable for the dynamic path planning of the vehicle. The multi-sampling method biased towards the target state makes the growth of the random tree directional and reasonable. The adaptive greedy step size considering the target direction can increase the success rate of node expansion and make the newly extended node tend to the target state direction to a certain extent. The two random trees are directly interconnected when there are no obstacles between them, as a result, which further reduces the running time of the algorithm. Changing from only considering the Euclidean distance to considering the distance from the target state and the included angles between the connection lines of tree nodes, the parent node selection method improves the running speed of the algorithm to a certain extent while making the generated path tend to be gentle. The path reorganization method, including path node reconnection and path smoothing, can remove necessary turning points, significantly reduce the path length, and plan a path with continuous curvature. As for the problem of path connection between frames, the path coherence method can make paths between different frames smoothly connect to form a differentiable path. By way of the simulation experiment study, the improved heuristic Bi-RRT algorithm has a real-time performance, especially in a straight road scenario, and guarantees the shortest path while obeying the road constraints and the vehicle constraint and considering the driving habit of the driver. On the contrary, the vehicle constraint and the driver’s driving habits are not considered when applying the basic Bi-RRT algorithm.
However, it must be admitted that the running time may not be fast enough when the proposed algorithm is applied in a high-speed and dynamic curved road scene, which may be due to a large number of numerical calculations based on graphic geometry in obstacle detection. In future research, obstacle detection of gray value comparison and parallel computing are introduced to further reduce the proposed algorithm’s running time to meet the path planning requirement in a high-speed curved road scenario. After the preparation of the perception module, changing from the numerical calculation mode of graphics geometry to the comparison of gray values mode on binarized images, the obstacle detection can greatly reduce the calculation amount of the algorithm, thus speeding up the search speed of the algorithm. On this basis, the improved heuristic Bi-RRT algorithm can be applied to more complex driving scenarios, such as unstructured road scenes with a mixture of static and moving obstacles with grooves, to explore its adaptability. Furthermore, compared with other related algorithms, finding out the algorithm’s shortcomings and the scenes where the algorithm cannot be applied are made to improve the algorithm and enable it to be applied to more driving scenes.
6. Conclusions
This paper is concerned with the path planning of autonomous vehicles in a dynamic environment. An improved heuristic Bi-RRT algorithm has been proposed and tested. The proposed algorithm can solve the path query problem of the basic Bi-RRT algorithm and the interconnection problem of paths between various frames in a dynamic scenario to obtain a smooth and asymptotically optimal path with continuous curvature with high efficiency and accuracy. The proposed path planning algorithm consists of the obstacle-free direct connection of two trees, the heuristic target bias sampling, the heuristic parent node selection, the heuristic node extension, the improved constraints, path reorganization, and path coherence. The obstacle-free direct connection mode can further accelerate the interconnection of the two random trees. The heuristic target bias sampling can reduce blind sampling, and the heuristic node extension can decrease invalid expansion, thereby accelerating the running speed and improving the searching efficiency of the algorithm. The heuristic parent node selection speeds up the algorithm’s calculation and improves path quality to some extent. The improved environmental constraint and the improved vehicle constraint integrated with the advanced obstacle avoidance distance are considered together to make the vehicle avoid the obstacle in advance and accurately and make the vehicle drive safely. Path reorganization aims to post-process the initial path to obtain a reasonable and differentiable path with the approximate optimal length, which can be tracked by the vehicle smoothly and successfully. In addition, path coherence solves the problem of the smooth connection of paths between different frames, enabling the vehicle to run smoothly and steadily at the connection point. Through the simulation experiments, the improved heuristic Bi-RRT algorithm can generate the smoothest path and takes the shortest time compared with the other four algorithms. As a result, it is an effective local path planning algorithm for the autonomous vehicle and has practical value in the application of the wheeled robot.
In future works, the research focuses on increasing the solution speed, further reducing the calculation time, especially in the curved road scenario. The proposed algorithm will be applied in more complex driving scenarios, such as the parking scene and the drift scene with moving obstacles, to test its adaptiveness. Moreover, after the preparation of the test platform of the autonomous vehicle, an on-site experiment is conducted to test its effectiveness in practical applications.