Vehicle trajectory generation method, electronic equipment and storage medium

By sampling and optimizing the vehicle trajectory parameters, a target trajectory that meets kinematic constraints is generated, and the safety and efficiency problems of autonomous driving trajectory planning in complex environments is solved, and efficient and comfortable autonomous driving is achieved.

CN119911294APending Publication Date: 2025-05-02ZHEJIANG LEAPMOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510046756.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Autonomous driving trajectory planning faces challenges of complex road environments and dynamic traffic conditions, making it difficult to ensure that vehicles can reach their destination safely, efficiently and comfortably.

Method used

By sampling the trajectory parameters of the vehicle while driving, the action sequence is obtained, the initial trajectory is calculated, and the target trajectory is generated through optimization processing to satisfy kinematic constraints for use in autonomous driving.

Benefits of technology

An efficient and comfortable vehicle driving trajectory planning is achieved, ensuring that the target trajectory meets kinematic constraints and supports the safe and autonomous driving of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119911294A_ABST
    Figure CN119911294A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle track generation method, electronic equipment and a storage medium, and aims to solve the problems. The method comprises the following steps: executing sampling operation on track parameters when a vehicle is driven, and obtaining an action sequence of the vehicle; calculating the action sequence to obtain an initial track; the initial track is optimized, a target track is generated, and the target track is used for automatic driving of the vehicle. The generated target track meets kinematics constraints, the target track is used for automatic driving of the vehicle, and efficient and comfortable vehicle driving track planning is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed in the present application relate to the field of autonomous driving technology, and more specifically, to a vehicle trajectory generation method, an electronic device, and a storage medium. Background Art

[0002] Autonomous driving trajectory planning usually calculates a safe, efficient and comfortable driving trajectory based on the vehicle's current position, surrounding environment information (such as obstacles, traffic signals, etc.) and the vehicle's own status. In practical applications, trajectory planning faces many challenges, such as complex road environments and dynamically changing traffic conditions. How to ensure that the vehicle can reach its destination smoothly and safely is still a key issue. Summary of the invention

[0003] According to an embodiment of the present application, the present application proposes a vehicle trajectory generation method, an electronic device and a storage medium to solve the above-mentioned problem.

[0004] The first aspect of the present application discloses a vehicle trajectory generation method, comprising: performing a sampling operation on trajectory parameters of a vehicle when driving to obtain an action sequence of the vehicle; calculating the action sequence to obtain an initial trajectory; optimizing the initial trajectory to generate a target trajectory, and the target trajectory is used for automatic driving of the vehicle.

[0005] In some embodiments, the sampling operation is performed on the trajectory parameters of the vehicle when driving to obtain the action sequence of the vehicle, including: performing lateral action sampling on the trajectory parameters to obtain lateral action within a preset time period, and performing longitudinal action sampling on the trajectory parameters to obtain longitudinal action within the preset time period, wherein the lateral action within the preset time period corresponds to the longitudinal action within the preset time period, and the lateral action and longitudinal action within the preset time period form a plurality of initial sampling actions; and pruning the plurality of initial sampling actions to obtain the action sequence.

[0006] In some embodiments, the lateral motion sampling of the trajectory parameters includes: performing a first lateral space sampling to obtain first lateral sampling information, wherein the first lateral sampling information includes lane change information of the vehicle; performing a second lateral space sampling to obtain second lateral sampling information, wherein the second lateral sampling information includes steering wheel angle information of the vehicle; and determining the lateral motion based on the first lateral sampling information and the second lateral sampling information.

[0007] In some embodiments, the longitudinal motion sampling of the trajectory parameters includes: performing longitudinal spatial sampling to obtain the longitudinal motion, wherein the longitudinal motion includes a longitudinal acceleration change rate of the vehicle.

[0008] In some embodiments, the pruning process includes: deleting actions that do not comply with lane change rules from the multiple initial sampling actions.

[0009] In some embodiments, the calculating the action sequence to obtain the initial trajectory includes: generating the initial action trajectory by deducing using a kinematic model based on the action sequence; and optimizing the initial action trajectory using a preset cost function to obtain the initial trajectory.

[0010] In some embodiments, the preset cost function includes at least one of a traffic efficiency cost function, a safety cost function, and a comfort cost function.

[0011] In some embodiments, the optimizing the initial trajectory to generate the target trajectory includes: iterating the initial trajectory using a target constraint and an objective function to obtain the target trajectory; wherein the target constraint is determined based on the initial trajectory; and the objective function includes at least one of an action cost function, a state cost function, and a collision cost function.

[0012] The second aspect of the present application discloses an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the vehicle trajectory generation method described in the first aspect.

[0013] The third aspect of the present application discloses a non-volatile computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the vehicle trajectory generation method described in the first aspect is implemented.

[0014] The beneficial effects of the present application include: performing sampling operations on trajectory parameters of a vehicle when driving, obtaining an action sequence of the vehicle, calculating the action sequence to obtain an initial trajectory, and further processing and optimizing the initial trajectory to generate a target trajectory, wherein the generated target trajectory satisfies kinematic constraints, and the target trajectory is used for automatic driving of the vehicle, thereby achieving efficient and comfortable vehicle driving trajectory planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present application will be further described below in conjunction with the accompanying drawings and implementation methods, in which:

[0016] Figure 1 is a flow chart of a vehicle trajectory generation method according to an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0018] Figure 3It is a schematic diagram of the structure of the non-volatile computer-readable storage medium of an embodiment of the present application. DETAILED DESCRIPTION

[0019] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0020] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, and can mean including any one or more elements selected from the set consisting of A, B, and C. In addition, the terms "first", "second", and "third" in this application are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0021] Traditional trajectory planning methods first plan the lateral path, and then plan the longitudinal speed based on the lateral path, which often loses the optimality of the trajectory. In addition, traditional trajectory planning methods are generally only performed in the reference line coordinate system (Frenet coordinate system), which is too dependent on the road reference line, so that the obtained trajectory is directly affected by the curvature of the road reference line and cannot fully meet the kinematic constraints, which in turn has a great adverse effect on downstream control.

[0022] To this end, the present application provides a vehicle trajectory generation method, an electronic device and a storage medium to solve the above problems.

[0023] In order to enable those skilled in the art to better understand the technical solution of the present application, the technical solution of the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0024] See also Figure 1 , Figure 1 The flowchart of the vehicle trajectory generation method of the embodiment of the present application is shown in FIG. The execution subject of the method can be an electronic device with computing function, such as a vehicle-mounted device, a microcomputer, a server, and a mobile device such as a laptop computer and a tablet computer.

[0025] It should be noted that if there are substantially the same results, the method of the present application is not limited to Figure 1 The process sequence shown is limited.

[0026] In some possible implementations, the method may be implemented by a processor calling computer-readable instructions stored in a memory, such as Figure 1 As shown, the method may include the following steps:

[0027] S11: Perform sampling operation on trajectory parameters of the vehicle when driving to obtain the action sequence of the vehicle.

[0028] The trajectory parameters of the vehicle are sampled when the vehicle is driving to obtain the vehicle's motion sequence. For example, periodic motion sampling is performed when the vehicle is driving to obtain the vehicle's motion state recorded in chronological order. The sampling operation can be understood as predicting the vehicle's motion trajectory. For example, based on the vehicle state and road conditions at the current moment, the trajectory parameters of the vehicle at the next moment are obtained. The trajectory parameters may include the vehicle's speed, position coordinates, steering wheel angle information, etc.

[0029] S12: Calculate the action sequence to obtain an initial trajectory.

[0030] The action sequence is calculated to obtain an initial trajectory. For example, a preset deduction calculation is performed based on the sampled action sequence to obtain an initial trajectory of the vehicle, wherein the calculated initial trajectory satisfies kinematic constraints.

[0031] S13: Optimize the initial trajectory to generate a target trajectory, which is used for automatic driving of the vehicle.

[0032] The initial trajectory is optimized to generate a target trajectory. For example, the initial trajectory that satisfies the kinematic constraints is optimized to obtain the target trajectory, wherein the target trajectory is used for automatic driving of the vehicle to achieve safe, efficient and comfortable vehicle driving trajectory planning.

[0033] In this embodiment, a sampling operation is performed on the trajectory parameters of the vehicle when driving, the vehicle's action sequence is obtained, the action sequence is calculated to obtain an initial trajectory, and further, the initial trajectory is processed and optimized to generate a target trajectory, wherein the generated target trajectory satisfies kinematic constraints, and the target trajectory is used for automatic driving of the vehicle, thereby achieving efficient and comfortable vehicle driving trajectory planning.

[0034] In some embodiments, a sampling operation is performed on the trajectory parameters of the vehicle while driving to obtain a motion sequence of the vehicle, including: sampling the trajectory parameters for lateral motion to obtain lateral motion within a preset time period, and sampling the trajectory parameters for longitudinal motion to obtain longitudinal motion within a preset time period, wherein the lateral motion within the preset time period corresponds to the longitudinal motion within the preset time period, and the lateral motion and the longitudinal motion within the preset time period form a plurality of initial sampling motions; and pruning the plurality of initial sampling motions to obtain a motion sequence.

[0035] In some examples, the preset period may refer to the cycle of the sampling operation, such as 3s, 4s, 5s, 6s, etc. At this time, the trajectory parameters are sampled for lateral motion to obtain multiple lateral motions within the sampling period, and the trajectory parameters are sampled for longitudinal motion to obtain multiple longitudinal motions within the sampling period, wherein the multiple lateral motions within the sampling period correspond to the multiple longitudinal motions one by one, and the multiple lateral motions and the multiple longitudinal motions form multiple initial sampling motions. Further, the multiple initial sampling motions are pruned to obtain the motion sequence within the sampling period.

[0036] For example, the sampling period is 5s, the sampling interval is 1s, and the trajectory parameters are sampled for lateral motion to obtain multiple lateral motions within 5s, and the trajectory parameters are sampled for longitudinal motion to obtain multiple longitudinal motions within 5s, wherein the multiple lateral motions correspond to the multiple longitudinal motions one-to-one, and multiple lateral motions and multiple longitudinal motions form multiple initial sampling motions, for example, a lateral motion obtained by sampling in the 1st second and a longitudinal motion obtained by sampling in the 1st second constitute an initial sampling motion... Further, the multiple initial sampling motions are pruned, and the motions that do not conform to the preset rules in the multiple initial sampling motions are deleted to obtain the motion sequence within the sampling period. For example, the duration corresponding to the action sequence W is 5s, and it includes 5 initial sampling actions, that is, the action sequence W is {W1, W2, W3, W4, W5}, wherein the initial sampling action W1 includes the horizontal action X1 and the vertical action Y1 at the same time, the initial sampling action W2 includes the horizontal action X2 and the vertical action Y2 at the same time, the initial sampling action W3 includes the horizontal action X3 and the vertical action Y3 at the same time, the initial sampling action W4 includes the horizontal action X4 and the vertical action Y4 at the same time, and the initial sampling action W5 includes the horizontal action X5 and the vertical action Y5 at the same time.

[0037] In this embodiment, lateral motion sampling is performed on trajectory parameters to obtain lateral motion within a preset time period, and longitudinal motion sampling is performed on trajectory parameters to obtain longitudinal motion within a preset time period, the lateral motion within the preset time period corresponds to the longitudinal motion within the preset time period, and the lateral motion and the longitudinal motion within the preset time period form a plurality of initial sampling motions, and then the plurality of initial sampling motions are pruned to obtain a motion sequence, and further, the motion sequence is calculated to obtain an initial trajectory, wherein the motion sequence obtained in combination with the longitudinal and lateral sampling spaces can make the obtained initial trajectory optimal.

[0038] In some embodiments, lateral motion sampling is performed on trajectory parameters, including: performing a first lateral space sampling to obtain first lateral sampling information, the first lateral sampling information including lane change information of the vehicle; performing a second lateral space sampling to obtain second lateral sampling information, the second lateral sampling information including steering wheel angle information of the vehicle; and determining the lateral motion based on the first lateral sampling information and the second lateral sampling information.

[0039] In some examples, a first lateral spatial sampling is performed to obtain first lateral sampling information, and a second lateral spatial sampling is performed based on the first lateral sampling information to obtain second lateral sampling information. Further, a lateral action can be determined based on the first lateral sampling information and the second lateral sampling information. The first lateral sampling information includes the lane change information of the vehicle, and the second lateral sampling information includes the steering wheel angle information of the vehicle. It can be understood that the lateral action includes the first lateral sampling information and the second lateral sampling information, that is, the lateral action includes the lane change information and the steering wheel angle information of the vehicle.

[0040] For example, the lane change information of the vehicle includes K (centering), L (left lane change) and R (right lane change), K means that the vehicle keeps going straight, L means that the vehicle moves to the left, and R means that the vehicle moves to the right. The first lateral sampling information within the preset time period is obtained, that is, the lane change information of the vehicle within the preset time period is obtained, for example, {KKLLL}, which means that the vehicle keeps going straight and then changes lanes to the left. The steering wheel angle information of the vehicle includes the steering wheel angle of the vehicle, for example etc., obtain the second horizontal sampling information within the preset time period, that is, obtain the steering wheel angle information of the vehicle within the preset time period, for example It means that the direction of the vehicle remains unchanged for the first 2 seconds and then turns left for 3 seconds. At this time, the corresponding lateral action {X1, X2, X3, X4, X5} is obtained based on the first lateral sampling information and the second lateral sampling information, that is,

[0041] In some embodiments, performing longitudinal motion sampling on trajectory parameters includes: performing longitudinal spatial sampling to obtain longitudinal motion, wherein the longitudinal motion includes a longitudinal acceleration change rate of the vehicle.

[0042] In some examples, longitudinal spatial sampling is performed to obtain longitudinal motion, wherein the longitudinal motion includes the longitudinal acceleration change rate of the vehicle, for example, the longitudinal acceleration change rate of the vehicle is obtained by performing longitudinal spatial sampling, for example, the longitudinal acceleration change rate includes -1, 0, 1, etc. The longitudinal motion {Y1, Y2, Y3, Y4, Y5} within a preset time period is obtained, that is, the longitudinal acceleration change rate of the vehicle within the preset time period is obtained, for example, {1, -1, 0, 1, 1}, indicating that the vehicle accelerates and decelerates at a constant speed in sequence during driving, and then accelerates.

[0043] Furthermore, multiple initial sampling actions are formed by multiple horizontal actions and multiple vertical actions. For example, the horizontal actions {X1, X2, X3, X4, X5} and the vertical actions {Y1, Y2, Y3, Y4, Y5} form the corresponding initial sampling actions {W1, W2, W3, W4, W5}, that is, Correspondingly, the contents indicated by the initial sampling actions {W1, W2, W3, W4, W5} are: in the 1st second, the vehicle keeps the steering wheel angle for straight-ahead unchanged and accelerates; in the 2nd second, the vehicle keeps the steering wheel angle for straight-ahead unchanged and decelerates; in the 3rd second, the vehicle moves the steering wheel to the left and turns left while maintaining a constant speed; in the 4th second, the vehicle continues to move the steering wheel to the left and turns left while maintaining a constant speed; in the 5th second, the vehicle moves the steering wheel to the left and turns left while accelerating.

[0044] In some examples, a first transverse spatial sampling is performed to obtain first transverse sampling information, and second transverse spatial sampling and longitudinal spatial sampling are performed based on the first transverse sampling information. It can be understood that the first transverse spatial sampling is performed to determine the lane change information of the vehicle, and then the transverse sampling space and longitudinal sampling space are determined based on the preview time according to the lane change information of the vehicle. For example, the first transverse sampling data (L, R, K) is obtained within the sampling period, and the second transverse sampling data And the longitudinal motion data j lon (-1, 0, 1), where if the first horizontal sampling information is determined to be L, the space used for the second horizontal spatial sampling and the vertical spatial sampling can be considered and If the first horizontal sampling information is determined to be R, the second horizontal spatial sampling and longitudinal spatial sampling can be considered and Any combination of; if it is determined that the first horizontal sampling information is K, the second horizontal spatial sampling and longitudinal spatial sampling space can be considered and any combination of (-1, 0, 1).

[0045] In some embodiments, the pruning process includes: deleting actions that do not comply with lane change rules from a plurality of initial sampling actions.

[0046] In some examples, multiple initial sampling actions are pruned, and the pruning includes deleting actions that do not comply with lane change rules in the multiple initial sampling actions, wherein the lane change rules include that at most two lane change information appear in the same preset time period and / or illegal lane changes are not allowed. At most two lane change information appear in the same preset time period. For example, if the first horizontal sampling data of the preset time period is {LLLKK}, {KKKKK}, {RRRKK}, etc., the corresponding initial sampling action can be retained; if the first horizontal sampling data of the preset time period is {LLKKR}, {LLKRR}, etc., the corresponding initial sampling action needs to be deleted. Illegal lane changes are not allowed. For example, within the same preset time period, the vehicle cannot change lanes to the left at the current moment and change lanes to the right at the next moment. If the first horizontal sampling information of the preset time period is {LLRRR}, {RRLLL}, etc., the corresponding initial sampling action needs to be deleted.

[0047] In an embodiment of the present application, multiple initial sampling actions are pruned, and the pruning process includes deleting actions that do not comply with lane change rules in the multiple initial sampling actions, thereby reducing sampling time and avoiding dimensionality explosion, so as to achieve efficient and comfortable vehicle driving trajectory planning.

[0048] In some embodiments, the initial trajectory is obtained based on calculation of the action sequence, including: based on the action sequence, using a kinematic model to deduce and generate the initial action trajectory; and optimizing the initial action trajectory using a preset cost function to obtain the initial trajectory.

[0049] In some examples, based on the action sequence, the kinematic model is used for deduction to generate an initial action trajectory, so that the obtained initial action trajectory satisfies the kinematic constraints, wherein the kinematic model is used for deduction as follows:

[0050]

[0051] Among them, k is the current time step; k+1 is the next time step; x k is the x coordinate at time k; y k is the y coordinate at time k; v k is the speed at time k; θ k is the heading angle at time k; is the lateral acceleration at time k; is the longitudinal acceleration at time k; is the rate of change of lateral acceleration at time k; is the rate of change of longitudinal acceleration at time k.

[0052] Furthermore, the preset cost function is used to optimize the initial motion trajectory to obtain the initial trajectory. Since the initial motion trajectory satisfies the kinematic constraints, the obtained initial trajectory also satisfies the kinematic constraints. In some examples, using xy coordinates for planning can solve the problem of planning only in the reference line coordinate system and being overly dependent on the road reference line.

[0053] In some embodiments, the preset cost function includes at least one of a traffic efficiency cost function, a safety cost function, and a comfort cost function.

[0054] It is beneficial to optimize the initial action trajectory by using a preset cost function, so that the initial trajectory can be obtained, and the formation of the initial trajectory takes into account driving safety, comfort, efficiency, trajectory continuity, etc. Among them, the preset cost function includes a traffic efficiency cost function, a safety cost function, and a comfort cost function.

[0055] In some examples, the traffic efficiency cost function is expressed as follows:

[0056]

[0057] v lane_speed =min(v speed_limit ,v flow_speed_average ) (Formula 5);

[0058]

[0059] Among them, cost effeciency represents the cost of traffic efficiency; lane = navi, indicating whether the lane information is consistent with the high-precision map navigation route; w speed is the speed weight parameter; cost speed is the speed weight cost; w lane_type is the road type weight parameter; cost lane_type is the efficiency cost of road type; v lane_speed is the road speed; v cuise_speed is the cruising speed; lane_type == mergeorsplit indicates whether it is a diverging or merging road; v speed_limit Indicates the road speed limit; v flow_speed_average It represents the average speed of the traffic flow; obs_num represents the number of obstacles within a certain range of the lane. For example, if the sampling action is L (left lane change), the vehicles within a certain range before and after the left lane are selected; v(j) is the speed of the obstacle.

[0060] In some examples, the safety cost function calculation is performed for each selected key obstacle. For example, when changing lanes right, the cost of the obstacles in front of the current lane, in front of the right lane, and behind the right lane is calculated. The final cost calculation result of the right lane change is the sum of the costs of the three obstacles. If the obstacle at the corresponding position does not exist, the cost of the area is 0. The safety cost function is expressed as follows:

[0061] cost safe =cost obs_1 +cost obs_2 +cost obs_3 (Formula 7);

[0062]

[0063] Among them, cost safe Indicates the security cost; cost obs_1 Indicates the cost of the obstacle in front of the current lane, cost obs_2 Indicates the cost of the obstacle in front of the left / right lane change lane, cost obs_3 Indicates the cost of the obstacle behind the left / right lane change; cost obs cost obs_1 、cost obs_2 and cost obs_3 Function expression; inf means infinity; obs_start_l means the value of l of the coordinate closest to the center line of the lane when the obstacle is projected on the reference line at the sampling moment; obs_end_l means the value of l of the coordinate farthest from the center line of the lane when the obstacle is projected on the reference line at the sampling moment; obs_start_s means the value of s of the longitudinal starting coordinate of the front of the vehicle when the obstacle is projected on the reference line at the sampling moment; obs_end_s means the value of s of the longitudinal starting coordinate of the rear of the vehicle when the obstacle is projected on the reference line at the sampling moment; ego_start_l means the value of l of the coordinate closest to the center line of the lane when the ego vehicle is projected on the reference line at the sampling moment; ego_end_l means the value of l of the coordinate farthest from the center line of the lane when the ego vehicle is projected on the reference line at the sampling moment; ego_start_s means the value of s of the longitudinal starting coordinate of the front of the vehicle when the ego vehicle is projected on the reference line at the sampling moment; ego_end_s means the value of s of the longitudinal starting coordinate of the rear of the vehicle when the ego vehicle is projected on the reference line at the sampling moment.

[0064] In some examples, the comfort cost function is expressed as follows:

[0065] cost comfort =w1·cost long_jerk +w2·cost central_eccal +w3·cost lat_comfortable (Formula 9);

[0066]

[0067] Among them, cost comfort represents the safety cost; w1 is the longitudinal comfort weight, w2 is the centripetal acceleration weight, and w3 is the lateral comfort weight; cost long_jerk is the longitudinal comfort cost function, jerk is the acceleration change rate, lonjerkupperbound is the upper limit of the acceleration change rate; cost central_accel is the centripetal acceleration cost function, kappa is the trajectory curvature, v long (t) is the longitudinal velocity; cost lat_comfortable is the lateral comfort cost function, The first derivative of the trajectory lateral component function, is the second-order derivative of the trajectory lateral component function, is the first-order derivative of the longitudinal component function of the trajectory, is the second-order derivative of the longitudinal component function of the trajectory; t is the current time step, and T is the sampling period.

[0068] In some embodiments, the initial trajectory is optimized to generate a target trajectory, including: iterating the initial trajectory using a target constraint and an objective function to obtain the target trajectory; wherein the target constraint is determined based on the initial trajectory; and the objective function includes at least one of an action cost function, a state cost function, and a collision cost function.

[0069] In some examples, the initial trajectory is iterated using the target constraint and the target function to obtain the target trajectory. For example, a discrete-time dynamic system is set up with the state equation:

[0070] X k+1 =f(X k ,U k )(Formula 12)

[0071] The following kinematic model is used as the state transfer equation in trajectory planning:

[0072]

[0073] Among them, X k ∈R n is the state of the system at time step k, U k ∈R m is the control input of the system at time step k, and f describes the state equation of the system to find the optimal control sequence {U0, U1, ..., U N-1}Minimize the objective function, which is expressed as follows:

[0074]

[0075] Among them, l(X k ,U k ) is the stage cost function, l f (x N ) is the terminal cost function.

[0076] Furthermore, in trajectory planning, the state and collision constraints are reflected through soft constraints and applied to the objective function. For example, the objective function includes an action cost function (action_cost), a state cost function (state_cost) and a collision cost function (collision_cost), and then the sum of the costs corresponding to the action cost function, the state cost function and the collision cost function is minimized by iterating the optimal control sequence. Among them, the initial trajectory obtained above can be used as the initial control sequence for iteration, and the soft constraints such as state and collision, i.e., the target constraints, are determined based on the initial trajectory.

[0077] The initial trajectory is iterated using the target constraint and the objective function, including: recursively calculating the gradient and Hessian matrix of the value function to obtain the optimal control rate sequence; updating the control input and state trajectory according to the new control rate sequence; checking whether the control input and the cost function meet the convergence conditions, if so, stop the iteration, otherwise proceed to the next round of iteration.

[0078] In some examples, the initial trajectory is optimized using an iLQR (iterative Linear Quadratic Regulator) trajectory optimization algorithm. For example, the initial trajectory is iterated using a target constraint and an objective function to obtain a target trajectory, wherein the target constraint is determined based on the initial trajectory, and the objective function includes an action cost function, a state cost function, and a collision cost function.

[0079] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0080] See also Figure 2 , Figure 2 2 is a schematic diagram of the structure of an electronic device of an embodiment of the present application. The electronic device 20 includes a memory 21 and a processor 22 coupled to each other, and the processor 22 is used to execute program instructions stored in the memory 21 to implement the steps of the above-mentioned vehicle trajectory generation method embodiment. In a specific implementation scenario, the electronic device 20 may include but is not limited to: a microcomputer, a server, which is not limited here.

[0081] Specifically, the processor 22 is used to control itself and the memory 21 to implement the steps of the above-mentioned vehicle trajectory generation method embodiment. The processor 22 can also be called a CPU (Central Processing Unit), and the processor 22 may be an integrated circuit chip with signal processing capabilities. The processor 22 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 22 can be implemented by an integrated circuit chip.

[0082] See also Figure 3 , Figure 3 30 is a schematic diagram of the structure of a non-volatile computer-readable storage medium according to an embodiment of the present application. The non-volatile computer-readable storage medium 30 is used to store a computer program 301. When the computer program 301 is executed by a processor, for example, Figure 2 When the processor 22 in the embodiment is executed, it is used to implement the steps of the above-mentioned embodiment of the vehicle trajectory generation method.

[0083] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0084] In the several embodiments provided in the present application, it should be understood that the disclosed methods and related devices can be implemented in other ways. For example, the above-described related device implementations are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication disconnection shown or discussed can be through some interfaces, indirect coupling or communication disconnection of devices or units, which can be electrical, mechanical or other forms.

[0085] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0086] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0087] It is easy for a person skilled in the art to know that many modifications and changes can be made to the device and method while maintaining the teaching content of the present application. Therefore, the above disclosure should be considered as limited only by the scope of the appended claims.

Claims

1. A vehicle trajectory generation method, characterized in that: include: Performing a sampling operation on trajectory parameters of a vehicle when driving to obtain an action sequence of the vehicle; Calculating the action sequence to obtain an initial trajectory; The initial trajectory is optimized to generate a target trajectory, and the target trajectory is used for automatic driving of the vehicle.

2. The method according to claim 1, characterized in that The sampling operation is performed on the trajectory parameters of the vehicle when driving to obtain the action sequence of the vehicle, including: Performing lateral motion sampling on the trajectory parameters to obtain lateral motion within a preset period, and performing longitudinal motion sampling on the trajectory parameters to obtain longitudinal motion within the preset period, wherein the lateral motion within the preset period corresponds to the longitudinal motion within the preset period, and the lateral motion and the longitudinal motion within the preset period form a plurality of initial sampling motions; The plurality of initial sampling actions are pruned to obtain the action sequence.

3. The method according to claim 2, characterized in that The performing lateral motion sampling on the trajectory parameters comprises: Performing first lateral spatial sampling to obtain first lateral sampling information, where the first lateral sampling information includes lane change information of the vehicle; Performing second transverse spatial sampling to obtain second transverse sampling information, where the second transverse sampling information includes steering wheel angle information of the vehicle; The lateral motion is determined based on the first lateral sampling information and the second lateral sampling information.

4. The method according to claim 2, characterized in that: The longitudinal motion sampling of the trajectory parameters comprises: Longitudinal spatial sampling is performed to obtain the longitudinal motion, wherein the longitudinal motion includes a longitudinal acceleration change rate of the vehicle.

5. The method according to claim 2, characterized in that: The pruning process includes: Delete the actions that do not comply with the lane change rule from the multiple initial sample actions.

6. The method according to claim 1, characterized in that The step of calculating the action sequence to obtain an initial trajectory includes: Based on the action sequence, a kinematic model is used to deduce and generate an initial action trajectory; It is beneficial to optimize the initial motion trajectory using a preset cost function to obtain the initial trajectory.

7. The method according to claim 6, characterized in that The preset cost function includes at least one of a traffic efficiency cost function, a safety cost function and a comfort cost function.

8. The method according to claim 1, characterized in that The step of optimizing the initial trajectory to generate a target trajectory includes: Iterating the initial trajectory using the target constraint and the target function to obtain the target trajectory; wherein the target constraint is determined based on the initial trajectory; The objective function includes at least one of an action cost function, a state cost function, and a collision cost function.

9. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the vehicle trajectory generation method according to any one of claims 1 to 8.

10. A non-volatile computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the vehicle trajectory generation method according to any one of claims 1 to 8 is implemented.