Test method, device, electronic device, readable storage medium and product
By obtaining test requirements information from dynamic scene files and controlling the driving of virtual vehicles in the autonomous driving simulation test, the problems of cumbersome testing steps and complex file management in the prior art are solved, and the testing efficiency and resource utilization are improved.
Patent Information
- Application Number
- CN202410351801.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-03-26
AI Technical Summary
The existing autonomous driving simulation test steps are cumbersome, low efficiency, and the file management burden of multiple scenarios is large, and the information reading required information is low.
By obtaining pre-set simulation test scenarios, virtual roads and vehicles are generated based on static and dynamic scene files, after detecting the trigger conditions, obtaining test requirements information from the dynamic scene files, input the model to be tested to generate control information, and controlling the virtual vehicle to generate Test results reduce the number of scene files and improve reading efficiency.
It improves the efficiency of autonomous driving simulation testing, reduces the burden of file management and labor and storage resources costs, and simplifies the testing process.
Smart Images

Figure CN118394627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and more specifically, to a testing method, device, electronic device, computer-readable medium and product. Background Art
[0002] At present, with the continuous improvement of autonomous driving technology, the demand for autonomous driving simulation testing is also increasing. Although autonomous driving algorithms can be tested through simulation testing platforms, the current simulation testing steps are relatively cumbersome, resulting in low testing efficiency. Summary of the invention
[0003] The present application proposes a testing method, device, electronic device, computer-readable medium and product to improve the above-mentioned defects.
[0004] In a first aspect, an embodiment of the present application provides a testing method, comprising: obtaining a pre-set simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road; controlling the virtual vehicle under test to travel in the virtual road with a dynamic driving environment based on preset information; when it is detected that a trigger condition is met, obtaining test requirement information from the dynamic scenario file, wherein the test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; inputting first data into a model to be tested, and obtaining control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and environmental information of the virtual vehicle under test at a current moment, wherein the environmental information includes map information of the virtual road and obstacle information in the virtual road at a current moment; and controlling the virtual vehicle under test to travel in the virtual road based on the control information to generate a test result.
[0005] Optionally, for a possible implementation, before obtaining a pre-set simulation test scene, it also includes: generating a virtual road based on a static scene file; generating a dynamic driving environment and a virtual vehicle under test based on a dynamic scene file; and generating a simulation test scene based on the virtual road, the dynamic driving environment and the virtual vehicle under test.
[0006] Optionally, for a possible implementation, before obtaining the test requirement information from the dynamic scene file when the trigger condition is detected to be satisfied, it also includes: when it is detected that the current moment satisfies a preset trigger moment or when a preset trigger event is detected, determining that the trigger condition is satisfied.
[0007] Optionally, for a possible implementation, the step of inputting first data into the model to be tested and obtaining control information generated by the model to be tested based on the first data includes: converting the format of the first data to obtain second data; and inputting the second data into the model to be tested and obtaining control information generated by the model to be tested based on the second data.
[0008] Optionally, for a possible implementation, controlling the virtual vehicle under test to travel in the virtual road based on the control information to generate a test result includes: controlling the virtual vehicle under test to travel in a virtual road with a dynamic driving environment based on the control information; obtaining third data of the virtual vehicle under test during the driving process; and determining the test result based on the third data.
[0009] Optionally, for a possible implementation, determining the test result based on the third data includes: determining a difference between the third data and test requirement information; and determining the test result according to the difference.
[0010] In the second aspect, an embodiment of the present application further provides a trajectory acquisition device, comprising: a first acquisition unit, the first acquisition unit is used to acquire a preset simulation test scenario, the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road; a simulation unit, the simulation unit controls the virtual vehicle under test to travel in the virtual road with a dynamic driving environment based on preset information; a second acquisition unit, the second acquisition unit is used to acquire test requirement information from the dynamic scenario file when it is detected that a trigger condition is met, the test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; a transmission unit, the transmission unit is used to input first data into a model to be tested, and acquire control information generated by the model to be tested based on the first data, the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, the environmental information includes map information of the virtual road and obstacle information in the virtual road at the current moment; a calculation unit, the calculation unit is used to control the virtual vehicle under test to travel in the virtual road based on the control information to generate a test result.
[0011] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors; a memory; a positioning device and a height acquisition device; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors so that the electronic device performs the above method.
[0012] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0013] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program / instructions, which implement the above method when executed by a processor.
[0014] The test method, device, electronic device, computer-readable medium and product provided by the present application are as follows: first, a preset simulation test scenario is obtained, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road; based on preset information, the virtual vehicle under test is controlled to travel in the virtual road with a dynamic driving environment; secondly, when it is detected that a trigger condition is met, test requirement information is obtained from the dynamic scenario file, wherein the test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; then, first data is input into a model to be tested, and control information generated by the model to be tested based on the first data is obtained, wherein the first data includes the test requirement information and environmental information of the virtual vehicle under test at the current moment, wherein the environmental information includes map information of the virtual road and obstacle information in the virtual road at the current moment; finally, based on the control information, the virtual vehicle under test is controlled to travel in the virtual road to generate a test result. This application obtains test requirement information from a dynamic scene file when the trigger condition is detected. This application reads the test requirement information from the dynamic scene instead of reading the test requirement information from another file, avoiding the need to store the test requirement information in an additional file, reducing the number of scene files, reducing the management burden of scene files, and improving the efficiency of reading test requirement information, thereby improving the efficiency of autonomous driving simulation testing. At the same time, it can also reduce the management of additional files, saving manpower and storage resource costs.
[0015] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be achieved and obtained by the structures specifically pointed out in the written description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A method flow chart of the testing method provided in an embodiment of the present application is shown;
[0018] Figure 2 A method flow chart of another testing method provided in an embodiment of the present application is shown;
[0019] Figure 3 A method flow chart of another testing method provided by an embodiment of the present application is shown;
[0020] Figure 4 A method flow chart of another testing method provided in an embodiment of the present application is shown;
[0021] Figure 5 The structure diagram of the test device provided by the embodiment of the present application is shown;
[0022] Figure 6 A structural block diagram of a testing device provided in another embodiment of the present application is shown;
[0023] Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0024] Figure 8 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;
[0025] Fig. 9 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0027] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0028] At present, with the continuous improvement of autonomous driving technology, the demand for autonomous driving simulation testing is also increasing. Although autonomous driving algorithms can be tested through simulation testing platforms, the current simulation testing steps are relatively cumbersome.
[0029] Therefore, in the embodiments of the present application, a testing method, an apparatus, an electronic device and a readable storage medium are provided to solve or partially solve the above-mentioned problems.
[0030] See also Figure 1 , Figure 1 A method flow chart of a testing method provided in an embodiment of the present application is shown, and the method specifically includes steps S110 to S150.
[0031] Step S110: obtaining a preset simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road.
[0032] Among them, the simulation test scene is a three-dimensional virtual scene for conducting autonomous driving tests, and the simulation test scene includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road. The dynamic driving environment represents road participants moving on the virtual road, and the road participants include virtual pedestrians, virtual moving vehicles, virtual bicycles, virtual traffic lights, etc.
[0033] It should be noted that the simulation test scenario is used to simulate the real scenario, wherein the virtual vehicle under test may be a digitized vehicle obtained by sampling, modeling, and other operations on the real vehicle under test in advance; similarly, the virtual roads and the road participants moving on each virtual road may be used to simulate the real roads and the road participants moving on the real roads.
[0034] Among them, the virtual vehicle under test is a virtual vehicle for realizing autonomous driving simulation testing. In other words, in the simulation test scenario, relevant data of the virtual vehicle under test is collected and transmitted to the model to be tested for autonomous driving simulation testing. The control instructions sent by the model to be tested are used to control the virtual vehicle under test. The virtual vehicle under test travels on the virtual road according to the received control instructions, and the driving data of the virtual vehicle under test on the virtual road is recorded, and the performance of the model to be tested is evaluated based on the driving data.
[0035] It should be noted that the simulation test scenario is generated by the simulation test platform based on the static scenario file and the dynamic scenario file. For details, please refer to the subsequent embodiments.
[0036] The simulation test platform can generally include a simulation framework, a physics engine, and a graphics engine. The simulation framework is the core of the software platform, supporting sensor simulation, vehicle dynamics simulation, traffic environment simulation, cloud simulation, etc., so that the simulation test platform can be used to edit static traffic environments and dynamic traffic participants, and the simulation test platform can be used in conjunction with dynamics simulation software for joint simulation to achieve the development and test verification of the model to be tested. The model to be tested can be an autonomous driving control algorithm model.
[0037] Step S120: controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information.
[0038] Among them, the preset information can be pre-set initial state information, and the virtual vehicle under test can travel on the virtual road based on the preset information until the virtual vehicle under test receives the control instruction issued by the model to be tested, and the virtual vehicle under test travels on the virtual road based on the control instruction issued by the model to be tested.
[0039] Among them, the preset information includes information about the virtual vehicle under test traveling on the virtual road. Further, the preset information may include the initial position, driving direction information, driving speed information, driving lane information and driving habit information of the virtual vehicle under test.
[0040] The preset information may be information pre-stored in the simulation test platform, or may be information transmitted to the simulation test platform by an external device, so that the simulation test platform then sends the preset information to the virtual vehicle under test in the simulation test scenario.
[0041] Step S130: when it is detected that the trigger condition is met, obtaining test requirement information from the dynamic scene file, the test requirement information including state machine information of the virtual vehicle under test and human-machine interaction information of the virtual vehicle under test.
[0042] It should be noted that the test requirement information is the target information of the model to be tested, and the model to be tested makes a decision based on the target information in order to make the test result close to or the same as the target information.
[0043] Among them, the state machine information includes multiple states and conversion rules between each state, and the conversion rules define the conversion of the virtual vehicle under test from one state to another when specific conditions are met. For example, the state of the virtual vehicle under test is currently detected to be "waiting for the traffic light". When the target traffic light turns green, the state of the virtual vehicle under test is switched according to the conversion rules, and the state of the virtual vehicle under test is switched to "driving".
[0044] Wherein, the human-computer interaction information includes lever lane change information, cruising speed information, and following vehicle distance information. It should be noted that the state machine information can be used to guide the human-computer interaction information. For example, after the state machine switches the state of the virtual vehicle under test from "waiting for the signal light" to "driving", the virtual vehicle under test performs human-computer interaction according to the switched state, for example, the virtual vehicle under test changes lanes based on the lever lane change information. Wherein, the dynamic scene file is a file used to describe various traffic participants in the traffic environment. The traffic participants may include other vehicles, pedestrians, bicycles, and traffic lights. The information of each traffic participant may include the initial position, speed, acceleration, and direction of movement of each traffic participant, and may also include the movement rules, behavior models, and interaction methods of each traffic participant. By reading and parsing the dynamic scene file, the simulation test platform can generate a virtual traffic scene that simulates a real traffic scene according to the information in the dynamic scene file, that is, a simulation test scene.
[0045] Exemplarily, the dynamic scene file may be an OpenSCENARIO file.
[0046] It should be noted that the existing dynamic scene files include information about traffic participants on the virtual road, including virtual pedestrian information, virtual moving vehicle information, virtual bicycle information and virtual traffic light information. Test requirement information is stored in other scene files. When the simulation test platform constructs a simulation test scene, it is necessary to read not only the dynamic scene files, but also the scene files with test requirement information. On the one hand, there are many scene files and the burden of file management is heavy. On the other hand, the simulation test platform is inefficient in reading multiple files.
[0047] To this end, the present application adds new types of dynamic scene file storage parameters based on the data format of dynamic scene files, and stores test requirement information in dynamic scene files. On the one hand, it reduces the number of scene files and the burden of file management. On the other hand, the simulation test platform can obtain the information of traffic participants and test requirement information by reading and parsing the dynamic scene files, which reduces the time for reading data and improves the efficiency of the simulation test platform in reading data.
[0048] It should be noted that when a trigger condition is detected, the simulation test platform obtains the test requirement information from the dynamic scenario file, that is, the test requirement information is read by the simulation test platform only when the trigger condition is met.
[0049] Among them, the trigger condition can be a time trigger or an event trigger. When it is detected that the trigger condition is met, the test requirement information is obtained from the dynamic scene file. For details, please refer to the subsequent embodiments.
[0050] Step S140: input the first data into the model to be tested, and obtain the control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment.
[0051] The environmental information includes map information of the virtual road and obstacle information in the virtual road at the current moment. It should be noted that the obstacle information in the virtual road at the current moment represents the obstacle information in the virtual road relative to the motion trajectory of the virtual vehicle being measured.
[0052] The first data includes test requirement information and the environment information of the virtual vehicle under test at the current moment. The first data is transmitted to the model to be tested, and control information generated by the model to be tested based on the first data is obtained. That is, the test requirement information and the environment information of the virtual vehicle under test at the current moment are transmitted to the model to be tested, and the model to be tested makes a control decision based on the received information to generate control information, and transmits the control information to the virtual vehicle under test to control the virtual vehicle under test to travel on the virtual road, so as to realize the simulation test of the model to be tested.
[0053] Step S150: Based on the control information, the virtual vehicle under test is controlled to travel on the virtual road to generate a test result.
[0054] The virtual vehicle under test controlled by the control information drives on a virtual road, obtains driving data of the virtual vehicle under test during driving, and generates a test result based on the driving data. For example, the driving data of the virtual vehicle under test during driving can be obtained, and then the obtained driving data can be compared with the test requirement information to generate a test result. For details, please refer to the subsequent embodiments.
[0055] A testing method provided in an embodiment of the present application comprises: first, obtaining a preset simulation test scenario, wherein the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road; controlling the virtual vehicle under test to travel in the virtual road with a dynamic driving environment based on preset information; secondly, obtaining test requirement information from a dynamic scenario file when it is detected that a trigger condition is met, wherein the test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; then, inputting first data into a model to be tested, obtaining control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and environmental information of the virtual vehicle under test at the current moment, wherein the environmental information includes map information of the virtual road and obstacle information in the virtual road at the current moment, and the model to be tested is used to control the virtual vehicle under test; finally, controlling the virtual vehicle under test to travel in the virtual road based on the control information to generate a test result.
[0056] This application obtains test requirement information from a dynamic scene file when the trigger condition is detected. This application reads the test requirement information from the dynamic scene instead of reading the test requirement information from another file, avoiding the need to store the test requirement information in an additional file, reducing the number of scene files, reducing the management burden of scene files, and improving the efficiency of reading test requirement information, thereby improving the efficiency of autonomous driving simulation testing. At the same time, it can also reduce the management of additional files, saving manpower and storage resource costs.
[0057] See also Figure 2 , Figure 2 A method flow chart of a testing method provided in an embodiment of the present application is shown, and the method specifically includes steps S210 to S280.
[0058] Step S210: Generate a virtual road based on the static scene file.
[0059] In autonomous driving simulation tests, static scene files are used to describe static elements in traffic scenes, such as the geometry of the road, lane lines, and buildings beside the road. The elements in static scene files usually do not move or change.
[0060] Exemplarily, the static file is an OpenDRIVE file, which uses a standard static map format to divide the road into road reference lines, lanes, road facilities, road heights, and intersections where multiple roads converge.
[0061] The simulation test platform reads the static scene file to generate a virtual road, and the virtual road corresponds to the static elements in the static scene file.
[0062] Exemplarily, the static scene file includes: a two-lane, two-way straight road with a total length of 1,000 meters, a road width of 7.5 meters, and a building covering an area of 200 square meters on the right side of 250 meters on the road. The simulation test platform generates a virtual road based on the static scene file. The total length of the virtual road is 1,000 meters, the virtual road is a two-lane, two-way straight road, the road width of the virtual road is 7.5 meters, and there is a virtual building covering an area of 200 square meters on the right side of the virtual road at 250 meters.
[0063] Step S220: Generate a dynamic driving environment and a virtual vehicle to be tested based on the dynamic scene file.
[0064] The dynamic scene file is a file used to describe various traffic participants in a traffic environment. For details, please refer to the aforementioned embodiment.
[0065] After establishing the virtual road, the simulation test platform reads the dynamic scene file and generates a dynamic driving environment and the vehicle under test based on the dynamic scene file.
[0066] The simulation test platform can also directly read static scene files and dynamic scene files, and simultaneously generate virtual roads, dynamic driving environments and tested vehicles.
[0067] Exemplarily, continuing with the previous embodiment, the simulation test platform generates a virtual road based on the static scene file. The total length of the virtual road is 1000 meters. The virtual road is a two-lane two-way straight road. The width of the virtual road is 7.5 meters. There is a virtual building covering an area of 200 square meters on the right side of the virtual road at 250 meters. The dynamic scene file includes: there is a vehicle under test with a speed of 45KM / h in the first lane at 100 meters, a vehicle with a speed of 35KM / h in the second lane at 200 meters, a vehicle with a speed of 55KM / h in the first lane at 600 meters, and a pedestrian with a speed of -4KM / h outside the lane line at 150 meters. The simulation test platform reads the dynamic scene file and generates a dynamic driving environment and a virtual vehicle under test. Specifically, there is a virtual vehicle under test with a speed of 45KM / h in the first lane at 100 meters in the virtual road, a virtual vehicle with a speed of 35KM / h in the second lane at 200 meters in the virtual road, a virtual vehicle with a speed of 55KM / h in the first lane at 600 meters in the virtual road, and a virtual pedestrian with a speed of -4KM / h outside the lane line at 150 meters.
[0068] Step S230: Generate a simulation test scenario based on the virtual road, the dynamic driving environment and the virtual vehicle under test.
[0069] The control simulation test platform generates a simulation test scenario based on the virtual road, the dynamic driving environment and the virtual vehicle under test.
[0070] It is understandable that the simulation test scene is generated based on the virtual road, the dynamic driving environment and the virtual vehicle under test, and the simulation test scene is generated based on a virtual position relationship that is the same as or similar to the real position relationship. The real position relationship is used to represent the position relationship between the real road, the real dynamic driving environment and the real vehicle under test.
[0071] Step S240: obtaining a preset simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road.
[0072] Step S250: controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information.
[0073] Step S260: when it is detected that the trigger condition is met, obtaining test requirement information from the dynamic scenario file, the test requirement information including state machine information of the virtual vehicle under test and human-machine interaction information of the virtual vehicle under test.
[0074] Among them, step S240 to step S260 have been introduced in detail in the above embodiments and will not be repeated here.
[0075] Step S270: input the first data into the model to be tested, and obtain the control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment.
[0076] Step S280: Based on the control information, the virtual vehicle under test is controlled to travel on the virtual road to generate a test result.
[0077] Among them, step S270 and step S280 have been introduced in detail in the above embodiments and will not be repeated here.
[0078] A testing method provided in an embodiment of the present application generates a virtual road based on a static scene file; generates a dynamic driving environment and a virtual vehicle under test based on a dynamic scene file; generates a simulation test scene based on the virtual road, the dynamic driving environment and the virtual vehicle under test. The present application generates a simulation test scene based on a dynamic scene file and a static scene file.
[0079] See also Figure 3 , Figure 3 A method flow chart of a testing method provided in an embodiment of the present application is shown, and the method specifically includes steps S310 to S360.
[0080] Step S310: obtaining a preset simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road.
[0081] Step S320: controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information.
[0082] Among them, step S310 to step S320 have been introduced in detail in the above embodiments and will not be repeated here.
[0083] Step S330: when it is detected that the current moment meets the preset trigger moment or when a preset trigger event is detected, it is determined that the trigger condition is met.
[0084] Among them, the trigger time can be the total time the virtual vehicle under test travels on the virtual road. For example, if the trigger time is 2 minutes, it means that in the simulation test scenario, after it is detected that the virtual vehicle under test has traveled on the virtual road for 2 minutes, it is determined that the trigger condition is met.
[0085] The trigger event may be that the virtual vehicle under test reaches a specified position, the speed of the virtual vehicle under test reaches a specified speed, or the distance between the virtual vehicle under test and other vehicles is a specified distance. For example, the trigger event may be that the speed of the virtual vehicle under test reaches 25 km / h. When it is detected that the speed of the virtual vehicle under test reaches 25 km / h, it is determined that the trigger condition is met.
[0086] Step S340: when it is detected that the trigger condition is met, obtaining test requirement information from the dynamic scene file, the test requirement information including state machine information of the virtual vehicle under test and human-machine interaction information of the virtual vehicle under test.
[0087] Among them, step S340 has been introduced in detail in the above embodiment and will not be repeated here.
[0088] Step S350: input the first data into the model to be tested, and obtain the control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment.
[0089] In an optional embodiment, the format of the input data of the model to be tested is different from the format of the output data of the simulation test platform. Therefore, it is necessary to convert the format of the first data into a format that can be read by the model to be tested, and obtain the control information generated by the model to be tested based on the first data. The specific steps may include steps S3501 to S3502.
[0090] Step S3501: convert the format of the first data to obtain second data.
[0091] It is understandable that the first data in the first data format may not be directly input into the model to be tested, that is, the input data format recognizable by the model to be tested does not include the first data format. Therefore, the first data can be converted into the second data in the second data format so that the test model can recognize the second data. Among them, the input data format recognizable by the model to be tested includes the second data format. Specifically, the format of the first data can be converted into a format that can be read by the model to be tested, and the data after the format conversion is used as the second data.
[0092] Exemplarily, the first data may be format-converted through an adapter to obtain second data. The adapter is connected to a simulation test platform, and a connection relationship is established between the adapter and the model to be tested. The adapter may convert different formats of data into a target format.
[0093] Step S3502: input the second data into the model to be tested, and obtain control information generated by the model to be tested based on the second data.
[0094] The second data after format conversion is input into the model to be tested, and the model to be tested makes a decision based on the second data to generate control information for controlling the virtual vehicle to be tested to travel on the virtual road.
[0095] Step S360: Based on the control information, the virtual vehicle under test is controlled to travel on the virtual road to generate a test result.
[0096] It is understandable that after the model to be tested generates control information, the control information may be converted into a format and the converted control information may be input into the simulation test platform, thereby generating a test result based on the virtual vehicle under test controlled by the control information.
[0097] A testing method provided in an embodiment of the present application reads test requirement information from a dynamic scene instead of reading the test requirement information from another file when a trigger condition is detected to be met. This reduces the management burden of scene files and improves the efficiency of reading test requirement information, thereby improving the efficiency of autonomous driving simulation testing.
[0098] See also Figure 4 , Figure 4 A method flow chart of a testing method provided in an embodiment of the present application is shown, and the method specifically includes steps S410 to S470.
[0099] Step S410: obtaining a preset simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road.
[0100] Step S420: controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information.
[0101] Step S430: when it is detected that the trigger condition is met, obtaining test requirement information from the dynamic scene file, the test requirement information including state machine information of the virtual vehicle under test and human-machine interaction information of the virtual vehicle under test.
[0102] Step S440: input the first data into the model to be tested, and obtain the control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment.
[0103] Among them, step S410 to step S440 have been introduced in detail in the above embodiments and will not be repeated here.
[0104] Step S450: controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on the control information.
[0105] The virtual vehicle under test drives on a virtual road with a dynamic driving environment based on the control information sent by the model to be tested. For example, the control information may be the control of the driving speed of the virtual vehicle under test, the control of the driving acceleration, the control of the driving direction, and the driving lane, which are not specifically limited in the embodiments of the present application.
[0106] Step S460: Acquire third data of the virtual vehicle under test during its driving process.
[0107] Among them, third data of the virtual vehicle under test when driving on a virtual road is obtained, and the third data includes test state machine information and test human-computer interaction information, wherein the test state machine information can represent the state information and state switching information of the virtual vehicle under test at a certain moment in the driving process, and the test human-computer interaction information can be used to represent the interaction information of the virtual vehicle under test at a certain moment in the driving process.
[0108] Step S470: Determine a test result based on the third data.
[0109] The test result of the model to be tested is determined based on the third data. The smaller the difference between the third data and the preset standard data, the better the model to be tested is. Otherwise, the worse the model to be tested is. The specific steps of determining the test result based on the third data include steps S4701 to S4702.
[0110] Step S4701: Determine the difference between the third data and the test requirement information.
[0111] Among them, the third data includes test state machine information and test human-computer interaction information, that is, the third data represents the information obtained by simulating the test of the virtual vehicle under test in the virtual test scene, and the test requirement information is the target information. Determining the difference between the third data and the test requirement information is to determine the difference between the test information and the target information.
[0112] In an optional embodiment, the third data includes test state machine information and test human-computer interaction information, and the test requirement information includes state machine information and human-computer interaction information. The difference between the test state machine information and the test state machine information is determined as the first difference, and the difference between the test human-computer interaction information and the human-computer interaction information is determined as the second difference. The difference between the third data and the test requirement information is determined to be the sum of the first difference and the second difference.
[0113] Step S4702: Determine the test result according to the difference.
[0114] The test result is determined according to a preset comparison rule, for example, the difference is divided into three levels: primary difference, secondary difference, and tertiary difference, wherein the difference value of the primary difference is smaller than the difference value of the secondary difference, and the difference value of the secondary difference is smaller than the difference value of the tertiary difference, and the test result is divided into three levels: good, better, and worse. If the difference is a primary difference, the test result is good, if the difference is a secondary difference, the test result is better, and if the difference is a tertiary difference, the test result is worse.
[0115] A testing method provided in an embodiment of the present application can control the virtual vehicle under test to travel in a virtual road with a dynamic driving environment according to the control information; obtain third data of the virtual vehicle under test during the driving process; and determine the test result based on the third data.
[0116] See also Figure 5 , Figure 5 A structural block diagram of a test device 500 provided in an embodiment of the present application is shown. The test device 500 includes: a first acquisition unit 510, a simulation unit 520, a second acquisition unit 530, a transmission unit 540 and a calculation unit 550.
[0117] The first acquisition unit 510 is used to acquire a preset simulation test scenario, which is generated based on a static scenario file and a dynamic scenario file. The simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road.
[0118] Optionally, for a possible implementation, the first acquisition unit 510 can also be used to generate a virtual road based on a static scene file; generate a dynamic driving environment and a virtual vehicle under test based on a dynamic scene file; and generate a simulation test scene based on the virtual road, the dynamic driving environment and the virtual vehicle under test.
[0119] The simulation unit 520 controls the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information.
[0120] The second acquisition unit 530 is used to acquire test requirement information from the dynamic scene file when it is detected that the trigger condition is met. The test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test.
[0121] Optionally, for a possible implementation, the second acquisition unit 530 may also be configured to determine that a trigger condition is satisfied when it is detected that the current moment satisfies a preset trigger moment or when a preset trigger event is detected.
[0122] The transmission unit 540 is used to input the first data into the model to be tested and obtain control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment.
[0123] Optionally, for a possible implementation, the transmission unit 540 can also be used to convert the format of the first data to obtain second data; input the second data into the model to be tested, and obtain control information generated by the model to be tested based on the second data.
[0124] The calculation unit 550 is used to control the virtual vehicle under test to travel on the virtual road based on the control information to generate a test result.
[0125] Optionally, for a possible implementation, the computing unit 550 can also be used to control the virtual vehicle under test to travel in a virtual road with a dynamic driving environment based on the control information; obtain third data of the virtual vehicle under test during the driving process; and determine the test result based on the third data.
[0126] Optionally, for a possible implementation, the calculation unit 550 may also be used to determine a difference between the third data and the test requirement information; and determine a test result according to the difference.
[0127] Optionally, for a possible implementation, the test requirement information includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; the environmental information includes map information of the virtual road and obstacle information in the virtual road at the current moment.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0129] In several embodiments provided in the present application, the coupling between the units may be electrical, mechanical or other forms of coupling. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] See also Figure 6 , Figure 6 A structural block diagram of a test device 600 provided in an embodiment of the present application is shown. The test device 600 includes: a simulation test platform 610, a static scene file 620, a dynamic scene file 630, an adapter 640, and a model to be tested 650.
[0131] The simulation test platform 610 reads data from the static scene file 620 and the dynamic scene file 630, generates a simulation test platform according to the read data, transmits the map information, obstacle information, state machine information and human-computer interaction information in the simulation test scene to the adapter 640, and the adapter converts the received data into a format and transmits it to the model to be tested 650. The model to be tested 650 makes a decision based on the received data to generate planning trajectory information or control information, and converts the planning trajectory information or control information into a format through the adapter and transmits it to the virtual vehicle to be tested in the simulation test platform, and the virtual vehicle to be tested travels on the virtual road according to the received planning trajectory information and control information. The third data of the virtual vehicle to be tested during driving is obtained; and the test result is determined based on the third data.
[0132] See also Figure 7 , Figure 7 The structural block diagram of an electronic device 700 provided in an embodiment of the present application is shown. The electronic device 700 may be a vehicle system, which may be arranged in a vehicle. The electronic device 700 in the present application may include one or more of the following components: a processor 711, a memory 712, and one or more application programs, wherein the processor 711 is electrically connected to the memory 712, and the one or more program configurations are used to execute the methods described in the various embodiments of the aforementioned test method.
[0133] The processor 711 may include one or more processing cores. The processor 711 uses various interfaces and lines to connect various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 712, and calling data stored in the memory 712. Optionally, the processor 711 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 711 can integrate one or a combination of a central processing unit (CPU), a graphics processor (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 711, but may be implemented separately through a communication chip. Specifically, the method described in the above embodiments may be executed by one or more processors 711 .
[0134] For some embodiments, the memory 712 may include a random access memory (RAM) or a read-only memory (ROM). The memory 712 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 712 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 700 during use, etc.
[0135] See also Figure 8 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0136] The computer readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program codes 810 that perform any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
[0138] Please refer to Fig. 9 , which shows a structural block diagram 900 of a computer program product provided by an embodiment of the present application. The computer program product 900 includes a computer program / instruction 910, and when the computer program / instruction 910 is executed by a processor, the steps of the above method are implemented.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A testing method, characterized in that: The method comprises: Acquire a preset simulation test scenario, wherein the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle to be tested set in the virtual road; Controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment; When it is detected that the trigger condition is met, the test requirement information is obtained from the dynamic scenario file, wherein the test requirement information is pre-stored in the dynamic scenario file based on the data format of the dynamic scenario file, and includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; Inputting first data into the model to be tested, and obtaining control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information of the virtual vehicle under test at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment; The virtual vehicle under test is controlled to travel on the virtual road based on the control information to generate a test result.
2. The method according to claim 1, before obtaining the preset simulation test scenario, further comprising: Generate virtual roads based on static scene files; Generate dynamic driving environment and tested virtual vehicle based on dynamic scene files; A simulation test scenario is generated based on the virtual road, the dynamic driving environment and the virtual vehicle under test.
3. The method according to claim 1, before obtaining the test requirement information from the dynamic scenario file when the trigger condition is detected to be met, further comprises: When it is detected that the current moment meets the preset trigger moment or when a preset trigger event is detected, it is determined that the trigger condition is met.
4. The method according to claim 1, wherein inputting the first data into the model to be tested and obtaining the control information generated by the model to be tested based on the first data comprises: Convert the first data into a second data; The second data is input into the model to be tested, and control information generated by the model to be tested based on the second data is obtained.
5. The method according to claim 1, wherein the step of controlling the virtual vehicle under test to travel on the virtual road based on the control information to generate a test result comprises: Controlling the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on the control information; Acquiring third data of the virtual vehicle under test during driving; A test result is determined based on the third data.
6. The method according to claim 5, wherein determining the test result based on the third data comprises: determining a difference between the third data and the test requirement information; A test result is determined based on the difference.
7. A testing device, characterized in that: The device comprises: A first acquisition unit, the first acquisition unit is used to acquire a preset simulation test scenario, the simulation test scenario is generated based on a static scenario file and a dynamic scenario file, and the simulation test scenario includes a virtual road with a dynamic driving environment and a virtual vehicle under test set in the virtual road; A simulation unit, wherein the simulation unit controls the virtual vehicle under test to travel on a virtual road with a dynamic driving environment based on preset information; A second acquisition unit, the second acquisition unit is used to acquire test requirement information from the dynamic scenario file when it is detected that the trigger condition is met, the test requirement information is pre-stored in the dynamic scenario file based on the data format of the dynamic scenario file, and includes state machine information of the virtual vehicle under test and human-computer interaction information of the virtual vehicle under test; A transmission unit, the transmission unit being used to input first data into the model to be tested, and obtain control information generated by the model to be tested based on the first data, wherein the first data includes the test requirement information and the environmental information where the virtual vehicle to be tested is located at the current moment, and the environmental information includes the map information of the virtual road and the obstacle information in the virtual road at the current moment; A computing unit is used to control the virtual vehicle under test to travel on the virtual road based on the control information to generate a test result.
8. An electronic device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory, the one or more applications are configured to be executed by the one or more processors, and the one or more applications are configured to execute the test method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the testing method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the testing method according to any one of claims 1 to 6 is implemented.
