CN115203031A - Automatic driving and automatic generalization simulation test method and device - Google Patents
Automatic driving and automatic generalization simulation test method and device Download PDFInfo
- Publication number
- CN115203031A CN115203031A CN202210809998.4A CN202210809998A CN115203031A CN 115203031 A CN115203031 A CN 115203031A CN 202210809998 A CN202210809998 A CN 202210809998A CN 115203031 A CN115203031 A CN 115203031A
- Authority
- CN
- China
- Prior art keywords
- simulation
- test
- simulation test
- target
- generalization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 215
- 238000010998 test method Methods 0.000 title claims abstract description 17
- 238000012360 testing method Methods 0.000 claims abstract description 287
- 238000013515 script Methods 0.000 claims abstract description 136
- 238000011156 evaluation Methods 0.000 claims abstract description 64
- 238000000034 method Methods 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 15
- 238000002347 injection Methods 0.000 claims description 6
- 239000007924 injection Substances 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 2
- 238000005520 cutting process Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000004422 calculation algorithm Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000005259 measurement Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000011161 development Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 239000000243 solution Substances 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000009472 formulation Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000004888 barrier function Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses an automatic driving generalization simulation test method and device, relates to the technical field of automatic driving of vehicles, gives consideration to realization of simulation parameter generalization iteration and automatic simulation test, and can be used for testing and verifying the whole automatic driving system. The main technical scheme of the application is as follows: configuring a test environment of the LGSVL simulation platform as a Python interface simulation mode; compiling a target Python script corresponding to a simulation test scene based on the Python interface simulation mode, wherein the target Python script comprises a plurality of target test scripts constructed based on generalization parameters; configuring an evaluation index corresponding to the simulation test scene; compiling an automatic iteration test script corresponding to the simulation test scene by using the evaluation index corresponding to the simulation test scene and the target test script; and running the automatic iteration test script by utilizing a preset simulator, and executing an automatic driving automatic generalization simulation test.
Description
Technical Field
The application relates to the technical field of automatic driving of vehicles, in particular to an automatic driving automatic generalization simulation test method and device.
Background
With the rapid development of information and control technology, the automatic driving technology is gradually welcomed by automobile manufacturers and users, which is a great trend of future automobile development, and driving by applying the automatic driving technology not only reduces dangerousness, but also can reduce the heavy driving operation task of the users.
At present, in the process of continuous development of the automatic driving technology, the simulation requirement for the automatic driving algorithm is gradually increased and is becoming more and more urgent. The automatic driving function is supported by a large number of algorithms, the algorithm development is a continuous iterative process, and in the algorithm development process, a large number of simulation iterative tests are required to be carried out before field testing to verify the automatic driving function which is not mature. However, how to implement the generalized iterative test of simulation parameters with low cost and high efficiency still remains to be a solution with better requirements.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for automatic generic simulation testing of automatic driving, which mainly aims to achieve both generic iteration of simulation parameters and automatic simulation testing, and can be used to test and verify the whole automatic driving system.
In order to achieve the above purpose, the present application mainly provides the following technical solutions:
the application provides a first aspect of an automatic driving generalization simulation test method, which comprises the following steps:
configuring a test environment of the LGSVL simulation platform into a Python interface simulation mode;
compiling a target Python script corresponding to a simulation test scene based on the Python interface simulation mode, wherein the target Python script comprises a plurality of target test scripts constructed based on generalization parameters;
configuring an evaluation index corresponding to the simulation test scene;
compiling an automatic iteration test script corresponding to the simulation test scene by using the evaluation index corresponding to the simulation test scene and the target test script;
and running the automatic iteration test script by utilizing a preset simulator, and executing an automatic driving automatic generalization simulation test.
In some modified embodiments of the first aspect of the present application, the compiling a target Python script corresponding to a simulation test scenario based on the Python interface simulation mode includes:
acquiring a plurality of key parameters from a simulation test scene;
configuring each key parameter as a generalization parameter;
setting the value range of each generalization parameter;
constructing a plurality of parameter combinations consisting of generalization parameters carrying different values based on the value ranges of the generalization parameters, wherein each generalization parameter corresponds to a unique value in each parameter combination;
and creating a target test script based on each parameter combination and storing the target test script into a json file.
In some modified embodiments of the first aspect of the present application, the configuring an evaluation index corresponding to the simulation test scenario includes:
creating corresponding index items based on the simulation test scene;
adding a measure to each of the index items;
and obtaining the evaluation index corresponding to the simulation test scene based on each index item and the corresponding measuring standard.
In some modified embodiments of the first aspect of the present application, the compiling an automatic iteration test script corresponding to the simulation test scenario by using the evaluation index corresponding to the simulation test scenario and the target test script includes:
starting a preset simulator;
calling a target test script from the json file, and injecting the target test script into the preset simulator;
injecting the evaluation index corresponding to the simulation test scene into the preset simulator;
and generating an automatic iteration test script suitable for the simulation test scene based on the target test script and the evaluation index in the preset simulator.
The second aspect of the present application provides an automatic driving generalization simulation test apparatus, the apparatus comprising:
the first configuration unit is used for configuring the test environment of the LGSVL simulation platform into a Python interface simulation mode;
the first compiling unit is used for compiling a target Python script corresponding to a simulation test scene based on the Python interface simulation mode, wherein the target Python script comprises a plurality of target test scripts constructed based on generalized parameters;
the second configuration unit is used for configuring the evaluation indexes corresponding to the simulation test scene;
the second compiling unit is used for compiling the automatic iteration test script corresponding to the simulation test scene by utilizing the evaluation index corresponding to the simulation test scene and the target test script;
and the execution unit is used for running the automatic iteration test script by utilizing a preset simulator and executing the automatic driving automatic generalization simulation test.
In some modified embodiments of the second aspect of the present application, the first formulation unit includes:
the acquisition module is used for acquiring a plurality of key parameters from a simulation test scene;
the configuration module is used for configuring each key parameter as a generalization parameter;
the setting module is used for setting the value range of each generalization parameter;
the building module is used for building a plurality of parameter combinations consisting of generalization parameters carrying different values based on the value ranges of the generalization parameters, wherein each generalization parameter corresponds to a unique value in each parameter combination;
and the creating module is used for creating a target test script based on each parameter combination and storing the target test script into a json file.
In some modified embodiments of the second aspect of the present application, the second configuration unit includes:
the creating module is used for creating corresponding index items based on the simulation test scene;
the adding module is used for adding a measuring standard to each index item;
and the construction module is used for obtaining the evaluation index corresponding to the simulation test scene based on each index item and the corresponding measuring standard.
In some modified embodiments of the second aspect of the present application, the second formulation unit includes:
the starting module is used for starting the preset simulator;
the injection module is used for calling a target test script from the json file and injecting the target test script into the preset simulator;
the injection module is further configured to inject the evaluation index corresponding to the simulation test scenario into the preset simulator;
and the generation module is used for generating an automatic iteration test script suitable for the simulation test scene based on the target test script and the evaluation index in the preset simulator.
A third aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the automated driving automated generalization simulation testing method described above.
A fourth aspect of the present application provides an electronic device, comprising: the automatic driving automatic generalized simulation test system comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the automatic driving automatic generalized simulation test method.
By means of the technical scheme, the technical scheme provided by the application at least has the following advantages:
the application provides an automatic driving generalized simulation test method and device, the test environment of an LGSVL simulation platform is configured to be a Python interface simulation mode, target Python scripts corresponding to different simulation test scenes are compiled based on the Python interface simulation mode, each target Python script comprises a plurality of target test scripts constructed based on generalized parameters, and corresponding evaluation indexes are set for each simulation test scene, so that the corresponding automatic iterative test scripts are compiled by using the target test scripts and the evaluation indexes contained in the target Python scripts of each simulation test scene, and then the automatic iterative test scripts are operated in a preset simulator, so that the generalized iterative test of the simulation parameters in the simulation test scenes is realized based on the target test scripts. The scheme provided by the application mainly aims at the simulation parameter generalization iteration test, the required automatic iteration test script is compiled by means of the simulation platform, the test execution operation is simple, the scheme provided by the application has low cost and high efficiency, and the technical problem that the simulation parameter generalization iteration test scheme with low cost and high efficiency is difficult to find in the prior art is solved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of an automatic driving automatic generalization simulation test provided in an embodiment of the present application;
FIG. 2 is a flow chart of another automated driving automated generalized simulation test method provided in an embodiment of the present application;
fig. 3 is a block diagram illustrating an automatic driving automatic generalized simulation testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a block diagram of another automatic driving automatic generalization simulation test device provided in the embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the application provides an automatic driving generalization simulation test method, and as shown in fig. 1, the embodiment of the application provides the following specific steps:
101. and configuring a test environment of the LGSVL simulation platform into a Python interface simulation mode.
The LGSVL is an open-source general simulation platform, and the LGSVL simulation platform is bridged with an automatic driving open-source framework (Apollo) to integrate a simulation automatic driving system, wherein the simulation automatic driving system at least comprises a planning control algorithm module and a simulation vehicle control module. The LGSVL simulation platform provides road information, barrier information in a simulation test scene and positioning information of a simulation vehicle based on a high-precision map, a planning control algorithm module is used for calculating a path according to the related data information provided by the LGSVL, and a simulation vehicle control module is used for sending related control signals to a chassis of the vehicle to control the simulation vehicle to automatically drive on a simulation road surface.
In the embodiment of the application, a web interface of the LGSVL simulation platform is opened, an interface template simulator is established and started to enter a Python interface simulation mode.
102. And compiling a target Python script corresponding to the simulation test scene based on the Python interface simulation mode.
The simulation test scenario is a preset test scenario, in the embodiment of the application, various test scenarios can be preset according to the test requirement of automatic driving, and a corresponding target Python script is compiled based on each test scenario.
In the embodiment of the application, a generalized iterative test is performed on at least one key parameter in any simulation test scenario, and for example, when a value of one key parameter changes, a test operation needs to be performed again in an iterative manner. Accordingly, such key parameters are called generalized parameters, and in order to successfully support execution of generalized iterative test operations, a plurality of target test scripts need to be constructed based on the generalized parameters, and a target Python script corresponding to a simulation test scenario is formed by using the target test scripts.
It should be noted that, in the embodiment of the present application, for one simulation test scenario, target test scripts possessed by a target Python script of the simulation test scenario are actually constructed based on different values of key parameters, and each target test script is equivalent to testing one small scenario, so that based on the target test scripts, a test operation performed on one simulation test scenario is equivalent to generalization into a test operation of multiple small scenarios.
103. And configuring evaluation indexes corresponding to the simulation test scenes.
In the embodiment of the application, the evaluation index required by the simulation test scene is set based on the target Python script corresponding to the simulation test scene.
For example, for a vehicle switching scene during the driving of a vehicle, corresponding measurement criteria can be set based on the distance between the vehicle and the front vehicle when switching the vehicle and the vehicle speed of the vehicle when switching the vehicle, so as to obtain that the evaluation index is "collision" or "no collision".
In the present embodiment, the "vehicle cutting scene" is specifically a scene in which the vehicle cuts into the lane B from the lane a through the lane change during the driving.
104. And compiling the automatic iteration test script corresponding to the simulation test scene by using the evaluation index and the target test script corresponding to the simulation test scene.
105. And running an automatic iteration test script by using a preset simulator, and executing an automatic driving automatic generalization simulation test.
In the embodiment of the application, for any simulation test scenario, the evaluation index and the target test script of the target Python script are used to inject the evaluation index and the target test script into a preset simulator, and an automatic iteration test script corresponding to the simulation test scenario, for example, an automatic iteration bash shell script, is compiled. And running an automatic iteration test script by using a preset simulator, and executing an automatic driving automatic generalization simulation test.
The embodiment of the application provides an automatic driving generalized simulation test method, the test environment of an LGSVL simulation platform is configured to be a Python interface simulation mode, target Python scripts corresponding to different simulation test scenes are compiled based on the Python interface simulation mode, each target Python script comprises a plurality of target test scripts constructed based on generalized parameters, and corresponding evaluation indexes are also set for each simulation test scene, so that the corresponding automatic iteration test scripts are compiled by using the target test scripts and the evaluation indexes contained in the target Python scripts of each simulation test scene, and then the automatic iteration test scripts are operated in a preset simulator, so that the generalized iteration test of the simulation parameters in the simulation test scenes is equivalently realized based on the target test scripts. The scheme provided by the embodiment of the application mainly aims at the generalized iteration test of the simulation parameters, the required automatic iteration test script is compiled by means of the simulation platform, and the test execution operation is simple.
In order to describe the above embodiment in more detail, the embodiment of the present application further provides another automatic driving generalization simulation test method, as shown in fig. 2, which is a more detailed explanation of the above embodiment, and for this, the embodiment of the present application provides the following specific steps:
201. and configuring a test environment of the LGSVL simulation platform into a Python interface simulation mode.
Next, in the following steps 202-206, based on the Python interface simulation mode, a target Python script corresponding to the simulation test scenario is compiled.
202. A plurality of key parameters are obtained from a simulation test scene.
203. And configuring each key parameter as a generalization parameter.
204. And setting the value range of each generalization parameter.
205. And establishing a plurality of parameter combinations consisting of the generalization parameters carrying different values based on the value ranges of the generalization parameters, wherein each generalization parameter corresponds to a unique value in each parameter combination.
206. And creating a target test script based on each parameter combination and storing the target test script into a json file.
In the embodiment of the application, different key parameters can be obtained for different simulation test scenarios, for example, for a vehicle-cutting scenario, the distance to a preceding vehicle and the vehicle speed of the vehicle are taken into consideration, and therefore for the vehicle-cutting scenario, "the distance to the preceding vehicle" and "the vehicle speed of the vehicle" can be taken as two key parameters.
The embodiment of the application mainly aims at the generalized iterative test of the simulation parameters of the key parameters, and particularly relates to the multiple iterative tests by taking the key parameters as the generalized parameters and giving corresponding value ranges.
For an exemplary vehicle-switching scene, key parameters of 'the front vehicle distance' and 'the self vehicle speed' are configured as generalized parameters and are endowed with value ranges. For example, the range of the parameter "the distance between the vehicle and the front vehicle" is 0 to 2 (m), and the range of the parameter "the vehicle speed of the vehicle" is 10 to 60 (km/h). Accordingly, a plurality of parameter combinations can be formed according to different values of the two parameters, such as the parameter combination of 'the vehicle distance is 1 m' + 'the vehicle speed is 30'; the parameter combination of "vehicle distance 1.5m" + "vehicle speed 50", and the like.
It should be noted that, for any simulation test scenario, a plurality of generalization parameters obtained based on the key parameters may be provided, and because the attributes of the generalization parameters are different, the value units and the value ranges of the generalization parameters are different. The embodiment of the application can preset different generalization parameters and execute the value taking method from the value taking range.
Illustratively, the car cutting scene is taken as an example, the value range of the parameter "the distance between the front car and the front car" is 0-2 (m), and based on the parameter attribute, the value method can be preset as selecting different parameter values from the value range every 0.2m by taking the initial value as the standard; for the parameter 'self vehicle speed', a value taking method can be preset, wherein different parameter values are selected from a value taking range at intervals of 10km/h based on initial value taking. In addition, the embodiment of the application can also establish the mapping relation between different generalization parameters and the value taking method in advance, thereby realizing automatic value taking based on different generalization parameters.
In fact, each parameter combination corresponds to one small scene, so that a simulation test scene is generalized into a plurality of small scenes based on the parameter combinations, and each small scene performs a test operation on the same test subject (for example, a car cutting test subject), thereby realizing a generalized iterative test on the simulation parameters in any one simulation test scene. According to the embodiment of the application, a corresponding target test script is constructed based on each parameter combination, a target test script corresponding to each small scene is obtained, and then the target test scripts are utilized to form a target Python script corresponding to a simulation test scene.
207. And configuring evaluation indexes corresponding to the simulation test scenes.
In this embodiment of the present application, in order to evaluate the test result, an evaluation index corresponding to the simulation test scenario needs to be configured in advance, and the specific implementation process may include: firstly, creating corresponding index items based on a simulation test scene, and adding a measuring standard to each index item; and secondly, obtaining an evaluation index corresponding to the simulation test scene based on each index item and the corresponding measuring standard.
For example, still taking a car cutting scene as an example, for two parameters "with the distance between the vehicle and the vehicle in front" and "the vehicle speed", two index items "distance between the vehicle" and "vehicle speed" are configured correspondingly, and since the effect of performing the car cutting operation is obtained based on the combined action of the two parameters, a measurement standard can be added to the two index items at the same time, so as to comprehensively obtain a corresponding evaluation index by using the two index items. For example, if the "inter-vehicle distance" with the preceding vehicle is less than 0.5m and the "vehicle speed" per se is more than 40km/h, the evaluation index is "collision".
It should be noted that, for any one simulation test scenario and for the same evaluation index, the embodiment of the present application may be obtained based on different measurement criteria of the index item. For example, if the "inter-vehicle distance" with the preceding vehicle is 0.5 to 1 (m) and the "vehicle speed" itself is 55 to 60 (km/h), the evaluation index also becomes "collision", and the same evaluation index can be obtained based on a combination of different measures of the index items.
For the automatic driving simulation test, an evaluation index library may be pre-established in the embodiment of the present application, so that when a certain scene needs to be subjected to the simulation test, an evaluation index corresponding to the tested simulation test scene may be acquired from the evaluation index library, for example, for a vehicle cutting scene, an evaluation index of "collision" or "non-collision" may be acquired from the evaluation index library.
Further, in order to set the evaluation index, a required index item (for example, two index items of "vehicle distance" and "vehicle speed") is created from the simulation test scene according to the key parameter, and then the diversity endowing measurement standards can be performed on the two index items, so that the evaluation index is constructed by using the index items and the diversity measurement standards, the diversity test requirement on one simulation test scene is met, and the problem that the evaluation index corresponding to a certain target test script cannot be obtained is avoided.
208. And compiling an automatic iteration test script corresponding to the simulation test scene by using the evaluation index and the target test script corresponding to the simulation test scene.
In the embodiment of the application, firstly, a preset simulator is started, a target test script is called from a json file and is injected into the preset simulator, and an evaluation index corresponding to a simulation test scene is also injected into the preset simulator; and secondly, generating an automatic iteration test script suitable for the simulation test scene based on the target test script and the evaluation index. For example, automatically iterating the bash shell script.
In the embodiment of the present application, it needs to be ensured that the constructed automatic iteration test script contains two parts of data information, that is: the test samples (i.e. the target test scripts) and the evaluation indexes are obtained, so that the evaluation result corresponding to each test sample can be obtained.
209. And running an automatic iteration test script by using a preset simulator, and executing an automatic driving automatic generalization simulation test.
For the embodiment of the application, by running the automatic iteration test script on any simulation test scene, the method is equivalent to executing a plurality of target test scripts one by one, and accordingly, a test is executed on each small scene generalized by the simulation test scene.
The embodiment of the application can adopt the simulation parameter generalization iteration method for any simulation test scene, so that the iteration test method can be applied to testing and verifying the whole automatic driving system.
Further, as an implementation of the method shown in fig. 1 and fig. 2, an embodiment of the present application provides an automatic driving automatic generalization simulation test apparatus. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. The device is applied to generalization iterative test of simulation parameters in a simulation test scene, and specifically as shown in fig. 3, the device comprises:
a first configuration unit 31, configured to configure a test environment of the LGSVL simulation platform as a Python interface simulation mode;
a first compiling unit 32, configured to compile a target Python script corresponding to a simulation test scenario based on the Python interface simulation mode, where the target Python script includes multiple target test scripts constructed based on generalized parameters;
a second configuration unit 33, configured to configure an evaluation index corresponding to the simulation test scenario;
a second compiling unit 34, configured to compile an automatic iteration test script corresponding to the simulation test scenario by using the evaluation index corresponding to the simulation test scenario and the target test script;
and the execution unit 35 is configured to run the automatic iteration test script by using a preset simulator, and execute an automatic driving and automatic generalization simulation test.
Further, as shown in fig. 4, the first compiling unit 32 includes:
an obtaining module 321, configured to obtain a plurality of key parameters from a simulation test scenario;
a configuration module 322, configured to configure each of the key parameters as a generalization parameter;
a setting module 323, configured to set a value range of each of the generalization parameters;
a constructing module 324, configured to construct, based on the value range of each of the generalization parameters, a plurality of parameter combinations composed of generalization parameters carrying different values, where each of the generalization parameters in each of the parameter combinations corresponds to a unique value;
and a creating module 325, configured to create a target test script based on each parameter combination and store the target test script in a json file.
Further, as shown in fig. 4, the second configuration unit 33 includes:
a creating module 331, configured to create a corresponding index item based on the simulation test scenario;
an adding module 332, configured to add a metric to each of the index items;
a constructing module 333, configured to obtain, based on each index item and the corresponding measurement standard, an evaluation index corresponding to the simulation test scenario.
Further, as shown in fig. 4, the second compiling unit 34 includes:
a starting module 341, configured to start a preset emulator;
an injection module 342, configured to invoke a target test script from the json file, and inject the target test script into the preset simulator;
the injection module 342 is further configured to inject the evaluation index corresponding to the simulation test scenario into the preset simulator;
a generating module 343, configured to generate, in the preset simulator, an automatic iteration test script applicable to the simulation test scenario based on the target test script and the evaluation index.
To sum up, the embodiment of the present application provides an automatic driving generalized simulation test method and apparatus, where a test environment of an LGSVL simulation platform is configured as a Python interface simulation mode, and target Python scripts corresponding to different simulation test scenarios are compiled based on the test environment, so that each target Python script includes a plurality of target test scripts constructed based on generalized parameters, and a corresponding evaluation index is also set for each simulation test scenario, so that a corresponding automatic iteration test script is compiled using the target test scripts and the evaluation indexes included in the target Python scripts of each simulation test scenario, and then by running the automatic iteration test scripts in a preset simulator, the generalized iteration test of simulation parameters in the simulation test scenarios is equivalently implemented based on the target test scripts. The embodiment of the application gives consideration to the realization of simulation parameter generalization iteration and automatic simulation test, and can be used for testing and verifying the whole automatic driving system.
The automatic driving automatic generalization simulation test device comprises a processor and a memory, wherein the first configuration unit, the first compiling unit, the second configuration unit, the second compiling unit, the execution unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, simulation parameter generalization iteration and automatic simulation test can be realized by adjusting kernel parameters, and the method can be used for testing and verifying the whole automatic driving system.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the automatic driving automatic generalization simulation test method is realized.
An embodiment of the present application provides an electronic device, including: the automatic driving generalized simulation test system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the automatic driving generalized simulation test method.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), including at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent insertion, improvement, etc. made within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims (10)
1. An automatic driving and automatic generalization simulation test method is characterized by comprising the following steps:
configuring a test environment of the LGSVL simulation platform as a Python interface simulation mode;
compiling a target Python script corresponding to a simulation test scene based on the Python interface simulation mode, wherein the target Python script comprises a plurality of target test scripts constructed based on generalization parameters;
configuring an evaluation index corresponding to the simulation test scene;
compiling an automatic iteration test script corresponding to the simulation test scene by using the evaluation index corresponding to the simulation test scene and the target test script;
and running the automatic iteration test script by utilizing a preset simulator, and executing an automatic driving automatic generalization simulation test.
2. The method according to claim 1, wherein the compiling a target Python script corresponding to a simulation test scenario based on the Python interface simulation mode comprises:
acquiring a plurality of key parameters from a simulation test scene;
configuring each key parameter as a generalization parameter;
setting the value range of each generalization parameter;
constructing a plurality of parameter combinations consisting of generalization parameters carrying different values based on the value ranges of the generalization parameters, wherein each generalization parameter corresponds to a unique value in each parameter combination;
and creating a target test script based on each parameter combination and storing the target test script into a json file.
3. The method according to claim 1, wherein the configuring the evaluation index corresponding to the simulation test scenario includes:
creating corresponding index items based on the simulation test scene;
adding a metric to each of the indicator items;
and obtaining the evaluation index corresponding to the simulation test scene based on each index item and the corresponding measuring standard.
4. The method according to claim 1, wherein the compiling an automatic iteration test script corresponding to the simulation test scenario by using the evaluation index corresponding to the simulation test scenario and the target test script comprises:
starting a preset simulator;
calling a target test script from the json file, and injecting the target test script into the preset simulator;
injecting the evaluation index corresponding to the simulation test scene into the preset simulator;
and generating an automatic iteration test script suitable for the simulation test scene based on the target test script and the evaluation index in the preset simulator.
5. An automatic driving and automatic generalization simulation test device, characterized in that the device comprises:
the first configuration unit is used for configuring the test environment of the LGSVL simulation platform into a Python interface simulation mode;
the first compiling unit is used for compiling a target Python script corresponding to a simulation test scene based on the Python interface simulation mode, wherein the target Python script comprises a plurality of target test scripts constructed based on generalized parameters;
the second configuration unit is used for configuring the evaluation indexes corresponding to the simulation test scene;
the second compiling unit is used for compiling the automatic iteration test script corresponding to the simulation test scene by utilizing the evaluation index corresponding to the simulation test scene and the target test script;
and the execution unit is used for running the automatic iteration test script by utilizing a preset simulator and executing the automatic driving automatic generalization simulation test.
6. The apparatus of claim 5, wherein the first programming unit comprises:
the acquisition module is used for acquiring a plurality of key parameters from a simulation test scene;
the configuration module is used for configuring each key parameter as a generalization parameter;
the setting module is used for setting the value range of each generalization parameter;
the building module is used for building a plurality of parameter combinations consisting of generalization parameters carrying different values based on the value ranges of the generalization parameters, wherein each generalization parameter corresponds to a unique value in each parameter combination;
and the creating module is used for creating a target test script based on each parameter combination and storing the target test script into a json file.
7. The apparatus of claim 5, wherein the second configuration unit comprises:
the creating module is used for creating corresponding index items based on the simulation test scene;
the adding module is used for adding a measuring standard to each index item;
and the construction module is used for obtaining the evaluation index corresponding to the simulation test scene based on each index item and the corresponding measuring standard.
8. The method of claim 2, wherein the second compilation unit comprises:
the starting module is used for starting the preset simulator;
the injection module is used for calling a target test script from the json file and injecting the target test script into the preset simulator;
the injection module is further configured to inject the evaluation index corresponding to the simulation test scenario into the preset simulator;
and the generation module is used for generating an automatic iteration test script suitable for the simulation test scene based on the target test script and the evaluation index in the preset simulator.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the automated driving automated generalization simulation test method according to any of claims 1 to 4.
10. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the automated driving automated generalized simulation testing method of any of claims 1-4 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210809998.4A CN115203031A (en) | 2022-07-11 | 2022-07-11 | Automatic driving and automatic generalization simulation test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210809998.4A CN115203031A (en) | 2022-07-11 | 2022-07-11 | Automatic driving and automatic generalization simulation test method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115203031A true CN115203031A (en) | 2022-10-18 |
Family
ID=83580466
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210809998.4A Pending CN115203031A (en) | 2022-07-11 | 2022-07-11 | Automatic driving and automatic generalization simulation test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115203031A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115688496A (en) * | 2023-01-05 | 2023-02-03 | 西安深信科创信息技术有限公司 | Method for obtaining automatic driving simulation test script and related device |
-
2022
- 2022-07-11 CN CN202210809998.4A patent/CN115203031A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115688496A (en) * | 2023-01-05 | 2023-02-03 | 西安深信科创信息技术有限公司 | Method for obtaining automatic driving simulation test script and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112506756B (en) | Method and device for generating test case script of vehicle controller | |
CN110096445A (en) | A kind of model is in ring test method and device | |
CN115203031A (en) | Automatic driving and automatic generalization simulation test method and device | |
CN111026080A (en) | Hardware-in-loop test method and device for controller | |
Raffaelli et al. | Facing ADAS validation complexity with usage oriented testing | |
CN109614325A (en) | A kind of method and device, electronic equipment and the storage medium of determining control property | |
CN111008154A (en) | Android application automatic test method and system based on reinforcement learning | |
CN114117977B (en) | Method suitable for automatically verifying processor system scene | |
CN103049374A (en) | Automatic testing method and device | |
CN113641592B (en) | Test sequence generation method and device | |
CN104252413A (en) | Automatic script generation method, device and system | |
CN104850478B (en) | A kind of method and virtual measuring method for setting up object model to be measured | |
Wang et al. | Test case generation from UML models | |
Kriebel et al. | The next generation of bmw’s electrified powertrains: Providing software features quickly by model-based system design | |
Wu et al. | Experimentally determining passivity indices: Theory and simulation | |
US20180060219A1 (en) | Apparatus and methodology for symbolic execution-based analysis of unintended interactions in a computing system | |
CN113326211B (en) | Test case generation method and device | |
CN115114778A (en) | Method and device for generating simulation test scene | |
CN109615473A (en) | A kind of statement of account mileage determines method and system | |
CN115987821A (en) | Gateway routing test method and device | |
CN113760595A (en) | VECU software in-loop test method, device, equipment and readable storage medium | |
Philipps et al. | Prototype-based tests for hybrid reactive systems | |
Hamza et al. | A Java Implementation of Future Automotive Systems Technology Simulator (FASTSim) Fuel Economy Simulation Code Modules | |
CN115098375A (en) | Test case and script generation method and device, electronic equipment and storage medium | |
Vitale et al. | The Software-Defined Vehicle: How to Verify and Validate Software Functions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 314500 988 Tong Tong Road, Wu Tong Street, Tongxiang, Jiaxing, Zhejiang Applicant after: United New Energy Automobile Co.,Ltd. Address before: 314500 988 Tong Tong Road, Wu Tong Street, Tongxiang, Jiaxing, Zhejiang Applicant before: Hozon New Energy Automobile Co., Ltd. |