US-12620239-B2 - Driving assistance algorithm testing method, electronic device and storage medium
Abstract
A driving assistance algorithm testing method applied to an electronic device is provided. In the method, the electronic device obtains a driving assistance algorithm to be tested of a vehicle and multiple specification parameters and models a virtual scene on a simulator according to the preset parameters and generates an initial image according to the virtual scene. The electronic device obtains a target image corresponding to the driving assistance algorithm by converting the initial image according to a preset sensor conversion algorithm and the specification parameters, and generates a target vehicle control instruction according to the driving assistance algorithm, the target image, a vehicle control conversion algorithm, and the specification parameters, and scores the driving assistance algorithm by executing the target vehicle control instruction in the virtual scene of the simulator. The method can improve a verification accuracy of the driving assistance algorithm.
Inventors
- Chieh Lee
- CHIN-PIN KUO
Assignees
- HON HAI PRECISION INDUSTRY CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20230509
- Priority Date
- 20230106
Claims (17)
- 1 . A driving assistance algorithm testing method using an electronic device, the method comprising: obtaining a driving assistance algorithm to be tested of a vehicle and at least one specification parameter; modeling a virtual scene on a simulator of the electronic device according to a plurality of preset parameters and generating an initial image according to the virtual scene; obtaining a target image corresponding to the driving assistance algorithm to be tested by converting the initial image according to a preset sensor conversion algorithm and the at least one specification parameter, comprising: obtaining the target image by performing a size transformation on the initial image according to the preset sensor conversion algorithm and a size of the target image; generating a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, a vehicle control conversion algorithm, and the at least one specification parameter; and scoring the driving assistance algorithm to be tested by executing the target vehicle control instruction in the virtual scene of the simulator.
- 2 . The driving assistance algorithm testing method according to claim 1 , wherein modeling the virtual scene on the simulator of the electronic device according to the plurality of preset parameters and generating the initial image from the virtual scene comprises: simulating a virtual photographing device in the simulator according to a plurality of device parameters of the plurality of preset parameters; simulating each virtual object corresponding to each of a plurality of object parameters of the plurality of preset parameters in the simulator; determining a scene that comprises a plurality of virtual objects as the virtual scene; and obtaining the initial image by controlling the virtual photographing device to shoot the virtual scene.
- 3 . The driving assistance algorithm testing method according to claim 1 , wherein generating the target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter comprises: calculating a driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image; calculating an initial vehicle control instruction corresponding to the driving trajectory; and obtaining the target vehicle control instruction by converting the initial vehicle control instruction according to the vehicle control conversion algorithm and the at least one specification parameter.
- 4 . The driving assistance algorithm testing method according to claim 3 , wherein calculating the driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image comprises: extracting a plurality of potential features from the target image by using the driving assistance algorithm to be tested; obtaining the target object by identifying the plurality of potential features; identifying passable spatial information according to the target object; and generating the driving trajectory according to continuous passable spatial information.
- 5 . The driving assistance algorithm testing method according to claim 4 , wherein generating a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter comprises: acquiring a preset throttle calibration table; calculating a throttle value according to the throttle calibration table and an initial acceleration of the initial vehicle control instruction; obtaining a steering ratio corresponding to the vehicle from the at least one specification parameter; and calculating a tire rotation angle according to a steering wheel angle of the initial vehicle control instruction and the steering ratio.
- 6 . The driving assistance algorithm testing method according to claim 1 , wherein scoring the driving assistance algorithm to be tested by executing the target vehicle control instruction in the virtual scene of the simulator comprises: obtaining at least one vehicle status corresponding to the virtual vehicle by executing the target vehicle control instruction in the virtual scene through the simulator; and scoring the at least one vehicle status to obtain a score of the driving assistance algorithm to be tested.
- 7 . An electronic device comprising: a storage device; at least one processor; and the storage device storing one or more programs, which when executed by the at least one processor, cause the at least one processor to: obtain a driving assistance algorithm to be tested of a vehicle and at least one specification parameter; model a virtual scene on a simulator of the electronic device according to a plurality of preset parameters and generate an initial image according to the virtual scene; obtain a target image corresponding to the driving assistance algorithm to be tested by converting the initial image according to a preset sensor conversion algorithm and the at least one specification parameter, comprising: obtain the target image by performing a size transformation on the initial image according to the preset sensor conversion algorithm and a size of the target image; generate a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, a vehicle control conversion algorithm, and the at least one specification parameter; and score the driving assistance algorithm to be tested by executing the target vehicle control instruction in the virtual scene of the simulator.
- 8 . The electronic device according to claim 7 , wherein the at least one processor models the virtual scene on the simulator of the electronic device according to the plurality of preset parameters and generating the initial image from the virtual scene by: simulating a virtual photographing device in the simulator according to a plurality of device parameters of the plurality of preset parameters; simulating each virtual object corresponding to each of a plurality of object parameters of the plurality of preset parameters in the simulator; determining a scene that comprises a plurality of virtual objects as the virtual scene; and obtaining the initial image by controlling the virtual photographing device to shoot the virtual scene.
- 9 . The electronic device according to claim 7 , wherein the at least one processor generates the target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter by: calculating a driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image; calculating an initial vehicle control instruction corresponding to the driving trajectory; and obtaining the target vehicle control instruction by converting the initial vehicle control instruction according to the vehicle control conversion algorithm and the at least one specification parameter.
- 10 . The electronic device according to claim 9 , wherein the at least one processor calculates the driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image by: extracting a plurality of potential features from the target image by using the driving assistance algorithm to be tested; obtaining the target object by identifying the plurality of potential features; identifying passable spatial information according to the target object; and generating the driving trajectory according to continuous passable spatial information.
- 11 . The electronic device according to claim 10 , wherein the at least one processor generates a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter by: acquiring a preset throttle calibration table; calculating a throttle value according to the throttle calibration table and an initial acceleration of the initial vehicle control instruction; obtaining a steering ratio corresponding to the vehicle from the at least one specification parameter; and calculating a tire rotation angle according to a steering wheel angle of the initial vehicle control instruction and the steering ratio.
- 12 . The electronic device according to claim 7 , wherein the at least one processor scores the driving assistance algorithm to be tested by executing the target vehicle control instruction in the virtual scene of the simulator to: obtaining at least one vehicle status corresponding to the virtual vehicle by executing the target vehicle control instruction in the virtual scene through the simulator; and scoring the at least one vehicle status to obtain a score of the driving assistance algorithm to be tested.
- 13 . A non-transitory storage medium having instructions stored thereon, when the instructions are executed by a processor of an electronic device, the processor is caused to perform a driving assistance algorithm testing method, wherein the method comprises: obtaining a driving assistance algorithm to be tested of a vehicle and at least one specification parameter; modeling a virtual scene on a simulator of the electronic device according to a plurality of preset parameters and generating an initial image according to the virtual scene; obtaining a target image corresponding to the driving assistance algorithm to be tested by converting the initial image according to a preset sensor conversion algorithm and the at least one specification parameter, comprises: obtaining the target image by performing a size transformation on the initial image according to the preset sensor conversion algorithm and a size of the target image; generating a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, a vehicle control conversion algorithm, and the at least one specification parameter; and scoring the driving assistance algorithm to be tested by executing the target vehicle control instruction in the virtual scene of the simulator.
- 14 . The non-transitory storage medium according to claim 13 , wherein modeling the virtual scene on the simulator of the electronic device according to the plurality of preset parameters and generating the initial image from the virtual scene comprises: simulating a virtual photographing device in the simulator according to a plurality of device parameters of the plurality of preset parameters; simulating each virtual object corresponding to each of a plurality of object parameters of the plurality of preset parameters in the simulator; determining a scene that comprises a plurality of virtual objects as the virtual scene; and obtaining the initial image by controlling the virtual photographing device to shoot the virtual scene.
- 15 . The non-transitory storage medium according to claim 13 , wherein generating the target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter comprises: calculating a driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image; calculating an initial vehicle control instruction corresponding to the driving trajectory; and obtaining the target vehicle control instruction by converting the initial vehicle control instruction according to the vehicle control conversion algorithm and the at least one specification parameter.
- 16 . The non-transitory storage medium according to claim 14 , wherein calculating the driving trajectory of the vehicle according to the driving assistance algorithm to be tested and the target image comprises: extracting a plurality of potential features from the target image by using the driving assistance algorithm to be tested; obtaining the target object by identifying the plurality of potential features; identifying passable spatial information according to the target object; and generating the driving trajectory according to continuous passable spatial information.
- 17 . The non-transitory storage medium according to claim 16 , wherein generating a target vehicle control instruction according to the driving assistance algorithm to be tested, the target image, the vehicle control conversion algorithm, and the at least one specification parameter comprises: acquiring a preset throttle calibration table; calculating a throttle value according to the throttle calibration table and an initial acceleration of the initial vehicle control instruction; obtaining a steering ratio corresponding to the vehicle from the at least one specification parameter; and calculating a tire rotation angle according to a steering wheel angle of the initial vehicle control instruction and the steering ratio.
Description
FIELD The present disclosure relates to a field of vehicle control, in particular to a driving assistance algorithm testing method, an electronic device, and a storage medium. BACKGROUND In a current verification scheme that a simulator is used to test a driving assistance algorithm, there is an error between each execution instruction of a simulator of a vehicle and each vehicle control instruction calculated by the driving assistance algorithm. If the simulator directly executes the instructions calculated by the driving assistance algorithm, it will cause a virtual vehicle of the simulator cannot achieve the vehicle control effect corresponding to execute the vehicle control instruction, resulting in inaccurate verification results by using the driving assistance algorithm of the simulator. In addition, if an unqualified driving assistance algorithm is installed in the vehicle, it may affect driving safety. Therefore, how to improve the verification accuracy of the driving assistance algorithm has become a technical problem that needs to be solved urgently. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flowchart of a driving assistance algorithm testing method provided by an embodiment of the present disclosure. FIG. 2 is a flowchart of a method for generating a target vehicle control instruction provided by an embodiment of the present disclosure. FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION Plurality of embodiments are described in the present disclosure, but the description is exemplary rather than limiting, and there may be more embodiments and implementation solutions within the scope of the embodiments described in the present disclosure. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment. When describing representative embodiments, the specification may present methods and/or processes as a specific sequence of steps. However, to the extent that the method or process does not depend on the specific order of steps described in the present disclosure, the method or process should not be limited to the specific order of steps described. As understood by those of ordinary skills in the art, other orders of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be interpreted as limitation to the claims. In addition, the claims for the method and/or process should not be limited to the steps performed in the written order, and those of skill in the art may readily understand that these orders may vary and still remain within the essence and scope of the embodiments of the present disclosure. Unless otherwise defined, technical terms or scientific terms used in the embodiments shall have their common meanings as construed by those of ordinary skills in the art to which the present disclosure pertains. The terms “first”, “second” and the like used in the embodiments of the present disclosure do not represent any order, quantity, or importance, but are merely used to distinguish between different components. The terms “include”, “contain” or the like mean that elements or articles appearing before such terms may cover elements or articles listed after the words and their equivalents without excluding other elements or articles. The terms “connect”, “link” or the like are not limited to physical or mechanical connection, but may include electrical connections, whether direct or indirect. In a current verification scheme that a simulator is used to test a driving assistance algorithm, there is an error between each execution instruction of a simulator of a vehicle and each vehicle control instruction calculated by the driving assistance algorithm. If the simulator directly executes the instructions calculated by the driving assistance algorithm, it will cause a virtual vehicle of the simulator cannot achieve the vehicle control effect corresponding to execute the vehicle control instruction, resulting in inaccurate verification results by using the driving assistance algorithm of the simulator. In addition, if an unqualified driving assistance algorithm is installed in the vehicle, it may affect driving safety. Therefore, how to improve the verification accuracy of the driving assistance algorithm has become a technical problem that needs to be solved urgently. In order to solve the above problems, an embodiment of the present disclosure provides a method for testing a driving assistance algorithm, which can improve the verification accuracy of the driving assistance algorithm, thereby improving driving safety. The following will be described in detail in conjunctio