Soft and hard constraint combined space-time joint trajectory planning method
Through the combined space-time joint trajectory planning method of soft and hard constraints, the pass corridor and iterative optimization framework are used to solve the continuity and consistency of trajectory optimization in urban auxiliary navigation, reducing the solution time and improving efficiency, ensuring the trajectory Optimization of security and hardware performance.
Patent Information
- Application Number
- CN202410873405.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-11-01
AI Technical Summary
Traditional trajectory optimization methods have problems such as poor trajectory continuity and consistency, difficulty in solving and time-consuming in urban auxiliary navigation. Especially when hardware performance is limited, it is difficult to effectively reduce the waste of computing resources and improve efficiency.
The space-time joint trajectory planning method combined with soft and hard constraints is adopted to generate corridors, solve soft and hard constraints through perceived data and positioned data. The iterative optimization framework uses historical trajectories as the initial stage, combining the Jacobian matrix and Heather matrix for Optimize to ensure the safety and efficiency of the trajectory.
Reduce the solution time, ensure the consistency and consistency of the trajectory, solve the problem through soft constraint optimization efficiency, and add a hard constraint protection layer in case of collisions to ensure the safety of the optimized trajectory.
Smart Images

Figure CN118877009A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile intelligence and autonomous driving, and in particular to a spatiotemporal joint trajectory planning method combining soft and hard constraints. Background Art
[0002] With the development of automobile intelligence, urban assisted navigation technology has gradually received attention. Technology in the field of urban assistance effectively reduces the driving burden of drivers and improves driving safety. Local trajectory optimization technology is an important part of urban assisted navigation technology. It is a key factor in ensuring navigation safety and comfort. Traditional trajectory optimization methods are mostly based on the decoupled Frenet coordinate system. Since path planning and speed planning are performed independently, the continuity and consistency of the trajectory are poor. In addition, the Frenet coordinate system cannot describe the vehicle dynamics characteristics under large curvature curves; the spatiotemporal joint planning method is mostly based on the Cartesian coordinate system, which can effectively guarantee the performance of the optimized trajectory, but due to nonlinear characteristics such as spatiotemporal coupling and obstacle avoidance constraints, the solution is difficult and time-consuming; the hierarchical planning method based on the Frenet coordinate system and the Cartesian coordinate system, although it guarantees the effect of the trajectory in extreme scenarios and reduces the time-consuming solution, it will cause a waste of computing resources in most scenarios, greatly increasing costs. This is where this application needs to focus on improvement. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a spatiotemporal joint trajectory planning method combining soft and hard constraints, which reduces the solution time under the premise of limited hardware performance, while not sacrificing the quality of the optimized trajectory and ensuring the coherence and consistency of the results.
[0004] In order to solve the above technical problems, the present invention provides a spatiotemporal joint trajectory planning method combining soft and hard constraints. The upstream input of the trajectory planning method is perception data and positioning data, which are the road centerline and the global vehicle posture respectively. The planning history input is the previous frame planning trajectory and StitchState. Each frame planning performs corridor generation, soft constraint solving and hard constraint solving respectively, and finally obtains the planning trajectory; the method comprises the following steps:
[0005] Step S1: Initialize stitch_state to the current position of the vehicle, origin_point to stitch_state,
[0006] ref_path is the reference line, guess_path is ref_path;
[0007] Step S2: construct the drivable area on ref_path by expanding the obstacles;
[0008] Step S3: using guess_path as the initial solution and ref_path as the reference trajectory, applying the drivable area as a soft constraint to solve the initial solution of the optimized trajectory;
[0009] Step S4: initial collision detection;
[0010] If there is a collision, jump to step S5;
[0011] If there is no collision, jump to step S6;
[0012] Step S5: Taking the initial solution of the optimized trajectory as the initial solution, ref_path as the reference trajectory, and applying the drivable area as a hard constraint to solve the final solution of the optimized trajectory;
[0013] Step S6: stitch_state is the corresponding point on result_path at the next frame planning moment, guess_path is the corresponding point on result_path starting from stitch_state, and the position of the last trajectory point is guessed through result_path.
[0014] The upstream inputs of the trajectory planning method are perception data and positioning data, which are the road centerline and the global vehicle pose, respectively.
[0015] The step S2 comprises the following steps:
[0016] Step S21: Envelope the vehicle body with n circles of equal radius, and the formula for the center of each point is as follows:
[0017]
[0018] Among them, x and y are the center points of the rear axle of the vehicle, L R , L w and L F are the distance from the rear end of the vehicle to the rear axle, the distance from the front axle to the rear axle, and the distance from the front end of the vehicle to the front axle, respectively. θ is the heading angle of the vehicle;
[0019] Step S22: Expand each point as the center to form a passage corridor:
[0020] x i min ≤x i ≤x i max ;
[0021] x i min ≤y i ≤x i max .
[0022] The step S3 comprises the following steps:
[0023] Step S31: Convert the hard constraints of the drivable area into a cost function using the outside point method. First, calculate the cost:
[0024]
[0025] Among them, cost ori is the cost of the original problem, cost x is the cost of position x, cost y is the cost of position y;
[0026] Step S32: Calculate the Jacobian matrix of the soft constraint:
[0027]
[0028]
[0029] Step S33: Calculate the Heather matrix of the soft constraint:
[0030]
[0031]
[0032] The step S4 comprises the following steps:
[0033] Step S41: construct the state space equation:
[0034]
[0035] Step S42: At the cost of state quantity and control quantity deviation and soft constraints, the objective function is constructed as follows:
[0036] J = ∫(Q||x(τ)-x ref (τ)|| 2 +R||u(τ)-u ref (τ)|| 2 +c soft ); Step S43: construct the initial state constraints and dynamic constraints as follows:
[0037] x(0)=x init ;
[0038] u(0)=u init ;
[0039]
[0040] Step S44: Solve the optimization problem and perform collision detection on the optimal solution. If a collision occurs, jump to step S5, otherwise jump to step S6.
[0041] The step S5 comprises the following steps:
[0042] Step S51: Convert the hard constraints into a general form:
[0043] c(i)=x i min -x(i)≤0;
[0044] c(i+1)=x(i)-x i max ≤0;
[0045] Step S52: Taking x1 and y1 as an example, the Jacobian matrix of the transformed constraint cost is calculated:
[0046]
[0047] Step S53: using the augmented Lagrangian method to solve the optimization problem with inequality constraints.
[0048] The step S6 comprises the following steps:
[0049] Step S61: Calculate stitch_state:
[0050] stitch_state=result_path(k);
[0051] Step S62: Calculate guess_path:
[0052] [gp(0) gp(1) … gp(n-1) gp(n)] = [rp(1) rp(2) … rp(n) rp(n)+drp(n)].
[0053] The superior effects of the present invention are:
[0054] 1) The present invention opens up a convex space through the passage corridor, converts the nonlinear obstacle avoidance cost into obstacle avoidance constraints, and combines the soft and hard constraints to reduce the solution time while ensuring that the trajectory is collision-free;
[0055] 2) The present invention proposes an iterative trajectory optimization framework, which uses the historical solution trajectory as the initial stage of the current frame trajectory, reducing the number of trajectory convergence iterations and thus reducing the time consumption;
[0056] 3) The present invention proposes a trajectory optimization method that combines soft and hard constraints, which reduces the time consumption of solving the optimization problem through soft constraints; at the same time, a hard constraint protection layer is added. When the soft constraint trajectory collides, the trajectory can be replanned to ensure the safety of the optimized trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0058] Figure 1 is a schematic diagram of an iterative trajectory optimization structure of a specific embodiment of the present invention;
[0059] Figure 2 It is a schematic diagram of the iterative trajectory optimization effect of a specific embodiment of the present invention. DETAILED DESCRIPTION
[0060] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0061] like Figure 1 As shown, the present invention provides a spatiotemporal joint trajectory planning method combining soft and hard constraints. The upstream input of the trajectory planning method is perception data and positioning data, which are the road centerline and the global vehicle posture respectively. The planning history input is the previous frame planning trajectory and StitchState. Each frame planning performs corridor generation, soft constraint solving and hard constraint solving respectively, and finally obtains the planning trajectory; the method comprises the following steps:
[0062] Step S1: Initialize stitch_state to the current position of the vehicle, origin_point to stitch_state, ref_path to the reference line, and guess_path to ref_path;
[0063] Step S11: The initial input is as follows:
[0064] stitch_state(0)=car_state(0);
[0065] origin_point(0)=stitch_state(0);
[0066] ref_path(0)=center_line(0);
[0067] guess_path(0)=ref_path(0).
[0068] Step S2: construct the drivable area on ref_path by expanding the obstacles;
[0069] Step S21: Envelope the vehicle body with n circles of equal radius, and the formula for the center of each point is as follows:
[0070]
[0071] Among them, x and y are the center points of the rear axle of the vehicle, L R , L w and L F are the distance from the rear end of the vehicle to the rear axle, the distance from the front axle to the rear axle, and the distance from the front end of the vehicle to the front axle, respectively. θ is the heading angle of the vehicle;
[0072] Step S22: Expand each point as the center to form a passage corridor:
[0073] x i min ≤x i ≤x i max ;
[0074] x i min ≤y i ≤x i max .
[0075] Step S3: using guess_path as the initial solution and ref_path as the reference trajectory, applying the drivable area as a soft constraint to solve the initial solution of the optimized trajectory;
[0076] Step S31: Convert the hard constraints of the drivable area into a cost function using the outside point method. First, calculate the cost:
[0077]
[0078] Among them, cost ori is the cost of the original problem, cost x is the cost of position x, cost y is the cost of position y; Step S32: Calculate the Jacobian matrix of the soft constraint:
[0079]
[0080] Step S33: Calculate the Heather matrix of the soft constraint:
[0081]
[0082]
[0083] Step S4: Initial solution collision detection; if collision, jump to step S5; if no collision, jump to step S6; Step S41: Construct state space equation:
[0084]
[0085] Step S42: At the cost of state quantity and control quantity deviation and soft constraints, the objective function is constructed as follows:
[0086] J = ∫(Q||x(τ)-x ref (τ)|| 2+R||u(τ)-u ref (τ)|| 2 +c soft );
[0087] Step S43: Construct the initial state constraints and dynamic constraints as follows:
[0088] x(0)=x init ;
[0089] u(0)=u init ;
[0090]
[0091] Step S44: Solve the optimization problem and perform collision detection on the optimal solution. If a collision occurs, jump to step S5, otherwise jump to step S6.
[0092] Step S5: Taking the initial solution of the optimized trajectory as the initial solution, ref_path as the reference trajectory, and applying the drivable area as a hard constraint to solve the final solution of the optimized trajectory;
[0093] Step S51: Convert the hard constraints into a general form:
[0094] c(i)=x i min -x(i)≤0;
[0095] c(i+n)=x(i)-x i min ≤0;
[0096] Step S52: Taking x1 and y1 as an example, the Jacobian matrix of the transformed constraint cost is calculated:
[0097]
[0098] Step S53: using the augmented Lagrangian method to solve the optimization problem with inequality constraints.
[0099] Step S6: stitch_state is the corresponding point on result_path at the next frame planning moment, guess_path is the corresponding point on result_path starting from stitch_state, and the position of the last track point is guessed through result_path;
[0100] Step S61: Calculate stitch_state:
[0101] stitch_state=result_path(k);
[0102] Step S62: Calculate guess_path:
[0103] [gp(0) gp(1) … gp(n-1) gp(n)] = [rp(1) rp(2) … rp(n) rp(n)+drp(n)].
[0104] Figure 2 The figure shows the effect of the iterative trajectory optimization method of the present invention. The vehicle changes lanes at an initial speed of 36 km / h, senses the presence of a dynamic obstacle in the target lane, and drives at a constant speed of 36 km / h. The planner uses deceleration to avoid the obstacle, plans the obstacle avoidance trajectory, and hands it over to the downstream horizontal and vertical coupling controller for horizontal and vertical tracking to complete the vehicle's obstacle avoidance behavior. There is no re-planning phenomenon in the entire lane change trajectory optimization process, and the collision-free lane change trajectory optimization goal is effectively achieved.
[0105] Aiming at the problem of trajectory optimization of intelligent line-controlled unmanned vehicles, the present invention proposes a spatiotemporal joint trajectory planning method combining soft and hard constraints, and also proposes an iterative optimization framework to improve the algorithm time consumption. The trajectory optimization method of the present invention provides useful assistance for the planning of intelligent line-controlled unmanned vehicles.
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A spatiotemporal joint trajectory planning method combining soft and hard constraints, characterized by: The upstream input of the trajectory planning method is perception data and positioning data, which are the road centerline and the global vehicle posture respectively. The planning history input is the previous frame planning trajectory and StitchState. Each frame planning performs corridor generation, soft constraint solving and hard constraint solving respectively, and finally obtains the planned trajectory.
2. The spatiotemporal joint trajectory planning method combining soft and hard constraints according to claim 1, characterized in that: The steps include: Step S1: Initialize stitch_state to the current position of the vehicle, origin_point to stitch_state, ref_path to the reference line, and guess_path to ref_path; Step S2: construct the drivable area on ref_path by expanding the obstacles; Step S3: using guess_path as the initial solution and ref_path as the reference trajectory, applying the drivable area as a soft constraint to solve the initial solution of the optimized trajectory; Step S4: initial collision detection; If there is a collision, jump to step S5; If there is no collision, jump to step S6; Step S5: Taking the initial solution of the optimized trajectory as the initial solution, ref_path as the reference trajectory, and applying the drivable area as a hard constraint to solve the final solution of the optimized trajectory; Step S6: stitch_state is the corresponding point on result_path at the next frame planning moment, guess_path is the corresponding point on result_path starting from stitch_state, and the position of the last trajectory point is guessed through result_path.
3. The spatiotemporal joint trajectory planning method combining soft and hard constraints according to claim 1, characterized in that: The step S2 comprises the following steps: Step S21: Envelope the vehicle body with n circles of equal radius, and the formula for the center of each point is as follows: Among them, x and y are the center points of the rear axle of the vehicle, L R , L w and L F are the distance from the rear end of the vehicle to the rear axle, the distance from the front axle to the rear axle, and the distance from the front end of the vehicle to the front axle, respectively. θ is the heading angle of the vehicle; Step S22: Expand each point as the center to form a passage corridor: x imin ≤x i ≤x imax ; x imin ≤y i ≤x imax 。 4. The spatiotemporal joint trajectory planning method combining soft and hard constraints according to claim 1, characterized in that: The step S3 comprises the following steps: Step S31: Convert the hard constraints of the drivable area into a cost function using the outside point method. First, calculate the cost: Among them, cost ori is the cost of the original problem, cost x is the cost of position x, cost y is the cost of position y; Step S32: Calculate the Jacobian matrix of the soft constraint: Step S33: Calculate the Heather matrix of the soft constraint:
5. The method for spatiotemporal joint trajectory planning combining soft and hard constraints according to claim 1, characterized in that: The step S4 comprises the following steps: Step S41: construct the state space equation: Step S42: At the cost of state quantity and control quantity deviation and soft constraints, the objective function is constructed as follows: J=∫(Q||x(τ)-x ref (t)|| 2 +R||u(τ)-u ref (t)|| 2 +c soft ); Step S43: Construct the initial state constraints and dynamic constraints as follows: x(0)=x init ; u(0)=u init ; Step S44: Solve the optimization problem and perform collision detection on the optimal solution. If a collision occurs, jump to step S5, otherwise jump to step S6.
6. The method for spatiotemporal joint trajectory planning combining soft and hard constraints according to claim 1, characterized in that: The step S5 comprises the following steps: Step S51: Convert the hard constraints into a general form: c(i)=x imin -x(i)≤0; c(i+n)=x(i)-x imax ≤0; Step S52: Taking x1 and y1 as an example, the Jacobian matrix of the transformed constraint cost is calculated: Step S53: using the augmented Lagrangian method to solve the optimization problem with inequality constraints.
7. The method for spatiotemporal joint trajectory planning combining soft and hard constraints according to claim 1, characterized in that: The step S6 comprises the following steps: Step S61: Calculate stitch_state: stitch_state=result_path(k); Step S62: Calculate guess_path: [gp(0) gp(1) … gp(n-1) gp(n)] = [rp(1) rp(2) … rp(n) rp(n)+drp(n)].
8. A computer system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claim 1.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
