A simulation data conversion method, system, electronic device and storage medium
By converting the sensor data collected by the real car into OpenDrive and OpenScenario formats, the problem that the real car data cannot be recognized by the simulation software is solved, the efficiency and simulation of simulation scenario construction are improved, and the testing cost is reduced.
Patent Information
- Application Number
- CN202210119240.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2042-02-08
AI Technical Summary
The sensor data collected by the real car is usually in CSV format and cannot be directly identified by the simulation software, resulting in doubt about the authenticity and reliability of the simulation test, and the actual car test is high.
By obtaining sensor data collected by the real car, the position, speed and lane change behavior of the bicycle and its car are calculated, converted to OpenDrive format, and the lane line position data is converted to OpenScenario format for recognition and use by simulation software.
It improves the efficiency and simulation performance of simulation scenario construction, reduces the cost of simulation testing, and avoids high-cost real-vehicle testing.
Smart Images

Figure CN114580355B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of autonomous driving simulation testing, and in particular relates to a simulation data conversion method, system, electronic device and storage medium. Background Art
[0002] As autonomous driving technology matures, the demand for driving scenario simulation testing is increasing, and more and more simulation scenarios need to be built. However, if simulation tests are conducted directly based on artificially built simulation scenarios, the authenticity and reliability of the test data are questionable; real vehicle testing involves many scenarios, and its testing cost is high. If simulation tests are conducted based on data collected from real vehicles, the data directly collected and stored by sensors is usually in CSV format and cannot be recognized and used by simulation software. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a simulation data conversion method, system, electronic device and storage medium, which are used to solve the problem that the data collected from the real vehicle cannot be directly recognized and used by the simulation software.
[0004] In a first aspect of an embodiment of the present invention, a simulation data conversion method is provided, comprising:
[0005] Obtain sensor data collected from the actual vehicle;
[0006] Taking the data start frame as the coordinate origin, calculate the position coordinates of the self-vehicle relative to the origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle based on the lane change behavior of the self-vehicle and the change in the relative lateral and longitudinal distance of the other vehicle;
[0007] Calculate the lane line position based on the lane line information of the current frame;
[0008] The lane position data is converted into the OpenDrive format, and the position, speed, and lane change information of the vehicle and other vehicles are converted into the OpenScenario format so as to be imported into the simulation software to build the simulation scenario.
[0009] In a second aspect of an embodiment of the present invention, a simulation data conversion system is provided, comprising:
[0010] The acquisition module is used to obtain sensor data collected by the real vehicle;
[0011] The first calculation module is used to calculate the position coordinates of the self-vehicle relative to the origin with the data start frame as the coordinate origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle according to the lane change behavior of the self-vehicle and the change of the relative lateral and longitudinal distance of the other vehicle;
[0012] A second calculation module, used to calculate the lane line position based on the lane line information of the current frame;
[0013] The format conversion module is used to convert lane line position data into the OpenDrive format, and convert the position, speed, and lane change information of the vehicle and other vehicles into the OpenScenario format so as to be imported into the simulation software to build a simulation scenario.
[0014] In a third aspect of an embodiment of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect of the embodiment of the present invention when executing the computer program.
[0015] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method provided in the first aspect of the embodiment of the present invention are implemented.
[0016] In an embodiment of the present invention, by calculating the position, lane change and lane line position of the real vehicle collected data and converting it into the OpenScenario format of the OpenDrive format that can be recognized and used by the simulation software, the simulation software can be directly recognized and used, thereby improving the efficiency and simulation of simulation scene construction and reducing the cost of simulation testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A schematic diagram of a flow chart of a simulation data conversion method provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of the structure of a simulation data conversion system provided by one embodiment of the present invention;
[0020] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] It should be understood that the term "including" and other similar expressions in the specification or claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions, such as a process, method, system, or device including a series of steps or units is not limited to the listed steps or units. In addition, "first" and "second" are used to distinguish different objects, not to describe a specific order.
[0023] See also Figure 1 , a flow chart of a simulation data conversion method provided by an embodiment of the present invention includes:
[0024] S101, obtaining sensor data collected by a real vehicle;
[0025] Based on the actual road scene driving data collected by the vehicle, a corresponding simulated driving scene can be constructed. The sensor data is the data collected by the vehicle-mounted sensor, and the sensor may include a camera, radar, GPS, IMU, etc.
[0026] The sensor data includes the vehicle speed, heading angle, GPS information, lane change behavior and lane line information of each frame, as well as the ID, relative distance (including lateral distance and longitudinal distance), and relative speed (including lateral speed and longitudinal speed) of other vehicles. The lane line information includes the distance between the camera and the lane line C0, the lane line yaw angle C1, the lane line curvature C2, the lane line curvature change rate C3, and the lane line visible range.
[0027] S102, taking the data start frame as the coordinate origin, calculating the position coordinates of the self-vehicle relative to the origin, and calculating the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculating the lane change behavior of the other vehicle based on the lane change behavior of the self-vehicle and the change in the relative lateral and longitudinal distance of the other vehicle;
[0028] Specifically, a plane coordinate system is constructed with the vehicle head direction in the starting frame as the Y-axis direction and the direction perpendicular to the vehicle body as the X-axis direction; the coordinates of the vehicle relative to the origin in each frame are calculated according to the vehicle speed and heading angle, and the global position of the vehicle is calculated according to the vehicle GPS position in the starting frame.
[0029] The relative coordinates of each frame relative to the origin are calculated using the vehicle speed and heading angle, and combined with the first frame GPS signal to determine the precise position of the global vehicle.
[0030] Extract the relative speed and relative distance of the vehicle corresponding to the other vehicle ID, and convert the data of a certain number of frames (such as 36 frames) into data corresponding to 1 second. When recording data, the sensor contains information such as speed and lane change related to the vehicle itself, while other vehicle information (other vehicles) only contains relative speed and relative distance. The speed of the other vehicle is calculated by the speed of the vehicle itself and the relative speed, and the speed information of each second can be obtained by taking the average value. The relative distance is to directly take the data of the last frame per second as the relative distance of this second. Therefore, the speed and position coordinates of the remaining vehicles can be calculated based on the relative speed and relative distance.
[0031] Among them, when the self-vehicle does not change lanes, if the lateral distance change of the other vehicle exceeds a predetermined value, it is determined that the other vehicle has changed lanes; when the self-vehicle has changed lanes, it is determined whether the other vehicle has changed lanes based on the change in the lateral distance between the self-vehicle and the other vehicle before and after the lane change.
[0032] For example, the vehicle is going straight without changing lanes, and the target vehicle is on the center line of the lane to the right of the vehicle. The lane width defaults to 3.75 meters. If the vehicle on the right changes lanes, the lateral distance between it and the vehicle will be greater than 5.625 meters, then it is judged that the vehicle on the right has changed lanes.
[0033] S103, calculating the lane line position based on the lane line information of the current frame;
[0034] The lane line information includes the distance between the camera and the lane line C0, the lane line yaw angle C1, the lane line curvature C2, the lane line curvature change rate C3 and the lane line visible range. The lane line equation is constructed based on the C0, C1, C2 and C3 information, and the lane line position information can be obtained by solving the equation.
[0035] Among them, the lane line information is used as the parameters of a cubic equation to construct and solve the lane line equation of the current frame. According to the position relationship of the vehicle in the current frame relative to the origin, the equation is converted to the current coordinate system to calculate the lane line position of the current frame.
[0036] The lane line equation in the current frame is solved by using C0, C1, C2, and C3 as the parameters of a cubic equation. The equation is converted to the current coordinate system based on the position of the vehicle in the current frame relative to the origin. That is, the actual position of the lane line in each frame is determined. The visible range of the lane line is the actual length obtained based on the equation. The lane line position data in all collected frames is calculated.
[0037] S104, converting the lane line position data into the OpenDrive format, and converting the position, speed, and lane change information of the own vehicle and other vehicles into the OpenScenario format, so as to be imported into the simulation software to construct a simulation scenario.
[0038] Convert all frame lane data into OpenDrive format, and use programming language to convert vehicle position, speed, lane change and other data into OpenScenario format that can be recognized and used by simulation software. Further, the OpenDrive road base map and vehicle data in OpenScenario format can be imported into the simulation software for simulation scenario construction.
[0039] In this embodiment, the format of the data collected from the real vehicle can be converted for simulation scene construction and testing, which makes it easier for the simulation software to use the data collected from the real vehicle, reduces the cost of simulation scene construction and improves construction efficiency, and avoids high-cost real vehicle testing.
[0040] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0041] Figure 2 A schematic diagram of the structure of a simulation data conversion system provided by an embodiment of the present invention, the system comprising:
[0042] An acquisition module 210 is used to acquire sensor data collected by a real vehicle;
[0043] The first calculation module 220 is used to calculate the position coordinates of the self-vehicle relative to the origin with the data start frame as the coordinate origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle according to the lane change behavior of the self-vehicle and the change of the relative lateral and longitudinal distance of the other vehicle;
[0044] Among them, a plane coordinate system is constructed with the direction of the vehicle head in the starting frame as the Y-axis direction and the direction perpendicular to the vehicle body as the X-axis direction; the coordinates of the vehicle relative to the origin in each frame are calculated according to the vehicle speed and heading angle (angular velocity), and the global position of the vehicle is calculated according to the GPS position of the vehicle in the starting frame.
[0045] Specifically, when the self-vehicle does not change lanes, if the lateral distance change of the other vehicle exceeds a predetermined value, it is determined that the other vehicle has changed lanes; when the self-vehicle has changed lanes, it is determined whether the other vehicle has changed lanes based on the change in the lateral distance between the self-vehicle and the other vehicle before and after the lane change.
[0046] A second calculation module 230, used to calculate the lane line position based on the lane line information of the current frame;
[0047] Specifically, the lane line information is used as the parameters of a cubic equation to construct and solve the lane line equation of the current frame. According to the position relationship of the vehicle in the current frame relative to the origin, the equation is converted to the current coordinate system to calculate the lane line position of the current frame.
[0048] The format conversion module 240 is used to convert the lane line position data into the OpenDrive format, and convert the position, speed, and lane change information of the vehicle and other vehicles into the OpenScenario format so as to be imported into the simulation software to construct the simulation scenario.
[0049] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described system and module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0050] Figure 3 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is used for simulating data conversion. Figure 3 As shown, the electronic device 3 of this embodiment includes: a memory 310, a processor 320 and a system bus 330, wherein the memory 310 includes an executable program 3101 stored thereon, and those skilled in the art can understand that Figure 3 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0051] Combine the following Figure 3 A detailed introduction to the various components of electronic equipment:
[0052] The memory 310 can be used to store software programs and modules, and the processor 320 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 310. The memory 310 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as cache data), etc. In addition, the memory 310 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0053] The memory 310 contains an executable program 3101 of the signboard extraction method, which can be divided into one or more modules / units, which are stored in the memory 310 and executed by the processor 320 to achieve format conversion of simulation data, etc. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 3101 in the electronic device 3. For example, the computer program 3101 can be divided into an acquisition module, a first calculation module, a second calculation module, and a format conversion module.
[0054] The processor 320 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 310, and calling data stored in the memory 310, it performs various functions of the electronic device and processes data, thereby monitoring the overall status of the electronic device. Optionally, the processor 320 may include one or more processing units; preferably, the processor 320 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 320.
[0055] The system bus 330 is used to connect the various functional components inside the computer, and can transmit data information, address information, and control information. Its types can be, for example, PCI bus, ISA bus, VESA bus, etc. The instructions of the processor 320 are transmitted to the memory 310 through the bus, and the memory 310 feeds back data to the processor 320. The system bus 330 is responsible for the data and instruction exchange between the processor 320 and the memory 310. Of course, the system bus 330 can also be connected to other devices, such as network interfaces, display devices, etc.
[0056] In the embodiment of the present invention, the executable program executed by the processor 320 included in the electronic device includes:
[0057] Obtain sensor data collected from the actual vehicle;
[0058] Taking the data start frame as the coordinate origin, calculate the position coordinates of the self-vehicle relative to the origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle based on the lane change behavior of the self-vehicle and the change in the relative lateral and longitudinal distance of the other vehicle;
[0059] Calculate the lane line position based on the lane line information of the current frame;
[0060] The lane position data is converted into the OpenDrive format, and the position, speed, and lane change information of the vehicle and other vehicles are converted into the OpenScenario format so as to be imported into the simulation software to build the simulation scenario.
[0061] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0062] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0063] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulation data conversion method, characterized in that: include: Obtain sensor data collected from the actual vehicle; Taking the data start frame as the coordinate origin, calculate the position coordinates of the self-vehicle relative to the origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle based on the lane change behavior of the self-vehicle and the change in the relative lateral and longitudinal distance of the other vehicle; Calculate the lane line position based on the lane line information of the current frame; The lane line information is used as the parameters of a cubic equation to construct and solve the lane line equation of the current frame. According to the position relationship of the vehicle in the current frame relative to the origin, the equation is converted to the current coordinate system to calculate the lane line position of the current frame. The lane position data is converted into the OpenDrive format, and the position, speed, and lane change information of the vehicle and other vehicles are converted into the OpenScenario format so as to be imported into the simulation software to build the simulation scenario.
2. The method according to claim 1, characterized in that The data start frame is used as the coordinate origin, and the position coordinates of the vehicle relative to the origin are calculated as follows: The plane coordinate system is constructed with the vehicle head direction in the starting frame as the Y-axis direction and the direction perpendicular to the vehicle body as the X-axis direction; The coordinates of the vehicle relative to the origin in each frame are calculated based on the vehicle speed and heading angle, and the global position of the vehicle is calculated based on the vehicle GPS position in the starting frame.
3. The method according to claim 1, characterized in that The calculating of the lane changing behavior of the other vehicle according to the lane changing behavior of the own vehicle and the change of the relative lateral and longitudinal distances of the other vehicle comprises: When the self-vehicle does not change lanes, if the lateral distance change of the other vehicle exceeds a predetermined value, it is determined that the other vehicle has changed lanes; When the ego vehicle changes lanes, the change in lateral distance between the ego vehicle and the other vehicle before and after the lane change is used to determine whether the other vehicle has changed lanes.
4. A simulation data conversion system, characterized in that: include: The acquisition module is used to obtain sensor data collected by the real vehicle; The first calculation module is used to calculate the position coordinates of the self-vehicle relative to the origin with the data start frame as the coordinate origin, and calculate the position coordinates of the other vehicle based on the relative speed and relative distance of the other vehicle relative to the self-vehicle, and calculate the lane change behavior of the other vehicle according to the lane change behavior of the self-vehicle and the change of the relative lateral and longitudinal distance of the other vehicle; A second calculation module, used to calculate the lane line position based on the lane line information of the current frame; The format conversion module is used to convert lane position data into the OpenDrive format, and convert the position, speed, and lane change information of the vehicle and other vehicles into the OpenScenerio format so as to be imported into the simulation software to build the simulation scene.
5. The system according to claim 4, characterized in that The data start frame is used as the coordinate origin to calculate the position coordinates of the vehicle relative to the origin: The plane coordinate system is constructed with the vehicle head direction in the starting frame as the Y-axis direction and the direction perpendicular to the vehicle body as the X-axis direction; The coordinates of the vehicle relative to the origin in each frame are calculated based on the vehicle speed and heading angle, and the global position of the vehicle is calculated based on the vehicle GPS position in the starting frame.
6. The system according to claim 4, characterized in that The calculating of the lane changing behavior of the other vehicle according to the lane changing behavior of the own vehicle and the change of the relative lateral and longitudinal distances of the other vehicle comprises: When the self-vehicle does not change lanes, if the lateral distance change of the other vehicle exceeds a predetermined value, it is determined that the other vehicle has changed lanes; When the ego vehicle changes lanes, the change in lateral distance between the ego vehicle and the other vehicle before and after the lane change is used to determine whether the other vehicle has changed lanes.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a simulation data conversion method as described in any one of claims 1 to 3 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the steps of a simulation data conversion method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Method and device for interaction between driverless simulation system and tested driverless software
CN113342701A