Track optimization method and device, equipment and medium

By using the iterative linear quadratic regulator ILQR in trajectory optimization, foreseeing obstacle constraint information and adjusting the cost function and value function, the problem of low solution efficiency caused by sudden changes in constraint information in trajectory planning is solved, and more efficient trajectory optimization is achieved.

CN120742887APending Publication Date: 2025-10-03UISEE TECH BEIJING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510896607.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

When obstacles suddenly appear, the existing trajectory planning methods suffer from the sudden change of constraint information, which leads to low optimizer solution efficiency and difficulty in fast convergence.

Method used

Through the iterative linear quadratic regulator ILQR, the constraint information of the mutation trajectory points is used to optimize the non-mutation trajectory points, adjust the cost function and value function, foresee the future constraint information, and reduce the degree of constraint information mutation.

Benefits of technology

The optimization performance is improved in the scenario of sudden change of constraint information, the number of iterations is reduced, and the smoothness and efficiency of the trajectory optimization process are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120742887A_ABST
    Figure CN120742887A_ABST
Patent Text Reader

Abstract

The invention relates to a trajectory optimization method and device, electronic equipment and a storage medium. The trajectory optimization method comprises the steps of determining whether a sudden change trajectory point with constraint information sudden change exists on a reference trajectory or not according to detection data of a vehicle-mounted sensor; if the abrupt change track point with the constraint information abrupt change exists, determining target information of a non-abrupt change track point according to the constraint information of the abrupt change track point and the constraint information of the non-abrupt change track point located in front of the abrupt change track point on the reference track; according to the target information of the non-abrupt-change track point, optimizing the non-abrupt-change track point before the abrupt-change track point through an iterative linear quadratic regulator (ILQR) to obtain an optimized track point; and determining an optimized track corresponding to the reference track according to the optimized track point. The problem of solution convergence caused by abrupt change of constraint information of trajectory points in the trajectory optimization process is solved, and the solution performance of an optimizer in a constraint information abrupt change scene is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of trajectory optimization technology, and in particular to a trajectory optimization method, apparatus, device, and medium. Background Art

[0002] In autonomous driving tasks, common trajectory planning methods include: optimization-based methods, such as OBCA (Optimal Bounded-Curvature Algorithm), which usually uses the trajectory obtained by sampling or searching as a reference trajectory, then defines constraints and cost functions based on the reference trajectory, and finally solves the problem through an optimizer to obtain the optimized target trajectory.

[0003] The problem is that it relies heavily on the solver's performance. When the problem is complex, the solver is inefficient and time-consuming. For example, when an obstacle suddenly appears, the sudden increase in the obstacle constraint causes a sudden change in the constraint information, which in turn reduces the optimizer's solver efficiency.

[0004] In view of this, this application is hereby filed. Summary of the Invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a trajectory optimization method, apparatus, device and medium to solve the problem of solution convergence caused by sudden changes in the constraint information of trajectory points during the trajectory optimization process, and ensure the solution performance of the optimizer in the scenario of sudden changes in constraint information.

[0006] In a first aspect, an embodiment of the present disclosure provides a trajectory optimization method, the method comprising:

[0007] Determining, based on detection data from an onboard sensor, whether there is a sudden change trajectory point on a reference trajectory where constraint information suddenly changes, wherein the reference trajectory includes a plurality of trajectory points arranged in chronological order;

[0008] If there is a sudden change trajectory point with a sudden change in constraint information, determining the target information of the non-sudden change trajectory point based on the constraint information of the sudden change trajectory point and the constraint information of a non-sudden change trajectory point on the reference trajectory that is located before the sudden change trajectory point;

[0009] According to the target information of the non-mutation trajectory point, the non-mutation trajectory point before the mutation trajectory point is optimized by an iterative linear quadratic regulator ILQR to obtain an optimized trajectory point;

[0010] According to the optimized trajectory points, an optimized trajectory corresponding to the reference trajectory is determined.

[0011] In a second aspect, an embodiment of the present disclosure further provides a trajectory optimization device, the device comprising:

[0012] a first determining module, configured to determine, based on detection data from an onboard sensor, whether there is a sudden change trajectory point on a reference trajectory where constraint information suddenly changes, wherein the reference trajectory includes a plurality of trajectory points arranged in chronological order;

[0013] a second determining module configured to, if there is a mutation trajectory point with a sudden change in constraint information, determine the target information of the non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of a non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point;

[0014] an optimization module, configured to optimize the non-mutation trajectory point before the mutation trajectory point by an iterative linear quadratic regulator ILQR according to target information of the non-mutation trajectory point to obtain an optimized trajectory point;

[0015] The third determining module is used to determine the optimized trajectory corresponding to the reference trajectory according to the optimized trajectory points.

[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the trajectory optimization method as described above.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the trajectory optimization method described above when executed by a processor.

[0018] The present disclosure provides a trajectory optimization method. When a mutation trajectory point on a reference trajectory is determined to have a sudden change in constraint information, the method determines the target information of the non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that precedes the mutation trajectory point. Then, based on the target information of the non-mutation trajectory point, the non-mutation trajectory point preceding the mutation trajectory point is optimized using an iterative linear quadratic regulator (ILQR) to obtain an optimized trajectory point. Based on the optimized trajectory point, the optimized trajectory corresponding to the reference trajectory is determined. In other words, the constraint information of the mutation trajectory point is used to influence the relevant information of the constraint information of the non-mutation trajectory point on the reference trajectory that precedes the mutation trajectory point. The purpose is to reduce the gap between the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point, thereby mitigating the degree of mutation, or in other words, reducing the degree of difference in constraint conditions between different trajectory points, thereby reducing the optimization complexity and ensuring the solution performance of the iterative linear quadratic regulator (ILQR). BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 is a schematic diagram of a trajectory point constraint in an embodiment of the present disclosure;

[0021] Figure 2 Schematic diagram of a flow chart of a trajectory optimization method in an embodiment of the present disclosure;

[0022] Figure 3 is a schematic diagram of another trajectory point constraint in an embodiment of the present disclosure;

[0023] Figure 4 Schematic diagram of the structure of a trajectory optimization device in an embodiment of the present disclosure;

[0024] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0028] As described in the background art, common trajectory planning methods in autonomous driving tasks include: optimization-based methods, such as OBCA (Optimal Bounded-Curvature Algorithm), which usually uses the trajectory obtained by sampling or searching as a reference trajectory, then defines constraints and cost functions based on the reference trajectory, and finally solves the problem through the optimizer to obtain the optimized target trajectory. The problem is that it is highly dependent on the solving performance of the optimizer. When the problem complexity is high, the solution efficiency is low and the time consumption is long. For example, when an obstacle suddenly appears, the sudden increase in obstacle constraints will cause the constraint information to mutate, which in turn leads to an increase in the difference in constraint information between trajectory points, increasing the difficulty of convergence in the optimization solution process, resulting in a decrease in the solver efficiency.

[0029] Specifically, when optimizing each trajectory point through the iterative linear quadratic regulator ILQR, the constraint information of each trajectory point is taken into account. The usual practice is to use the constraint information of each trajectory point as a limiting condition for the trajectory point cost function. However, the cost function of each trajectory point often only considers its own constraint information. The gradient obtained after deriving the cost function only represents the expectation of the current trajectory point, and it does not consider the constraint information of the adjacent trajectory points. Such a design has the following problems: If a constraint information is suddenly added to the trajectory point behind the current trajectory point, such as an obstacle suddenly appears, then obstacle avoidance constraint information needs to be added to avoid the obstacle, such as Figure 1 As shown, 120 represents the vehicle, the black solid line represents the road network boundary 130, the trajectory composed of black dots is the reference trajectory 110, 140 represents the obstacle, the black arrow 131 close to the road network boundary 130 represents the road network boundary constraint, and the arrow 141 close to the obstacle 140 represents the obstacle avoidance constraint. Near position A, due to the appearance of obstacle 140, the constraint information of the corresponding trajectory point has undergone a sudden change, which will require the optimized trajectory to undergo a large change near position A. The optimizer itself relies on repeated iterations and will eventually converge with a high probability. The final optimized trajectory example is shown in trajectory 150, but the number of iterations will be relatively large, resulting in a decrease in the performance of the optimizer. Therefore, it needs to be improved to solve the problem of decreased convergence due to the sudden change in constraint information.

[0030] The obstacle 140 may be a moving vehicle, a pedestrian, or a temporary roadblock.

[0031] In response to the above problems, an embodiment of the present disclosure provides a trajectory optimization method. Figure 2 This is a flow chart of a trajectory optimization method in an embodiment of the present disclosure. The method can be executed by a trajectory optimization device, which can be implemented in software and / or hardware, and can be configured in an electronic device. Figure 2 As shown, the method may specifically include the following steps:

[0032] S210 , determining whether there is a sudden change trajectory point on a reference trajectory where constraint information suddenly changes based on detection data from an onboard sensor, where the reference trajectory includes a plurality of trajectory points arranged in chronological order.

[0033] Among them, the reference trajectory is a global path, which is a global path planned on the map based on the starting position and target position of the vehicle. It is usually obtained by searching in the topological structure of the map using a search algorithm (such as the A* algorithm, the Dijkstra algorithm, etc.), and can also be determined by other means. The embodiment of the present application does not limit the method for determining the reference trajectory. The reference trajectory takes into account the connectivity and traffic rules of the road network, and is the path that the vehicle is expected to follow, but the reference trajectory does not take into account the real-time traffic conditions. Therefore, on the basis of the reference trajectory, it is also necessary to optimize the trajectory points on the reference trajectory in combination with the real-time obstacles around the vehicle to ensure that the vehicle can travel safely and smoothly.

[0034] Determine whether there is a sudden change in constraint information on the reference trajectory based on the detection data of the vehicle-mounted sensors, including:

[0035] Based on the detection data of the on-board sensors, it is determined whether there is an obstacle within the preset area of ​​the reference trajectory. If it is determined that there is an obstacle within the preset area of ​​the reference trajectory, the collision time between the vehicle and the obstacle is determined. If the collision time is less than a threshold, a mutation trajectory point on the reference trajectory is determined to have a sudden change in constraint information, and the trajectory point on the reference trajectory closest to the obstacle is determined as the mutation trajectory point.

[0036] The reference trajectory represents the trajectory that the vehicle is expected to follow. In actual driving, even if the vehicle cannot strictly follow the reference trajectory, the reference trajectory points near the vehicle are usually within the detection range of the on-board sensors. Therefore, based on the detection data of the on-board sensors, it can be determined whether there are obstacles within the preset area of ​​the reference trajectory.

[0037] like Figure 1As shown in the figure, an obstacle 140 appears at position A. Assuming that the distance between obstacle 140 and the 20th reference trajectory point is the shortest, the 20th reference trajectory point is determined as a sudden change trajectory point. This is because there are no obstacles at the trajectory points before the 20th reference trajectory point. When optimizing the trajectory points before the 20th reference trajectory point, only the constraint of road boundary 130 needs to be satisfied. Taking the vehicle's forward direction as a reference, as long as the optimized trajectory point is to the right of road boundary 130, it is sufficient. However, when optimizing the 20th reference trajectory point, it is necessary to bypass obstacle 140. Therefore, the constraint information of the 20th reference trajectory point is no longer limited to the constraint of road boundary 130, but also includes the constraint information brought by obstacle 140. As a result, the constraint information of the 20th reference trajectory point is suddenly changed compared with the constraint information of the reference trajectory points before it. Therefore, the 20th reference trajectory point is determined as a sudden change trajectory point, and the trajectory points before the 20th reference trajectory point are determined as non-sudden change trajectory points.

[0038] S220: If there is a sudden change trajectory point with a sudden change in constraint information, determine the target information of the non-sudden change trajectory point according to the constraint information of the sudden change trajectory point and the constraint information of a non-sudden change trajectory point on the reference trajectory that is located before the sudden change trajectory point.

[0039] It is understandable that the constraint information shared by each trajectory point, in addition to the constraint information brought by the road boundary 130, also includes other constraint information, such as the maximum speed limit, maximum turning angle, minimum turning angle, maximum acceleration, etc. from the vehicle.

[0040] In some embodiments, the purpose of determining the target information of a non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of a non-mutation trajectory point located before the mutation trajectory point on the reference trajectory is to add a portion of the constraint information of the mutation trajectory point to the constraint information of the non-mutation trajectory point, thereby reducing the difference between the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point, thereby reducing the complexity of the optimization solution and ensuring the solution performance of the optimizer.

[0041] In other embodiments, the purpose of determining the target information of the non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point located before the mutation trajectory point on the reference trajectory is: using the intermediate quantity related to the constraint information of the mutation trajectory point to process the intermediate quantity related to the constraint information of the non-mutation trajectory point, for example, adding a component of the intermediate quantity related to the constraint information of the mutation trajectory point to the intermediate quantity related to the constraint information of the non-mutation trajectory point, so as to reduce the complexity of the optimization solution and ensure the solution performance of the optimizer. The intermediate quantity is, for example, the cost function and / or value function involved in the optimization solution through the iterative linear quadratic regulator ILQR.

[0042] A cost function, sometimes also called a loss function, is used to measure the effectiveness of a control strategy. For example, if a vehicle's position deviates from the reference trajectory after simulating it with a control strategy that "drives at a certain acceleration and steering angle for a certain period of time," and the vehicle's driving becomes increasingly unstable and unsafe, the cost function value will increase, indicating a poor control strategy. The goal of optimization is to converge the cost function for all trajectory points within an acceptable range.

[0043] The essence of the value function is a local quadratic approximation function to the cost function, which is used to approximate the future cumulative cost, realize the connection from local optimization to global planning, and calculate the gradient information of the control quantity update in the back propagation. The optimization process of ILQR is divided into forward propagation (used to generate candidate trajectories) and back propagation (used to calculate gradients and update control quantities, such as acceleration, steering wheel angle, etc.). The value function is used to derive the feedback gain matrix and feedforward gain control quantity in the back propagation. Intuitively, the gradient of the value function indicates the impact of the state deviation on the future cost, thereby guiding the adjustment direction of the control quantity. ILQR updates the parameters of the candidate trajectories and the value function through multiple rounds of iterations. Specifically, the quadratic parameters of the value function are updated during each round of back propagation, and new candidate trajectories are generated by forward propagation. When the increment of the value function is less than the threshold, the algorithm converges, and the value function is approximately the optimal cost function.

[0044] Therefore, by using the cost function of the mutation trajectory point to process the cost function of the non-mutation trajectory point, the algorithm can consider the mutation constraint information in advance at the non-mutation trajectory point, thereby solving the problem of difficult convergence.

[0045] S230 , according to the target information of the non-mutation trajectory point, optimizing the non-mutation trajectory point before the mutation trajectory point by an iterative linear quadratic regulator ILQR to obtain an optimized trajectory point.

[0046] S240: Determine an optimized trajectory corresponding to the reference trajectory according to the optimized trajectory points.

[0047] A trajectory optimization method provided by an embodiment of the present disclosure utilizes the constraint information of a mutation trajectory point to influence the related information of the constraint information of a non-mutation trajectory point located before the mutation trajectory point on a reference trajectory. The purpose is to reduce the gap between the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point, thereby slowing down the degree of mutation, or reducing the degree of difference in constraint conditions between different trajectory points, thereby reducing the optimization complexity and ensuring the solution performance of the iterative linear quadratic regulator (ILQR).

[0048] In some embodiments, the target information for a non-mutation trajectory point includes a new cost function for the non-mutation trajectory point. Determining the new cost function for the non-mutation trajectory point based on the constraint information for the mutation trajectory point and the constraint information for a non-mutation trajectory point located before the mutation trajectory point on a reference trajectory includes: determining an obstacle cost function for the mutation trajectory point based on the constraint information for the mutation trajectory point; determining an original cost function for the non-mutation trajectory point based on the constraint information for the non-mutation trajectory point; determining a weight for the obstacle cost function based on the distance between the non-mutation trajectory point and the mutation trajectory point; and determining a new cost function based on the weights of the obstacle cost function, the original cost function, and the obstacle cost function.

[0049] The essence of a cost function is to quantify "good or bad," converting optimization objectives into numerical values. Its core function is to provide a clear optimization direction for the algorithm. Therefore, its design forms are diverse and are not limited in this embodiment. Common cost function design objectives include minimizing the deviation between the optimized trajectory and the reference trajectory, maximizing the distance between the optimized trajectory and obstacles, and maximizing the distance to the road network boundary to ensure safety, and minimizing the acceleration or steering angle change rate to ensure vehicle driving stability. After determining the constraint information of the trajectory points, a specific cost function can be designed based on these design objectives.

[0050] Exemplarily, determining the new cost function according to the obstacle cost function, the original cost function, and the weight of the obstacle cost function includes:

[0051] The new cost function is determined according to the obstacle cost function, the original cost function and the weight using the following calculation formula:

[0052] J new =J old +a×J obj (1)

[0053] Among them, J new Represents the new cost function for non-mutation trajectory points, J old represents the original cost function of the non-mutation trajectory point, a represents the weight of the obstacle cost function, J objrepresents the obstacle cost function. The weight of the obstacle cost function is determined based on the distance between a non-mutation point and a mutation point. The greater the distance between a non-mutation point and a mutation point, the smaller the weight of the obstacle cost function. Conversely, the smaller the distance between a non-mutation point and a mutation point, the larger the weight of the obstacle cost function. That is, the new cost function for non-mutation points closer to a mutation point incorporates more of the obstacle cost function components of the mutation point, while the new cost function for non-mutation points farther from a mutation point incorporates fewer of the obstacle cost function components of the mutation point. This reduces the differences between the cost functions of adjacent trajectory points, accelerates the convergence of the algorithm, and makes the optimized trajectory smoother, eliminating segments with sudden large curvature changes, thereby ensuring smoother vehicle following.

[0054] Furthermore, in some embodiments, the number of non-mutation trajectory points located before the mutation trajectory point can be limited. For example, only the cost functions of the 10 non-mutation trajectory points located before the mutation trajectory point and closest to the mutation trajectory point are processed according to the above calculation formula (1), thereby achieving the purpose of accurately controlling the influence range and avoiding invalid processing while ensuring the convergence speed of the algorithm.

[0055] In summary, the essence of this implementation is to "explicitly add" the cross-time coupling cost in the cost function. Assuming that an obstacle suddenly appears at the 20th trajectory point, the obstacle cost function of the 20th trajectory point is allocated in advance to the cost functions of the 10th to 19th trajectory points in a weighted attenuation manner, so that the optimization process can actively "foresee" the obstacle constraints of future time periods and avoid the sudden change of constraints at the 20th trajectory point. This implementation does not require modification of the core algorithm of ILQR (such as backpropagation logic and forward propagation logic). The purpose of "advance constraint" and "active foresight" can be achieved only by changing the design of the cost function. It has strong compatibility, low implementation complexity, and is easy to implement.

[0056] In other implementations, the purpose of considering future mutation constraints in advance is achieved by modifying the value function in the Bellman optimality principle solution process. Specifically, ILQR is an iterative algorithm based on the Bellman optimality principle. The essence of its solution is dynamic programming, that is, the value function V of the current trajectory point is k The value is equal to the cost function l of the current trajectory point k Add the value function V of the future trajectory point k+1 :

[0057] V k =l k +V k+1

[0058] Therefore, dynamic programming itself includes the idea of ​​momentum gradient, but it is a passive transfer, that is, it is impossible to control how much in advance the impact of future mutation constraints is considered, nor can it control the extent of the impact. Therefore, this can also be further optimized. Because ILQR is optimized and solved through iteration, that is, the output of the current solution will be used as the input of the next iterative solution, so the following modifications can be made:

[0059] Determine the value function of the mutation trajectory point in the ILQR iteration according to the constraint information of the mutation trajectory point; determine the cost of the non-mutation trajectory point in the ILQR iteration according to the constraint information of the non-mutation trajectory point; determine the weight of the value function of the mutation trajectory point in the ILQR iteration according to the distance between the non-mutation trajectory point and the mutation trajectory point; determine the value function of the non-mutation trajectory point in the ILQR iteration according to the value function of the mutation trajectory point in the ILQR iteration, the cost of the non-mutation trajectory point in the ILQR iteration and the weight of the value function of the mutation trajectory point in the ILQR iteration.

[0060] Specifically, the value function of the non-mutation trajectory point in the ILQR iteration is determined by the following calculation formula:

[0061]

[0062] Where i represents the number of iterations, represents the value function of the non-mutation trajectory point k in the i-th iteration, represents the cost of the non-mutation trajectory point k in the i-th iteration, β represents the weight of the value function of the mutation trajectory point in the ILQR iteration, represents the value function of the mutation trajectory point k+1 in the i-th iteration, Represents the value function of the mutation trajectory point k+1 in the i-1th iteration.

[0063] Therefore, the value function of the current trajectory point in the current iteration is is the future trajectory point value function in the current iteration and the future trajectory point value function in the previous iteration The weighted sum of , which can play a smoothing role. For example, in the i = 1 iteration, an obstacle constraint suddenly appears at the 20th trajectory point, that is, Very large, if we follow the traditional method V k =l k +V k+1 , which will result in Mutation is not conducive to optimization solution, but if the weighted i=0 iteration is added at this time Because i=0 iteration has not started yet, so the 0th iteration is the initial value, which will be relatively small, so it plays a smoothing role in the first iteration, in other words, it is the influence of momentum gradient. Similarly, for example, in the i=2th iteration, an obstacle constraint suddenly appears at the 20th trajectory point, that is, Very large, if we follow the traditional method V k =l k +V k+1 , which will result in Mutation is not conducive to optimization, but if the weighted i=1 iteration is added at this time Because the obstacle has not appeared at the time of iteration i=1, the first iteration Smaller, which plays a smoothing role in the second iteration.

[0064] In some embodiments, the cost function of the non-mutation trajectory point may be modified according to the above calculation formula (1), and the value function of the non-mutation trajectory point may be modified according to the above calculation formula (2).

[0065] In some implementations, the constraint information of the non-mutation trajectory point may also be directly processed. Specifically, the target information of the non-mutation trajectory point includes: new constraint information of the non-mutation trajectory point;

[0066] The determining the target information of the non-mutation trajectory point according to the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point includes:

[0067] The constraint information of the mutation trajectory point and the constraint information of each non-mutation trajectory point are input into a trained multi-layer perceptron model to obtain new constraint information of each non-mutation trajectory point; wherein the multi-layer perceptron model includes an encoder and a decoder composed of a multi-layer perceptron, the encoder is used to preprocess the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point to generate a constraint encoding vector, and based on the self-attention mechanism, feature extraction is performed on the constraint encoding vector to obtain a feature vector; the decoder is used to decode the feature vector to obtain the new constraint information of the non-mutation trajectory point.

[0068] When training a multi-layer perceptron model and obtaining a trained multi-layer perceptron model, it is necessary to construct a sample set, which includes multiple sample pairs. A sample pair includes the constraint information of each trajectory point before processing and the constraint information of each trajectory point after processing (i.e., the true value). The true value can be determined manually or a smooth boundary curve can be obtained by curve interpolation. During the training process, the difference between the output value of the model and the true value can be calculated using the following loss function:

[0069] L=L smooth+L ration

[0070]

[0071] Among them, L represents the difference between the output value of the model and the true value, L smooth represents the smoothness loss, L ration Indicates the rationality loss, y j+1 Represents the constraint information of the j+1th trajectory point output by the model, y j Represents the constraint information of the j-th trajectory point output by the model, y gt,j Represents the true value of the constraint information of the j-th trajectory point.

[0072] like Figure 1 and Figure 3 As shown in FIG, before processing, the constraint information of the non-mutation trajectory point is based on the road network boundary 130, while the constraint information of the mutation trajectory point is based on an edge of the obstacle 140. There is a big difference between the constraint information of the non-mutation trajectory point and the constraint information of the mutation trajectory point. After processing, the constraint information of the non-mutation trajectory point is based on the boundary line 160, as shown in FIG. Figure 3 As shown in FIG, it is obvious that the difference between the constraint information of the non-mutation trajectory point and the constraint information of the mutation trajectory point is reduced, and the constraint boundary between each trajectory point is smoother.

[0073] For example, for a reference trajectory T with N trajectory points, assuming that some trajectory points have sudden obstacle constraints and some trajectory points do not have obstacle constraints, these trajectory points may also include discontinuous road network boundary constraints; then the constraint information of the trajectory points (including but not limited to road network boundary constraints and obstacle constraints) is saved as a constraint sequence C1 (a list of length N), and a state sequence B indicating whether there is a constraint (for example, a BOOL type sequence, if a trajectory point has an obstacle constraint, then the element at the corresponding position is true, otherwise it is false). This information is input into the trained multi-layer perceptron model, and the output is a constraint sequence C2, which contains the adjusted constraint information of each trajectory point. The optimization solution is performed in the optimizer according to the adjusted constraint information, which can more reasonably consider the sudden constraint and does not require additional adjustments to the optimizer.

[0074] This embodiment provides four optional solutions for optimizing trajectory points. The first, second and third solutions process the cost function and / or value function involved in the optimizer's solution process. The fourth solution processes the constraint information of the trajectory point itself and does not involve improvements to the optimizer's internal solution. Specifically, the first solution is to add the component of the obstacle cost function for the mutation trajectory point to the cost function of the non-mutation trajectory point. The second solution is to add the component of the value function of the next trajectory point in the previous iteration to the value function of the current trajectory point in the current iteration. The third solution is a solution that combines the first and second solutions, that is, to change the cost function and the value function at the same time.

[0075] By adding the associated factors of the obstacle constraint information of the sudden trajectory points to the relevant information of the non-mutation trajectory points used for optimization, the optimization algorithm can "actively foresee" the obstacle constraint information of the sudden trajectory points when optimizing the non-mutation trajectory points, thereby avoiding sudden mutations in the constraint information and accelerating the convergence speed of the optimization algorithm.

[0076] Figure 4 FIG. 1 is a schematic diagram of the structure of a trajectory optimization device in an embodiment of the present disclosure. Figure 4 As shown: The device includes: a first determination module 410, which is used to determine whether there is a mutation trajectory point with a sudden change in constraint information on the reference trajectory based on the detection data of the vehicle-mounted sensor, wherein the reference trajectory includes multiple trajectory points arranged in chronological order; a second determination module 420, which is used to determine the target information of the non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point if there is a mutation trajectory point with a sudden change in constraint information; an optimization module 430, which is used to optimize the non-mutation trajectory point before the mutation trajectory point through an iterative linear quadratic regulator ILQR based on the target information of the non-mutation trajectory point to obtain an optimized trajectory point; and a third determination module 440, which is used to determine the optimized trajectory corresponding to the reference trajectory based on the optimized trajectory point.

[0077] Optionally, the first determination module 410 is specifically used to: determine whether there is an obstacle within the preset area of ​​the reference trajectory based on the detection data of the vehicle-mounted sensor; if it is determined that there is an obstacle within the preset area of ​​the reference trajectory, determine the collision time between the vehicle and the obstacle; if the collision time is less than a threshold, determine that there is a mutation trajectory point on the reference trajectory where the constraint information suddenly changes, and determine the trajectory point on the reference trajectory closest to the obstacle as the mutation trajectory point.

[0078] Optionally, the target information of the non-mutation trajectory point includes a new cost function of the non-mutation trajectory point; the second determination module 420 is specifically used to: determine the obstacle cost function of the mutation trajectory point according to the constraint information of the mutation trajectory point; determine the original cost function of the non-mutation trajectory point according to the constraint information of the non-mutation trajectory point; determine the weight of the obstacle cost function according to the distance between the non-mutation trajectory point and the mutation trajectory point; and determine the new cost function according to the weight of the obstacle cost function, the original cost function and the obstacle cost function.

[0079] Exemplarily, the new cost function is determined according to the obstacle cost function, the original cost function, and the weight using the following calculation formula:

[0080] J new =J old +a×J obj

[0081] Among them, J new represents the new cost function of the non-mutation trajectory point, Jold represents the original cost function of the non-mutation trajectory point, a represents the weight of the obstacle cost function, J obj represents the obstacle cost function.

[0082] Optionally, the target information of the non-mutation trajectory point includes: the value function of the non-mutation trajectory point in the ILQR iteration; the second determination module 420 is specifically used to: determine the value function of the mutation trajectory point in the ILQR iteration according to the constraint information of the mutation trajectory point; determine the cost of the non-mutation trajectory point in the ILQR iteration according to the constraint information of the non-mutation trajectory point; determine the weight of the value function of the mutation trajectory point in the ILQR iteration according to the distance between the non-mutation trajectory point and the mutation trajectory point; determine the value function of the non-mutation trajectory point in the ILQR iteration according to the value function of the mutation trajectory point in the ILQR iteration, the cost of the non-mutation trajectory point in the ILQR iteration and the weight of the value function of the mutation trajectory point in the ILQR iteration.

[0083] Exemplarily, the value function of the non-mutation trajectory point in the ILQR iteration is determined by the following calculation formula:

[0084]

[0085] Where i represents the number of iterations, represents the value function of the non-mutation trajectory point k in the i-th iteration, represents the cost of the non-mutation trajectory point k in the i-th iteration, β represents the weight of the value function of the mutation trajectory point in the ILQR iteration, represents the value function of the mutation trajectory point k+1 in the i-th iteration, Represents the value function of the mutation trajectory point k+1 in the i-1th iteration.

[0086] Optionally, the target information of the non-mutation trajectory point includes: new constraint information of the non-mutation trajectory point; the second determination module 420 is specifically configured to: input the constraint information of the mutation trajectory point and the constraint information of each of the non-mutation trajectory points into a trained multi-layer perceptron model to obtain new constraint information of each of the non-mutation trajectory points;

[0087] The multi-layer perceptron model includes an encoder and a decoder composed of a multi-layer perceptron. The encoder is used to preprocess the constraint information of the mutation trajectory points and the constraint information of the non-mutation trajectory points to generate a constraint encoding vector, and based on the self-attention mechanism, perform feature extraction on the constraint encoding vector to obtain a feature vector; the decoder is used to decode the feature vector to obtain new constraint information of the non-mutation trajectory points.

[0088] The trajectory optimization device provided in the embodiment of the present disclosure can execute the steps of the trajectory optimization method provided in the embodiment of the method of the present disclosure, and the execution steps and beneficial effects are not repeated here.

[0089] Figure 5 This is a schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 5 , which shows a structural diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0090] like Figure 5 As shown, the electronic device 500 may include a processing device 501, a ROM 502, a RAM 503, a bus 504, an input / output (I / O) interface 505, an input device 506, an output device 507, a storage device 508, and a communication device 509. The processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501 can perform various appropriate actions and processes to implement the method of the embodiment described in the present disclosure according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.

[0091] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the trajectory optimization method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0092] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0093] The computer-readable medium may be included in the electronic device or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the trajectory optimization method disclosed herein.

[0094] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0095] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection according to one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0096] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

Claims

1. A trajectory optimization method, characterized in that: The method comprises: Determining, based on detection data from an onboard sensor, whether there is a sudden change trajectory point on a reference trajectory where constraint information suddenly changes, wherein the reference trajectory includes a plurality of trajectory points arranged in chronological order; If there is a sudden change trajectory point with a sudden change in constraint information, determining the target information of the non-sudden change trajectory point based on the constraint information of the sudden change trajectory point and the constraint information of a non-sudden change trajectory point on the reference trajectory that is located before the sudden change trajectory point; According to the target information of the non-mutation trajectory point, the non-mutation trajectory point before the mutation trajectory point is optimized by an iterative linear quadratic regulator ILQR to obtain an optimized trajectory point; According to the optimized trajectory points, an optimized trajectory corresponding to the reference trajectory is determined.

2. The method according to claim 1, characterized in that The determining, based on the detection data of the vehicle-mounted sensor, whether there is a sudden change trajectory point on the reference trajectory where the constraint information suddenly changes includes: Determining whether there is an obstacle within a preset area of ​​the reference trajectory based on detection data from an on-board sensor; If it is determined that there is an obstacle within the preset area of ​​the reference trajectory, determining the collision time between the vehicle and the obstacle; If the collision time is less than a threshold, it is determined that there is a sudden change trajectory point on the reference trajectory where the constraint information suddenly changes, and the trajectory point on the reference trajectory closest to the obstacle is determined as the sudden change trajectory point.

3. The method according to claim 1, characterized in that The target information of the non-mutation trajectory point includes a new cost function of the non-mutation trajectory point; The determining the target information of the non-mutation trajectory point according to the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point includes: Determining an obstacle cost function of the mutation trajectory point according to the constraint information of the mutation trajectory point; Determining the original cost function of the non-mutation trajectory point according to the constraint information of the non-mutation trajectory point; Determining a weight of the obstacle cost function according to a distance between the non-mutation trajectory point and the mutation trajectory point; The new cost function is determined according to the obstacle cost function, the original cost function, and a weight of the obstacle cost function.

4. The method according to claim 3, characterized in that The determining the new cost function according to the obstacle cost function, the original cost function, and the weight of the obstacle cost function includes: The new cost function is determined according to the obstacle cost function, the original cost function and the weight using the following calculation formula: I new =J old +a×J boj Among them, J new represents the new cost function for non-mutation trajectory points, J old represents the original cost function of the non-mutation trajectory point, a represents the weight of the obstacle cost function, J obj represents the obstacle cost function.

5. The method according to claim 1, wherein The target information of the non-mutation trajectory point includes: the value function of the non-mutation trajectory point in the ILQR iteration; The determining the target information of the non-mutation trajectory point according to the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point includes: Determining a value function of the mutation trajectory point in the ILQR iteration according to the constraint information of the mutation trajectory point; Determining the cost of the non-mutation trajectory point in the ILQR iteration according to the constraint information of the non-mutation trajectory point; Determining the weight of the value function of the mutation trajectory point in the ILQR iteration according to the distance between the non-mutation trajectory point and the mutation trajectory point; The value function of the non-mutation trajectory point in the ILQR iteration is determined according to the value function of the mutation trajectory point in the ILQR iteration, the cost of the non-mutation trajectory point in the ILQR iteration, and the weight of the value function of the mutation trajectory point in the ILQR iteration.

6. The method according to claim 5, characterized in that Determining the value function of the non-mutation trajectory point in the ILQR iteration according to the value function of the mutation trajectory point in the ILQR iteration, the cost of the non-mutation trajectory point in the ILQR iteration, and the weight of the value function of the mutation trajectory point in the ILQR iteration includes: The value function of the non-mutation trajectory point in the ILQR iteration is determined by the following calculation formula: Where i represents the number of iterations, represents the value function of the non-mutation trajectory point k in the i-th iteration, represents the cost of the non-mutation trajectory point k in the i-th iteration, β represents the weight of the value function of the mutation trajectory point in the ILQR iteration, represents the value function of the mutation trajectory point k+1 in the i-th iteration, Represents the value function of the mutation trajectory point k+1 in the i-1th iteration.

7. The method according to claim 1, characterized in that The target information of the non-mutation trajectory point includes: new constraint information of the non-mutation trajectory point; The determining the target information of the non-mutation trajectory point according to the constraint information of the mutation trajectory point and the constraint information of the non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point includes: Inputting the constraint information of the mutation trajectory point and the constraint information of each non-mutation trajectory point into a trained multi-layer perceptron model to obtain new constraint information of each non-mutation trajectory point; The multi-layer perceptron model includes an encoder and a decoder composed of a multi-layer perceptron. The encoder is used to preprocess the constraint information of the mutation trajectory points and the constraint information of the non-mutation trajectory points to generate a constraint encoding vector, and based on the self-attention mechanism, perform feature extraction on the constraint encoding vector to obtain a feature vector; the decoder is used to decode the feature vector to obtain new constraint information of the non-mutation trajectory points.

8. A trajectory optimization device, characterized in that: include: a first determining module, configured to determine, based on detection data from an onboard sensor, whether there is a sudden change trajectory point on a reference trajectory where constraint information suddenly changes, wherein the reference trajectory includes a plurality of trajectory points arranged in chronological order; a second determining module configured to, if there is a mutation trajectory point with a sudden change in constraint information, determine the target information of the non-mutation trajectory point based on the constraint information of the mutation trajectory point and the constraint information of a non-mutation trajectory point on the reference trajectory that is located before the mutation trajectory point; an optimization module, configured to optimize the non-mutation trajectory point before the mutation trajectory point by an iterative linear quadratic regulator ILQR according to target information of the non-mutation trajectory point to obtain an optimized trajectory point; The third determining module is used to determine the optimized trajectory corresponding to the reference trajectory according to the optimized trajectory points.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.