Next Article in Journal
ZSE-VITS: A Zero-Shot Expressive Voice Cloning Method Based on VITS
Next Article in Special Issue
Accelerating Fuzzy Actor–Critic Learning via Suboptimal Knowledge for a Multi-Agent Tracking Problem
Previous Article in Journal
Dynamic Beacon Distribution Mechanism for Internet of Vehicles: An Analytical Study
Previous Article in Special Issue
Behavior-Based Herding Algorithm for Social Force Model Based Sheep Herd
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Spatial Path Smoothing for Car-like Robots Using Corridor-Based Quadratic Optimization

School of Automation, Guangdong University of Technology, Guangzhou 510006, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(4), 819; https://doi.org/10.3390/electronics12040819
Submission received: 4 November 2022 / Revised: 13 January 2023 / Accepted: 13 January 2023 / Published: 6 February 2023
(This article belongs to the Special Issue Advances in Theories and Applications of Multi-Agent Systems)

Abstract

:
The global planning module of car-like robots usually plans a coarse spatial path, which may be non-smooth and kinematically infeasible for car-like robots. This study proposes an efficient spatial path smoothing approach, which is capable of optimizing a rough spatial path to be a high quality one. Two novel designs contribute to the proposed approach. One is a direct corridor construction method that provides an optimization region for path optimization. Based on a redefined path representation in the generated corridor, the second one is a core spatial path optimization method, where the optimization problem is formulated as a multi-objective quadratic programming (QP) with corridor and maximum-curvature constraints. Meanwhile, integrating a two-steps strategy into an optimization process yields a good trade-off between efficiency and quality. Experiment results validate that the proposed approach has the ability to online generate a high quality path.

1. Introduction

In the last decades, as the technology of autonomous navigation achieving huge progress, mobile vehicles with autonomous navigation system have been applied in various scenarios, such as floor cleaning, industrial inspection and cargo delivery. To handle the various tasks, mobile vehicles are expected to have the ability to avoid collision with surrounding objects [1]. As an essential module of autonomous navigation system, the planning module plays an important role in guaranteeing the safe and comfort vehicle motion by generating a smooth and collision-free path from the starting state to the terminal state [2,3]. In practical application, the planned path is also required to satisfy kinematic constraints of the vehicle. All these considerations make path planning for self-driving system be more challenging work.
A typical path planning framework mainly involves two parts: path finding and trajectory generation. Most of the path finding algorithms such as search-based methods [4,5], sampling-based methods [6,7] and others [8], can work well in collision-free path finding. However, the planned results are rough paths, which consist of straight lines and sharp turns, and therefore may violate certain constraints such as continuity and vehicle kinematics. A common method for continuous path generation uses parametric curves, such as polynomial [9], spline [10] and Bézier [11] curves. However, the kinematic feasibility of the generated path cannot be guaranteed by working with these curves directly [12]. The other pipeline for trajectory generation is to formulate an nonlinear optimization problem considering continuity, safety and vehicle kinematic. Due to the limited capability of trajectory optimization, a rough path may increase the optimization difficulty and results in a low quality trajectory. In addition, many methods formulate trajectory planning as nonlinear and nonconvex optimization problems, which cannot guarantee that the optimization converges to the optimal solution.
Our goal is to design a convex optimization approach considering the kinematic constraints of car-like robots for spatial path optimization. In our design, the path optimization problem is decomposed into spatial corridor generation and corridor-based path optimization. Firstly, a direct and efficient corridor generation method is proposed to construct a feasible optimization corridor along the reference path. This corridor is used to be the convex optimization domain in which the optimal solution can be found Secondly, on the basis of the generated corridor, multi-objective optimization cost function with a quadratic form is designed by introducing a new path point representation. Meanwhile, in order to guarantee a kinematically feasible path, our method incorporates corridor constraints and maximum-curvature constraints. The maximum-curvature constraints are formulated as approximate linear constraints. Finally, a two-steps optimization strategy is designed to solve the problem effectively. The contributions of this article are summarized as follows:
  • A simple and efficient spatial corridor generation method for spatial corridor extraction is proposed. The problem of path optimization based on the generated spatial corridor are developed as quadratic forms.
  • A convex multi-objective path optimization problem with corridor and maximum-curvature constraints is designed to generate a smooth and kinematically feasible path. The overall problem of path optimization is developed as a quadratic programming problem, which can be quickly solved. Meanwhile, a two-steps optimization strategy is designed to balance the optimization efficiency and quality.
  • Our proposed method can be utilized to optimize the path in various scenarios. In addition, the experimental results demonstrate that our approach has a good performance in operational efficiency.

2. Related Work

The traditional path finding methods, such as search-based methods [4,5] and sampling-based methods [6,7], mainly focus on the efficiency or the optimality of finding a collision-free path from the starting position to the destination, but fail to concern the path feasibility for car-like robots. The planning results of these methods are usually rough and can not be used directly to navigate robots. To fill this gap, some methods post-process searching primitives via model predictive control methods to guarantee the kinematical feasibility of planning the results [13,14]. Inheriting the idea of the A* algorithm and introducing a model-based node expansion strategy can plan a vehicle-drivable trajectory in [15,16]. The variant of the rapidly exploring random tree is reported in [17], which considers kinematics constraints of robots in the searching process to enhance the feasibility of the planned path. However, several aspects of the planning objectives can not be fully considered in these methods, including length, smoothness and kinematical feasibility.
To pursue a high quality path, lots of results with regard to path optimization have been reported in recent years. Some of the works formulate their path optimization problem based on the pre-built corridor around the initial path. The reference [18] segments the safe region into the straight regions and corner region along the initial path. Convex polygons, then, are constructed within those segment regions and form a corridor jointly. A novel corridor structure is proposed in [19], namely, the spatial-temporal semantic corridor. This structure provides a representation for various kinds of semantic elements in the Frenét frame, extracting a free-space corridor for safe trajectory generation. Both the works in [18,19] can find collision-free and continuous paths by constraining the control points of each segment Bézier curve inside the corridor using the convex hull property of the Bézier curve. However, the feasibility of the generating paths in these methods cannot be guaranteed due to the lack of taking vehicle kinematic constraints into account. To deal with this problem, based on the corridor-based optimization method, ref. [20] introduces an approximate method to enforce kinematic constraints, which can find a kinematically-feasible path while ensuring the convexity of the optimization problem. The final optimization problem is formulated as a quadratic programming problem with quadratic constraints, and solved in several milliseconds, on average.
Path optimization is usually a multi-objective nonlinear optimization problem with various constraints [21,22,23,24,25,26,27]. Many path optimization problems are usually formulated as non-convex problems [28] and therefore have the following shortcomings: (i) optimization results may highly depend on the initial guess, (ii) optimization problems may easily stuck in local optimal solutions, and (iii) optimization problems may not be solved in a computationally efficient way [29]. To avoid these shortcomings, some works develop path optimization problems as convex problems, which can be solved by efficient techniques [29,30,31]. Thanks to the convexity of the problem, the global optimal solution can be found within finite iterations. Moreover, the problem with quadratic functions and linear constraints is a special case of convex problems, which is called the QP problem. In [25], based on the left and right side bound of the road map, a quadratic path length cost function is designed to minimize the required lap time. To find a path with the best trade-off between shortest length and minimum-curvature, approaches in [18,26], first give quadratic objective functions to find the shortest path and minimum-curvature path independently, and then find the best trade-off between the shortest path and minimum-curvature path. However, these methods focus on achieving the lowest lap time in the racing game, which may be not suitable for other scenarios. The method in [27] solves a trajectory optimization problem using sequential QP. In [20,32], an approximate method to enforce kinematic constraints is introduced to generate a kinematically feasible path using sequential QP. However, introducing kinematic constraints at the very start of the optimization process is not a good optimization strategy to quickly find a solution. This is because, in some cases, the optimization results are already kinematically feasible without introducing kinematic constraints. In addition, introducing kinematic constraints will increase the complexity of the optimization problem.

3. Spatial Corridor Generation

In this section, a simple and efficient method focusing on computing the corridor boundary points along the reference path is designed to generate a spatial corridor. The computed boundary points are used to represent the corridor, which are suited for the establishment of the path optimization problem.

Corridor Boundary Generation

Given a initial path P init = { P 1 init , P 2 init , , P m init } , this subsection computes the reference path P ref = { P 1 ref , P 2 ref , , P n ref } and corridor boundaries represented by P L = { P 1 L , P 2 L , , P n L } and P R = { P 1 R , P 2 R , , P n R } , as shown in Figure 1. A point has two dimension information P i j = [ x i j , y i j ] T . We directly compute the slope k i of the line segment between P i ref and P i + 1 ref . The corridor region is stretched along the reference path laterally by computing the perpendicular line of the corresponding line segment. Given the corridor lateral stretching distance parameters d L = { d 1 L , d 2 L , , d n L } and d R = { d 1 R , d 2 R , , d n R } , the corridor boundary points can be computed by:
x i L = x i ref + h d i L k i 2 + 1 , x i R = x i ref h d i R k i 2 + 1 , y i j = k i ( x i j x i ref ) + y i ref , j { L , R } ,
where k i represents the slope of the perpendicular of i-th line segment and is computed by k i = ( y i + 1 ref y i ref ) / ( x i + 1 ref x i ref ) . h is used to distinguish P i L and P i R , defined as follows:
h = 1 , v 1 , i × v 2 , i > 0 1 , v 1 , i × v 2 , i < 0 ,
with
v 1 , i = [ x i ref x i L , y i ref y i L ] , v 2 , i = [ x i + 1 ref x i ref , y i + 1 ref y i ref ] .
Noted that, in practice, a safe optimization region is guaranteed by pushing the corridor into the safe region of the road map. The size of corridor region is determined by P L and P R . We only need to modify P L and P R to adjust the corridor.
Algorithm 1 shows the process of the proposed spatial corridor generation. The algorithm will begin with a linear interpolation for generating a path with uniformly and densely distributed waypoints, if there is a path with the sparse path point distribution. Then, we compute the segment line slope (Line 4 in Algorithm 1) and its vertical line slope (Line 5 in Algorithm 1) for extracting spatial corridor. There are n vertical line slope parameters computed in Algorithm 1 from line 3 to line 10. It is worth noting that the function (Line 11 in Algorithm 1) is introduced to reconstruct the local segment of the corridor so that a reasonable corridor along path can be obtained. An example for local corridor reconstruction is shown in Figure 2. Based on the final slope set k smooth , boundary points are computed (Line 12–17 in Algorithm 1).
Algorithm 1 Spatial Corridor Generation.
  • Input: P init , point set of the initial reference path;  d L , d R , the set of corridor width parameters
  • Output: P L , P R , boundary points of spatial corridor
1:
k , k smooth , P L , P R
2:
P ref PathInterpolation( P init )
3:
for i = 1 to n 1 do
4:
     k i ComputeLineSlope( P i ref , P i + 1 ref )
5:
     k i 1 / k i
6:
     k k k i
7:
end for
8:
k n ComputeLineSlope( P n 1 ref , P n ref )
9:
k n 1 / k n
10:
k k k n
11:
k smooth ComputeSmoothSlopes ( k )
12:
for i = 1 to ndo
13:
     P i L ComputeLeftBoundaryPoint( k i smooth , P i ref , d i L )
14:
     P i R ComputeRightBoundaryPoint( k i smooth , P i ref , d i R )
15:
     P L P L P i L
16:
     P R P R P i R
17:
end for
18:
return P L , P R

4. Path Optimization

The goal of path optimization is to optimize a discrete path to be a high quality path. To formulate the path optimization problem, firstly, we describe the path point representation based on the generated corridor. Secondly, we discuss quadratic objective functions and linear constraints of path optimization to jointly construct a QP problem. Finally, a two-steps optimization strategy is designed to quickly find a feasible solution.

4.1. Path Point Representation

Given the reference path, instead of directly taking the path points as the optimization variables, similar to [15], we use scale factors to identify the path points and take these factors as the optimization variables. Optimized points can be obtained by these factors, once the optimization procedure is completed. The representation of a path point within the generated corridor is described as follows:
P i = P i L + ρ i ( P i R P i L ) , i = { 1 , , n }
where ρ i [ 0 , 1 ] is the factor to identify point P i within the line segment between P i L and P i R . With this path point representation, we only need to use ρ i to represent a path point in the optimization process. Moreover, for a path with n waypoints, an optimization problem directly optimizing the x-direction and y-direction depends on 2 n variables. Based on the above discussion, only n factors are optimized.

4.2. Multi-Objective Path Optimization

4.2.1. Path Length Optimization

A coarse reference path often includes redundant displacement due to unreasonable path shapes. An evaluation term for the computing squared euclidean distance between adjacent path points is used to minimize the path length. The objective function for path length minimization is formulated as:
J l = i = 1 n 1 P i + 1 P i 2 = i = 1 n 1 ( x i + 1 x i ) 2 + ( y i + 1 y i ) 2 .
Let Δ P x , i = x i + 1 x i , Δ P y , i = y i + 1 y i , Δ x i = x i R x i L and Δ y i = y i R y i L . According to the path point representation in Equation (4), here, we consider the case of x-direction. Then, Δ P x , i can be rewritten as:
Δ P x , i = 1 1 Δ x i 0 0 Δ x i + 1 ρ i ρ i + 1 + 1 1 x i L x i + 1 L ,
where x i R and x i L are boundary points information given by the generated spatial corridor. Moreover, the path length minimization problem can be viewed as a quadratic form:
( Δ P x , i ) 2 = ρ ¯ i T H l , x , i ρ ¯ i + B l , x , i ρ ¯ i + constant ,
where ρ ¯ i = [ ρ i ρ i + 1 ] T , while H l , x , i and B l , x , i are constant matrices. For y-direction, we have the same form:
( Δ P y , i ) 2 = ρ ¯ i T H l , y , i ρ ¯ i + B l , y , i ρ ¯ i + constant ,
Finally, the total quadratic form is a combination of Equations (7) and (8):
J l = i = 1 n 1 ρ ¯ i T ( H l , x , i + H l , y , i ) ρ ¯ i + ( B l , x , i + B l , y , i ) ρ ¯ i + constant .

4.2.2. Path Smoothness Optimization

It is desirable to generate a smooth path for the vehicle to track so that the vehicle can run comfortably and steadily. In order to smooth the path, an elastic band cost function [33] is used to penalize the path smoothness:
J s = i = 1 n 2 ( P i + 2 P i + 1 ) ( P i + 1 P i ) 2 = i = 1 n 2 P i + 2 2 P i + 1 + P i 2 = i = 1 n 2 A i 2 ,
where
A i = 1 2 1 Δ x i 0 0 0 Δ x i + 1 0 0 0 Δ x i + 2 ρ i ρ i + 1 ρ i + 2 + 1 2 1 x i L x i + 1 L x i + 2 L .
The designed cost function is intended to shorten the distance among three adjacent points along the reference path. The shorter distance, the more likely these three adjacent points are in a straight line. The smoothness of the path with the straight line shape is guaranteed naturally. Therefore, curvature of the path can also be minimized by this cost function. Generally, the path tracking module of a self-driving car is prefered to a path with lower curvature due to vehicle kinematic restrictions.
For further consideration, an elastic band cost function in [34] is adopted to penalize the jerk of the B-spline for minimizing the curve smoothness. This cost function takes account of four adjacent points. In this paper, we used the similar term to smooth the path further:
J j = i = 1 n 3 ( P i + 3 2 P i + 2 + P i + 1 ) ( P i + 2 2 P i + 1 + P i ) 2 = i = 1 n 3 P i + 3 3 P i + 2 + 3 P i + 1 P i 2 = i = 1 n 3 S i 2 ,
where
S i = 1 3 3 1 T Δ x i 0 0 0 0 Δ x i + 1 0 0 0 0 Δ x i + 2 0 0 0 0 Δ x i + 3 ρ i ρ i + 1 ρ i + 2 ρ i + 3 + 1 3 3 1 T x i L x i + 1 L x i + 2 L x i + 3 L .
Define ρ ^ i = [ ρ i , ρ i + 1 , ρ i + 2 ] T and ρ ˜ i = [ ρ i , ρ i + 1 , ρ i + 2 , ρ i + 3 ] T . Both cost functions J s and J j are represented as quadratic forms:
J s = i = 1 n 1 ρ ^ i T ( H s , x , i + H s , y , i ) ρ ^ i + ( B s , x , i + B s , y , i ) ρ ^ i + constant ,
J j = i = 1 n 1 ρ ˜ i T ( H j , x , i + H j , y , i ) ρ ˜ i + ( B j , x , i T + B j , y , i T ) ρ ˜ i + constant ,
where H s , x , i , H s , y , i , B j , x , i and B j , y , i are the known parameters.

4.2.3. Path Deviation Optimization

Generally, the given reference path is safe and reliable. It is desirable that the optimized path keeps the shape of the reference path. For this, the sum of deviation between optimized points and reference points along the path is considered to minimize the deviation. As previously noted, the reference path points are taken as the middle points of the corridor to generate corridor boundaries. A reference path point in the corridor is represented as g ( i ) = ( P i L + 0.5 ( P i R P i L ) ) . The cost function of reference path deviation is measured as:
J d = i = 1 n P i g ( i ) 2 = i = 1 n D i 2 ,
where
D i = Δ x i ρ i + 0.5 Δ x i .
Then, J d can be rewritten as:
J d = i = 1 n ρ i T ( H d , x , i + H d , y , i ) ρ i + ( B d , x , i + B d , y , i ) ρ i + constant .
where H d , x , i , H d , y , i , B d , x , i and B d , y , i are constants.
The overall objective function is a linear combination of the cost functions of path length, smoothness and deviation, given as:
J t o t a l = ω l J l + ω s J s + ω j J j + ω d J d ,
where ω l , ω s , ω j and ω d are the corresponding weighting parameters.

4.3. Optimization Constraints

The constraints for path optimization in this paper are separated into two classes, including corridor and kinematic constraints. The corridor constraints are to constrain the optimization domain of the problem into the corridor region, i.e., paths generated in the iteration optimization process must be inside the corridor. To satisfy vehicle kinematic constraints, we consider the maximum turning radius of the vehicle and introduce maximum curvature constraints to limit the curvature of the path during optimization.

4.3.1. Corridor Boundary Constraints

Since the vehicle always passes the starting and ending points, these two boundary points are directly fixed without modification. That is, the boundary constraints are viewed as affine equality constraints. We introduce boundary constraints by fixing scalar factors of two boundary points:
ρ 1 = ρ start , ρ n = ρ goal ,
where ρ s t a r t and ρ g o a l represent the boundary factors of starting and ending points, respectively.

4.3.2. Corridor Internal Constraints

The feasibility of the path is guaranteed by enforcing each path segment inside the corresponding feasible domain. That is, the corridor internal constraints give the certain optimization scope to find the optimal solution within the corridor. These constraints are classified as affine inequality constraints:
0 + ε 2 ρ 2 1 ε 2 , 0 + ε 3 ρ 3 1 ε 3 , 0 + ε n 1 ρ n 1 1 ε n 1 ,
where ε i [ 0 , 0.5 ] and i = 2 , 3 , , n 1 . ε i is the constant parameter to adjust the optimization domain.

4.3.3. Curvature Constraints

Curvature constraints play an important role in guaranteeing the feasibility of the path kinematically. R min is defined as the minimum turning radius, which is given by the vehicle’s physical restrictions. The maximal curvature can be represented as κ max = 1 / R min . The following descriptions are based on an assumption that each path point P i is uniformly and densely distributed over the path. Thus, with the illustration in Figure 3, several approximate formulas are obtained as follows:
Δ s d ,
sin ( α ) = Δ s R d R , sin ( α ) α
where Δ s d = i = 1 n 1 P i + 1 ref P i ref / ( n 1 ) . To evaluate the path curvature, we first compute the following formulas according to the illustration in Figure 3:
μ = P i + 1 P i + P i + 1 P i + 2 , μ = P i + 1 P i + P i + 1 P i + 2 , = P i + P i + 2 2 P i + 1 ,
μ = 2 d sin ( α 2 ) Δ s 2 κ ,
where κ is the curvature and κ κ max . Equation (25) is used to approximately compute μ . Thus, we have:
μ Δ s 2 κ max ,
i.e.,
P i + P i + 2 2 P i + 1 Δ s 2 κ max .
The square of Equation (27) is used to limit the curvature:
P i + P i + 2 2 P i + 1 2 ( Δ s 2 κ max ) 2 .
The form of curvature constraint in Equation (28) is a nonlinear inequality. Directly introducing this constraint will make the optimization problem difficult to be solved. To full this gap, the Taylor approximation method retaining first-order item is used to linearize the curvature constraint in this paper. Denote F ( ξ i ) = P i + P i + 2 2 P i + 1 2 , where ξ i = [ P i , P i + 1 , P i + 2 ] T . One has:
F ( ξ i ) F ( ξ i ref ) + F ( ξ i ref ) ( ξ i ξ i ref ) ,
where ξ i ref can be obtained from the reference path. Denote E i as the constant item of Equation (29) and rewrite F ( ξ i ) as:
F ( ξ i ) = F ( ξ i ref ) ξ i + E i .
Equation (28) can be rewritten as:
0 F ( ξ i ) ( Δ s 2 κ max ) 2 ,
Combining Equations (30) and (31), we have:
E i F ( ξ i ref ) ξ i ( Δ s 2 κ max ) 2 E i ,
It is worth mentioning that optimization variables of the convex problem in this paper are the scalar factors . According to the path point representation in Equation (4), one has:
E i B i ρ ˜ i + G i ( Δ s 2 κ max ) 2 E i ,
where B i and G i are constants. Accordingly, the curvature constraints can be formulated as:
E 1 G 1 B 1 ρ ˜ 1 ( Δ s 2 κ max ) 2 E 1 G 1 , E 2 G 2 B 2 ρ ˜ 2 ( Δ s 2 κ max ) 2 E 2 G 2 , E n 2 G n 2 B n 2 ρ ˜ n 2 ( Δ s 2 κ max ) 2 E n 2 G n 2 .
To sum up, the optimization objectives presented in Equations (9), (14), (15) and (18) are quadratic functions ( ρ T H ρ + q ρ ). Boundary constraints in Equation (20) are formulated as affine equalities ( A eq ρ = b eq ). Both corridor internal constraints in Equation (21) and corridor boundary constraints in Equation (34) have the form of affine inequality ( A ie ρ b ie ). Therefore, the overall path optimization problem can be described as a general QP problem:
minimize ρ T H ρ + q ρ , subject to A eq ρ = b eq , A ie ρ b ie .
The implementation process of the path optimization is presented in Algorithm 2. Here, ρ = [ ρ 1 , ρ 2 , , ρ n ] T is defined as the set of scalar factors. The constraints in the path optimization stage are separated into two classes, including boundary constraints and curvature constraints. In particular, the optimization problem without curvature constraints can be solved efficiently. The smoothing cost function can smooth the path and push the path curvature into a reasonable level. Due to most cases that the curvature of initial reference path is reasonable, the generated path after path optimization without curvature constraints is already feasible in curvature. Therefore, a two-steps path optimization strategy in Algorithm 2 is proposed to speed up the path optimization in this paper. The first step optimization does not consider the curvature constraints (Line 4 in Algorithm 2). To speed up the optimization, we provide a initial guess for optimization (Line 3 in Algorithm 2). Here, the initial guess is considered to stay within the corridor and keep close to the reference path. This step may obtain a path which violates the maximal curvature. To check the feasibility of the path, we compute the maximal curvature of the generated path (Line 6 in Algorithm 2). If the generated path passes the check of validity of the maximum curvature (Line 7-9 in Algorithm 2), a feasible solution is returned. If the generated path violates the maximum curvature constraint, the procedure will enter the second step optimization, which is the so-called path optimization with curvature constraints. In this step, the solution of the first step is retained to initialize the second step. Significantly, the parameter Δ s is computed approximately before the optimization, which cannot guarantee that the optimized result is strictly feasible. For this, the designed second step optimization will iteratively check and optimize the path until the optimized path passes the check of validity. We first use the last optimization results to update the parameter Δ s (Line 12 in Algorithm 2). Then, the path optimization with maximal curvature constraints is activated once to find a solution (Line 13 in Algorithm 2). Finally, the procedure will compute the maximal curvature and further check the validity of the maximum curvature of the solution (Line 15–18 in Algorithm 2). The iteration optimization procedure will terminate until the optimized result passes the feasible check (Line 15–18 in Algorithm 2) or the number N reaches the upper iteration number N max (Line 11 in Algorithm 2).
Algorithm 2 Spatial path optimization.
  • Input: P ref , point set of reference path; P L and P R , boundary points of spatial corridor; κ max , the maximal curvature; N max , the upper number of iterations.
  • Output: P opt , waypoints of the optimized path
1:
N 0
2:
F l a g F a l s e
3:
ρ init ComputeInitialGuess( P ref , P L , P R )
4:
ρ opt OptimizationWithoutCurvatureConstraints( ρ init , P ref , P L , P R )
5:
P opt GetOptimizedPoints( ρ opt , P L , P R )
6:
κ GetPathMaxCurvature( P opt )
7:
if κ < κ max then
8:
     F l a g T r u e
9:
end if
10:
if F l a g   i s   F a l s e then
11:
    while  N < N max  do
12:
         Δ s UpdateSegmentArcLength( P opt )
13:
         ρ opt OptimizationWithCurvatureConstraints( ρ opt , P ref , P L , P R , Δ s )
14:
         P opt GetOptimizedPoints( ρ opt , P L , P R )
15:
         κ GetPathMaxCurvature( P opt )
16:
        if  κ < κ max  then
17:
           break
18:
        end if
19:
         N N + 1
20:
    end while
21:
end if
22:
return P opt

5. Experiment Results

5.1. Implementation Details

Since the optimization problem can be formulated as a QP one, the path optimization method proposed in this article is implemented in C++11 and with QP solver OSQP [31]. All modules of the complete algorithm are tested on a computer with an Intel i5-8265U processor at 1.60 GHz and 8 GB RAM.
To verify the performance of the proposed algorithm, we first conduct experiments in a vector road map, which is built by an open source mapping tool Lanelets [35]. The vector roadmap is shown in Figure 4. In our test, a global planning module is used to find the global planning path according to the given starting position and the terminal position. Due to manually labeling the map elements, the quality of paths from the global planning module is not guaranteed and these paths are needed to be further optimized. Our proposed algorithm is integrated into the planning module for global reference path optimization. In order to demonstrate that our approach is capable of handling path optimization for different scenarios, we have applied our approach to achieve standard and racing path optimization. Secondly, we also apply our approach to the on-road environment with obstacles for the safe path generation. Finally, in order to demonstrate complexity and feasibility of the designed method, experiments in two different environments are also conducted. A visualization of the path optimization process is shown in Figure 5.

5.2. Standard Path Optimization

In the autonomous driving scene, a high quality reference path is desirable to be provided for self-driving, which primarily fulfills requirements of safety, smoothness and following the initial path as much as possible. The requirement of the shortest path is considered as the secondary goal. Different road conditions including the straight line and turning curve are tested, as shown in Figure 6. Reference paths in Figure 6a,c are given by the global planner module. The points along the reference path are distributed unevenly. These paths are hard to be executed directly, due to having impracticable curvature. After optimization, resulting paths in Figure 6b,d are high quality paths adjusted in several aspects, including smoothness, curvature, deviation and length of the path.
As shown in Table 1, the cost of smoothness of optimized paths is reduced, reaching a lower level. That is, the quality of smoothness of the path is improved. The maximum curvature is calculated to show that the curvature of the generated path is optimized and subject to the maximal curvature constraint.

5.3. Racing Path Optimization

In racing games, a high quality racing path takes the smoothness and length of path into consideration, so that lap-times of driving can be reduced as much as possible. In this test, we apply our approach to find a path mainly minimizing both length and smoothness. Weights of w l , w a , w j and w d are adjusted to suit for this case, without modification of the algorithm frame. The optimization results in Figure 7b,d show that the generated paths deviate from the reference path and have a better performance in smoothness and length than the initial paths in Figure 7a,c. The associated evaluation results are shown in Table 2.

5.4. On Road Path Optimization

The above mentioned experiments are conducted in the obstacle-free environments. The corridor generation part is implemented using the consistent parameters, constructing a comparatively regular optimization corridor. The path optimization is achieved on the base of the regular corridor. In this subsection, we show that the proposed approach can be used to optimize the road path in the on-road environment with static obstacles shown in Figure 8. To ensure that the optimized path is passable in the obstacle environment, the corridor generation part first constructs an obstacle-free corridor. As shown in Figure 8, the generated blue corridor along the road is an obstacle-free corridor with irregular shapes. This irregular corridor is still suitable for the path optimization formulation. This corridor is also viewed as a convex domain for path optimization. We take the path connecting intermediate points of the generated corridor as the initial guess for the path optimization, as the red line shown in Figure 9. The initial guess is an non-smooth path with a large curvature. To consider the safe distance from the surrounding obstacles, we compute the parameters ε i = D s a f e / P i R P i L , i { 1 , 2 , , n 1 } to adjust the corridor internal constraints, where D s a f e is the safe distance from obstacles. In this test, we set D s a f e = 1.5 m. After path optimization, the returned result is a both smooth and kinematically feasible path, as the green line shown in Figure 9. Figure 10 shows the curvature distributions of the output path along the travel distance.

5.5. Complexity and Feasibility

Figure 11 shows the average time consumption of each part of the proposed algorithm. Paths with different lengths are adopted to test the efficiency of our proposed method. A path with more than 1900 waypoints can be optimized completely in less than 40 ms, which shows that the proposed algorithm is able to run in real-time.
In order to prove capabilities of the proposed algorithm to generate a both smooth and kinematically feasible path, we first make a comparison among following three cases: (i) path optimization only with boundary constraint. (ii) Path optimization with boundary constraint and curvature constraint. (iii) Two-steps path optimization with boundary constraint and alternative curvature constraint (showed in Algorithm 2). In Figure 12, the curvature distribution of the initial path surpasses the permissible maximum curvature, as shown in the red curve. In Figure 12b, the optimization result of case (i) violates the maximum curvature constraint, while results of case (ii) and case (iii) satisfy the maximum curvature constraint. In Figure 12a, all the cases can generate a feasible path satisfying the miximal curvature constraint.
Table 3 indicates that the case (iii) has the same level of computation time as the case (ii) in the complex road environment shown in Figure 13b. In the simple road environment shown in Figure 13a, the computation time of the case (iii) is close to the case (i), possessing a high computing speed.
According to the above description of Figure 12 and Table 3, it can be concluded that the case (i) is capable of finding a path in the corridor with a lower computation complexity, but fails to ensure the curvature feasibility of the path. The case (ii) is able to generate a feasible path but runs in a higher computational complexity than others. The case (iii), which is called the two-steps path optimization in Algorithm 2, achieves a good trade-off between the curvature feasibility and computation complexity.

6. Conclusions and Future Work

This paper presented a corridor-based method for spatial path optimization, which is mainly containing two modules: spatial corridor generation and two-steps path optimization. The spatial corridor construction module is designed to extract an optimization domain for path optimization. The two-steps path optimization approach is designed to generate a smooth path in real-time while ensuring the feasibility of path curvature. The overall path optimization is formulated as a general QP problem and solved efficiently. To evaluate our method, we used our proposed method to achieve path optimization in different environments. Simulation experiments demonstrate the validity of the proposed method. Further work will be presented to investigate the path speed optimization and integrate it into our system. Moreover, it is promising to extend its applications to other scenarios.

Author Contributions

Conceptualization, Y.L. (Yongkang Lu) and Y.W.; methodology, Y.L. (Yongkang Lu); software, Y.L. (Yongkang Lu); validation, Y.L. (Yongkang Lu), Y.W. and W.Z.; formal analysis, Y.L. (Yanzhou Li); investigation, M.C.; resources, W.Z.; data curation, M.C.; writing—original draft preparation, W.Z.; writing—review and editing, Y.L. (Yongkang Lu); visualization, W.Z.; supervision, Y.L. (Yanzhou Li); project administration, Y.W.; funding acquisition, Y.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China grant number 62003100, 62276074.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rasekhipour, Y.; Fadakar, I.; Khajepour, A. Autonomous driving motion planning with obstacles prioritization using lexicographic optimization. Control. Eng. Pract. 2018, 77, 235–246. [Google Scholar] [CrossRef]
  2. Claussmann, L.; Revilloud, M.; Gruyer, D.; Glaser, S. A review of motion planning for highway autonomous driving. IEEE Trans. Intell. Transp. Syst. 2019, 21, 1826–1848. [Google Scholar] [CrossRef]
  3. Katrakazas, C.; Quddus, M.; Chen, W.H.; Deka, L. Real-time motion planning methods for autonomous on-road driving: State-of-the-art and future research directions. Transp. Res. Part Emerg. Technol. 2015, 60, 416–442. [Google Scholar] [CrossRef]
  4. Hart, P.E.; Nilsson, N.J.; Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. 1968, 4, 100–107. [Google Scholar] [CrossRef]
  5. Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math. 1959, 1, 269–271. [Google Scholar] [CrossRef]
  6. LaValle, S.M.; Kuffner, J.J. Rapidly-Exploring Random Trees: Progress and Prospects. Algorithmic Comput. Robot. 2001, 5, 303–307. [Google Scholar]
  7. Kavraki, L.E.; Svestka, P.; Latombe, J.C.; Overmars, M.H. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE Trans. Robot. Autom. 1996, 12, 566–580. [Google Scholar] [CrossRef]
  8. Liu, M. Robotic online path planning on point cloud. IEEE Trans. Cybern. 2015, 46, 1217–1228. [Google Scholar] [CrossRef] [PubMed]
  9. Nelson, W. Continuous-curvature paths for autonomous vehicles. In Proceedings of the International Conference on Robotics and Automation, Scottsdale, AZ, USA, 14–19 May 1989; pp. 1260–1264. [Google Scholar]
  10. Berglund, T.; Jonsson, H.; Soderkvist, I. An obstacle-avoiding minimum variation b-spline problem. In Proceedings of the International Conference on Geometric Modeling and Graphics, London, UK, 16–18 July 2003; pp. 156–161. [Google Scholar]
  11. Hwang, J.H.; Arkin, R.C.; Kwon, D.S. Mobile robots at your fingertip: Bezier curve on-line trajectory generation for supervisory control. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2003) (Cat. No. 03CH37453), Las Vegas, NV, USA, 27–31 October 2003; Volume 2, pp. 1444–1449. [Google Scholar]
  12. Connors, J.; Elkaim, G. Analysis of a spline based, obstacle avoiding path planning algorithm. In Proceedings of the Vehicular Technology Conference-VTC2007-Spring, Dublin, Ireland, 22–25 April 2007; pp. 2565–2569. [Google Scholar]
  13. Kuwata, Y.; Teo, J.; Fiore, G.; Karaman, S.; Frazzoli, E.; How, J.P. Real-time motion planning with applications to autonomous urban driving. IEEE Trans. Control. Syst. Technol. 2009, 17, 1105–1118. [Google Scholar] [CrossRef]
  14. Ma, L.; Xue, J.; Kawabata, K.; Zhu, J.; Ma, C.; Zheng, N. Efficient sampling-based motion planning for on-road autonomous driving. IEEE Trans. Intell. Transp. Syst. 2015, 16, 1961–1976. [Google Scholar] [CrossRef]
  15. Dolgov, D.; Thrun, S.; Montemerlo, M.; Diebel, J. Practical search techniques in path planning for autonomous driving. Ann. Arbor. 2008, 1001, 18–80. [Google Scholar]
  16. Dolgov, D.; Thrun, S. Autonomous driving in semi-structured environments: Mapping and planning. In Proceedings of the IEEE international Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 3407–3414. [Google Scholar]
  17. Webb, D.J.; Van Den Berg, J. Kinodynamic RRT*: Asymptotically optimal motion planning for robots with linear dynamics. In Proceedings of the IEEE International Conference on Robotics and Automation, Karlsruhe, Germany, 6–10 May 2013; pp. 5054–5061. [Google Scholar]
  18. Cardamone, L.; Loiacono, D.; Lanzi, P.L.; Bardelli, A.P. Searching for the optimal racing line using genetic algorithms. In Proceedings of the IEEE Conference on Computational Intelligence and Games, Copenhagen, Denmark, 18–21 August 2010; pp. 388–394. [Google Scholar]
  19. Ding, W.; Zhang, L.; Chen, J.; Shen, S. Safe trajectory generation for complex urban environments using spatio-temporal semantic corridor. IEEE Robot. Autom. Lett. 2019, 4, 2997–3004. [Google Scholar] [CrossRef] [Green Version]
  20. Zhu, Z.; Schmerling, E.; Pavone, M. A convex optimization approach to smooth trajectories for motion planning with car-like robots. In Proceedings of the IEEE conference on decision and control (CDC), Osaka, Japan, 15–18 December 2015; pp. 835–842. [Google Scholar]
  21. Schouwenaars, T.; De Moor, B.; Feron, E.; How, J. Mixed integer programming for multi-vehicle path planning. In Proceedings of the European control conference (ECC), Porto, Portugal, 4–7 September 2001; pp. 2603–2608. [Google Scholar]
  22. Ziegler, J.; Bender, P.; Dang, T.; Stiller, C. Trajectory planning for Bertha—A local, continuous method. In Proceedings of the IEEE Intelligent Vehicles Symposium Proceedings, Dearborn, MI, USA, 8–11 June 2014; pp. 450–457. [Google Scholar]
  23. Wu, X.; Li, Z.; Kan, Z.; Gao, H. Reference trajectory reshaping optimization and control of robotic exoskeletons for human–robot co-manipulation. IEEE Trans. Cybern. 2019, 50, 3740–3751. [Google Scholar] [CrossRef] [PubMed]
  24. Chai, R.; Savvaris, A.; Tsourdos, A.; Xia, Y.; Chai, S. Solving multiobjective constrained trajectory optimization problem by an extended evolutionary algorithm. IEEE Trans. Cybern. 2018, 50, 1630–1643. [Google Scholar] [CrossRef] [PubMed]
  25. Caporale, D.; Fagiolini, A.; Pallottino, L.; Settimi, A.; Biondo, A.; Amerotti, F.; Massa, F.; Caro, S.D.; Corti, A.; Venturini, L. A planning and control system for self-driving racing vehicles. In Proceedings of the IEEE 4th International Forum on Research and Technology for Society and Industry (RTSI), Palermo, Italy, 10–13 September 2018; pp. 1–6. [Google Scholar]
  26. Braghin, F.; Cheli, F.; Melzi, S.; Sabbioni, E. Race driver model. Comput. Struct. 2008, 86, 1503–1516. [Google Scholar] [CrossRef]
  27. Ziegler, J.; Bender, P.; Schreiber, M.; Lategahn, H.; Strauss, T.; Stiller, C.; Dang, T.; Franke, U.; Appenrodt, N.; Keller, C.G.; et al. Making bertha drive—An autonomous journey on a historic route. IEEE Intell. Transp. Syst. Mag. 2014, 6, 8–20. [Google Scholar] [CrossRef]
  28. Gu, T.; Snider, J.; Dolan, J.M.; Lee, J. Focused trajectory planning for autonomous on-road driving. In Proceedings of the IEEE Intelligent Vehicles Symposium (IV), Gold Coast, Australia, 23–26 June 2013; pp. 547–552. [Google Scholar]
  29. Boyd, S.; Vandenberghe, L. Convex Optimization; Cambridge University Press: Cambridge, UK, 2004. [Google Scholar]
  30. Domahidi, A.; Chu, E.; Boyd, S. ECOS: An SOCP solver for embedded systems. In Proceedings of the European Control Conference (ECC), Zurich, Switzerland, 17–19 July 2013; pp. 3071–3076. [Google Scholar]
  31. Stellato, B.; Banjac, G.; Goulart, P.; Bemporad, A.; Boyd, S. OSQP: An operator splitting solver for quadratic programs. Math. Program. Comput. 2020, 12, 637–672. [Google Scholar] [CrossRef]
  32. Zhou, J.; He, R.; Wang, Y.; Jiang, S.; Zhu, Z.; Hu, J.; Miao, J.; Luo, Q. Dl-iaps and pjso: A path/speed decoupled trajectory optimization and its application in autonomous driving. arXiv 2020, arXiv:2009.11135. [Google Scholar]
  33. Quinlan, S.; Khatib, O. Elastic bands: Connecting path planning and control. In Proceedings of the IEEE International Conference on Robotics and Automation, Atlanta, GA, USA, 2–6 May 1993; pp. 802–807. [Google Scholar]
  34. Gao, F.; Wang, L.; Zhou, B.; Zhou, X.; Pan, J.; Shen, S. Teach-repeat-replan: A complete and robust system for aggressive flight in complex environments. IEEE Trans. Robot. 2020, 36, 1526–1545. [Google Scholar] [CrossRef]
  35. Bender, P.; Ziegler, J.; Stiller, C. Lanelets: Efficient map representation for autonomous driving. In Proceedings of the IEEE Intelligent Vehicles Symposium Proceedings, Dearborn, MI, USA, 8–11 June 2014; pp. 420–425. [Google Scholar]
Figure 1. An illustration of spatial corridor. The black lines represent the road boundaries. The green grid represents the generated corridor. The blue line represents the reference path.
Figure 1. An illustration of spatial corridor. The black lines represent the road boundaries. The green grid represents the generated corridor. The blue line represents the reference path.
Electronics 12 00819 g001
Figure 2. (a) The corridor is obtained in the case of the turn, with θ 2 = 90 and α 2 = 90 . The generated corridor in this case extracts a non-ideal region. In (b), an ideal corridor is constructed by readjusting the slopes of horizontal lines, in which θ 1 = θ 2 and α 1 = α 2 .
Figure 2. (a) The corridor is obtained in the case of the turn, with θ 2 = 90 and α 2 = 90 . The generated corridor in this case extracts a non-ideal region. In (b), an ideal corridor is constructed by readjusting the slopes of horizontal lines, in which θ 1 = θ 2 and α 1 = α 2 .
Electronics 12 00819 g002
Figure 3. Illustration of linearized procedure of curvature constraint.
Figure 3. Illustration of linearized procedure of curvature constraint.
Electronics 12 00819 g003
Figure 4. The road map built in campus environment.
Figure 4. The road map built in campus environment.
Electronics 12 00819 g004
Figure 5. An illustration of the results of path optimization. Spatial corridor and high quality path are generated after optimization. The spatial corridor is directly constructed by the initial path. After optimization, a path is obtained within the region of the spatial corridor. The quality of resulting path (the blue line) is higher than the one before (the red line).
Figure 5. An illustration of the results of path optimization. Spatial corridor and high quality path are generated after optimization. The spatial corridor is directly constructed by the initial path. After optimization, a path is obtained within the region of the spatial corridor. The quality of resulting path (the blue line) is higher than the one before (the red line).
Electronics 12 00819 g005
Figure 6. Results of standard path optimization in the static turning environment. (a) Initial path; (b) Optimized path; (c) Initial path; (d) Optimized path.
Figure 6. Results of standard path optimization in the static turning environment. (a) Initial path; (b) Optimized path; (c) Initial path; (d) Optimized path.
Electronics 12 00819 g006
Figure 7. Results of racing line optimization. The red lines represent the initial paths. The blue lines represent the optimized paths. (a) Initial path; (b) Optimized path; (c) Initial path; (d) Optimized path.
Figure 7. Results of racing line optimization. The red lines represent the initial paths. The blue lines represent the optimized paths. (a) Initial path; (b) Optimized path; (c) Initial path; (d) Optimized path.
Electronics 12 00819 g007
Figure 8. Corridor generation in the on-road environment. The black reatangles represent the static obstacles. The blue grid represents the generating corridor.
Figure 8. Corridor generation in the on-road environment. The black reatangles represent the static obstacles. The blue grid represents the generating corridor.
Electronics 12 00819 g008
Figure 9. Path optimization in the on-road environment. The red line represents the initial path, while the green line represents the optimized path.
Figure 9. Path optimization in the on-road environment. The red line represents the initial path, while the green line represents the optimized path.
Electronics 12 00819 g009
Figure 10. Curvature distributions of the optimized path.
Figure 10. Curvature distributions of the optimized path.
Electronics 12 00819 g010
Figure 11. Time consumption of each part of the proposed method, including corridor generation, path optimization and complete process.
Figure 11. Time consumption of each part of the proposed method, including corridor generation, path optimization and complete process.
Electronics 12 00819 g011
Figure 12. Comparison of the curvature distribution of reference path and paths optimized by different methods. The red curve represents the curvature distributions of the initial path. Blue, green and yellow curves are generated by the method only with boundary constraint, method with boundary constraint and curvature constraint and two-step optimization method, respectively. (a) Optimization results in simple environment; (b) Optimization results in complex environment.
Figure 12. Comparison of the curvature distribution of reference path and paths optimized by different methods. The red curve represents the curvature distributions of the initial path. Blue, green and yellow curves are generated by the method only with boundary constraint, method with boundary constraint and curvature constraint and two-step optimization method, respectively. (a) Optimization results in simple environment; (b) Optimization results in complex environment.
Electronics 12 00819 g012
Figure 13. Different environments are used to test the designed method. (a) is a simple environment with normal lanes, while (b) is a unconventional environment with complex lanes. (a) Path optimization in simple environment; (b) Path optimization in complex environment.
Figure 13. Different environments are used to test the designed method. (a) is a simple environment with normal lanes, while (b) is a unconventional environment with complex lanes. (a) Path optimization in simple environment; (b) Path optimization in complex environment.
Electronics 12 00819 g013
Table 1. Comparison of evaluation items of paths.
Table 1. Comparison of evaluation items of paths.
w l = 0.500 ,   w s = 0.250 ,   w j = 0.800 ,   w d = 0.300
PathLength CostSmoothness CostDeviation CostMaximum Curvature Cost
Figure 7a105.17043.3710.0000.381
Figure 7b104.7901.9682.2660.114
Figure 7c177.62748.6500.0000.427
Figure 7d176.7643.0933.1820.130
Table 2. Comparisons of evaluation items of paths.
Table 2. Comparisons of evaluation items of paths.
w l = 2.050 ,   w s = 1.200 ,   w j = 0.001 ,   w d = 1.880
PathLength CostSmoothness CostDeviation CostMaximum Curvature Cost
Figure 8a125.21541.5500.0000.107
Figure 8b122.4414.304111.2620.039
Figure 8c183.81932.0780.0000.063
Figure 8d180.9073.400137.7220.028
Table 3. Performance of path optimization.
Table 3. Performance of path optimization.
Time Consumption (s)
Env.Without Curvature ConstraintsWith Curvature ConstraintsTwo-Steps Optimization
Figure 9a0.006110.009970.00653
Figure 9b0.005370.016060.01678
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lu, Y.; Wu, Y.; Zhong, W.; Li, Y.; Chen, M. Spatial Path Smoothing for Car-like Robots Using Corridor-Based Quadratic Optimization. Electronics 2023, 12, 819. https://doi.org/10.3390/electronics12040819

AMA Style

Lu Y, Wu Y, Zhong W, Li Y, Chen M. Spatial Path Smoothing for Car-like Robots Using Corridor-Based Quadratic Optimization. Electronics. 2023; 12(4):819. https://doi.org/10.3390/electronics12040819

Chicago/Turabian Style

Lu, Yongkang, Yuanqing Wu, Wenjian Zhong, Yanzhou Li, and Meng Chen. 2023. "Spatial Path Smoothing for Car-like Robots Using Corridor-Based Quadratic Optimization" Electronics 12, no. 4: 819. https://doi.org/10.3390/electronics12040819

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop