Simulated driving test method, device, computer equipment and storage medium
By randomly generating traffic participants and detecting collisions in autonomous driving tests, the limitations of manually defined behaviors in traditional tests are resolved, achieving more accurate simulated driving test results.
Patent Information
- Application Number
- CN202210794156.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-07-07
AI Technical Summary
In traditional autonomous driving tests, manually defining the movement behaviors of traffic participants makes it difficult to exhaust all traffic scenarios encountered during actual driving, resulting in inaccurate test results.
A simulated driving test method is provided. By obtaining pre-set traffic participant generation information, including time, range and behavior setting information, traffic participant objects are randomly generated in a simulated driving scene and their movement is controlled to detect collision situations and determine test results.
It improves the accuracy of simulated driving tests, can actively explore various types of scenarios, enrich the scenario library, and help driving decision-making algorithms conduct more accurate tests.
Smart Images

Figure CN115203823B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a simulated driving test method, apparatus, computer equipment, storage medium, and computer program product. Background Art
[0002] When an autonomous vehicle encounters a pedestrian crossing the road, for example, it makes driving decisions based on its decision-making and planning algorithms. Therefore, it's crucial to test these algorithms before they're deployed. This can be done through simulation, where traffic participants are generated to simulate real-world traffic conditions like pedestrians and vehicles.
[0003] Traditional technologies manually define the movement of traffic participants on the road. During simulation, these movements are controlled based on these manually defined behaviors. However, these manually defined behaviors are limited and difficult to fully capture the full range of traffic scenarios encountered during real-world driving, resulting in inaccurate test results. Summary of the Invention
[0004] Based on this, it is necessary to provide a simulated driving test method, device, computer equipment, storage medium and computer program product that can improve the accuracy of test results in response to the above technical problems.
[0005] In one aspect, the present application provides a simulated driving test method. The method includes:
[0006] Obtaining pre-set traffic participant object generation information, the traffic participant object generation information including time setting information, range setting information and behavior setting information;
[0007] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0008] When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location;
[0009] Control the traffic participant to start moving from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested;
[0010] During the movement of the traffic participant, it is detected whether the vehicle to be tested collides with the traffic participant, and the simulation driving test result is determined based on the collision situation.
[0011] On the other hand, the present application also provides a simulated driving test device. The device includes:
[0012] An acquisition module is used to acquire preset traffic participant object generation information, where the traffic participant object generation information includes time setting information, range setting information, and behavior setting information;
[0013] A determination module, used to determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0014] a generation module, configured to, when determining the current moment as the target moment based on the time setting information, determine a random location in front of the vehicle to be tested according to the range setting information, and generate a traffic participant object at the random location;
[0015] The control module is used to control the traffic participant to move from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested; during the movement of the traffic participant, it is detected whether the vehicle to be tested collides with the traffic participant, and the simulation driving test result is determined based on the collision situation.
[0016] In some embodiments, the determination module is specifically configured to:
[0017] Traverse each vehicle in the simulated driving scene, and for the current vehicle currently traversed, if the current vehicle is in a driving state, use the current vehicle as the vehicle to be tested.
[0018] In some embodiments, the time setting information includes at least one time interval distributed according to a preset function, and the generating module is further configured to:
[0019] determining a target time interval from the at least one time interval;
[0020] Obtain the previous moment when the traffic participant object was generated for the vehicle to be tested, and determine the duration between the previous moment and the current moment;
[0021] When the duration is the target time interval, the current moment is determined to be the target moment.
[0022] In some embodiments, the range setting information includes a vertical range, and the generation module is specifically configured to:
[0023] Get the target's horizontal distance and randomly extract the target's vertical distance from the vertical range;
[0024] A position that is a longitudinal distance from a target in front of the vehicle to be tested and a lateral distance from a target on the outer edge of the road where the vehicle to be tested is currently located is used as a random location.
[0025] In some embodiments, the range setting information includes a horizontal range, and the generation module is specifically configured to:
[0026] Get the target longitudinal distance and randomly extract the target lateral distance from the lateral range;
[0027] A position that is a longitudinal distance from a target in front of the vehicle to be tested and a lateral distance from a target on the outer edge of the road where the vehicle to be tested is currently located is used as a random location.
[0028] In some embodiments, the lateral range is determined by a first threshold and a second threshold, the first threshold being smaller than the second threshold, wherein the first threshold is the distance from the center point of the traffic participant object to the outer edge of the road when the traffic participant object is tangent to the outer edge of the road where the vehicle to be tested is located, and the second threshold is a pre-set value.
[0029] In some embodiments, the behavior setting information includes an angle range, and a control module is specifically used to:
[0030] Randomly extract the target angle from the angle range;
[0031] Determining a reference direction based on the orientation of the road the vehicle to be tested is currently on relative to traffic participants;
[0032] Determine the entry angle based on the reference direction and the target angle;
[0033] Control traffic participants to enter the current road at a random location with an entry angle and move at a preset speed and along a preset path.
[0034] In some embodiments, the behavior setting information includes a speed range, and a control module is specifically configured to:
[0035] Randomly extract the target speed from the speed range;
[0036] Control traffic participants to start from random locations and move according to target speed and preset paths.
[0037] In some embodiments, the range setting information includes a preset longitudinal distance, and the control module is further configured to:
[0038] Determining a predicted longitudinal position of a traffic participant based on the current position of the vehicle under test on the road and a preset longitudinal distance;
[0039] When the predicted longitudinal position does not meet the generation conditions, the traffic participant object generation event is cached until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the test vehicle after traveling, and then the traffic participant object is generated based on the predicted longitudinal position.
[0040] In some embodiments, the control module is further configured to:
[0041] In a case where the predicted longitudinal position is outside the map of the simulated driving scenario, or the number of predicted longitudinal positions in the simulated driving scenario is greater than one, it is determined that the predicted longitudinal position does not meet the generation condition.
[0042] In some embodiments, the control module is specifically configured to:
[0043] In the event of a collision, a collision event is recorded; and based on the recorded collision event, a simulated driving test result obtained by performing a simulated driving test on the vehicle to be tested is determined.
[0044] In another aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are performed:
[0045] Obtaining pre-set traffic participant object generation information, the traffic participant object generation information including time setting information, range setting information and behavior setting information;
[0046] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0047] When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location;
[0048] Control the traffic participant to start moving from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested;
[0049] During the movement of the traffic participant, it is detected whether the vehicle to be tested collides with the traffic participant, and the simulation driving test result is determined based on the collision situation.
[0050] In another aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0051] Obtaining pre-set traffic participant object generation information, the traffic participant object generation information including time setting information, range setting information and behavior setting information;
[0052] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0053] When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location;
[0054] Control the traffic participant to start moving from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested;
[0055] During the movement of the traffic participant, it is detected whether the vehicle to be tested collides with the traffic participant, and the simulation driving test result is determined based on the collision situation.
[0056] On the other hand, the present application also provides a computer program product. The computer program product includes a computer program, which, when executed by a processor, implements the following steps:
[0057] Obtaining pre-set traffic participant object generation information, the traffic participant object generation information including time setting information, range setting information and behavior setting information;
[0058] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0059] When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location;
[0060] Control the traffic participant to start moving from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested;
[0061] During the movement of the traffic participant, it is detected whether the vehicle to be tested collides with the traffic participant, and the simulation driving test result is determined based on the collision situation.
[0062] The aforementioned simulated driving test method, apparatus, computer device, storage medium, and computer program product first obtain pre-set traffic participant generation information, which includes time setting information, range setting information, and behavior setting information. The time setting information can be used to determine a random time point for generating a traffic participant, the range setting information can be used to determine a random location for generating a traffic participant, and the behavior setting information can be used to determine a random action of the traffic participant. After determining a test vehicle in a driving state in a simulated driving scenario, when the current time is determined as the target time based on the time setting information, a random location is determined in front of the test vehicle according to the range setting information, a traffic participant is generated at the random location, and the traffic participant is controlled to move from the random location according to the behavior setting information so that the traffic participant passes in front of the test vehicle. During the movement of the traffic participant, whether the test vehicle collides with the traffic participant is detected, and a simulated driving test result is determined based on the collision situation. In this way, the behavior of the traffic participant generates a number of traffic scenarios, which can simulate various road conditions that a vehicle may encounter during driving, thereby performing a simulated driving test on the test vehicle based on its reaction. In this way, various types of scenarios can be actively explored, such as some extreme scenarios that cannot be set up by humans, to help enrich the scenario library, thereby achieving the purpose of testing the driving decision algorithm of the test vehicle and making the results of the simulated driving test more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A schematic diagram of an application environment of a simulated driving test method in one embodiment;
[0064] Figure 2 Schematic diagram of a flow chart of a simulated driving test method in one embodiment;
[0065] Figure 3 is a schematic diagram of a traffic participant object in one embodiment;
[0066] Figure 4 is a schematic diagram of the longitudinal distance in one embodiment;
[0067] Figure 5 is a schematic diagram of the lateral distance in one embodiment;
[0068] Figure 6 Schematic diagram of the zero direction and the positive direction in one embodiment;
[0069] Figure 7 A schematic diagram showing that the predicted longitudinal position does not meet the generation condition in one embodiment;
[0070] Figure 8 A schematic diagram of another embodiment in which the predicted longitudinal position does not meet the generation condition;
[0071] Figure 9 A schematic flow chart of a simulated driving test method according to another embodiment;
[0072] Figure 10 is a structural block diagram of a simulated driving test device in one embodiment;
[0073] Figure 11 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0075] The simulated driving test method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The simulation driving test method provided in each embodiment of the present application can be executed separately by the terminal 102 or the server 104, and can also be executed jointly by the terminal 102 and the server 104. Take the execution of the terminal alone as an example to illustrate: the tester can set the traffic participant object generation information through the visual interface provided by the terminal, and the traffic participant object generation information includes time setting information, range setting information and behavior setting information. The terminal can be equipped with a simulation system for verifying the decision-making planning algorithm. After the simulation system starts running, the vehicle to be tested that is in a driving state in the simulated driving scenario is determined; when the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location; the traffic participant object is controlled to start moving from the random location according to the behavior setting information, so that the traffic participant object passes in front of the vehicle to be tested; during the movement of the traffic participant object, it is detected whether the vehicle to be tested collides with the traffic participant object, and the simulation driving test result is determined based on the collision situation.
[0076] Among them, terminal 102 can be, but is not limited to, various computers, laptops, smartphones, tablets, Internet of Things devices, and portable wearable devices. Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server. The method provided in the embodiments of the present application can be applied in the field of autonomous driving, and the vehicle mentioned in the embodiments of the present application can be an autonomous driving vehicle.
[0077] In some embodiments, as Figure 2 As shown, a simulated driving test method is provided. This embodiment uses the method applied to a computer device as an example. The computer device can be Figure 1 In the embodiment, the method includes the following steps:
[0078] S202: Acquire preset traffic participant object generation information, where the traffic participant object generation information includes time setting information, range setting information, and behavior setting information.
[0079] Among them, traffic participating objects can represent any movable objects that a vehicle may encounter when driving on the road in a real scene. For example, traffic participating objects can represent people, animals, vehicles, etc., which is not limited in this embodiment of the present application.
[0080] In which, in the simulated driving scenario, traffic participants can be represented by any shape. For example, traffic participants can be represented by squares, rectangles, circles, and ellipses. The embodiment of the present application uses an ellipse as an example to illustrate the process of the simulated driving test method, but this does not constitute a limitation to the embodiment of the present application.
[0081] For details, see Figure 3 As shown, the intersection of the major and minor axes of the ellipse can be used as the center of mass of the traffic participant object. The positions of the traffic participant objects mentioned in the embodiments of this application all refer to the positions of the center of mass. The tester can control the size of the traffic participant object by setting the values of the semi-major axis and the semi-minor axis, or the values of the semi-major axis and the semi-minor axis can be the default values. The major axis of the ellipse is used to measure the width of the space occupied by the traffic participant object, and the minor axis of the ellipse is used to measure the depth of the space occupied by the traffic participant object. Figure 3 In the example, the width of the space occupied by the traffic participant objects is 0.6, and the depth of the space occupied by the traffic participant objects is 0.5.
[0082] In some embodiments, the computer device may provide a visual interface through which the tester can set the traffic participant object generation information. Alternatively, the tester can directly set the traffic participant object generation information in the code corresponding to the method provided in the embodiments of this application. The embodiments of this application do not limit how the tester sets the traffic participant object generation information.
[0083] In order to control the time point of generating the traffic participant object, the embodiment of the present application proposes the concept of time setting information, which may include the time interval between two adjacent generation of the traffic participant object.
[0084] In some embodiments, the time setting information may include a fixed time interval. After the simulation starts, the computer device generates a traffic participant object once every time interval. Specifically, after the traffic participant object is generated for the last time, for each moment after the moment of the previous generation of the traffic participant object (the previous moment), the computer device determines whether the moment and the previous generation moment are separated by the above time interval. If so, the moment is determined to be the target moment, that is, the moment of generating the traffic participant object again. In the above case, since the time interval is fixed, the moments of generating the traffic participant object are distributed at equal intervals. For example, if the traffic participant object is generated at moment T, the moments of subsequently generating the traffic participant object are 2T, 3T, 4T, ... nT.
[0085] Among them, after the simulation starts, the moment when the computer device generates the traffic participant object for the first time can be randomly selected or pre-set by the tester. In addition, the moment in the embodiment of the present application can be the moment defined by the clock in the simulation system, so the moment in the embodiment of the present application can be understood as the simulation moment.
[0086] In some embodiments, the time setting information may include at least one time interval distributed according to a preset function, and the time interval between two adjacent generation of traffic participant objects may be any of these time intervals. Specifically, after the last generation of a traffic participant object, for each moment after the moment of the last generation of the traffic participant object (the previous generation moment), one time interval may be selected from the at least one time interval, and the computer device determines whether the moment and the previous generation moment are separated by the selected time interval. If so, the moment is determined to be the target moment, i.e., the moment at which the traffic participant object is generated again. In the above case, since at least one time interval is different, the moments of generating the traffic participant objects are randomly distributed.
[0087] Exemplarily, the preset function may be an exponential function, and at least one time interval may obey the following exponential function:
[0088] P(X>t)=e -t / T
[0089] Where T is the mathematical expectation of the time interval and P is the probability that the time interval is greater than t.
[0090] In order to control the location where a traffic participant object is generated, the present embodiment proposes the concept of range setting information. In the present embodiment, the direction perpendicular to the road on which the vehicle to be tested is located is referred to as the horizontal direction, and the direction corresponding to the road on which the vehicle to be tested is located is referred to as the vertical direction. Considering the vertical distance between the traffic participant object and the outer edge of the road on which the vehicle to be tested is located, and the distance between the traffic participant object and the vehicle to be tested along the road on which the vehicle to be tested is located, a unique location can be determined. Based on this, the present embodiment proposes the concepts of the horizontal range and the vertical range for controlling the location where the traffic participant object is generated. The horizontal range includes: the optional vertical distance between the traffic participant object to be generated and the outer edge of the road on which the vehicle to be tested is located, and the vertical range includes: the optional distance between the traffic participant object to be generated and the vehicle to be tested along the road on which the vehicle to be tested is located. When the computer device subsequently generates a traffic participant object, it randomly extracts a distance from the horizontal range and the vertical range respectively, and determines the location of the traffic participant object to be generated based on the two extracted distances. For convenience of explanation, this location is referred to as a random location in the present embodiment.
[0091] In some embodiments, the horizontal range and vertical range can be used as range setting information. Alternatively, a fixed vertical distance can be preset, and the horizontal range and the preset vertical distance can be used as range setting information. Alternatively, a fixed horizontal distance can be preset, and the preset horizontal distance and vertical range can be used as range setting information. Alternatively, a fixed horizontal distance and vertical distance can be preset, and the preset horizontal distance and the preset vertical distance can be used as range setting information.
[0092] Among them, in order to realize the control of the actions performed by the traffic participant, the concept of behavior setting information is proposed in the embodiment of the present application. When the traffic participant crosses the road with a random location as the initial position, it faces the following problems: at which angle to move into the road, at which speed to move, and along which path to move. Based on this, the embodiment of the present application proposes the concepts of angle range and speed range. The angle range includes: the optional angles at which the traffic participant enters the road where the vehicle to be tested is located; the speed range includes: the optional speeds when the traffic participant crosses the road. After determining the random location, the computer device randomly extracts an angle from the angle range and a speed from the speed range, and controls the traffic participant to enter the road where the vehicle to be tested is located based on the extracted angle and move along the preset path at the extracted speed.
[0093] The preset path may be a straight line, a curve, or other forms of routes, which is not limited in the embodiments of the present application.
[0094] In some embodiments, the angle range and speed range can be used as behavior setting information. Alternatively, a fixed speed can be preset, and the preset speed and angle range can be used as behavior setting information. Alternatively, a fixed angle can be preset, and the speed range and preset angle can be used as behavior setting information. Alternatively, a fixed speed and angle can be preset, and the preset speed and preset angle can be used as behavior setting information.
[0095] S204: Determine a vehicle to be tested that is in a driving state in the simulated driving scenario.
[0096] In order to improve test efficiency, multiple vehicles can be added to the simulated driving scene. After the simulation starts, the computer equipment can determine whether each vehicle is in a driving state or a stopped state, and the vehicles in a driving state can be used as vehicles to be tested.
[0097] S206 : When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location.
[0098] In some embodiments, the computer device may determine whether the current moment is the target moment based on the time interval in the time setting information and the moment when the traffic participant object was last generated.
[0099] In some embodiments, when the range setting information includes a horizontal range and a vertical range, the computer device randomly extracts a distance from the horizontal range and the vertical range respectively, and determines the location of the traffic participant object to be generated based on the two extracted distances. For the sake of convenience, this location is referred to as a random location in the embodiments of the present application.
[0100] In some embodiments, when the range setting information includes a lateral range and a preset longitudinal distance, the computer device randomly extracts a distance from the lateral range and determines the random location based on the distance and the preset longitudinal distance. In this case, all subsequently generated traffic participants have the same distance from the test vehicle along the road where the test vehicle is located.
[0101] In some embodiments, when the range setting information includes a preset lateral distance and a longitudinal range, the computer device randomly extracts a distance from the longitudinal range and determines the random location based on this distance and the preset lateral distance. In this case, each subsequently generated traffic participant has the same vertical distance from the outer edge of the road where the test vehicle is located.
[0102] In some embodiments, when the range setting information includes a preset lateral distance and a preset longitudinal distance, the computer device determines the random location based on the preset lateral distance and the preset longitudinal distance. In this case, each subsequently generated traffic participant has the same distance from the test vehicle along the road where the test vehicle is located, and each subsequently generated traffic participant has the same vertical distance from the outer edge of the road where the test vehicle is located.
[0103] S208 : Control the traffic participant to start moving from a random location according to the behavior setting information, so that the traffic participant passes in front of the vehicle to be tested.
[0104] In some embodiments, when the behavior setting information includes an angle range and a speed range, after determining the random location, the computer device randomly extracts an angle from the angle range and a speed from the speed range, and controls the traffic participant to enter the road where the vehicle to be tested is located based on the extracted angle and move along the preset path at the extracted speed, so that the traffic participant passes in front of the vehicle to be tested.
[0105] In some embodiments, when the behavior setting information includes a preset speed and an angle range, the computer device randomly extracts an angle from the angle range after determining the random location, and controls the traffic participant object to enter the road where the vehicle to be tested is located based on the extracted angle, and move at a preset speed along a preset path, so that the traffic participant object passes in front of the vehicle to be tested. In this case, the speed of each traffic participant object generated subsequently when crossing the road where the vehicle to be tested is located is the same.
[0106] In some embodiments, when the behavior setting information includes a speed range and a preset angle, the computer device randomly extracts a speed from the speed range after determining the random location, controls the traffic participant to enter the road where the vehicle to be tested is located based on the preset angle, and moves along the preset path at the extracted speed, so that the traffic participant passes in front of the vehicle to be tested. In this case, each traffic participant generated subsequently enters the road where the vehicle to be tested at the same angle.
[0107] In some embodiments, when the behavior setting information includes a preset speed and a preset angle, after determining the random location, the computer device controls the traffic participant object to enter the road where the vehicle to be tested is located based on the preset angle and move at a preset speed along a preset path, so that the traffic participant object passes in front of the vehicle to be tested. In this case, each subsequently generated traffic participant object has the same speed when crossing the road where the vehicle to be tested is located, and furthermore, each subsequently generated traffic participant object has the same angle at which it enters the road where the vehicle to be tested is located.
[0108] In some embodiments, the tester may pre-set a random seed, and the computer device may use the random seed to extract corresponding data from the horizontal range, vertical range, angle range, and speed range.
[0109] S2010. During the movement of the traffic participant, detect whether the vehicle to be tested collides with the traffic participant, and determine the simulation driving test result based on the collision situation.
[0110] In some embodiments, the computer device may detect whether the vehicle to be tested and the traffic participant object overlap at certain moments during the movement of the traffic participant object. If so, it is determined that the vehicle to be tested and the traffic participant object collide with each other.
[0111] In some embodiments, during the driving process of the vehicle to be tested, the computer device will generate traffic participant objects multiple times based on time setting information, and can count the number of collisions. Based on the statistical results, the test results of the simulated driving test of the vehicle to be tested are determined.
[0112] The simulated driving test method provided by the embodiment of the present application first obtains pre-set traffic participant object generation information, which includes time setting information, range setting information and behavior setting information. The time setting information can be used to determine the random time point for generating the traffic participant object, the range setting information can be used to determine the random location for generating the traffic participant object, and the behavior setting information can be used to determine the random action of the traffic participant object. After determining the vehicle to be tested in a driving state in the simulated driving scene, when the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, a traffic participant object is generated at the random location, and the traffic participant object is controlled to start moving from the random location according to the behavior setting information so that the traffic participant object passes in front of the vehicle to be tested. During the movement of the traffic participant object, it is detected whether the vehicle to be tested collides with the traffic participant object, and the simulated driving test result is determined based on the collision situation. The method provided by the embodiment of the present application realizes the randomness of the three dimensions of generation time, generation location and execution action. Compared with the method of manually defining movement behavior, the traffic scenes encountered by the vehicle to be tested are richer and the simulated driving test results are more accurate.
[0113] In some embodiments, the step of determining a vehicle to be tested that is in a driving state in a simulated driving scenario includes: traversing each vehicle in the simulated driving scenario, and for a current vehicle that is currently traversed, if the current vehicle is in a driving state, using the current vehicle as the vehicle to be tested.
[0114] Among them, since the embodiment of the present application tests whether the vehicle's decision-making and planning algorithm can help the vehicle make correct driving decisions to prevent collisions between the vehicle and the traffic participants when a traffic participant crosses the road in front of the vehicle during driving. When the vehicle is in a stopped state, the above test cannot be performed. Therefore, it is necessary to filter out vehicles in a stopped state. Specifically, the driving scene may contain multiple vehicles. The computer device can traverse each vehicle and determine whether the current vehicle is in a driving state for the current traversed vehicle. If the current vehicle is in a driving state, the current vehicle is used as the vehicle to be tested.
[0115] In some embodiments, when the computer device determines that the current vehicle is in a driving state, it can further determine whether the current moment is the target moment for the current vehicle. If so, the current vehicle is used as a vehicle to be tested.
[0116] Specifically, the computer device may determine whether the current moment is a moment at which a traffic participant object needs to be generated for the current vehicle. If so, the computer device may determine the current moment as a target moment for the current vehicle.
[0117] In the above embodiment, when the simulated driving scene includes multiple vehicles, each vehicle is traversed, and when the current vehicle is in a driving state, the current vehicle is used as the vehicle to be tested, thereby avoiding the waste of processing resources caused by generating traffic participant objects for vehicles in a stopped state.
[0118] In some embodiments, the time setting information includes at least one time interval that obeys a preset function distribution. When the current moment is determined to be the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information. Before the step of generating a traffic participant object at the random location, the simulation driving test method provided by the embodiment of the present application may also include a target moment determination step, which specifically includes: determining the target time interval from at least one time interval; obtaining the previous moment when the traffic participant object was generated for the vehicle to be tested, and determining the duration between the previous moment and the current moment; when the duration is the target time interval, determining the current moment as the target moment.
[0119] In some embodiments, the computer device may randomly extract a time interval from at least one time interval as the target time interval. For example, if the at least one time interval includes T1, T2, T3, etc. and the randomly extracted time interval is T3, then T3 may be used as the target time interval.
[0120] In some embodiments, the computer device can obtain the previous moment when the traffic participation object was generated for the vehicle to be tested, and determine the duration between the previous moment and the current moment, and judge the relationship between the duration and the target time interval. If the duration is less than the target time interval, it is determined that the moment for generating the traffic participation object for the vehicle to be tested has not yet arrived. If the duration is the same as the target time interval, the current moment is determined to be the target moment, and the step of determining a random location in front of the vehicle to be tested according to the range setting information is continued.
[0121] In the above embodiment, the time setting information includes at least one time interval that obeys a preset function distribution. The target time interval can be determined from the at least one time interval, and whether the current moment is the target moment for the vehicle to be tested is determined based on the target time interval. If the current moment is the target moment, a traffic participant object is generated. Since the at least one time interval obeys the preset function distribution, the target moment determined based on the at least one time interval is random, which realizes the randomness of the generation of traffic participant objects in the time dimension, making the traffic scenes encountered by the vehicle to be tested richer.
[0122] In some embodiments, the range setting information includes a longitudinal range, and the step of determining a random location in front of the vehicle to be tested according to the range setting information includes: obtaining a target lateral distance and randomly extracting the target longitudinal distance from the longitudinal range; and taking a position that is the target longitudinal distance in front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located as the random location.
[0123] In some embodiments, the range setting information includes a preset horizontal distance in addition to the vertical range, and the computer device may use the preset horizontal distance as the target horizontal distance. Alternatively, the range setting information includes a horizontal range in addition to the vertical range, and the computer device may randomly extract a horizontal distance from the horizontal range and use the extracted horizontal distance as the target horizontal distance.
[0124] Among them, the longitudinal range includes: the optional distance from the traffic participant object to be generated to the vehicle to be tested along the road where the vehicle to be tested is located. The optional distance from the traffic participant object to the vehicle to be tested mentioned here can be the optional distance from the traffic participant object to the front of the vehicle to be tested. Referring to Figure 4, the distance from the traffic participant object to the front of the vehicle to be tested along the road where the vehicle to be tested is x. In the simulated driving scenario, the main test is whether the vehicle can avoid the traffic participant object when there is a traffic participant object passing in front of the vehicle. Therefore, the minimum value of x can be 0, and the tester can pre-set the maximum value of x. Figure 3 The maximum value of x is represented by X, so the vertical range can be determined as [0, X].
[0125] In some embodiments, the computer device may randomly extract a distance from the longitudinal range as the target longitudinal distance, and may use the position of the target longitudinal distance extending from the front position of the vehicle to be tested in the driving direction of the vehicle to be tested as the longitudinal position, and use the position outside the road where the vehicle to be tested is located and the distance between the outer edge of the road where the vehicle to be tested is the target lateral distance as the lateral position. Based on the above longitudinal position and lateral position, the random location is determined.
[0126] Among them, in the real driving scene, pedestrians and other traffic participants may enter and cross the road from the left side of the road, or may enter and cross the road from the right side of the road. In the simulated driving scene, the tester can pre-set the traffic participant to enter from the left side of the road, or set the traffic participant to enter from the right side of the road, or set the probability of the traffic participant entering from the left side to a%, and the probability of entering from the right side to (1-a)%. In the case where the tester sets the traffic participant to enter from the left side of the road, the computer device will use the position outside the left outer edge of the road where the vehicle to be tested is located, and the distance between the left outer edge and the position is the target lateral distance, as the lateral position in the above-mentioned process of determining the lateral position. In the case where the tester sets the traffic participant to enter from the right side of the road, the computer device will use the position outside the right outer edge of the road where the vehicle to be tested is located, and the distance between the right outer edge and the position is the target lateral distance, as the lateral position when calculating the lateral position. When the tester sets the probability of a traffic participant entering from the left to a%, and the probability of entering from the right to (1-a)%, the computer device, when calculating the lateral position, first counts the proportion of all generated traffic participants entering from the left and the proportion entering from the right, compares the proportion entering from the left with a%, and compares the proportion entering from the right with (1-a)%, and based on the two comparison results, determines the entry direction this time, and further determines the lateral position based on the entry direction this time.
[0127] In the above embodiment, a target longitudinal distance is randomly extracted from the longitudinal range, and a location that is both the target longitudinal distance in front of the test vehicle and the target lateral distance from the outer edge of the road where the test vehicle is currently located is used as the random location. Because the target longitudinal distance is randomly extracted, the location determined based on the target longitudinal distance is also random, achieving randomness in the location dimension of the generated traffic participants, enriching the traffic scenarios encountered by the test vehicle.
[0128] In some embodiments, the range setting information includes a lateral range, and the step of determining a random location in front of the vehicle to be tested according to the range setting information includes: obtaining a target longitudinal distance and randomly extracting a target lateral distance from the lateral range; and taking a position that is the target longitudinal distance in front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located as the random location.
[0129] In some embodiments, the range setting information includes a preset longitudinal distance in addition to the horizontal range, and the computer device may use the preset longitudinal distance as the target longitudinal distance. Alternatively, the range setting information includes a longitudinal range in addition to the horizontal range, and the computer device may randomly extract a longitudinal distance from the longitudinal range and use the extracted longitudinal distance as the target longitudinal distance.
[0130] The lateral range includes the optional vertical distance between the generated traffic participant and the outer edge of the road where the vehicle to be tested is located. The lateral range can be a range pre-set by the tester. The embodiments of this application do not limit the setting rules of the lateral range.
[0131] In some embodiments, the computer device may randomly extract a distance from the lateral range as the target lateral distance, may use the position of the target longitudinal distance extending from the front position of the vehicle to be tested in the driving direction of the vehicle to be tested as the longitudinal position, and may use the position outside the road where the vehicle to be tested is located and the distance between the outer edge of the road where the vehicle to be tested is the target lateral distance as the lateral position, and determine the random location based on the above longitudinal position and lateral position.
[0132] In the above embodiment, a target lateral distance is randomly extracted from the lateral range, and a location that is both the longitudinal distance from the target in front of the test vehicle and the target lateral distance from the outer edge of the road where the test vehicle is currently located is used as the random location. Because the target lateral distance is randomly extracted, the location determined based on the target lateral distance is also random, achieving randomness in the location dimension of the generated traffic participants, enriching the traffic scenarios encountered by the test vehicle.
[0133] In some embodiments, the lateral range is determined by a first threshold and a second threshold, the first threshold being smaller than the second threshold, wherein the first threshold is the distance from the center point of the traffic participant object to the outer edge of the road when the traffic participant object is tangent to the outer edge of the road where the vehicle to be tested is located, and the second threshold is a pre-set value.
[0134] The lateral range includes the optional vertical distance from the traffic participant to be generated to the outer edge of the road where the vehicle to be tested is located. Figure 5 As shown in the figure, a perpendicular line is drawn from the center point of the traffic participant to the outer edge of the road where the vehicle is located, and the distance between the center point of the traffic participant and the foot of the perpendicular line is used as the vertical distance from the traffic participant to the outer edge of the road where the vehicle is located. Considering that pedestrians in real scenes generally move from outside the road to the road, the minimum vertical distance can be the distance between the center point of the traffic participant and the foot of the perpendicular line when the traffic participant and the outer edge of the road where the vehicle is located are tangent, that is, Figure 5 half of the semiminor axis of the median ellipse, Figure 5 b is used in the test, and b can be used as the first threshold. The tester can preset a maximum vertical distance. Figure 5 In the expression "X", X can be used as the second threshold, thereby determining the lateral range to be [b, X].
[0135] In the above embodiment, the lateral range of the initial position of the traffic participant object to be generated is determined based on the common pattern of pedestrians crossing the road in real scenes, so that the traffic participant object in the simulated driving scene and the pedestrians in the real scene are closer, thereby improving the effectiveness of the simulated driving test.
[0136] In some embodiments, the behavior setting information includes an angle range, and the step of controlling the traffic participant to start moving from a random location according to the behavior setting information includes:
[0137] A target angle is randomly extracted from an angle range; a reference direction is determined based on the orientation of the road on which the vehicle to be tested is currently located relative to the traffic participant; an entry angle is determined based on the reference direction and the target angle; and the traffic participant is controlled to enter the current road at a random location with the entry angle and move at a preset speed and along a preset path.
[0138] Among them, after the random location for generating the traffic participant object is determined according to the range setting information, it is necessary to control the traffic participant object to move from the random location into the road. When the traffic participant object moves into the road, it faces the following problems: at which angle to move from the random location into the road, at which speed to move, and along which path to move. In order to improve the randomness of the movement of the traffic participant object, the embodiment of the present application proposes the concept of an angle range. After determining the random location of the traffic participant object, the computer device randomly extracts an angle from the angle range, controls the traffic participant object to enter the road based on the angle, and moves according to a preset speed and a preset path.
[0139] The behavior setting information may include not only the angle range but also the preset speed. Alternatively, the behavior setting information may include not only the angle range but also the speed range, and the computer device may randomly select a speed from the speed range as the preset speed.
[0140] Here, an angle is randomly extracted from the angle range. For the convenience of explanation, the extracted angle is called the target angle in the embodiment of this application. Since the target angle is obtained without defining the zero direction and the positive direction, the angle at which the traffic participant enters the road cannot be uniquely determined. Therefore, the tester can pre-set the zero direction and the positive direction. For example, see Figure 6As shown, the right-hand side of the traffic participant facing the road where the test vehicle is located can be used as the zero direction, and the counterclockwise direction can be used as the positive direction. Alternatively, the left-hand side of the traffic participant facing the road where the test vehicle is located can be used as the zero direction, and the clockwise direction can be used as the positive direction. This embodiment of the application is not limited to this.
[0141] In some embodiments, after determining the random location for generating the traffic participant object, the computer device determines the side of the traffic participant object facing the road where the test vehicle is currently located relative to the traffic participant object, and uses this side as the front of the traffic participant object. Based on the front of the traffic participant object, the right-hand side direction and the left-hand side direction of the traffic participant object are determined, and the reference direction is determined according to the zero direction pre-set by the tester. For example, if the tester pre-sets the right-hand side direction as the zero direction and the counterclockwise direction as the positive direction, the right-hand side direction is determined as the reference direction here, and the angle obtained by rotating the right-hand side direction counterclockwise by the target angle can be used as the entry angle. After obtaining the entry angle, the traffic participant object is controlled to enter the road where the test vehicle is located from the random location at the entry angle and move according to the preset speed and preset path.
[0142] Among them, the maximum value in the angle range can be set by the tester. In order to determine whether the traffic participant can enter the road, the maximum value should be less than π. For example, assuming that the maximum value set by the tester is R, (0, R] can be used as the angle range in the embodiment of the present application.
[0143] In the above embodiment, an angle range can be obtained in a pre-set manner. After determining the random location for generating the traffic participant object, an angle can be randomly extracted from the angle range, and the traffic participant object can be controlled to move into the road based on the angle. Since the angle extraction process is random, the angle at which the traffic participant object enters the road is also random, which realizes the randomness of the traffic participant object in the movement dimension, making the traffic scenes encountered by the vehicle to be tested richer.
[0144] In some embodiments, the behavior setting information includes a speed range, and the step of controlling the traffic participant to start moving from a random location according to the behavior setting information includes:
[0145] The target speed is randomly extracted from the speed range, and the traffic participants are controlled to start from a random location and move according to the target speed and preset path.
[0146] Among them, after the random location for generating the traffic participant object is determined according to the range setting information, it is necessary to control the traffic participant object to move from the random location into the road. When the traffic participant object moves into the road, it faces two problems, at which speed to move, and which path to move. In order to improve the randomness of the movement of the traffic participant object, the embodiment of the present application proposes the concept of speed range. After the computer device determines the random location of the traffic participant object, it randomly extracts a speed from the speed range. For the convenience of explanation, the extracted speed is referred to as the target speed in the embodiment of the present application, and the traffic participant object is controlled to start from the random location and move according to the target speed and the preset path. The preset path can be a straight line, a curve, or other forms of routes, and the embodiment of the present application does not limit this.
[0147] The speed range includes optional speeds at which traffic participants can move from a random location. To allow traffic participants to move, the speed range does not include zero. The tester can pre-set a maximum speed, and the speed range can be determined based on the maximum speed. For example, assuming the maximum speed set by the tester is V, the speed range can be (0, R]).
[0148] In the above embodiment, a speed range can be obtained in a pre-set manner. After determining the random location for generating the traffic participant object, a speed can be randomly extracted from the speed range to control the traffic participant object to move according to the target speed and preset path. Since the speed extraction process is random, the moving speed of the traffic participant object is random, which realizes the randomness of the traffic participant object in the movement dimension, making the traffic scenes encountered by the vehicle to be tested richer.
[0149] In some embodiments, the range setting information includes a preset longitudinal distance. The simulated driving test method provided in the embodiment of the present application further includes:
[0150] Based on the position of the vehicle to be tested on the current road and the preset longitudinal distance, the predicted longitudinal position of the traffic participant object is determined; when the predicted longitudinal position does not meet the generation conditions, the traffic participant object generation event is cached until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the vehicle to be tested after driving, and the traffic participant object is generated based on the predicted longitudinal position.
[0151] Among them, when the computer device determines that the current moment is the target moment, the position of the vehicle to be tested on the current road is extended to the position of the preset longitudinal distance in the driving direction as the predicted longitudinal position of the traffic participant object, and determines whether the predicted longitudinal position meets the generation conditions. If the predicted longitudinal position meets the generation conditions, the traffic participant object is generated. If the predicted longitudinal position does not meet the generation conditions, the traffic participant object generation event is cached. As the vehicle to be tested continues to move forward, at each simulation moment, the computer device determines the corresponding predicted longitudinal position based on the current position of the vehicle to be tested and the preset longitudinal distance, and determines whether the predicted longitudinal position at this time meets the generation conditions. If it does, the traffic participant object is generated, and the next generation moment is calculated based on the current moment; if the predicted longitudinal position at this time does not meet the generation conditions, the corresponding predicted longitudinal position continues to be determined as the vehicle to be tested continues to move forward.
[0152] In some embodiments, if the predicted longitudinal position is outside the map of the simulated driving scene, or the number of predicted longitudinal positions in the simulated driving scene is greater than one, the predicted longitudinal position is determined to not meet the generation condition. If the predicted longitudinal position is within the map of the simulated driving scene and the number of predicted longitudinal positions in the simulated driving scene is unique, the predicted longitudinal position is determined to meet the generation condition. For example, see Figure 7 As shown, at the current moment, the vehicle to be tested travels to Figure 7 In the case of the position shown, according to the preset longitudinal distance x, the predicted longitudinal position of the traffic participant is calculated at point A and point B, that is, the predicted longitudinal position is not unique. Figure 8 As shown, at the current moment, the vehicle to be tested travels to Figure 8 In the case of the position shown, according to the preset longitudinal distance, the predicted longitudinal position of the traffic participant is calculated at point C, that is, the predicted longitudinal position is outside the map of the simulated driving. Figure 7 and Figure 8 None of the predicted longitudinal positions shown meet the generation conditions.
[0153] For example, assuming that at simulation time t1, the vehicle to be tested travels to position A1, and the preset longitudinal distance is extended from A1 to the driving direction of the vehicle to be tested, the predicted longitudinal positions obtained are B1 and C1. Since the number of predicted longitudinal positions is not unique, it is determined that the predicted longitudinal position at this time does not meet the generation conditions, and the traffic participant object generation event is cached. At simulation time t2 after t1, the vehicle to be tested travels to position A2, and the preset longitudinal distance is extended from A2 to the driving direction of the vehicle to be tested, and the predicted longitudinal positions obtained are B2 and C2. Since the number of predicted longitudinal positions is not unique, it is determined that the predicted longitudinal position at this time still does not meet the generation conditions. At simulation time t3 after t2, the vehicle to be tested travels to position A3, and the preset longitudinal distance is extended from A3 to the driving direction of the vehicle to be tested, and the predicted longitudinal position obtained is B3. Since the number of predicted longitudinal positions is unique and within the simulated driving map, it is determined that the predicted longitudinal position at this time meets the generation conditions. Based on the target lateral distance and B3, a random location is determined, and a traffic participant object is generated at the random location.
[0154] In the above embodiment, after determining the predicted longitudinal position of a traffic participant object based on the position of the test vehicle on the current road and the preset longitudinal distance, if the predicted longitudinal position is outside the map of the simulated driving scenario, or if there are more than one predicted longitudinal positions in the simulated driving scenario, it is determined that the predicted longitudinal position does not meet the generation conditions. The traffic participant object generation event is then cached until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the test vehicle after driving. At this point, the traffic participant object is generated based on the predicted longitudinal position. This avoids the waste of processing resources caused by generating a traffic participant object even when the predicted longitudinal position does not meet the generation conditions and controlling the movement of the traffic participant object.
[0155] In some embodiments, the step of determining the simulated driving test result based on the collision situation includes:
[0156] In the event of a collision, a collision event is recorded; and based on the recorded collision event, a simulated driving test result obtained by performing a simulated driving test on the vehicle to be tested is determined.
[0157] In some embodiments, during the driving process of the vehicle to be tested, traffic participant objects will be generated multiple times based on time setting information. For each traffic participant object generated, the computer device can determine whether the vehicle to be tested collides with the traffic participant object. If a collision occurs, the collision event is recorded. After the simulation is completed, the number of collision events is counted. If the number of collision events exceeds a preset threshold, the test result is determined to be failed, and the decision planning algorithm needs to be optimized. If the number of collision events is less than or equal to the preset threshold, the test result is determined to be passed.
[0158] In some embodiments, the recorded collision event may include actions performed by traffic participants when the collision occurs, and the actions may be used to subsequently optimize the decision-making planning algorithm.
[0159] In the above embodiment, while a traffic participant is in motion, the vehicle under test is detected to see if it collides with the participant; if so, the collision event is recorded; and based on the recorded collision event, the test result of the simulated driving test of the vehicle under test is determined. Because the movements performed by the traffic participant are random and cover a wide range of traffic scenarios, the resulting test results are more accurate.
[0160] In some embodiments, a simulated driving test method is provided, the method comprising the following steps:
[0161] The preset traffic participant object generation information is obtained, where the traffic participant object generation information includes time setting information, range setting information, and behavior setting information.
[0162] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario.
[0163] The time setting information includes at least one time interval distributed according to a preset function, and a target time interval is determined from the at least one time interval; the previous moment when a traffic participant object was generated for the vehicle to be tested is obtained, and the duration between the previous moment and the current moment is determined; when the duration is the target time interval, the current moment is determined to be the target moment.
[0164] The range setting information includes the longitudinal range, obtains the target lateral distance, and randomly extracts the target longitudinal distance from the longitudinal range; and takes the position of the target longitudinal distance in front of the test vehicle and the target lateral distance from the outer edge of the road where the test vehicle is currently located as the random location.
[0165] Alternatively, the range setting information includes a lateral range, obtains a target longitudinal distance, and randomly extracts the target lateral distance from the lateral range; and uses a location that is both the target longitudinal distance in front of the test vehicle and the target lateral distance from the outer edge of the road where the test vehicle is currently located as the random location. The lateral range is determined by a first threshold and a second threshold, the first threshold being less than the second threshold. The first threshold is the distance from the center point of the traffic participant to the outer edge of the road where the test vehicle is located, provided that the traffic participant is tangent to the outer edge of the road where the test vehicle is located, and the second threshold is a preset value.
[0166] The behavior setting information includes an angle range, and a target angle is randomly extracted from the angle range; a reference direction is determined based on the orientation of the road where the vehicle to be tested is currently located relative to the traffic participant; an entry angle is determined based on the reference direction and the target angle; the traffic participant is controlled to enter the current road at a random location with the entry angle, and move at a preset speed and a preset path, so that the traffic participant passes in front of the vehicle to be tested.
[0167] Alternatively, the behavior setting information includes a speed range, and a target speed is randomly extracted from the speed range; the traffic participant is controlled to start from a random location and move according to the target speed and a preset path, so that the traffic participant passes in front of the vehicle to be tested.
[0168] Based on the current position of the test vehicle on the road and the preset longitudinal distance, the predicted longitudinal position of the traffic participant object is determined. If the predicted longitudinal position is outside the map of the simulated driving scenario, or if there are more than one predicted longitudinal position in the simulated driving scenario, it is determined that the predicted longitudinal position does not meet the generation conditions. The traffic participant object generation event is cached until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the test vehicle after driving. At this time, the traffic participant object is generated based on the predicted longitudinal position.
[0169] During the movement of traffic participants, it is detected whether the vehicle to be tested collides with the traffic participants, and the collision event is recorded in the event of a collision; based on the recorded collision event, a simulated driving test result obtained by performing a simulated driving test on the vehicle to be tested is determined.
[0170] The simulated driving test method provided by the embodiment of the present application first obtains pre-set traffic participant object generation information, which includes time setting information, range setting information and behavior setting information. The time setting information can be used to determine the random time point for generating the traffic participant object, the range setting information can be used to determine the random location for generating the traffic participant object, and the behavior setting information can be used to determine the random action of the traffic participant object. After determining the vehicle to be tested in a driving state in the simulated driving scene, when the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, a traffic participant object is generated at the random location, and the traffic participant object is controlled to start moving from the random location according to the behavior setting information so that the traffic participant object passes in front of the vehicle to be tested. During the movement of the traffic participant object, it is detected whether the vehicle to be tested collides with the traffic participant object, and the simulated driving test result is determined based on the collision situation. The method provided by the embodiment of the present application realizes the randomness of the three dimensions of generation time, generation location and execution action. Compared with the method of manually defining movement behavior, the traffic scenes encountered by the vehicle to be tested are richer and the simulated driving test results are more accurate.
[0171] In one possible scenario, the traffic participant represents a pedestrian, and the simulated driving scene includes multiple vehicles. The tester can pre-set the pedestrian generation information for each vehicle. It should be noted that the pedestrian generation information corresponding to each vehicle can be the same or different, and this embodiment of the application does not limit this. Figure 9 As shown in the figure, after the simulation begins, it prepares to randomly generate pedestrians. First, at the current simulation time, each vehicle is traversed. For the current vehicle, it is determined whether the current simulation time is the target time for the current vehicle, that is, whether the current time is the time when pedestrians need to be generated for the current vehicle. If so, the current vehicle is used as the test vehicle. If the current simulation time is not the target time for all vehicles, the simulation time is continued, and the total simulation time is determined in real time. If the total simulation time has expired, the simulation ends. If the total simulation time has not expired, other simulation modules are executed.
[0172] If multiple vehicles to be tested are identified through the above traversal, the following processing is performed on each of the multiple vehicles to be tested. A determination is made as to whether the next pedestrian-generated event has already occurred. If not, the next pedestrian-generated event's occurrence time is calculated based on the time setting information corresponding to the vehicle to be tested. If the next pedestrian-generated event's occurrence time has already occurred, a further determination is made as to whether a pedestrian-generated event has already been stored in the event buffer corresponding to the vehicle to be tested. Furthermore, if the next pedestrian-generated event's occurrence time has been calculated, a further determination is made as to whether a pedestrian-generated event has already been stored in the event buffer corresponding to the vehicle to be tested.
[0173] If a pedestrian-generated event is already stored in the event buffer, a predicted longitudinal position is determined based on the current position of the test vehicle on the road and the preset longitudinal distance, and a determination is made as to whether the predicted longitudinal position is feasible. If so, the pedestrian is controlled to perform the corresponding action according to the corresponding behavior setting information. Based on the current time and the time setting information, the time for the next pedestrian-generated event is determined, and the process returns to the step of iterating through each vehicle. If the predicted longitudinal position is not feasible, a determination is made as to whether the range setting information contains the preset longitudinal distance. If the range setting information does not contain the preset longitudinal distance but a longitudinal range, the furthest feasible position is determined based on the current position of the test vehicle on the road. At the furthest feasible position, the pedestrian is controlled to perform the corresponding action according to the corresponding behavior setting information. If the range setting information contains the preset longitudinal distance, a determination is again made as to whether a pedestrian-generated event is already stored in the event buffer. If the determination is that a pedestrian-generated event is already stored in the event buffer, the process returns to the step of iterating through each vehicle. If the determination is that no pedestrian-generated event is stored in the event buffer, the generated event is stored in the event buffer, and the process returns to the step of iterating through each vehicle.
[0174] If there are no pedestrian-generated events in the event buffer, the current moment is determined to be the target moment for the vehicle under test. If so, a random location is determined in front of the vehicle under test according to the corresponding range settings, and a pedestrian is generated at the random location. The process then determines whether the predicted longitudinal position is feasible. If the current moment is not the target moment for the vehicle under test, the process returns to the step of looping through each vehicle.
[0175] In another possible scenario, the algorithm corresponding to the simulated driving test method provided in the embodiment of the present application can be embedded in the micro-simulation software TAD Sim. The micro-simulation software TAD Sim includes a virtual city simulation environment, and the above algorithm can be executed when the virtual city simulation environment is running. Based on the purpose of generating pedestrians in the virtual city simulation environment, the following assumptions can be made: 1. In a pedestrian generation event, only one pedestrian appears in front of the vehicle to be tested. 2. Pedestrians are represented by ellipses in the virtual city simulation environment. 3. In order to avoid pedestrians suddenly appearing in the middle of the road, the initial position of the pedestrian (random location) is located outside the edge of the road. 4. It is assumed that after the pedestrian appears outside the edge of one side of the road, it enters the road and walks at a preset speed and angle, and disappears from the simulation environment after reaching the other side of the road. Here, only the movement of pedestrians in a two-dimensional plane is considered. 5. After the pedestrian is generated, if a collision occurs with the vehicle to be tested, the collision event can be recorded. There is no limitation on how to determine whether it is a collision and how to record it. 6. If there are multiple vehicles to be tested in the simulation environment, the pedestrian generation events corresponding to each vehicle to be tested are calculated separately.
[0176] Based on the above assumptions, the tester can set the time setting information, range setting information and behavior setting information. For the vehicle to be tested in the simulation environment, when the current time is determined as the target time based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location; the traffic participant object is controlled to perform corresponding actions according to the behavior setting information to perform a simulated driving test on the vehicle to be tested.
[0177] It can be understood that the above-mentioned application scenarios are used to help illustrate the solutions of this application, and are not used to limit the application scenarios of this application. The simulation driving test method of this application can also be applied to simulation environments such as virtual highways and virtual villages, and the embodiments of this application are not limited to this.
[0178] In the above embodiment, randomness of pedestrians in three dimensions, namely, generation time, generation location, and execution action, is achieved. Compared with the method of manually defining motion behavior, the traffic scenarios encountered by the tested vehicle are richer, and the simulated driving test results are more accurate.
[0179] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0180] Based on the same inventive concept, the present application also provides a simulated driving test device for implementing the aforementioned simulated driving test method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more simulated driving test device embodiments provided below can be found in the aforementioned limitations of the simulated driving test method and will not be further elaborated here.
[0181] In some embodiments, as Figure 10 As shown, a simulated driving test device is provided, comprising: an acquisition module 101, a determination module 102, a generation module 103 and a control module 104, wherein:
[0182] The acquisition module 101 is used to acquire preset traffic participant object generation information, where the traffic participant object generation information includes time setting information, range setting information, and behavior setting information.
[0183] The determination module 102 is configured to determine a vehicle to be tested that is in a driving state in a simulated driving scenario.
[0184] The generating module 103 is configured to determine a random location in front of the vehicle to be tested according to the range setting information when the current time is determined to be the target time based on the time setting information, and generate a traffic participant object at the random location.
[0185] The control module 104 is used to control the traffic participant to move from a random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested; during the movement of the traffic participant, detect whether the vehicle to be tested collides with the traffic participant, and determine the simulation driving test result based on the collision situation.
[0186] In some embodiments, the determination module 102 is specifically configured to: traverse each vehicle in the simulated driving scene, and for a current vehicle currently traversed, if the current vehicle is in a driving state, use the current vehicle as a vehicle to be tested.
[0187] In some embodiments, the time setting information includes at least one time interval that obeys a preset function distribution, and the generation module 103 is further used to: determine a target time interval from the at least one time interval; obtain the previous moment when the traffic participant object was generated for the vehicle to be tested, and determine the duration between the previous moment and the current moment; when the duration is the target time interval, determine the current moment as the target moment.
[0188] In some embodiments, the range setting information includes a longitudinal range, and the generation module 103 is specifically used to obtain the target lateral distance and randomly extract the target longitudinal distance from the longitudinal range; the position that is the target longitudinal distance in front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located is used as a random location.
[0189] In some embodiments, the range setting information includes a lateral range, and the generation module 103 is specifically used to: obtain the target longitudinal distance and randomly extract the target lateral distance from the lateral range; and take the position that is the target longitudinal distance in front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located as a random location.
[0190] In some embodiments, the lateral range is determined by a first threshold and a second threshold, the first threshold being smaller than the second threshold, wherein the first threshold is the distance from the center point of the traffic participant object to the outer edge of the road when the traffic participant object is tangent to the outer edge of the road where the vehicle to be tested is located, and the second threshold is a pre-set value.
[0191] In some embodiments, the behavior setting information includes an angle range, and the control module 104 is specifically used to: randomly extract a target angle from the angle range; determine a reference direction based on the orientation of the road where the vehicle to be tested is currently located relative to the traffic participant; determine an entry angle based on the reference direction and the target angle; control the traffic participant to enter the current road at a random location with the entry angle, and move at a preset speed and a preset path.
[0192] In some embodiments, the behavior setting information includes a speed range, and the control module 104 is specifically configured to: randomly extract a target speed from the speed range; and control the traffic participant to start from a random location and move according to the target speed and a preset path.
[0193] In some embodiments, the range setting information includes a preset longitudinal distance, and the control module 104 is further used to: determine the predicted longitudinal position of the traffic participant object based on the position of the vehicle to be tested on the current road and the preset longitudinal distance; if the predicted longitudinal position does not meet the generation conditions, cache the traffic participant object generation event until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the vehicle to be tested after driving, and then generate the traffic participant object based on the predicted longitudinal position.
[0194] In some embodiments, the control module 104 is further configured to: determine that the predicted longitudinal position does not meet the generation condition when the predicted longitudinal position is outside the map of the simulated driving scenario or the number of predicted longitudinal positions in the simulated driving scenario is greater than one.
[0195] In some embodiments, the control module 104 is specifically configured to: record a collision event in the event of a collision; and determine a simulated driving test result obtained by performing a simulated driving test on the vehicle to be tested based on the recorded collision event.
[0196] Each module in the aforementioned simulated driving test device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor within a computer device in hardware form, or stored in a computer device memory in software form, allowing the processor to call and execute the corresponding operations of each module.
[0197] In some embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 11As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a simulated driving test method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0198] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0199] In some embodiments, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0200] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0201] In some embodiments, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0202] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0203] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0204] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A simulated driving test method, characterized in that: The method comprises: Acquire preset traffic participant object generation information, wherein the traffic participant object generation information includes time setting information, range setting information, and behavior setting information; Determine the vehicle to be tested that is in a driving state in the simulated driving scenario; When the current moment is determined as the target moment based on the time setting information, a random location is determined in front of the vehicle to be tested according to the range setting information, and a traffic participant object is generated at the random location; Controlling the traffic participant to start moving from the random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested; During the movement of the traffic participant object, it is detected whether the vehicle to be tested collides with the traffic participant object, and a simulation driving test result is determined based on the collision situation.
2. The method according to claim 1, characterized in that The step of determining the vehicle to be tested that is in a driving state in the simulated driving scenario includes: Each vehicle in the simulated driving scene is traversed, and for a current vehicle currently traversed, when the current vehicle is in a driving state, the current vehicle is used as the vehicle to be tested.
3. The method according to claim 1, characterized in that The time setting information includes at least one time interval distributed according to a preset function. When determining the current time as the target time based on the time setting information, determining a random location in front of the vehicle to be tested according to the range setting information. Before generating a traffic participant object at the random location, the method further includes: determining a target time interval from the at least one time interval; Obtaining a previous moment when a traffic participant object was last generated for the vehicle to be tested, and determining a duration between the previous moment and the current moment; When the duration is the target time interval, the current moment is determined to be the target moment.
4. The method according to claim 1, wherein The range setting information includes a longitudinal range, and determining a random location in front of the vehicle to be tested according to the range setting information includes: Obtaining a target lateral distance, and randomly extracting a target longitudinal distance from the longitudinal range; A position that is the target longitudinal distance from the front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located is used as a random location.
5. The method according to claim 1, wherein The range setting information includes a lateral range, and determining a random location in front of the vehicle to be tested according to the range setting information includes: Obtaining a target longitudinal distance, and randomly extracting a target lateral distance from the lateral range; A position that is the target longitudinal distance from the front of the vehicle to be tested and the target lateral distance from the outer edge of the road where the vehicle to be tested is currently located is used as a random location.
6. The method according to claim 5, characterized in that The lateral range is determined by a first threshold and a second threshold, the first threshold is smaller than the second threshold, wherein the first threshold is the distance from the center point of the traffic participant object to the outer edge of the road when the traffic participant object is tangent to the outer edge of the road where the vehicle to be tested is located, and the second threshold is a preset value.
7. The method according to claim 1, characterized in that The behavior setting information includes an angle range, and controlling the traffic participant object to start moving from the random location according to the behavior setting information includes: randomly extracting a target angle from the angle range; Determining a reference direction based on the orientation of the road currently located by the vehicle to be tested relative to the traffic participant; determining an entry angle based on the reference direction and the target angle; The traffic participant object is controlled to enter the current road at the random location at the entry angle and to move at a preset speed and along a preset path.
8. The method according to claim 1, characterized in that The behavior setting information includes a speed range, and controlling the traffic participant to start moving from the random location according to the behavior setting information includes: randomly extracting a target speed from the speed range; The traffic participant object is controlled to start from the random location and move according to the target speed and preset path.
9. The method according to claim 1, characterized in that The range setting information includes a preset longitudinal distance, and the method further includes: Determining a predicted longitudinal position of the traffic participant based on the position of the vehicle to be tested on the current road and the preset longitudinal distance; When the predicted longitudinal position does not meet the generation conditions, the traffic participant object generation event is cached until the corresponding predicted longitudinal position is determined to meet the generation conditions based on the position of the vehicle to be tested after traveling, and then the traffic participant object is generated based on the predicted longitudinal position.
10. The method according to claim 9, characterized in that The method further comprises: In a case where the predicted longitudinal position is outside the map of the simulated driving scenario, or the number of the predicted longitudinal positions in the simulated driving scenario is greater than one, it is determined that the predicted longitudinal position does not meet the generation condition.
11. The method according to any one of claims 1 to 10, characterized in that Determining the simulated driving test result based on the collision situation includes: Record the collision event in the event of a collision; Based on the recorded collision event, a simulated driving test result obtained by performing a simulated driving test on the vehicle to be tested is determined.
12. A simulated driving test device, characterized in that: The device comprises: An acquisition module, configured to acquire preset traffic participant object generation information, wherein the traffic participant object generation information includes time setting information, range setting information, and behavior setting information; A determination module, used to determine the vehicle to be tested that is in a driving state in the simulated driving scenario; A generating module, configured to, when determining the current moment as the target moment based on the time setting information, determine a random location in front of the vehicle to be tested according to the range setting information, and generate a traffic participant object at the random location; A control module is used to control the traffic participant to start moving from the random location according to the behavior setting information so that the traffic participant passes in front of the vehicle to be tested; during the movement of the traffic participant, detect whether the vehicle to be tested collides with the traffic participant, and determine the simulation driving test result based on the collision situation.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Processing method and device for driving simulation scene and storage medium
CN110118661A
Driving simulation method and device and storage medium
CN110245406A