Model training method, trajectory planning method, electronic device and program product
By introducing a composite collision loss function to train the neural network model, the problem of unavoidable collisions in existing trajectory planning methods is solved, thereby improving safety and stability, reducing data acquisition costs, and generating a safer trajectory planning model.
Patent Information
- Application Number
- CN202511658879.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-27
AI Technical Summary
Existing trajectory planning methods do not explicitly consider collision avoidance, resulting in the generation of risky trajectories that may lead to collisions, making it difficult to achieve safe trajectory planning results on real vehicles.
A composite collision loss function is introduced to train the neural network model. By imitating the learning loss function and the combined loss function of the composite collision loss function, the neural network model is optimized to generate safe trajectories, including the collision degree loss function, the safety buffer loss function, and the trajectory inflation loss function.
It significantly improves the safety of trajectory planning, reduces the cost of training data collection, improves the stability and convergence speed of model training, and can effectively avoid the risk of collision between vehicles and obstacles.
Smart Images

Figure CN121580352A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of assisted driving, and in particular to a model training method, a trajectory planning method, an electronic device and a program product. BACKGROUND
[0002] Trajectory planning is an important function in a vehicle automatic driving system, which is responsible for generating one or more future driving trajectories that meet vehicle dynamics constraints, traffic rules and safety requirements in real time according to surrounding environment information provided by a perception module and a global path provided by a navigation module.
[0003] Among them, the safety of trajectory planning, that is, how to plan a trajectory to avoid collision in complex dynamic and static object interaction, is a core problem in trajectory planning.
[0004] The traditional trajectory planning method does not explicitly consider how to avoid collision in the scene, so it is easy to generate a risky trajectory that may cause collision, and it is difficult to achieve safe trajectory planning effect on a real vehicle. SUMMARY
[0005] The present application provides a model training method, a trajectory planning method, an electronic device and a program product to solve the technical problem that the existing trajectory planning technology is easy to generate a risky trajectory that may cause collision and is difficult to achieve safe trajectory planning effect on a real vehicle.
[0006] According to a first aspect of the present application, the present application provides a model training method, comprising:
[0007] Obtaining training data; wherein the training data comprises at least one training sample, the training sample comprises sample driving data of a vehicle, and a real trajectory corresponding to the sample driving data;
[0008] Inputting the training data into a pre-constructed neural network model to obtain a predicted trajectory output by the neural network model;
[0009] Based on the predicted trajectory and the real trajectory, a comprehensive loss function of the neural network model is constructed; wherein the comprehensive loss function comprises an imitation learning loss function and a composite collision loss function, the imitation learning loss function is used to represent the difference between the predicted trajectory and the real trajectory, and the composite collision loss function is used to represent the collision risk of the vehicle on the predicted trajectory;
[0010] Training the neural network model using the comprehensive loss function to obtain a trajectory planning model; wherein the trajectory planning model is used to obtain a corresponding planning trajectory based on the driving data of the vehicle.
[0011] In an implementable embodiment, the composite collision loss function comprises at least one of a collision degree loss function, a safety buffer loss function, and a trajectory inflation loss function;
[0012] The collision degree loss function is configured to represent a collision degree between the vehicle and the obstacle on the predicted trajectory.
[0013] The safety buffer loss function is configured to represent a safety buffer distance between the vehicle and the obstacle on the predicted trajectory.
[0014] The trajectory inflation loss function is configured to represent a collision degree between the vehicle and the obstacle within an inflated spatiotemporal neighborhood interval on the predicted trajectory.
[0015] In an implementable embodiment, the collision degree loss function is obtained based on a method comprising:
[0016] Based on a planning horizon of the predicted trajectory, a first overlap degree between the vehicle and each of the obstacles is obtained at each discrete time step within the planning horizon, and the collision degree loss function is constructed according to the first overlap degrees; wherein the higher the first overlap degree, the greater the collision degree loss corresponding to the collision degree loss function.
[0017] In an implementable embodiment, the safety buffer loss function is obtained based on a method comprising:
[0018] Based on a planning horizon of the predicted trajectory, a minimum surface clearance between the vehicle and each of the obstacles is obtained at each discrete time step within the planning horizon, and the safety buffer loss function is constructed according to the minimum surface clearances; wherein in the case that the minimum surface clearance is less than a safety distance threshold, the smaller the minimum surface clearance, the greater the safety buffer loss corresponding to the safety buffer loss function.
[0019] In an implementable embodiment, the minimum surface clearance is obtained based on a method comprising:
[0020] A first graph set configured to represent a geometry of the vehicle is constructed, and a second graph set configured to represent a geometry of the obstacle is constructed; wherein each of the first graph set and the second graph set comprises at least one graph, and the shape of the graph is at least one of a circle, an ellipse, a convex polygon, and a rectangle.
[0021] Based on a shortest distance between graphs in the first graph set and the second graph set, a minimum surface clearance between the vehicle and the obstacle is determined.
[0022] In an implementable embodiment, the trajectory inflation loss function is obtained based on a method comprising:
[0023] generate a time dilation window corresponding to each discrete time step within a planning horizon based on the predicted trajectory;
[0024] For each time dilation window, obtain a second overlap degree between the vehicle and each obstacle at the discrete time step corresponding to the time dilation window at each sliding time step within the time dilation window, and construct a trajectory dilation loss function according to the second overlap degree; the higher the second overlap degree, the greater the trajectory dilation loss corresponding to the trajectory dilation loss function.
[0025] According to a second aspect of the present application, the present application provides a trajectory planning method, comprising:
[0026] obtain current driving data of a vehicle; wherein the current driving data includes static perception data, obstacle perception data and road structure perception data;
[0027] input the current driving data into a trajectory planning model to obtain a planning trajectory output by the trajectory planning model; wherein the trajectory planning model is trained based on the model training method of any one of the first aspect.
[0028] According to a third aspect of the present application, the present application provides a model training device, comprising:
[0029] a sample acquisition module for acquiring training data; wherein the training data includes at least one training sample, and the training sample includes sample driving data of a vehicle and a real trajectory corresponding to the sample driving data;
[0030] a trajectory prediction module for inputting the training data into a pre-constructed neural network model to obtain a predicted trajectory output by the neural network model;
[0031] a loss determination module for constructing a comprehensive loss function of the neural network model based on the predicted trajectory and the real trajectory; wherein the comprehensive loss function includes an imitation learning loss function and a composite collision loss function, the imitation learning loss function is used to represent the difference between the predicted trajectory and the real trajectory, and the composite collision loss function is used to represent the collision risk of the vehicle on the predicted trajectory;
[0032] a model training module for training the neural network model using the comprehensive loss function to obtain a trajectory planning model; wherein the trajectory planning model is used to obtain a corresponding planning trajectory based on driving data of a vehicle.
[0033] According to a fourth aspect of the present disclosure, the present disclosure provides a trajectory planning device, comprising:
[0034] a data acquisition module configured to acquire current driving data of the vehicle, wherein the current driving data comprises static perception data, obstacle perception data and road structure perception data;
[0035] a trajectory planning module configured to input the current driving data into a trajectory planning model and acquire a planning trajectory output by the trajectory planning model, wherein the trajectory planning model is trained based on the model training method according to any one of the first aspect.
[0036] According to a fifth aspect of the present disclosure, the present disclosure provides an electronic device comprising a processor and a memory connected to the processor in communication;
[0037] the memory stores computer-executable instructions;
[0038] the processor executes the computer-executable instructions stored in the memory to implement the method according to any one of the first aspect or the second aspect.
[0039] According to a sixth aspect of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement the method according to any one of the first aspect or the second aspect.
[0040] According to a seventh aspect of the present disclosure, the present disclosure provides a computer program product comprising a computer program, wherein the computer program is executed to implement the method according to any one of the first aspect or the second aspect.
[0041] According to an eighth aspect of the present disclosure, the present disclosure provides a vehicle comprising the electronic device according to the fifth aspect.
[0042] Compared with the prior art, the present disclosure has the following beneficial effects:
[0043] The model training method, trajectory planning method, electronic device and program product provided by the present disclosure train the neural network model by introducing a composite collision loss function, thereby providing effective gradient supervision for potential risks, so that the network can learn a stable risk avoidance strategy without relying on a large number of real danger samples, thereby reducing the training data acquisition cost of the model, making the training converge faster and more stable. At the same time, the model learns a strategy that keeps away from collision risks and maintains driving feasibility, so that the trained trajectory planning model can fully consider the collision risk between the vehicle and the obstacle, significantly improving the safety of trajectory planning. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate embodiments consistent with the application, and together with the description, serve to explain the principles of the application.
[0045] Figure 1 A flowchart of a model training method provided for an embodiment of the application;
[0046] Figure 2 A flowchart of a minimum surface gap obtaining method provided for an embodiment of the application;
[0047] Figure 3 A flowchart of a trajectory expansion loss function construction method provided for an embodiment of the application;
[0048] Figure 4 A collision schematic diagram between a vehicle and an obstacle provided for an embodiment of the application;
[0049] Figure 5 A gap distance schematic diagram between a vehicle and an obstacle provided for an embodiment of the application;
[0050] Figure 6 A collision schematic diagram between a vehicle and an obstacle within a time expansion window provided for an embodiment of the application;
[0051] Figure 7 A flowchart of a trajectory planning method provided for an embodiment of the application;
[0052] Figure 8 A structural schematic diagram of a model training device provided for an embodiment of the application;
[0053] Figure 9 A structural schematic diagram of a trajectory planning device provided for an embodiment of the application;
[0054] Figure 10 A structural schematic diagram of an electronic device provided for an embodiment of the application.
[0055] Through the above-mentioned drawings, the specific embodiments of the application have been shown, and will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the application by any means, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0056] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0057] Autonomous driving systems are highly complex integrated systems whose core task is to achieve safe, efficient, and comfortable driving in various dynamic and uncertain traffic environments. The entire system is typically divided into several key functional modules, including environmental perception, decision-making and planning, and vehicle control. Among these, trajectory planning plays a crucial role as a bridge connecting perception and underlying control. It is responsible for generating one or more future driving trajectories in real time, satisfying vehicle dynamics constraints, traffic rules, and safety requirements, based on environmental information provided by the perception module (such as obstacle positions, lane lines, and traffic signs) and the global path provided by the navigation module. This trajectory not only defines the vehicle's geometric path over a future period but also includes time-dimensional information such as speed and acceleration, serving as the direct basis for the vehicle control system to execute driving tasks. Therefore, the performance of the trajectory planning algorithm directly determines the intelligence level, safety, and driving experience of autonomous vehicles.
[0058] The input to the trajectory planning module typically includes fused data from multiple sensors (such as cameras, LiDAR, millimeter-wave radar, etc.), which together construct a dynamic model of the vehicle's surrounding environment. Based on this model, the trajectory planning algorithm needs to search and optimize in a high-dimensional solution space to find an optimal or suboptimal trajectory. This process requires considering multiple conflicting objectives simultaneously, such as minimizing travel time, improving driving smoothness (reducing rapid acceleration and sharp turns), and reducing energy consumption while ensuring no collisions with any obstacles. Therefore, the trajectory planning problem is essentially a complex optimization problem with multiple objectives and constraints. Among these, the safety of trajectory planning—that is, how to plan a trajectory to avoid collisions in complex interactions between dynamic and static objects—is a core issue in trajectory planning.
[0059] To address the above challenges, the industry has developed various trajectory planning algorithms, which can be roughly divided into two categories: rule-based traditional planning methods and imitation learning-based planning methods. Among them, the rule-based traditional planning method usually relies on an explicit mathematical model and artificially designed rules to generate trajectories. Its core idea is to decompose the complex trajectory planning problem into a series of solvable sub-problems. However, the performance of this method is highly dependent on the artificially designed cost function, heuristic rules and environment model. The strong dependence on the scene often limits its generalization ability and adaptability, making it difficult to adapt to complex and variable real-world driving environments. At the same time, the algorithm's computing time may increase linearly or even non-linearly with the number of obstacles in the scene, resulting in system response delays and the inability to avoid sudden dangers in time, thereby seriously affecting driving safety.
[0060] Imitation learning uses supervised learning to train a neural network model to directly fit the mapping from perception input to control output, or from environment state to planning trajectory. The advantage of this method is that it can implicitly learn the experience and strategies of human drivers in dealing with complex scenarios without explicitly modeling these complex rules, thereby generating more natural and humanized trajectories.
[0061] However, in complex driving scenarios, there are often multiple reasonable and safe driving strategies for a given environment state, a phenomenon known as trajectory multimodality. For example, when a vehicle in front slows down, the driver can choose to slow down and follow, or to change lanes to the left or right to overtake. All three options can be safe and reasonable. However, standard supervised learning (such as behavior cloning) usually uses a loss function (such as mean squared error) that minimizes the difference between predicted values and true labels during training. This loss function forces the model to learn an "average" or "ambiguous" solution for all possible modes. In the trajectory planning task, this means that the model may generate a trajectory that is neither slowing down nor changing lanes, which may be unsafe or even dangerous in reality. For example, the model may output a trajectory that deviates from the current lane and does not fully enter the adjacent lane, causing the vehicle to drive on the line and increasing the risk of scratching other vehicles. This problem of unsafe model output due to multimodality is one of the core challenges faced by imitation learning methods in terms of safety.
[0062] To address the above technical problems, the present application proposes a model training method, a trajectory planning method, an electronic device and a program product, which introduces a composite collision loss function to train a neural network model, so that the trained trajectory planning model can fully consider the collision risk between the vehicle and the obstacles, significantly improving the safety of trajectory planning.
[0063] The technical solutions of the model training method, trajectory planning method, electronic device and program product provided by the present application will be described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or be combined with each other. For the same or similar content, it may not be repeated in different embodiments.
[0064] Figure 1 A flowchart of a model training method provided by an embodiment of the present application is shown in Figure 1 In some embodiments, the flow of the model training method includes the following steps:
[0065] S101, obtaining training data; wherein the training data includes at least one training sample, the training sample includes sample driving data of a vehicle, and a real trajectory corresponding to the sample driving data.
[0066] Specifically, the sample driving data includes vehicle state data, dynamic / static obstacle information (such as the position, speed, type, and historical trajectory of the obstacle) around the vehicle, high-precision map information, images, point clouds, and other multi-modal perception data. Among them, the sample driving data can be collected by a real vehicle during driving, or generated by simulation.
[0067] Specifically, the real trajectory is a high-quality trajectory true value under expert driving, and the real trajectory is used as a supervision signal for model training, providing the correct answer for the model and guiding the optimization direction of the model parameters.
[0068] S102, inputting the training data into a pre-constructed neural network model to obtain a predicted trajectory output by the neural network model.
[0069] Optionally, the neural network model includes an encoder and a decoder; the encoder is used to extract data features of the driving data of the vehicle; and the decoder is used to regress and output a corresponding planning trajectory based on the data features.
[0070] Among them, the input data is forward propagated via the neural network, the deep features of the data are extracted by the encoder (such as a convolutional layer), and the decoder (such as a fully connected layer or a deconvolutional layer) regresses and outputs a predicted trajectory of the vehicle within a future planning time domain T according to the extracted features. Specifically, the predicted trajectory can be represented by a series of discrete points (discrete time steps t of the planning time domain T), and each point contains position (x, y), heading angle, speed, and other information.
[0071] Specifically, the encoder selects a CNN network, and the decoder selects an RNN network. The CNN network is used to process image data from the camera and can effectively extract key visual features such as roads, vehicles, and pedestrians. The RNN network (such as LSTM or GRU) is good at processing sequence data and can capture the time-dependent relationship of the vehicle motion state, thereby better predicting the future trajectory.
[0072] Specifically, the network input is usually a multi-channel raster image or a set of feature vectors, which encodes obstacle information, lane line information, etc. in time series.
[0073] S103, based on the predicted trajectory and the real trajectory, a comprehensive loss function of the neural network model is constructed; wherein the comprehensive loss function includes an imitation learning loss function and a composite collision loss function, the imitation learning loss function is used to represent the difference between the predicted trajectory and the real trajectory, and the composite collision loss function is used to represent the collision risk of the vehicle on the predicted trajectory.
[0074] Wherein, by introducing the composite collision loss function, the subsequent model training can fully consider the collision risk between the vehicle and the obstacle, so as to improve the safety of the planning trajectory output by the model.
[0075] Optionally, the imitation learning loss function and the composite collision loss function are normalized and weighted summed to obtain the comprehensive loss function.
[0076] Wherein, the imitation learning loss function and the composite collision loss function are normalized and weighted summed to obtain the comprehensive loss function, which can avoid the weight imbalance of loss values with different dimensions and magnitudes when added, make each loss term contribute reasonably under a unified scale, and improve the stability and performance of model training.
[0077] Specifically, the imitation learning loss function can adopt mean square error loss function, mean absolute error loss function, etc.
[0078] S104, the neural network model is trained using the comprehensive loss function to obtain a trajectory planning model; wherein the trajectory planning model is used to obtain a corresponding planning trajectory based on the driving data of the vehicle.
[0079] Wherein, the parameters of the neural network model are adjusted using the comprehensive loss function to iteratively train the neural network model and obtain a trained trajectory planning model.
[0080] In the embodiment, the neural network model is trained by introducing a composite collision loss function, so as to provide effective gradient supervision for potential risks, and the network can learn a stable risk-avoiding strategy without relying on a large number of real danger samples, thereby reducing the training data acquisition cost of the model, and making the training converge faster and more stably. At the same time, the model learns a strategy that keeps away from collision risks and maintains driving feasibility, so that the trained trajectory planning model can fully consider the collision risk between the vehicle and the obstacle, and significantly improve the safety of trajectory planning.
[0081] In some embodiments, the composite collision loss function includes at least one of a collision degree loss function, a safety buffer loss function, and a trajectory inflation loss function; the collision degree loss function is used to represent the collision degree between the vehicle and the obstacle on the predicted trajectory; the safety buffer loss function is used to represent the safety buffer distance between the vehicle and the obstacle on the predicted trajectory; and the trajectory inflation loss function is used to represent the collision degree between the vehicle and the obstacle on the predicted trajectory within the inflated spatiotemporal neighborhood interval.
[0082] In the embodiment, the collision degree loss function converts the "collision" in autonomous driving from a binary event (yes / no) into a continuously measurable physical quantity. By quantifying the overlap degree between the vehicle and the obstacle trajectory in space-time, the neural network can not only learn to "avoid collision", but also learn to "avoid collision with the largest gap", thereby distinguishing different severity of collision risks and preferentially avoiding the most dangerous scenarios.
[0083] The safety buffer loss function captures the potential collision point of the vehicle, thereby generating an explicit and strong "physical repulsive force" using the safety buffer distance to push the vehicle trajectory away from the dangerous area and avoid "edge passing" and "critical parking", so as to effectively reduce near-miss events.
[0084] The trajectory inflation loss function aims to solve a core pain point in dynamic interaction: the limitation of single-frame judgment. Since there is uncertainty in obstacle motion prediction and the vehicle reaction needs time, it is not enough to avoid collision with the obstacle at time t. The trajectory inflation loss function "inflates" the "dangerousness" of the obstacle in the time dimension, forcing the vehicle trajectory to maintain a safe distance within the spatiotemporal neighborhood intersected with the obstacle trajectory, thereby generating a smoother, more predictable and robust collision avoidance trajectory.
[0085] Optionally, the composite collision loss function is obtained by normalizing and weighting summing the collision loss function, the safety buffer loss function, and the trajectory inflation loss function.
[0086] The collision loss function, the safety buffer loss function, and the trajectory inflation loss function are normalized and then weighted and summed to obtain the composite collision loss function, which can avoid weight imbalance when loss values of different dimensions and magnitudes are added, reasonably contribute to each loss term under a unified scale, and improve the stability and performance of model training.
[0087] In some embodiments, for construction of the collision degree loss function, the first overlap degree between the vehicle and each obstacle is obtained at each discrete time step within the planning time domain based on the predicted trajectory, and the collision degree loss function is constructed according to the first overlap degree; the higher the first overlap degree, the greater the collision degree loss corresponding to the collision degree loss function.
[0088] Referring to Figure 4 , for example, the first overlap degree between the vehicle and each obstacle is represented by the intersection over union (IoU), and the vehicle E and the obstacle at any time t can be accurately represented as an oriented bounding box (OBB) in the bird's eye view (BEV) perspective of autonomous driving. Specifically, the oriented bounding box is defined by the center point coordinates (x, y), the length L, the width W, and the orientation angle .
[0089] At each discrete time step t (from 1 to T) within the planning time domain T, the intersection over union IoU between the planning rectangle of the vehicle at the future time t and the future real / predicted rectangle of each obstacle in the scene is calculated. The calculation formula is:
[0090]
[0091] wherein represents the intersection area of the two planning rectangles, represents the union area of the two planning rectangles; the value range of IoU is [0, 1], a value of 0 indicates that the planning rectangles of the vehicle and the obstacle have no overlap, and a larger value indicates a higher overlap degree of the planning rectangles of the vehicle and the obstacle.
[0092] In order to convert IoU into an effective loss function, a monotonically increasing first penalty function is introduced, which can amplify the penalty signal of serious collision. For example, a typical first penalty function is a logarithmic penalty function, and the calculation formula is:
[0093]
[0094] wherein, represents a hyper-parameter that adjusts the severity of the penalty. When IoU approaches 0, the collision degree loss function also approaches 0; as IoU increases, the collision degree loss function grows rapidly and nonlinearly.
[0095] Optionally, the first penalty function It can be a polynomial, logarithmic, exponential or piecewise function.
[0096] Optionally, IoU can be replaced by GIoU, DIoU, alpha-IoU, etc. Generalized overlap indicators to improve the gradient quality at the boundary.
[0097] Optionally, the IoU of the planning rectangle OBB can also be approximated by the differentiable rasterization method to solve the numerical instability of the analytic geometry in the degenerate pose (near parallel, minimal overlap).
[0098] Where, IoU is used to measure the degree of overlap between two planning rectangles OBB, but when dealing with degenerate poses (such as near parallel, minimal overlap), it will face the problem of numerical instability. The differentiable rasterization approximation method can discretize the continuous geometric space into regular grids, and calculate the IoU by calculating on the grid. The specific steps are as follows:
[0099] Step 1, grid division, according to the position and size of the two OBBs, determine a suitable enclosing area, and divide the area into regular grids. The size of the grid can be adjusted according to the actual demand, smaller grid can provide more accurate approximation result, but will increase the amount of calculation; larger grid is faster in calculation, but the approximation accuracy will be reduced.
[0100] Step 2, grid marking, for each grid, judge whether it is located in the overlapping area of the two OBBs. It can be realized by judging whether the center point of the grid is located in the two OBBs at the same time. If the center point of the grid is in the two OBBs, mark the grid as overlapping grid; otherwise, mark it as non-overlapping grid.
[0101] Step 3, IoU approximation calculation, count the number of overlapping grids and the number of grids covered by the two OBBs. IoU can be approximated by the following formula:
[0102]
[0103] Where, represents the number of overlapping grids, and represent the number of grids covered by the two OBBs, respectively.
[0104] In the above formula, the micro-grid approximation method discretizes the continuous geometric space into regular grids, and approximates the calculation of IoU by judging whether the grid is in the overlapping region of the two OBBs. On the one hand, it is differentiable, which can be combined with gradient-based optimization algorithms to optimize the OBB parameters. On the other hand, the grid size can be adjusted to balance the calculation efficiency and approximation accuracy. When a certain accuracy is guaranteed, the calculation speed is improved to meet the real-time requirements, or when high accuracy is required, more accurate results are provided. Thus, the numerical instability problem of the traditional analytic geometry method in the degenerate attitude of near-parallel and small overlap is effectively solved.
[0105] Finally, the total collision degree loss function is the sum of the penalty values of all time steps and all obstacle pairs in the planning horizon:
[0106]
[0107] where N represents the number of obstacles in the scene. In neural network training, since the IoU calculation of the oriented rectangle is completely differentiable (can be realized by analytic geometry or differentiable rendering), the collision degree loss function can stably provide gradients to guide the network parameters to optimize in the direction of reducing trajectory overlap.
[0108] In this embodiment, through the collision degree loss function, the collision between the vehicle and the obstacle is upgraded from "binary collision judgment" to "continuous risk measurement", which significantly improves the effectiveness of risk avoidance. And because the collision loss based on IoU quantifies the overlap degree and amplifies the punishment for serious overlap with a monotonically increasing function, the network will preferentially suppress high-risk contacts (head-on collision, large area overlap) during training, so that it can learn a strong safety boundary faster under the same number of training steps, and significantly reduce the incidence of hard collisions during inference.
[0109] In some embodiments, for the construction of the safety buffer loss function, the following steps are included: based on the planning horizon of the predicted trajectory, the minimum surface gap between the vehicle and each obstacle at each discrete time step in the planning horizon is obtained, and the safety buffer loss function is constructed according to the minimum surface gap; wherein when the minimum surface gap is less than the safety distance threshold, the smaller the minimum surface gap, the greater the safety buffer loss corresponding to the safety buffer loss function.
[0110] wherein a safety distance threshold is first defined, and after obtaining the minimum surface gap between the vehicle and the obstacle, when the minimum surface gap When the safety distance is less than the safety distance threshold, it is considered that there is a collision risk between the vehicle and the obstacle, and a penalty needs to be applied. Therefore, a second penalty function is introduced to construct a safety buffer loss function. In order to make the penalty function smooth and derivable, a Softplus function (or a similar smooth ReLU function) can be used. The safety buffer loss function is calculated according to the following formula:
[0111]
[0112] where the second penalty function The function has the following characteristics:
[0113] When (sufficient safety distance), the value of is negative, and the value of the softplus function is close to 0, almost no loss is generated.
[0114] When (infringe the safety boundary), the value of is positive, and the value of the softplus function is greater than 0, and decreases exponentially as the gap decreases, forming a strong repulsive force.
[0115] In this embodiment, the safety buffer loss function provides a very clear physical meaning for network optimization. At each step of gradient descent, the network is driven to adjust the planning trajectory to increase the minimum surface gap between the vehicle and the obstacle until it meets the safety distance requirement, thereby forming active defensive driving and converting "post-correction" into "pre-avoidance". Since the safety buffer loss generates a repulsive gradient when it enters the safety boundary without physical contact, the model will pull away in advance to avoid "edge passing" and "critical blocking", resulting in a significant reduction in near-miss events and a significant improvement in passenger subjective comfort.
[0116] Optionally, the second penalty function can use Hinge, Huber or exponential penalty function, etc. to adjust the gradient curve of small violations and large violations
[0117] Optionally, the safety distance threshold In addition to being set as a fixed parameter, it can also be self-adaptive according to the road level, weather, adhesion coefficient or driving style, or self-adaptive according to the vehicle speed and acceleration of the vehicle, or self-adaptive according to the collision time TOF (Time-to-Collision), TTC margin, and lateral remaining space, in order to improve the safety margin in high-speed / rain / snow and other working conditions.
[0118] For example, in terms of road level, the speed of highway vehicles is fast, and a longer safety distance threshold needs to be maintained to deal with unexpected situations. The speed of urban road vehicles is low, but the traffic complexity is high, so the safety distance threshold can be shortened to improve road utilization. Specifically, the road level is identified by high-precision maps or vehicle-mounted sensors, and the safety distance threshold is dynamically adjusted.
[0119] For example, in terms of weather, the road surface is slippery in rainy / snowy weather, which reduces tire adhesion and increases braking distance. In foggy weather, visibility is reduced, and a longer safety distance threshold needs to be maintained. Specifically, the weather is identified by rain sensors or cameras, and the safety distance threshold is dynamically adjusted.
[0120] For example, in terms of adhesion coefficient, on low adhesion coefficient road surface (such as ice surface, sand road), the safety distance threshold is extended to reduce the risk of vehicle collision. Specifically, the adhesion coefficient of the road surface is monitored in real time by sensors such as tire speed sensor and accelerometer.
[0121] For example, in terms of driving style, the safety distance threshold is dynamically adjusted according to the driving style. For example, a driver with aggressive driving style will extend the safety distance threshold when driving to compensate for the collision risk caused by his operation inertia. Specifically, by analyzing the driver's acceleration, braking, steering, and other behaviors, the driving style (such as aggressive, conservative) is identified.
[0122] For example, the safety distance threshold is dynamically buffered with the speed and acceleration of the vehicle, and the calculation formula is as follows:
[0123]
[0124] wherein, represents the initial safety distance threshold, and represent the speed and acceleration, respectively, and represent the coefficients, respectively.
[0125] Correspondingly, similar to the dynamic buffering of the safety distance threshold with the speed and acceleration of the vehicle, the safety distance threshold can also be adaptive to TOF (Time-to-Collision), TTC margin, lateral remaining space, etc. to improve the safety margin in high-speed / rain / snow working conditions.
[0126] Referring to Figure 2 Optionally, for obtaining the minimum surface gap, it specifically includes:
[0127] S201, respectively construct a first graph set for representing the vehicle geometry, and a second graph set for representing the obstacle geometry; wherein the first graph set and the second graph set each include at least one graph, and the shape of the graph is at least one of a circle, an ellipse, a convex polygon, and a rectangle.
[0128] By abandoning the rough model of simplifying the vehicle and the obstacle into a single point or a circle, and instead using a more accurate and still efficient graph set for geometric representation, the potential collision points of the vehicle in different postures can be more accurately captured by calculating the minimum distance between the respective graph sets of the vehicle and the obstacle.
[0129] Specifically, the shape of the graph can be selected according to different calculation budgets and accuracy requirements.
[0130] Specifically, the graph can also use a probability occupancy grid / soft mask to represent its geometric shape, in order to improve numerical stability under uncertainty.
[0131] Referring to Figure 5 , for example, the geometric shape of each vehicle is approximated as the union of K circular disks, for example, K=3 is an excellent choice, in which a larger circular disk covers the middle part of the vehicle body, and two smaller circular disks cover the front and rear of the vehicle, thereby representing the vehicle in geometry. Then at time t, the circular disk set of vehicle E is , and the circular disk set of obstacle is . Wherein each circular disk C is defined by the center point position p and the radius r.
[0132] S202, based on the shortest distance between the graphs in the first graph set and the second graph set, determine the minimum surface clearance between the vehicle and the obstacle.
[0133] Wherein the minimum surface clearance between the vehicle and the obstacle is In the graph set, this value is equal to the minimum distance value between all K*K pairs of graphs in the graph set.
[0134] Taking the circular disk set as an example, the minimum surface clearance is equal to the minimum value of the center distance between all K*K pairs of circular disks (one circular disk of the vehicle and one circular disk of the obstacle) minus the sum of the radii, which represents the physically closest distance between the vehicle contour and the obstacle contour. Its calculation formula is as follows:
[0135]
[0136] Wherein, represents the Euclidean distance.
[0137] Optionally, the minimum surface gap can also be obtained directly from the two convex sets using the GJK or support function method, or quickly obtained using a directed distance field / signature distance field (SDF) to reduce computational overhead.
[0138] Among them, the GJK algorithm constructs the Minkowski difference between two convex sets, determines whether the difference set contains the origin, and then determines whether the two convex sets intersect, and iteratively approximates the minimum gap; the support function method directly calculates the minimum gap between two convex sets in a specific direction by optimizing the directional projection; the directed distance field / signature distance field (SDF) obtains the minimum gap directly by querying the field value by pre-compiling the spatial directed distance field (SDF) of the two convex sets.
[0139] In some embodiments, see Figure 3 The construction of the trajectory dilation loss function includes:
[0140] S301, based on the planning time domain of the predicted trajectory, generates the time dilation window corresponding to each discrete time step within the planning time domain.
[0141] See Figure 6 For trajectory planning tasks, the core focus is on the obstacle at a certain point in the future. Location However, this location not only affects the vehicle's position... The timing of events has an impact, and also affects the expansion window of a short period before and after it. The planned layout within the area poses a threat. Therefore, the risk of collisions between obstacles and vehicles within a given time window needs further consideration.
[0142] S302, for each time dilation window, at each sliding time step within the time dilation window, the second overlap degree between the vehicle and each obstacle at the corresponding discrete time step of the time dilation window is obtained, and a trajectory dilation loss function is constructed based on the second overlap degree; wherein, the higher the second overlap degree, the greater the trajectory dilation loss corresponding to the trajectory dilation loss function.
[0143] For example, a time-weighted kernel function is introduced. Taking the Gaussian kernel as an example, the weights are made to... Centered on the time window, the decay smoothly towards both ends. The calculation formula is as follows:
[0144]
[0145] in, The coefficient represents the width of the time dilation, i.e., the range of influence.
[0146] Optional, time kernel The kernel can be changed from a Gaussian kernel to a rectangular, triangular, or cosine window kernel, or it can be adaptively adjusted according to obstacle acceleration and trajectory uncertainty. With K, the greater the risk, the wider the expansion.
[0147] For each obstacle, the reference time Calculate the vehicle's position in the following order: Within the central time window (i.e. ) and the obstacle in Fixed position of time The IoU collision level loss is calculated and weighted using a Gaussian kernel. Trajectory dilation loss function. The calculation formula is as follows:
[0148]
[0149] In the inner summation, the position of the obstacle is... It is fixed, while the vehicle's position is... It slides within a time window.
[0150] In this embodiment, a "soft safety tunnel" is constructed in the spatiotemporal domain for each obstacle using the trajectory dilation loss function to guide the neural network: when the vehicle is about to... When approaching an obstacle, the vehicle not only... At that instant, the vehicle cannot touch any obstacles. It's also best to stay away from obstacles during these times; the closer you are ( The smaller the obstacle, the heavier the penalty. This mechanism will spontaneously guide the neural network to generate a more "elegant" avoidance trajectory, so as to start avoidance earlier and end avoidance later, avoiding high-risk and low-comfort operations such as "extreme edge" or "sudden turn and brake" next to the obstacle.
[0151] Meanwhile, because obstacle trajectory expansion loss creates a "time safety belt" around the obstacle, allowing vehicles to begin and end avoidance earlier and maintain a greater safety margin with vehicles and pedestrians in front and behind during the process, it can significantly reduce behaviors that cause passenger anxiety, such as scraping the edge, sudden lane changes, and sudden braking. Training the model with this method results in fewer near-miss events, a larger minimum safe distance, and lower peak lateral and longitudinal acceleration, leading to a more relaxed and reassuring driving and riding experience.
[0152] Optionally, asymmetric expansion (for the future) can be employed. Applying greater weight makes it more consistent with driving response characteristics.
[0153] Taking the trajectory dilation loss function mentioned above as an example, by employing a Gaussian kernel, the weights are made to... Centered on the time window, the decay smoothly towards both ends, thus... the past time of the future time of In fact, according to the driving reaction characteristics of the vehicle, more attention should be paid to the collision risk of the future time of Therefore, an asymmetric expansion can be adopted to give greater weight to the IoU of the future
[0154] Optionally, in addition to using the collision degree loss of the vehicle and the obstacle to represent the expansion in the time dimension, the trajectory expansion loss can also be expanded to use the safety buffer loss of the vehicle and the obstacle to expand in the time dimension, so as to combine the collision buffer loss in the space dimension to form a "space + time" joint defense zone, so as to further reduce the collision risk of the vehicle trajectory planning.
[0155] Figure 7 A flowchart of a trajectory planning method provided by an embodiment of the present application is shown in Figure 7 In some embodiments, the flow of the trajectory planning method includes the following steps:
[0156] S701, obtaining current driving data of the vehicle; wherein the current driving data includes static perception data, obstacle perception data and road structure perception data.
[0157] Specifically, the static perception data includes traffic light information, road construction area information, etc., the obstacle perception data includes pedestrians, motor vehicles, non-motor vehicles, etc., and the road structure perception data includes lane lines, intersections, etc.
[0158] S702, inputting the current driving data into the trajectory planning model to obtain a planning trajectory output by the trajectory planning model; wherein the trajectory planning model is trained based on a model training method.
[0159] In this embodiment, since the trajectory planning model introduces a composite collision loss function for training, the trained trajectory planning model can fully consider the collision risk between the vehicle and the obstacle, and significantly improves the safety of trajectory planning.
[0160] Figure 8 A structural diagram of a model training device provided by an embodiment of the present application is shown in Figure 8 The model training device includes various functional modules for implementing the foregoing model training method, and any functional module can be realized by software and / or hardware.
[0161] In some embodiments, the model training device 800 includes a sample acquisition module 801, a trajectory prediction module 802, a loss determination module 803 and a model training module 804. Wherein:
[0162] The sample acquisition module 801 is configured to acquire training data; wherein the training data comprises at least one training sample, the training sample comprises sample driving data of a vehicle, and the sample driving data corresponds to a real trajectory;
[0163] The trajectory prediction module 802 is configured to input the training data into a pre-constructed neural network model, and acquire a predicted trajectory output by the neural network model;
[0164] The loss determination module 803 is configured to construct a comprehensive loss function of the neural network model based on the predicted trajectory and the real trajectory; wherein the comprehensive loss function comprises an imitation learning loss function and a compound collision loss function, the imitation learning loss function is used to represent the difference between the predicted trajectory and the real trajectory, and the compound collision loss function is used to represent the collision risk of the vehicle on the predicted trajectory;
[0165] The model training module 804 is configured to train the neural network model by using the comprehensive loss function, and obtain a trajectory planning model; wherein the trajectory planning model is used to obtain a corresponding planning trajectory based on the driving data of the vehicle.
[0166] In some embodiments, the compound collision loss function comprises at least one of a collision degree loss function, a safety buffer loss function and a trajectory inflation loss function;
[0167] The collision degree loss function is used to represent the collision degree between the vehicle and the obstacle on the predicted trajectory;
[0168] The safety buffer loss function is used to represent the safety buffer distance between the vehicle and the obstacle on the predicted trajectory;
[0169] The trajectory inflation loss function is used to represent the collision degree between the vehicle and the obstacle on the predicted trajectory in the inflated space-time neighborhood interval.
[0170] In some embodiments, the loss determination module 803 is specifically further configured to:
[0171] Based on a planning time domain of the predicted trajectory, a first overlap degree between the vehicle and each obstacle at each discrete time step in the planning time domain is acquired respectively, and a collision degree loss function is constructed according to the first overlap degree; wherein the higher the first overlap degree is, the greater the collision degree loss corresponding to the collision degree loss function is.
[0172] In some embodiments, the loss determination module 803 is specifically further configured to:
[0173] The minimum surface gap between the vehicle and each obstacle is obtained at each discrete time step within the planning time domain based on the planning time domain of the predicted trajectory, and a safety buffer loss function is constructed according to the minimum surface gap; wherein, in the case that the minimum surface gap is less than the safety distance threshold, the smaller the minimum surface gap is, the greater the safety buffer loss corresponding to the safety buffer loss function is.
[0174] In some embodiments, the loss determination module 803 is specifically further configured to:
[0175] A first graph set for representing the geometric shape of the vehicle and a second graph set for representing the geometric shape of the obstacle are respectively constructed; wherein, the first graph set and the second graph set each include at least one graph, and the shape of the graph is at least one of a circle, an ellipse, a convex polygon, and a rectangle;
[0176] The minimum surface gap between the vehicle and the obstacle is determined based on the shortest distance between the graphs in the first graph set and the second graph set.
[0177] In some embodiments, the loss determination module 803 is specifically further configured to:
[0178] A time inflation window corresponding to each discrete time step within the planning time domain is generated based on the planning time domain of the predicted trajectory;
[0179] For each time inflation window, a second overlap degree between the vehicle and each obstacle at the discrete time step corresponding to the time inflation window is obtained at each sliding time step within the time inflation window, and a trajectory inflation loss function is constructed according to the second overlap degree; wherein, the higher the second overlap degree is, the greater the trajectory inflation loss corresponding to the trajectory inflation loss function is.
[0180] The model training device 800 provided by the embodiments of the present application is used to execute the technical solutions provided by the foregoing model training method embodiments, and has similar implementation principles and technical effects to the foregoing method embodiments, which will not be described here in detail.
[0181] Figure 9 is a structural schematic diagram of a trajectory planning device provided by the embodiments of the present application, referring to Figure 9 The trajectory planning device includes various functional modules for implementing the foregoing trajectory planning method, and any functional module can be realized by software and / or hardware.
[0182] In some embodiments, the trajectory planning device 900 includes a data acquisition module 901 and a trajectory planning module 902. Wherein:
[0183] The data acquisition module 901 is configured to acquire the current driving data of the vehicle; wherein, the current driving data includes static perception data, obstacle perception data and road structure perception data;
[0184] The trajectory planning module 902 is configured to input the current driving data into the trajectory planning model, and obtain a planned trajectory output by the trajectory planning model, wherein the trajectory planning model is trained based on the model training method described above.
[0185] The trajectory planning device 900 provided by the embodiments of the present application is configured to execute the technical solutions provided by the trajectory planning method embodiments described above, and has similar implementation principles and technical effects to the method embodiments described above, which will not be repeated here.
[0186] It should be noted that the division of each module of the above device is only a logical division of functions, and all or part of the modules can be integrated into one physical entity, or physically separated. These modules can all be implemented in the form of software called by a processing element, or all be implemented in the form of hardware, or some modules are implemented in the form of software called by a processing element, and some modules are implemented in the form of hardware. For example, the sample acquisition module 801 can be a separate processing element, or can be integrated into a chip of the above device, in addition, it can also be stored in the memory of the above device in the form of program code, and the functions of the above sample acquisition module 801 are called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or can be independently implemented. The processing element here can be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each module can be completed by integrated logic circuit of hardware or instruction in the form of software in the processing element.
[0187] Figure 10 A structural schematic diagram of an electronic device provided by the embodiments of the present application is shown in FIG. 10. Figure 10 The electronic device 1000 includes a processor 1001 and a memory 1002 in communication with the processor 1001.
[0188] The memory 1002 stores computer execution instructions.
[0189] The processor 1001 executes the computer execution instructions stored in the memory 1002 to implement the technical solutions of the above model training method or trajectory planning method.
[0190] In the electronic device 1000 described above, the memory 1002 and the processor 1001 are directly or indirectly electrically connected to realize the transmission or interaction of data. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as through bus connection. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or only one type of bus. The memory 1002 stores computer execution instructions for implementing the foregoing model training method or trajectory planning method, including at least one software function module stored in the memory 1002 in the form of software or firmware, and the processor 1001 executes various function applications and data processing by running the software program and module stored in the memory 1002.
[0191] The memory 1002 at least includes one type of readable storage medium, not limited to a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Among them, the memory 1002 is used to store programs, and the processor 1001 executes the programs after receiving execution instructions. Further, the software program and module in the memory 1002 described above can also include an operating system, which can include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and can communicate with various hardware or software components to provide a running environment for other software components.
[0192] The processor 1001 can be an integrated circuit chip having a processing capability of signals. The processor 1001 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application specific integrated circuit (ASIC), etc. The processor 1001 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor, or the processor 1001 can also be any conventional processor or the like.
[0193] The electronic device 1000 is configured to execute the technical solutions provided by the foregoing model training method or trajectory planning method embodiments, and the implementation principles and technical effects are similar to those of the foregoing method embodiments, which will not be described herein.
[0194] The embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When the computer execution instructions are executed, the technical solutions of the foregoing model training method or trajectory planning method are implemented.
[0195] The computer readable storage medium described above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The computer readable storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0196] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium, and can write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the control device of the model training device or the trajectory planning device.
[0197] The embodiments of the present application further provide a vehicle, including the electronic device described above.
[0198] The embodiment of the present application further provides a computer program product comprising a computer program which, when executed, is configured to implement the technical solutions of the aforementioned model training method or trajectory planning method.
[0199] In the above embodiments, those skilled in the art can understand that the implementation of the above-mentioned method embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, it can be realized in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless network, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, Solid State Disk (SSD)) and the like.
[0200] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combination of these technical features does not exist contradictory, it should be considered as the scope of the present application.
[0201] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The specification and examples given are exemplary only. It is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the application are indicated by the appended claims.
[0202] It is to be understood that the application is not limited to the precise construction already described above and shown in the drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should only be limited by the claims appended hereto.
Claims
1. A model training method, characterized in that, include: Acquire training data; wherein the training data includes at least one training sample, the training sample includes sample driving data of the vehicle, and the real trajectory corresponding to the sample driving data; The training data is input into a pre-built neural network model to obtain the predicted trajectory output by the neural network model; Based on the predicted trajectory and the real trajectory, a comprehensive loss function for the neural network model is constructed; wherein, the comprehensive loss function includes an imitation learning loss function and a composite collision loss function, the imitation learning loss function is used to characterize the difference between the predicted trajectory and the real trajectory, and the composite collision loss function is used to characterize the collision risk of the vehicle on the predicted trajectory; The neural network model is trained using the comprehensive loss function to obtain a trajectory planning model; wherein, the trajectory planning model is used to obtain the corresponding planned trajectory based on the vehicle's driving data.
2. The method according to claim 1, characterized in that, The composite collision loss function includes at least one of the collision severity loss function, the safety buffer loss function, and the trajectory inflation loss function; The collision degree loss function is used to characterize the degree of collision between the vehicle and obstacles on the predicted trajectory; The safety buffer loss function is used to characterize the safety buffer distance between the vehicle and obstacles on the predicted trajectory; The trajectory dilation loss function is used to characterize the degree of collision between the vehicle and obstacles on the predicted trajectory within the dilated spatiotemporal neighborhood.
3. The method according to claim 2, characterized in that, The collision degree loss function is obtained based on the following method: Based on the planning time domain of the predicted trajectory, the first overlap degree between the vehicle and each obstacle is obtained at each discrete time step in the planning time domain, and the collision degree loss function is constructed according to the first overlap degree; wherein, the higher the first overlap degree, the greater the collision degree loss corresponding to the collision degree loss function.
4. The method according to claim 2, characterized in that, The safety buffer loss function is obtained based on the following method: Based on the planning time domain of the predicted trajectory, the minimum surface gap between the vehicle and each obstacle is obtained at each discrete time step within the planning time domain, and the safety buffer loss function is constructed based on the minimum surface gap; wherein, when the minimum surface gap is less than the safety distance threshold, the smaller the minimum surface gap, the greater the safety buffer loss corresponding to the safety buffer loss function.
5. The method according to claim 4, characterized in that, The minimum surface clearance is obtained based on the following method: A first graphic set for representing the geometry of the vehicle and a second graphic set for representing the geometry of the obstacle are constructed respectively; wherein, both the first graphic set and the second graphic set include at least one graphic, and the shape of the graphic is at least one of the following: circle, ellipse, convex polygon, and rectangle; The minimum surface gap between the vehicle and the obstacle is determined based on the shortest distance between the graphics in the first graphics set and the second graphics set.
6. The method according to claim 2, characterized in that, The trajectory dilation loss function is obtained based on the following method: Based on the planning time domain of the predicted trajectory, a time dilation window corresponding to each discrete time step within the planning time domain is generated; For each of the time dilation windows, at each sliding time step within the time dilation window, the second overlap degree between the vehicle and each of the obstacles at the corresponding discrete time step of the time dilation window is obtained, and the trajectory dilation loss function is constructed based on the second overlap degree; wherein, the higher the second overlap degree, the greater the trajectory dilation loss corresponding to the trajectory dilation loss function.
7. A trajectory planning method, characterized in that, include: Acquire the vehicle's current driving data; wherein, the current driving data includes static perception data, obstacle perception data, and road structure perception data; The current driving data is input into the trajectory planning model to obtain the planned trajectory output by the trajectory planning model; wherein the trajectory planning model is trained based on the model training method of any one of claims 1-6.
8. An electronic device, characterized in that, Includes a processor and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
9. A computer program product, characterized in that, Includes a computer program, which, when executed, is used to implement the method as described in any one of claims 1 to 7.
10. A vehicle, characterized in that, Including the electronic device as described in claim 8.
Citation Information
Patent Citations
Trajectory prediction model training method and device, trajectory prediction method and device, equipment and medium
CN114021080A
Anti-collision trajectory prediction model training method and device
CN117521712A
Vehicle data processing method and device, electronic equipment and storage medium
CN117912295A
Track planning method, vehicle-mounted equipment, vehicle and computer program product
CN118968472A
Vehicle door anti-collision control method, electronic equipment and vehicle
CN120906431A
Cited By
Intelligent equipment, trajectory planning method thereof and storage medium
CN122015878A