An autonomous driving algorithm training method and device
Through the method of combining the ring simulation platform and the real vehicle platform, a multi-scene driving data set is constructed and the autonomous driving algorithm is optimized, which solves the flexibility and adaptability of the autonomous driving algorithm in the existing technology in complex scenarios, and efficient training and verification are achieved, improving safety and adaptability.
Patent Information
- Application Number
- CN202410152232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-03
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-02-03
AI Technical Summary
Existing autonomous driving algorithms lack flexibility and adaptability when dealing with complex and changing road scenarios, have poor adaptability, and the migration cost from simulation environment to real environment is high, training and verification cost is high, and safety is difficult to guarantee.
By combining the ring simulation platform and the real vehicle platform, a multi-scene driving data set is constructed using the preset orthogonal arrangement method to generate a road simulation environment, optimize the autonomous driving algorithm, and project the spatiotemporal distribution characteristics of traffic participants onto the test road in real time, obtain real trajectory data for training, and combine deep learning, reinforcement learning and model prediction control technology to achieve independent learning and adaptive adjustment.
It improves the development efficiency and safety of autonomous driving algorithms, reduces training and verification costs, can better deal with complex driving scenarios, has good adaptive characteristics, and improves driving safety and comfort.
Smart Images

Figure CN118095482B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle autonomous driving, and in particular, to a method and device for training an autonomous driving algorithm. Background Art
[0002] In the field of autonomous driving planning and control (PNC), existing technical solutions mainly focus on methods of making decision planning and control based on traditional rules, experience, and models. These methods usually use predefined rules and models to generate autonomous driving decision strategies. For example, local planning algorithms such as LatticePlanner and EMPlanner are commonly used for local path planning and speed planning of vehicles on structured roads to generate vehicle trajectories to form different driving behaviors such as cruising, following, lane changing, overtaking, and obstacle avoidance. Algorithms such as MPC (Model Predictive Control) and LQR (Linear Quadratic Regulator Tracking Controller) are commonly used for trajectory tracking control of vehicles.
[0003] However, these existing technical solutions have some disadvantages. First, due to the complex and changeable nature of autonomous driving scenarios, it is difficult to cover all possible situations through manually defined rules and models, resulting in a lack of flexibility and adaptability in decision-making strategies. Second, traditional methods usually require a large amount of manual tuning and parameter settings, and need to be re-customized for different roads, traffic conditions, and vehicle characteristics, increasing the development and maintenance costs. In addition, existing technologies may have certain limitations when dealing with unstructured and complex real road scenarios, and it is difficult to ensure system robustness and safety. At the same time, existing technologies have poor adaptability from simulated vehicles, traffic environments to real vehicle traffic environments, and a large amount of repetitive later work is required to migrate and adapt the algorithms verified in the simulation environment to the real environment. Moreover, the semi-physical training and verification scenarios of current learning-based autonomous driving algorithms are relatively single, and a complete closed-loop of algorithm training, updating, and verification data has not been fully formed, and the algorithm's adaptability to boundary conditions is poor.
[0004] Therefore, it is necessary to provide a method for training an autonomous driving algorithm, which can jointly complete the training, updating, and calibration of the autonomous driving algorithm through an in-loop simulation platform and a real vehicle platform, improving the overall development efficiency of the autonomous driving algorithm and the safety factor of testing. Summary of the Invention
[0005] In view of this, it is necessary to provide a method and device for training an autonomous driving algorithm to solve the problems that existing technologies need to re-tune and set parameters for different roads, traffic conditions, and vehicle characteristics, have low accuracy when dealing with complex road scenarios, and have low safety for automatic vehicle driving.
[0006] To solve the above problems, the present invention provides a method for training an autonomous driving algorithm in a first aspect, including:
[0007] Generating a road simulation environment based on test road information;
[0008] Constructing a multi-scenario driving data set according to historical traffic scenario data by using a preset orthogonal array method;
[0009] Optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm, and obtaining the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle;
[0010] Projecting the spatio-temporal distribution characteristics of the traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and training the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm.
[0011] In a possible implementation manner, the generating a road simulation environment based on test road information includes:
[0012] Obtaining the longitude and latitude information of the trajectory points, the altitude information, and the vehicle attitude information of the test road, where the vehicle attitude information includes vehicle pitch angle information;
[0013] Determining the slope of the test road according to the pitch angle information;
[0014] Converting the longitude and latitude information of the trajectory points into coordinate information based on the Gauss-Kruger projection coordinate system, and constructing a vehicle trajectory sequence set according to the slope of the test road;
[0015] Determining the road characteristics corresponding to the test road according to the vehicle trajectory sequence set, and generating a corresponding road simulation environment according to the road characteristics.
[0016] In a possible implementation manner, the constructing a multi-scenario driving data set according to historical traffic scenario data by using a preset orthogonal array method includes:
[0017] Obtaining the boundary scenario data in multiple actual traffic accidents, and extracting the sampling feature data of the scenario objects in the actual traffic scenario data;
[0018] Performing orthogonal arrangement on the scenario objects according to the sampling feature data to obtain the spatio-temporal distribution characteristics of traffic participants;
[0019] Obtaining the basic driving conditions of the vehicle, and obtaining a multi-scenario driving data set according to the basic driving conditions and the spatio-temporal distribution characteristics of traffic participants.
[0020] In a possible implementation, optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm includes:
[0021] Adding the multi-scenario driving data set to the road simulation environment, using the autonomous driving algorithm to be verified to simulate and control the vehicle, and obtaining the simulation trajectory data of the vehicle;
[0022] Dividing the simulation trajectory data into multiple driving scenario segments, and determining the ego-vehicle trajectory data and the surrounding-vehicle trajectory data in each driving scenario segment;
[0023] Performing coordinate transformation on the ego-vehicle trajectory data and the surrounding-vehicle trajectory data, and generating an algorithm optimization evaluation index according to the trajectory data after coordinate transformation;
[0024] Constructing an algorithm training database based on the algorithm optimization evaluation index and the simulation trajectory data, and optimizing the autonomous driving algorithm to obtain an optimized driving algorithm.
[0025] In a possible implementation, the algorithm optimization evaluation index includes a lateral evaluation index and a longitudinal evaluation index;
[0026] The lateral evaluation index is used to measure the deviation of the vehicle from a preset standard line and the smooth state of lane-changing driving;
[0027] The longitudinal evaluation index is used to measure the vehicle speed deviation, trajectory deviation, smoothness of longitudinal acceleration, and collision risk of the vehicle.
[0028] In a possible implementation, optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm includes:
[0029] Taking the vehicle driving task completion time, the number of collisions, and the trajectory tracking effect as optimization objectives, and optimizing the autonomous driving algorithm to obtain an optimized driving algorithm.
[0030] In a possible implementation, projecting the spatio-temporal distribution characteristics of traffic participants onto the test road in real time, obtaining the real trajectory data of the vehicle, and training the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a well-trained autonomous driving algorithm includes:
[0031] Performing in-loop testing on the vehicle under different driving conditions according to the obstacle information projected in the simulation to obtain the real trajectory data of the vehicle;
[0032] Using the simulation trajectory data and the real trajectory data as the data input of a preset training model, optimizing and training the autonomous driving algorithm to obtain a well-trained autonomous driving algorithm.
[0033] In a second aspect, the present invention also provides an autonomous driving algorithm training device, including:
[0034] An environment building module for generating a road simulation environment based on test road information;
[0035] A data set construction module for constructing a multi-scenario driving data set according to historical traffic scenario data by using a preset orthogonal array method;
[0036] A simulation module for optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm, and acquiring the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle;
[0037] A training and optimization module for projecting the spatio-temporal distribution characteristics of the traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and training the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a well-trained autonomous driving algorithm.
[0038] In a third aspect, the present invention also provides an electronic device, including: a processor and a memory;
[0039] The memory stores a computer-readable program executable by the processor;
[0040] When the processor executes the computer-readable program, the steps in the above-mentioned autonomous driving algorithm training method are implemented.
[0041] In a fourth aspect, the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the above-mentioned autonomous driving algorithm training method.
[0042] The beneficial effects of the present invention are:
[0043] The present invention provides a method for training an autonomous driving algorithm. First, a road simulation environment is constructed in a simulation platform based on real test road information, and a multi-scenario driving data set is constructed and derived through an orthogonal array method. Secondly, the autonomous driving algorithm is optimized in the simulation platform according to the multi-scenario driving data set to obtain an optimized driving algorithm, and the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle output by the simulation platform are obtained. Finally, the spatio-temporal distribution characteristics of the traffic participants are projected onto the test road in real time to obtain the real trajectory data of the vehicle, and the autonomous driving algorithm is trained according to the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm. By comprehensively applying technologies such as deep learning, reinforcement learning, inverse reinforcement learning, and model predictive control, the system of the present invention can learn driving experience and rules from a large amount of real driving data, and has the ability of autonomous learning, intelligent decision-making, and adaptive adjustment to adapt to complex driving environments. A multi-scenario driving data set is constructed in a simulation software, and data collection and algorithm verification are completed in a real vehicle-in-the-loop platform. Through a training method combining virtual and real, the autonomous driving algorithm can be transferred to the real environment more quickly and efficiently, reducing the cost of algorithm training and verification, being able to better handle complex driving scenarios, improving driving safety and comfort, and being able to perform online training and optimization according to specific vehicle characteristics and real road environments, having good adaptive characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 FIG. is a flowchart of a method according to an embodiment of the autonomous driving algorithm training method provided by the present invention;
[0045] Figure 2 FIG. is a schematic structural diagram of an embodiment of the autonomous driving algorithm training device provided by the present invention;
[0046] Figure 3 FIG. is a schematic diagram of an operating environment of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] The following will specifically describe the preferred embodiments of the present invention with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, rather than to limit the scope of the present invention.
[0048] A specific embodiment of the present invention discloses a method for training an autonomous driving algorithm, including:
[0049] Step S101: Generate a road simulation environment based on test road information;
[0050] Step S102: Construct a multi-scenario driving data set according to historical traffic scenario data by using a preset orthogonal array method;
[0051] Step S103: Optimize the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm, and acquire the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle;
[0052] Step S104: Project the spatio-temporal distribution characteristics of the traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and train the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm.
[0053] The autonomous driving algorithm training method provided in this embodiment first constructs a road simulation environment in the simulation platform based on the real test road information, and constructs and derives a multi-scenario driving data set through the orthogonal array method; secondly, optimizes the autonomous driving algorithm in the simulation platform according to the multi-scenario driving data set to obtain an optimized driving algorithm, and acquires the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data output by the simulation platform; finally, projects the spatio-temporal distribution characteristics of the traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and trains the autonomous driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm. The method of this embodiment enables the system to learn driving experience and rules from a large amount of real driving data and possess the capabilities of autonomous learning, intelligent decision-making, and adaptive adjustment to adapt to complex driving environments through the comprehensive application of technologies such as deep learning, reinforcement learning, inverse reinforcement learning, and model predictive control; constructs a multi-scenario driving data set in the simulation software, completes data collection and algorithm verification in the real vehicle-in-the-loop platform, and enables the autonomous driving algorithm to migrate to the real environment more quickly and efficiently through the virtual-real combined training method, reducing the costs of algorithm training and verification, being able to better handle complex driving scenarios, improving driving safety and comfort, and being able to perform online training and optimization according to specific vehicle characteristics and real road environments, having good adaptive characteristics.
[0054] It should be noted that in the embodiments of the present invention, the autonomous driving PNC algorithm mainly uses ROS to complete the construction of the control system. The nodes for the simulation of the control system can interact with the hardware-in-the-loop simulation platform through UDP communication to complete the algorithm verification of multiple scenarios. The control system interacts with the actual vehicle and sensor devices through CANBUS nodes to obtain the real-time positioning and attitude information of the vehicle, and inputs the above information into the autonomous driving system to output control instructions, which are sent to the vehicle chassis in real time through the CANBUS nodes to complete the control of the real vehicle, thereby completing the training, update, and verification of the algorithm in the actual vehicle and the real road environment.
[0055] Among them, the simulation platform selects the Carmaker-Xpack4 simulation platform, which is used to build a multi-scenario driving dataset, train, update, and verify the automatic driving PNC algorithm, and simulate the road environment and the output of the real vehicle.
[0056] In some embodiments, step S101 generates a road simulation environment based on the test road information, including:
[0057] Obtain the longitude and latitude information, altitude information, and vehicle attitude information of the trajectory points of the test road, where the vehicle attitude information includes vehicle pitch angle information;
[0058] Determine the slope of the test road according to the pitch angle information;
[0059] Convert the longitude and latitude information of the trajectory points into coordinate information based on the Gauss-Krüger projection coordinate system, and construct a vehicle trajectory sequence set according to the slope of the test road;
[0060] Determine the road features corresponding to the test road according to the vehicle trajectory sequence set, and generate a corresponding road simulation environment according to the road features.
[0061] In a specific embodiment, the above method first selects the real test road of the automatic driving PNC algorithm, collects the real road longitude and latitude data, reproduces the real road environment in the scene editor of the simulation software, and completes the mapping of the real road environment positioning and the map in the simulation software. It includes the following steps:
[0062] Step S111: Use an actual vehicle and an integrated navigation system to collect the trajectory points of the test road in the WGS84 coordinate system, including longitude and latitude, altitude information, and vehicle attitude information.
[0063] Step S112: Smooth the pitch angle in the collected vehicle attitude information through a first-order low-pass filter and approximately use it as the road slope of the actual road.
[0064] Step S113: Use the C++ open-source third-party library proj4 to convert the longitude and latitude information and altitude information in the WGS84 coordinate system into coordinates in the Gauss-Krüger projection coordinate system, and combine them with the corresponding pitch angle to form the required trajectory sequence (xi, yi, zi, pi).
[0065] Step S114 applies the trajectory sequence generated in step S113 to generate road shape features such as heading angle, curvature, and pitch angle, calculates the average value of the road features of multiple trajectories, and reproduces a simulation road that conforms to the road features starting from zero to generate a simulation map.
[0066] In some embodiments, step S102 constructs a multi-scenario driving data set according to historical traffic scenario data by using a preset orthogonal arrangement method, including:
[0067] Obtain the boundary scenario data in multiple actual traffic accidents, and extract the sampling feature data of the scenario objects in the actual traffic scenario data;
[0068] Orthogonally arrange the scenario objects according to the sampling feature data to obtain the spatio-temporal distribution characteristics of traffic participants;
[0069] Obtain the basic driving conditions of the vehicle, and obtain a multi-scenario driving data set according to the basic driving conditions and the spatio-temporal distribution characteristics of traffic participants.
[0070] In a specific embodiment, constructing a multi-scenario driving data set according to historical traffic scenario data includes the following steps:
[0071] Step S211: Construct various basic driving conditions of the vehicle by referring to materials, such as driving conditions of constant speed cruise, following a vehicle, overtaking, lane changing, etc., and record them in the format of Table 1.
[0072] Table 1: Example of a single scenario
[0073] Vehicle number Timestamp / s Lateral offset / m Longitudinal offset / m Lane number Linear velocity / m / s 0 0.0 0.0 0.0 1 5.0 1 0.0 -3.75 0.0 0 10.0 1 6.0 3.75 90.0 0 15.0 1 12.0 0.0 200.0 1 20.0 .............
[0074] Among them, the vehicle numbered 0 represents the self-vehicle state and the desired state. The lateral offset and longitudinal offset respectively represent the coordinates in the L direction and S direction in the SL coordinate system, and the linear velocity represents the target speed of the vehicle at this moment.
[0075] Step S212: Collect the boundary conditions in actual historical traffic accidents and the accident scenario data corresponding to the boundary conditions, and extract the scenario objects in the accident scenario data; for example: the occluding vehicle, the self-vehicle, the protruding traffic participant, other environmental vehicles, and lane conditions in the "ghost car" scenario.
[0076] Step S213: Sample the scenario objects in S211 and expand the boundary conditions according to the sampling results.
[0077] For example: Sample the length, width, height, and position of the occluding vehicle according to the actual situation of a large truck to obtain various states of the occluding vehicle. Sample the vehicle poses such as the speed and acceleration of the protruding traffic participant detected by the self-vehicle to obtain various critical states of the self-vehicle.
[0078] The detected traffic participants, such as different pedestrians, bicycles, electric vehicles or other vehicles, are sampled for their speed, acceleration and other postures to obtain the status of different detected traffic participants.
[0079] The lane conditions, such as T-junctions, crossroads, right-angle intersections and other road structures, as well as the number of lanes such as single lane, two-way two-lane, two-way four-lane, road characteristics such as different road curvatures and legal information such as road speed limits are sampled to obtain different road environments.
[0080] In addition, the above method can also be applied to the status of other environmental vehicles to sample information such as type, quantity, and posture.
[0081] Step S214: Orthogonally arrange the scene objects sampled in step S213 to obtain a set of boundary case data sets derived from an accident boundary case, and eliminate unreasonable scenes to obtain a complete boundary case data set for training and verifying the autonomous driving algorithm.
[0082] Step S215: The above-constructed scenarios are combined with various basic driving conditions of the vehicle and input into the road scenario through the scenario editor of the simulation platform Carmaker to construct different scenarios for training autonomous driving algorithms.
[0083] In some embodiments, constructing a multi-scenario driving dataset based on historical traffic scene data using a preset orthogonal arrangement method includes:
[0084] Acquire boundary scene data from a plurality of actual traffic accidents, and extract sampling feature data of scene objects in the actual traffic scene data;
[0085] Orthogonally arranging the scene objects according to the sampled feature data to obtain spatiotemporal distribution characteristics of traffic participants;
[0086] The basic driving conditions of the vehicle are obtained, and a multi-scenario driving dataset is obtained based on the basic driving conditions and the spatiotemporal distribution characteristics of traffic participants.
[0087] In some embodiments, optimizing an autonomous driving algorithm in a road simulation environment based on the multi-scenario driving dataset to obtain an optimized driving algorithm includes:
[0088] Adding the multi-scenario driving dataset to the road simulation environment, using the autonomous driving algorithm to be verified to simulate and control the vehicle, and obtaining simulated trajectory data of the vehicle;
[0089] Dividing the simulation trajectory data into a plurality of driving scene segments, and determining the own vehicle trajectory data and the environment vehicle trajectory data in each driving scene segment;
[0090] Perform coordinate transformation on the ego vehicle trajectory data and the surrounding vehicle trajectory data, and generate algorithm optimization evaluation metrics based on the trajectory data after coordinate transformation;
[0091] Construct an algorithm training database based on the algorithm optimization evaluation metrics and the simulation trajectory data, and optimize the autonomous driving algorithm to obtain an optimized driving algorithm.
[0092] In some embodiments, the algorithm optimization evaluation metrics include lateral evaluation metrics and longitudinal evaluation metrics;
[0093] The lateral evaluation metric is used to measure the deviation of the vehicle from a preset standard line and the smoothness of lane-changing driving;
[0094] The longitudinal evaluation metric is used to measure the vehicle speed deviation, trajectory deviation, smoothness of longitudinal acceleration, and collision risk of the vehicle.
[0095] The above process will be described below through a specific embodiment.
[0096] Step 1: Use the constructed multi-scenario driving data set as the algorithm test and training scenario, connect the autonomous driving PNC algorithm to be verified or trained to the actual controller, and connect it to the CarMaker-Xpack4 device;
[0097] Step 2: Control the simulation vehicle in the simulation environment through the autonomous driving PNC algorithm, and obtain the data in Table 2 below from CarMaker.
[0098] Collect the data of each frame of simulation state into the database through TCP transmission as the data for verification and training of the autonomous driving algorithm.
[0099] Table 2 Output data of the simulation platform
[0100]
[0101]
[0102] Step 3: Clean and divide the trajectory data, divide it into time segments and road segments, divide it into multiple driving scenario segments, and select a suitable vehicle as the ego vehicle according to the driving behaviors of each vehicle within the segment. Its trajectory and driving behavior are used as a reference for subsequent algorithm training, and other vehicles are used as surrounding vehicles to provide traffic participant information for the operation of the PNC algorithm.
[0103] Step 4: Convert the environmental vehicle trajectories within each segment to the Frenet Frame coordinate system, convert the trajectory points in the Cartesian coordinate system to the Frenet Frame coordinate system, and construct the SL and ST diagrams for each time frame of the scenario segment.
[0104] Convert the selected ego vehicle trajectory to the Frenet Frame coordinate system as well to generate the driving characteristics of the time segment and the trajectory points for each time frame.
[0105] The specific conversion formula is shown in formula (0.1):
[0106] s = s r
[0107]
[0108]
[0109]
[0110] l′ = (1 - k r l)tan(θ x - θ r )
[0111]
[0112] In formula (0.1), s represents the longitudinal displacement of the vehicle on the reference path, represents the Frenet longitudinal velocity; represents the Frenet longitudinal acceleration, l represents the lateral offset distance of the vehicle relative to the reference path, v x represents the linear velocity of the vehicle in the Cartesian coordinate system, θ x represents the lateral direction angle of the vehicle relative to the reference x path, θ r represents the direction angle of the vehicle relative to the reference line r, a x represents the acceleration, the abscissa of the vehicle in the Cartesian coordinate system, k r and k r ′ represent the curvature.
[0113] Step 5: Verify the algorithm for the preprocessed data above, generate corresponding metrics as the data for algorithm training, and calculate the driving task completion time, the number of collisions, and the trajectory tracking effect as the input for model training, and optimize the PNC algorithm accordingly.
[0114] It should be noted that the corresponding metrics mentioned here include lateral evaluation metrics and longitudinal evaluation metrics. The following will elaborate on these two types of metrics in detail:
[0115] (1) Lateral evaluation metrics
[0116] The lateral evaluation index consists of two parts: the lateral offset cost and the lateral comfort cost function.
[0117] The design principle of the lateral offset cost function is to make the autonomous vehicle drive along the road center as much as possible. The larger the deviation from the center line, the higher the cost. The expression is as follows:
[0118]
[0119] In Equation (0.2), l i is the offset of the i-th trajectory point, l max is the maximum offset of the trajectory point, S is the number of trajectory points, and W is the state quantization value.
[0120] The design principle of the lateral comfort cost is to make the vehicle run smoothly during lane change. If the steering wheel turns violently, the cost will increase. The expression is as follows:
[0121]
[0122] In Equation (0.3), l i ″ represents the rate of change of distance offset, a i represents acceleration, and v i represents the vehicle speed. If the planned trajectory has a large lateral speed or lateral acceleration, the obtained cost value will also be large.
[0123] (2) Longitudinal evaluation index
[0124] The longitudinal evaluation index consists of four parts: the cost of reaching the longitudinal goal, the longitudinal comfort cost, the longitudinal collision cost, and the longitudinal centripetal acceleration cost.
[0125] The design principle of the longitudinal goal cost is to evaluate the cost required to complete the planning purpose, which can be specifically divided into the speed deviation cost and the total trajectory distance cost. The expression is as follows:
[0126]
[0127] In Equation (0.4), v ref represents the speed standard value, w sped represents the speed deviation weight, and w dis represents the distance deviation weight. These weight values are the weight values summarized in engineering practice. A large speed deviation and a large total trajectory distance both correspond to large weights, indicating that a higher cost is required to complete the planning goal.
[0128] The design principle of the longitudinal comfort cost is to ensure the riding comfort, which is measured by the longitudinal jerk, the derivative of acceleration with respect to time, representing the rate of change of acceleration. The expression is as follows:
[0129]
[0130] In Equation (0.5), j max represents the jerk. Excessive jerk will affect the comfort of passengers.
[0131] The design principle of the longitudinal collision cost is to evaluate the magnitude of the collision risk of candidate trajectories. Trajectories with a smaller collision risk have a lower corresponding cost. The expression is as follows:
[0132]
[0133] In Equation (0.6), cost i is the cost value calculated for the trajectories with collision risk during the collision detection process, and is obtained by sorting and assignment.
[0134] The design principle of the longitudinal centripetal acceleration cost is to enable the vehicle to slow down when turning or making a U-turn. The expression is as follows:
[0135]
[0136] In Equation (0.7), k i is the curvature of the sampling points on the lane reference line. It can be seen that the trajectories with a lower vehicle speed also have a relatively lower corresponding cost.
[0137] The above evaluation indicators and the original data are stored in the database to construct an algorithm training database, and corresponding algorithm verification evaluation documents are generated using each indicator.
[0138] In some embodiments, the optimizing the autonomous driving algorithm in a road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm includes:
[0139] Optimizing the autonomous driving algorithm with the vehicle driving task completion time, the number of collisions, and the trajectory tracking effect as the optimization objectives to obtain an optimized driving algorithm.
[0140] In some embodiments, in step S104, the projecting the spatio-temporal distribution characteristics of traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and training the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a well-trained autonomous driving algorithm includes:
[0141] Performing in-loop testing in different driving conditions of the vehicle according to the obstacle information projected in the simulation to obtain the real trajectory data of the vehicle;
[0142] Using the simulation trajectory data and the real trajectory data as the data input of a preset training model to optimize and train the autonomous driving algorithm to obtain a well-trained autonomous driving algorithm.
[0143] In a specific embodiment, the specific steps of training the optimized driving algorithm according to the real trajectory data and the simulated trajectory data are as follows:
[0144] Step S411: Select some typical scenarios in the above test scenarios, and project their global coordinates into the real road environment after coordinate transformation.
[0145] Step S412: Write the underlying control algorithm corresponding to the real vehicle, and connect the decision-making and planning algorithm and the upper-layer trajectory tracking control algorithm into it. In the real road environment, according to the obstacle information projected in the simulation, perform driving conditions such as lane change, obstacle avoidance, and overtaking, complete the vehicle-in-the-loop test, and collect the real test data synchronized in the simulation platform.
[0146] Step S413: Similarly, complete the online collection and online processing of the vehicle test data in the simulated road environment, and use it as the input of the model to optimize the PNC algorithm, so that it can be more efficiently adapted to the actual vehicle and the real road environment.
[0147] The method of this embodiment uses the hardware-in-the-loop simulation platform and the real vehicle platform to jointly complete the acquisition and data derivation of the boundary condition data (Corner Case) to construct a rich Corner Case set as the verification and training database of the autonomous driving algorithm. This method can optimize the algorithm more efficiently, and can complete the tuning and verification of the algorithm more efficiently and at low cost. And because this method takes the real vehicle data into account and uses it as part of the algorithm training, it can greatly improve the adaptability of the algorithm in the actual vehicle and the real road environment. In addition, the method of combining the hardware-in-the-loop simulation platform with the real road and vehicle data can also more efficiently complete the later algorithm training and update of the vehicle, improve the overall development efficiency of the autonomous driving algorithm and the safety factor of the test, and well reduce the verification cost.
[0148] The present invention also provides an autonomous driving algorithm training device, as Figure 2 shown. The autonomous driving algorithm training device 200 includes:
[0149] An environment building module 201, configured to generate a road simulation environment based on the test road information;
[0150] A data set construction module 202, configured to construct a multi-scenario driving data set according to the historical traffic scenario data by using a preset orthogonal array method;
[0151] A simulation module 203, configured to optimize the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm, and obtain the spatio-temporal distribution characteristics of traffic participants and the simulated trajectory data of the vehicle;
[0152] The training optimization module 204 is configured to project the spatio-temporal distribution features of the traffic participants onto the test road in real time, obtain the true trajectory data of the vehicle, and train the optimized driving algorithm according to the true trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm.
[0153] As Figure 3 shown, based on the above autonomous driving algorithm training method, the present invention also correspondingly provides an electronic device 300, which may be a computing electronic device such as a mobile terminal, a desktop computer, a notebook, a palm computer, and a server. The electronic device includes a processor 310, a memory 320, and a display 330. Figure 3 Only some components of the electronic device are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0154] The memory 320 may be an internal storage unit of the electronic device in some embodiments, such as the hard disk or memory of the electronic device. The memory 320 may also be an external storage electronic device of the electronic device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device. Further, the memory 320 may also include both the internal storage unit of the electronic device and the external storage electronic device. The memory 320 is used to store the application software installed on the electronic device and various types of data, such as the program code installed on the electronic device. The memory 320 may also be used to temporarily store the data that has been output or will be output. In one embodiment, an autonomous driving algorithm training program 340 is stored on the memory 320, and the autonomous driving algorithm training program 340 can be executed by the processor 310 to implement the autonomous driving algorithm training method of various embodiments of the present application.
[0155] The processor 310 may be a central processing unit (CPU), a microprocessor, or other data processing chips in some embodiments, and is used to run the program code stored in the memory 320 or process data, such as executing the autonomous driving algorithm training method.
[0156] In some embodiments, display 330 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 330 is used to display information on the autonomous driving algorithm training electronic device and to display a visual user interface. Components 310-330 of the electronic device communicate with each other via a system bus.
[0157] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0158] This embodiment also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the autonomous driving algorithm training method described in any of the above technical solutions.
[0159] The computer-readable storage medium and computing device provided according to the above embodiments of the present invention can be implemented with reference to the specific description of the above-mentioned method for training an autonomous driving algorithm according to the present invention, and have similar beneficial effects as the above-mentioned method for training an autonomous driving algorithm, which will not be repeated here.
[0160] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. A method for training an autonomous driving algorithm, characterized in that, Including: Generating a road simulation environment based on test road information; Constructing a multi-scenario driving dataset according to historical traffic scenario data by using a preset orthogonal array method; Optimizing an autonomous driving algorithm in the road simulation environment according to the multi-scenario driving dataset to obtain an optimized driving algorithm, and acquiring the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle; Projecting the spatio-temporal distribution characteristics of the traffic participants onto the test road in real time to obtain the real trajectory data of the vehicle, and training the optimized driving algorithm according to the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm; Among them, the optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving dataset to obtain an optimized driving algorithm includes: Adding the multi-scenario driving dataset into the road simulation environment, using the autonomous driving algorithm to be verified to simulate and control the vehicle, and acquiring the simulation trajectory data of the vehicle; Dividing the simulation trajectory data into multiple driving scenario segments, and determining the ego-vehicle trajectory data and the surrounding-vehicle trajectory data in each driving scenario segment; Performing coordinate transformation on the ego-vehicle trajectory data and the surrounding-vehicle trajectory data, and generating an algorithm optimization evaluation index according to the trajectory data after coordinate transformation; Constructing an algorithm training database based on the algorithm optimization evaluation index and the simulation trajectory data, and optimizing the autonomous driving algorithm to obtain an optimized driving algorithm.
2. The method for training an autonomous driving algorithm according to claim 1, wherein The generating a road simulation environment based on test road information includes: Obtaining the longitude and latitude information of the trajectory points, the altitude information and the vehicle attitude information of the test road, and the vehicle attitude information includes the vehicle pitch angle information; Determining the slope of the test road according to the pitch angle information; Converting the longitude and latitude information of the trajectory points into coordinate information based on the Gauss-Krüger projection coordinate system, and constructing a vehicle trajectory sequence set according to the slope of the test road; Determining the road characteristics corresponding to the test road according to the vehicle trajectory sequence set, and generating a corresponding road simulation environment according to the road characteristics.
3. The method for training an autonomous driving algorithm according to claim 1, characterized in that, The constructing a multi-scenario driving dataset according to historical traffic scenario data by using a preset orthogonal array method includes: Obtaining the boundary scenario data in multiple actual traffic accidents, and extracting the sampling feature data of the scenario objects in the actual traffic scenario data; Performing orthogonal arrangement on the scenario objects according to the sampling feature data to obtain the spatio-temporal distribution characteristics of traffic participants; Obtaining the basic driving conditions of the vehicle, and obtaining a multi-scenario driving dataset according to the basic driving conditions and the spatio-temporal distribution characteristics of traffic participants.
4. The method for training an autonomous driving algorithm according to claim 1, wherein The algorithm optimization evaluation index includes a lateral evaluation index and a longitudinal evaluation index; The lateral evaluation index is used to measure the deviation of the vehicle from a preset standard line and the smooth state of lane-changing driving; The longitudinal evaluation index is used to measure the vehicle speed deviation and trajectory deviation, the smoothness of the longitudinal acceleration, and the collision risk of the vehicle.
5. The method for training an autonomous driving algorithm according to claim 4, wherein The optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving dataset to obtain an optimized driving algorithm includes: Optimize the autonomous driving algorithm with the vehicle driving task completion time, the number of collisions, and the trajectory tracking effect as the optimization objectives to obtain an optimized driving algorithm.
6. The method for training an autonomous driving algorithm according to claim 1, wherein The method of projecting the spatio-temporal distribution characteristics of traffic participants onto the test road in real time, obtaining the real trajectory data of the vehicle, and training the optimized driving algorithm based on the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm includes: Perform in-loop testing on the vehicle in different driving conditions according to the obstacle information projected in the simulation to obtain the real trajectory data of the vehicle; Use the simulation trajectory data and the real trajectory data as the data input of a preset training model to optimize and train the autonomous driving algorithm to obtain a fully trained autonomous driving algorithm.
7. An automatic driving algorithm training device, characterized in that, It includes: An environment construction module for generating a road simulation environment based on the test road information; A data set construction module for constructing a multi-scenario driving data set according to the historical traffic scenario data using a preset orthogonal array method; A simulation module for optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm, and obtaining the spatio-temporal distribution characteristics of traffic participants and the simulation trajectory data of the vehicle; A training and optimization module for projecting the spatio-temporal distribution characteristics of traffic participants onto the test road in real time, obtaining the real trajectory data of the vehicle, and training the optimized driving algorithm based on the real trajectory data and the simulation trajectory data to obtain a fully trained autonomous driving algorithm; Among them, the method of optimizing the autonomous driving algorithm in the road simulation environment according to the multi-scenario driving data set to obtain an optimized driving algorithm includes: Add the multi-scenario driving data set to the road simulation environment, use the autonomous driving algorithm to be verified to simulate and control the vehicle, and obtain the simulation trajectory data of the vehicle; Divide the simulation trajectory data into multiple driving scenario segments, and determine the ego-vehicle trajectory data and the surrounding-vehicle trajectory data in each driving scenario segment; Perform coordinate transformation on the ego-vehicle trajectory data and the surrounding-vehicle trajectory data, and generate an algorithm optimization evaluation index based on the trajectory data after coordinate transformation; Construct an algorithm training database based on the algorithm optimization evaluation index and the simulation trajectory data, and optimize the autonomous driving algorithm to obtain an optimized driving algorithm.
8. An electronic device, characterized in that, It includes: A processor and a memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, it implements the steps in the autonomous driving algorithm training method as described in claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the autonomous driving algorithm training method as described in claims 1-6.
Citation Information
Patent Citations
Automatic driving simulation method, system and device, readable storage medium and platform
CN112286206A
Limited automatic driving traversal test scene design method and system and computer readable storage medium
CN114355790A
Automatic driving test scene generation method and system, and storage medium
CN116894395A