Simulated driving test method, device, computer equipment and storage medium
By obtaining lane change setting information and randomly selecting vehicle entry behaviors, the problem of insufficient scenario exhaustiveness in traditional simulated driving tests is solved, achieving more accurate test results.
Patent Information
- Application Number
- CN202210793816.9
- 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
The traditional manually defined vehicle entry method is difficult to exhaust the traffic scenarios encountered during real driving during the simulation process, resulting in inaccurate simulation driving test results.
By obtaining the pre-set lane change setting information, including time, range and entry behavior information, randomly selecting target behavior information, controlling the vehicle to cut into the lane where the vehicle to be tested is located, and detecting the collision result to determine the test result.
It enables comprehensive testing of the driving decision-making algorithm of the test vehicle, explores various types of scenarios, and improves the accuracy of simulated driving tests.
Smart Images

Figure CN115218915B_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 traffic scenario such as a lane change, it makes driving decisions based on its decision-making and planning algorithms. Therefore, it is crucial to test these algorithms before they are actually deployed. This can be tested through simulation, which involves cutting in front of the vehicle being tested.
[0003] Traditionally, vehicles cutting in front of the vehicle under test and their cutting-in behavior are manually defined. During simulation, the corresponding vehicle is controlled to cut in front of the vehicle under test based on these manually defined cutting-in vehicles and cutting-in behaviors. However, this manually defined approach struggles 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 preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in 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 triggering cut-in vehicle is determined from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information;
[0009] Randomly select target behavior information based on the entry behavior setting information;
[0010] When the target behavior information meets the lane cutting condition, the triggering cutting vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information;
[0011] Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0012] On the other hand, the present application also provides a simulated driving test device. The device includes:
[0013] An acquisition module, configured to acquire preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in behavior setting information;
[0014] A first determination module is used to determine a vehicle to be tested that is in a driving state in a simulated driving scenario;
[0015] a second determining module configured to, when determining based on the time setting information that the current moment is the target moment, determine, based on the range setting information, a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located;
[0016] A selection module, configured to randomly select target behavior information based on the entry behavior setting information;
[0017] A control module is used to control the triggering cut-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information when the target behavior information meets the lane cut-in condition;
[0018] The detection module is used to detect whether the vehicle to be tested collides with the triggering vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0019] In some embodiments, the first determination module is specifically configured to: traverse each vehicle in the simulated driving scene, and for a current vehicle currently traversed, when the current vehicle is in a driving state, use the current vehicle as a vehicle to be tested.
[0020] In some embodiments, the time setting information includes at least one time interval that obeys a first preset distribution, and the second determination module is further used to: determine a target time interval from the at least one time interval; obtain the previous moment when the vehicle to be tested was last triggered to cut in, and determine the duration between the previous moment and the current moment; if the duration is the target time interval, determine the current moment as the target moment.
[0021] In some embodiments, the second determination module is further used to: determine whether the vehicle to be tested meets the conditions for being cut in; if the vehicle to be tested does not meet the conditions for being cut in, cache the cut-in event; when it is determined that the vehicle to be tested has traveled to a position that meets the conditions for being cut in, execute the step of determining the triggering vehicle to cut in from vehicles traveling in a lane different from the lane where the vehicle to be tested is located based on the range setting information.
[0022] In some embodiments, the range setting information includes a longitudinal range, and the second determination module is specifically used to: randomly extract a target longitudinal distance from the longitudinal range; take a position in front of the vehicle to be tested on a lane different from the lane where the vehicle to be tested is located, at a longitudinal distance from the vehicle to be tested that is the target longitudinal distance, as the first position; in a lane different from the lane where the vehicle to be tested is located, search for vehicles in motion from the first position along the opposite direction of the lane, and if the currently found vehicle is not in the process of changing lanes, use the currently found vehicle as the trigger vehicle to cut in.
[0023] In some embodiments, the second determination module is also used for: when searching for a vehicle in motion from the first position along the opposite direction of the lane, if no triggering vehicle for cutting in is found, the cutting-in event is cached, and the first position is updated as the vehicle to be tested travels, until a triggering vehicle for cutting in can be found from the updated first position along the opposite direction of the lane, and then the step of randomly selecting target behavior information based on the cutting-in behavior setting information is executed.
[0024] In some embodiments, the selection module is specifically used to: generate a duration set that conforms to a second preset distribution with a preset cut-in duration as the mean; randomly extract a target duration from the duration set, and use the target duration as target behavior information.
[0025] In some embodiments, the control module is also used to: determine the first longitudinal driving distance of the triggering vehicle during the cutting-in process based on the maximum speed and target duration of the lane in which the vehicle to be tested is located; determine the second position of the triggering vehicle after the cutting-in is completed based on the current position of the triggering vehicle and the first longitudinal driving distance; and determine that the target duration meets the lane cutting-in condition when the second position is on the road where the vehicle to be tested is currently located.
[0026] In some embodiments, the control module is also used to: when the second position is not on the road where the vehicle to be tested is currently located, determine the second longitudinal driving distance of the triggering vehicle during the cut-in process according to the maximum speed of the lane where the vehicle to be tested is located and the preset shortest lane change time; determine the third position of the triggering vehicle after the cut-in is completed according to the current position of the triggering vehicle and the second longitudinal driving distance; when the third position is on the road where the vehicle to be tested is currently located, use the shortest lane change time as the target behavior information, and determine that the target behavior information meets the lane cut-in condition.
[0027] In some embodiments, the control module is specifically used to: determine the lateral driving distance of the triggering cutting-in vehicle during the cutting-in process based on the lane in which the vehicle to be tested is located and the lane in which the triggering cutting-in vehicle is located; determine the lateral driving speed of the triggering cutting-in vehicle during the cutting-in process based on the lateral driving distance and target behavior information; obtain the longitudinal driving speed of the triggering cutting-in vehicle during the cutting-in process; and control the triggering cutting-in vehicle to cut into the lane in which the vehicle to be tested is located according to the lateral driving speed and the longitudinal driving speed.
[0028] In some embodiments, the detection module is specifically configured to: record a collision event in the event of a collision; and determine a test result obtained by performing a simulated driving test on the vehicle to be tested based on the recorded collision event.
[0029] 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:
[0030] Obtaining preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in behavior setting information;
[0031] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0032] When the current moment is determined as the target moment based on the time setting information, a triggering cut-in vehicle is determined from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information;
[0033] Randomly select target behavior information based on the entry behavior setting information;
[0034] When the target behavior information meets the lane cutting condition, the triggering cutting vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information;
[0035] Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0036] 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:
[0037] Obtaining preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in behavior setting information;
[0038] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0039] When the current moment is determined as the target moment based on the time setting information, a triggering cut-in vehicle is determined from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information;
[0040] Randomly select target behavior information based on the entry behavior setting information;
[0041] When the target behavior information meets the lane cutting condition, the triggering cutting vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information;
[0042] Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0043] 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:
[0044] Obtaining preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in behavior setting information;
[0045] Determine the vehicle to be tested that is in a driving state in the simulated driving scenario;
[0046] When the current moment is determined as the target moment based on the time setting information, a triggering cut-in vehicle is determined from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information;
[0047] Randomly select target behavior information based on the entry behavior setting information;
[0048] When the target behavior information meets the lane cutting condition, the triggering cutting vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information;
[0049] Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0050] The simulated driving test method, apparatus, computer device, storage medium, and computer program product described above first obtain pre-set lane change setting information, which includes time setting information, range setting information, and cut-in behavior setting information. The time setting information can be used to determine a random time point for executing a vehicle cut-in event, the range setting information can be used to determine a random vehicle that cuts in front of the vehicle under test, and the cut-in behavior setting information can be used to determine a random cut-in behavior. After determining the vehicle under test that is in a driving state in the simulated driving scenario, when the current time is determined as a target time based on the time setting information, a triggering cut-in vehicle can be determined from vehicles traveling in a lane different from the lane in which the vehicle under test is located; and target behavior information is randomly selected based on the cut-in behavior setting information. When the target behavior information meets the lane cut-in condition, the triggering cut-in vehicle is controlled to cut into the lane in which the vehicle under test is located according to the target behavior information. Simultaneously, a detection is performed to determine whether the vehicle under test has collided with the triggering cut-in vehicle, and a test result of the simulated driving test for the vehicle under test is determined based on the detection result. In this way, triggering the cut-in behavior of the vehicle will generate a number of traffic scenarios, simulating various road conditions that the vehicle may encounter during driving, and then conducting a simulated driving test based on the test vehicle's response. This can proactively discover various types of scenarios, such as some extreme scenarios that cannot be set manually, to help enrich the scenario library, thereby achieving the purpose of testing the driving decision-making algorithm of the test vehicle and making the simulated driving test results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A diagram showing an application environment of a simulated driving test method in one embodiment;
[0052] Figure 2 is a schematic diagram of a vehicle cutting in according to one embodiment;
[0053] Figure 3 1 is a flow chart of a simulated driving test method according to an embodiment;
[0054] Figure 4 An example diagram of determining a triggering cut-in vehicle in one embodiment;
[0055] Figure 5 A schematic diagram of an embodiment in which the target longitudinal distance is not feasible;
[0056] Figure 6 A schematic diagram of another embodiment in which the target longitudinal distance is not feasible;
[0057] Figure 7 This is an example diagram of determining whether target behavior information meets lane cutting conditions in one embodiment;
[0058] Figure 8A schematic flow chart of a simulated driving test method according to another embodiment;
[0059] Figure 9 is a structural block diagram of a simulated driving test device in one embodiment;
[0060] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] 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.
[0062] 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 the 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 simulated driving test method provided in each embodiment of the present application can be executed by the terminal 102 or the server 104 alone, or it can be executed by the terminal 102 and the server 104 in collaboration. Take the terminal alone as an example for explanation: See Figure 2 As shown, the embodiment of the present application simulates a scenario in which a vehicle in another lane ahead of the vehicle cuts into the lane where the vehicle is located while the vehicle is driving. The embodiment of the present application can achieve the simulation of this scenario through the following process: the tester can set relevant parameters through the visual interface provided by the terminal, and the terminal can generate lane change setting information based on these parameters. The lane change setting information includes time setting information, range setting information, and cutting-in behavior setting information. The terminal can be equipped with a simulation system for verifying the decision-making planning algorithm. When the simulation system is running, a simulated driving scenario can be generated. The terminal can determine the vehicle to be tested that is in a driving state in the simulated driving scenario. When the current moment is determined to be the target moment based on the time setting information, the terminal can determine the triggering cutting-in vehicle from the vehicles driving in a lane different from the lane where the vehicle to be tested is located based on the range setting information. Then, the target behavior information is randomly selected based on the cutting-in behavior setting information. When the target behavior information meets the lane cutting condition, the triggering cutting-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information. At the same time, it is detected whether the vehicle to be tested collides with the triggering vehicle, and the test result of the simulated driving test of the vehicle to be tested is determined based on the detection result. The simulated driving test method provided in the embodiment of the present application can cover most lane change scenarios, and the test results are more accurate.
[0063] Among them, the terminal 102 can be, but is not limited to, various computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this. The method provided in the embodiment of the present application can be applied in the field of autonomous driving, and the vehicle mentioned in the embodiment of the present application can be an autonomous driving vehicle.
[0064] In some embodiments, as Figure 3 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:
[0065] S302: Obtain preset lane change setting information, where the lane change setting information includes time setting information, range setting information, and cut-in behavior setting information.
[0066] The computer device may provide a visual interface through which the tester may set lane change setting information. Alternatively, the tester may set relevant parameters through the visual interface, and the computer device may generate lane change setting information based on these parameters. This embodiment of the present application is not limited to this.
[0067] Among them, in order to control the time point of the vehicle cutting-in event in front of the vehicle to be tested, the embodiment of the present application proposes the concept of time setting information, which may include the time interval between two adjacent vehicle cutting-in events.
[0068] In some embodiments, the tester can set a fixed time interval through the visual interface provided by the computer device, and the computer device can use the time interval as time setting information. After the simulation starts, the computer device performs a vehicle cut-in event in front of the vehicle to be tested every time interval.
[0069] Specifically, after the last vehicle cut-in event, at each moment, the computer device determines whether the time interval between that moment and the previous vehicle cut-in event is exceeded. If so, the computer device determines that moment as the target moment, i.e., the time at which the vehicle cut-in event is to be executed again. In this case, since the time interval is fixed, the times at which the vehicle cut-in events are executed are evenly spaced. For example, if a vehicle cut-in event is executed at time T, the times at which subsequent vehicle cut-in events are executed are 2T, 3T, 4T, ..., nT.
[0070] Among them, after the simulation starts, the moment when the computer device executes the vehicle cut-in event 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.
[0071] In some embodiments, the tester can set a mathematical expectation of a time interval through a visual interface provided by a computer device. The computer device can generate at least one time interval that obeys a first preset distribution based on the mathematical expectation. The computer device can use the at least one time interval as time setting information, and the time interval between two adjacent vehicle cut-in events can be any of the time intervals.
[0072] Specifically, after the last vehicle cut-in event is executed, at each moment, the computer device may select a time interval from the at least one time interval and determine whether the selected time interval exists between the current moment and the time of the last vehicle cut-in event. If so, the computer device determines the current moment as the target moment, i.e., the time at which the vehicle cut-in event is executed again. In this case, since the at least one time interval is different, the times at which the vehicle cut-in events are executed are randomly distributed.
[0073] Exemplarily, the first preset distribution may be an exponential distribution, and at least one time interval may obey the following exponential distribution:
[0074] P(X>t)=e -t / T
[0075] Where T is the mathematical expectation of the time interval and P is the probability that the time interval is greater than t.
[0076] Among them, in order to achieve control over the vehicle that cuts in front of the vehicle to be tested, the embodiment of the present application proposes the concept of range setting information. In the embodiment of the present application, 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 longitudinal direction. In order to achieve the randomness of the vehicle that cuts in front of the vehicle to be tested, in some embodiments, the tester can set a longitudinal distance threshold through a visual interface provided by a computer device. The computer device can generate a longitudinal range based on the longitudinal distance threshold, and use the longitudinal range as the range setting information. When determining the triggering vehicle to cut in, a distance can be randomly extracted from the longitudinal range, and based on the distance, the triggering vehicle to cut in is determined.
[0077] In some embodiments, the tester can set a fixed longitudinal distance through a visual interface provided by the computer device, and the computer device can use the preset longitudinal distance as the range setting information. When determining the triggering cut-in vehicle, the triggering cut-in vehicle can be determined based on the preset longitudinal distance.
[0078] In some embodiments, the tester can set the longitudinal time spacing threshold through the visual interface provided by the computer device. The time spacing here can be the collision time (Time-To-Collision, abbreviated as TTC). The computer device can generate a longitudinal range based on the longitudinal time spacing threshold and use the longitudinal range as the range setting information.
[0079] In order to control the cutting-in behavior of a vehicle that cuts in front of the vehicle to be tested during the cutting-in process, the embodiment of the present application proposes the concept of behavior setting information.
[0080] In some embodiments, considering that when a vehicle cuts into another lane from the current lane, it involves lateral speed and longitudinal speed, the lateral speed is the speed of the vehicle in the vertical direction of the road, and the longitudinal speed is the speed of the vehicle in the direction of the road. The embodiment of the present application proposes that the tester can set a cut-in time through the visual interface provided by the computer device, and the computer device can use the preset cut-in time as the cut-in behavior setting information. The computer device can generate a corresponding duration set based on the preset cut-in duration, and then randomly extract the target duration from the duration set, and use the target duration as the target behavior information, or directly use the preset cut-in duration as the target behavior information.
[0081] In some embodiments, the tester can set at least one of the cut-in lateral speed, the cut-in longitudinal speed, or the cut-in trajectory through a visual interface provided by a computer device, and the computer device can use at least one of the preset cut-in lateral speed, the preset cut-in longitudinal speed, or the preset cut-in trajectory as the cut-in behavior setting information.
[0082] S304: Determine a vehicle to be tested that is in a driving state in the simulated driving scenario.
[0083] 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.
[0084] S306 : When the current time is determined as the target time based on the time setting information, a triggering cut-in vehicle is determined from vehicles traveling in a lane different from the lane where the vehicle to be tested is located according to the range setting information.
[0085] 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 of the last vehicle cut-in event.
[0086] Among them, the lane different from the lane in which the vehicle to be tested is located can be the lane to the left of the lane in which the vehicle to be tested is located, or it can be the lane to the right of the lane in which the vehicle to be tested is located. This embodiment of the present application is not limited to this. The left and right here can be defined from the driver's perspective.
[0087] In some embodiments, when the range setting information includes a longitudinal range, the computer device may randomly extract a distance from the longitudinal range, and determine a triggering vehicle to cut in based on the extracted distance in a lane different from the lane in which the vehicle to be tested is located.
[0088] In some embodiments, when the range setting information includes a preset longitudinal distance, the computer device may determine a triggering vehicle for cutting in based on the preset longitudinal distance in a lane different from the lane in which the vehicle to be tested is located. Specifically, the computer device may determine a first position in a lane different from the lane in which the vehicle to be tested is located based on the preset longitudinal distance, and then, based on the first position, search sequentially along the lane in the opposite direction for a vehicle that is in motion and not in the process of changing lanes, using the found vehicle as the triggering vehicle for cutting in. Alternatively, the computer device may directly determine whether a vehicle that is in motion and not in the process of changing lanes exists at the first position. If so, the computer device may determine the vehicle that is in motion and not in the process of changing lanes.
[0089] In some embodiments, the computer device can determine whether the vehicle is in the process of changing lanes by whether the vehicle's lateral speed is 0. Specifically, if the vehicle's lateral speed is not 0, it can be determined that the vehicle is in the process of changing lanes. If the vehicle's lateral speed is 0, it can be determined that the vehicle is not in the process of changing lanes.
[0090] S308: Randomly select target behavior information based on the entry behavior setting information.
[0091] In some embodiments, when the cut-in behavior setting information includes a preset cut-in duration, the computer device can generate a corresponding duration set based on the preset cut-in duration, and can randomly extract a target duration from the duration set and use the target duration as the target behavior information, or directly use the preset cut-in duration as the target behavior information.
[0092] In some embodiments, when the cut-in behavior setting information includes a preset cut-in lateral speed, a preset cut-in longitudinal speed, and a preset cut-in trajectory, the computer device can directly use the preset cut-in lateral speed, the preset cut-in longitudinal speed, and the preset cut-in trajectory as target behavior information.
[0093] S3010: When the target behavior information satisfies the lane cutting condition, control the triggering cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information.
[0094] In some embodiments, when the target behavior information includes a target duration randomly extracted from a duration set, the computer device can calculate the longitudinal distance that the triggered cutting-in vehicle needs to travel during the cutting-in process based on the maximum speed of the lane in which the vehicle to be tested is located and the randomly extracted target duration, and based on the longitudinal distance, determine whether the position of the triggered cutting-in vehicle after completing the cutting-in is on the road where the vehicle to be tested is located. If so, it is determined that the randomly extracted target duration meets the lane cutting-in condition; if not, it is determined that the randomly extracted target duration does not meet the lane cutting-in condition.
[0095] In some embodiments, after determining that the randomly extracted target duration meets the conditions for lane cutting, the computer device can obtain the lateral distance that needs to be traveled during the lane cutting process to trigger the vehicle to cut in, and determine the lateral driving speed during the cutting in process based on the lateral distance and the randomly extracted target duration. The vehicle can be controlled to cut in front of the vehicle to be tested according to the lateral driving speed and the longitudinal driving speed obtained based on the following algorithm.
[0096] In some embodiments, when the target behavior information includes a preset cut-in time, the computer device can calculate the longitudinal distance that the triggering cutting-in vehicle needs to travel during the cut-in process based on the maximum speed of the lane in which the vehicle to be tested is located and the preset cut-in time, and determine based on the longitudinal distance whether the position of the triggering cutting-in vehicle after completing the cut-in is on the road where the vehicle to be tested is located. If so, it is determined that the preset cut-in time meets the lane cut-in condition; if not, it is determined that the preset cut-in time does not meet the lane cut-in condition.
[0097] In some embodiments, after determining that a preset cut-in time meets the conditions for lane cutting, the computer device can obtain the lateral distance that needs to be traveled during the cut-in process to trigger the vehicle to cut in, and based on the lateral distance and the preset cut-in time, determine the lateral driving speed during the cut-in process. The vehicle can be controlled to cut in front of the vehicle to be tested according to the lateral driving speed and the longitudinal driving speed obtained based on the following algorithm.
[0098] In some embodiments, when the target behavior information includes a preset cut-in lateral speed, a preset cut-in longitudinal speed, and a preset cut-in trajectory, and when the target behavior information meets the lane cut-in condition, the computer device can control the vehicle to cut in front of the vehicle to be tested according to the preset cut-in lateral speed, the preset cut-in longitudinal speed, and the preset cut-in trajectory.
[0099] Among them, the execution of a vehicle cutting-in event mentioned in the embodiment of the present application can be understood as the computer device executing the following steps once: according to the range setting information, determining the triggering cutting-in vehicle from the vehicles traveling in a lane different from the lane where the vehicle to be tested is located; randomly selecting the target behavior information based on the cutting-in behavior setting information; when the target behavior information meets the lane cutting-in condition, controlling the triggering cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information.
[0100] 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 vertical range and the time range.
[0101] S3012: Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine a test result of a simulated driving test on the vehicle to be tested based on the detection result.
[0102] In some embodiments, when the computer device controls the triggered cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information, it can detect whether the vehicle to be tested and the triggered cutting-in vehicle overlap at certain moments. If so, it is determined that the vehicle to be tested and the triggered cutting-in vehicle collide with each other.
[0103] In some embodiments, during the driving process of the vehicle to be tested, the computer device will execute the vehicle cut-in event multiple times based on the time setting information, and can collect statistics on the detection results corresponding to the multiple vehicle cut-in events. Based on the statistical results, the test results of the simulated driving test of the vehicle to be tested are determined.
[0104] The simulated driving test method provided by the embodiment of the present application first obtains pre-set lane change setting information, which includes time setting information, range setting information, and cut-in behavior setting information. The time setting information can be used to determine the random time point for executing the vehicle cut-in event, the range setting information can be used to determine the random vehicle that cuts in front of the vehicle to be tested, and the cut-in behavior setting information can be used to determine the random cut-in behavior. After determining 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 trigger cut-in vehicle can be determined from vehicles traveling in a lane different from the lane where the vehicle to be tested is located; and the target behavior information is randomly selected based on the cut-in behavior setting information; when the target behavior information meets the lane cut-in condition, the trigger cut-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information; at the same time, it is detected whether the vehicle to be tested collides with the trigger cut-in vehicle, and the test result of the simulated driving test on the vehicle to be tested is determined based on the detection result. The above simulation process realizes the randomness of the three dimensions of entry time point, entry vehicle, and entry behavior. Compared with the manually defined method, the traffic scenarios encountered by the tested vehicles are richer and the simulated driving test results are more accurate.
[0105] 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.
[0106] 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 when a vehicle in another lane cuts in during driving, the above test cannot be performed when the vehicle is in a stopped state. Therefore, it is necessary to filter out stopped vehicles. Specifically, the driving scene may contain multiple vehicles, and the computer device can traverse each vehicle. For the current vehicle traversed, it is determined whether the current vehicle is in a driving state. If the current vehicle is in a driving state, the current vehicle is used as the vehicle to be tested.
[0107] 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.
[0108] Specifically, the computer device may determine whether the current moment is a moment at which a vehicle cut-in event needs to be executed for the current vehicle. If so, the computer device may determine the current moment as a target moment for the current vehicle.
[0109] 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.
[0110] In some embodiments, the time setting information includes at least one time interval that obeys a first preset distribution. When the current moment is determined to be the target moment based on the time setting information, before the step of determining a triggering vehicle to cut in from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information, the simulation driving test method provided in 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 vehicle to be tested was last triggered to cut in, 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.
[0111] Among them, the first preset distribution can be an exponential distribution, a normal distribution, etc., and the embodiment of the present application does not limit the first preset distribution.
[0112] 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.
[0113] In some embodiments, the computer device can obtain the previous moment when the vehicle to be tested was triggered to cut in, and calculate the duration between the previous moment and the current moment, and determine 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 time for executing the vehicle cutting in event 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 then continue to execute steps such as determining the triggering vehicle to cut in from vehicles traveling in lanes different from the lane where the vehicle to be tested is located based on the range setting information.
[0114] In some embodiments, the tester may set a random seed for at least one time interval in advance, and the computer device may extract a target time interval from the at least one time interval using the random seed.
[0115] In the above embodiment, the time setting information includes at least one time interval that obeys a first preset distribution. A target time interval can be determined from the at least one time interval, and whether the current moment is the target moment for executing the vehicle cut-in event is determined based on the target time interval. If the current moment is the target moment, the steps of determining the triggering cut-in vehicle from vehicles traveling in lanes different from the lane where the vehicle to be tested is located according to the range setting information are continued. Since at least one time interval obeys a preset function distribution, the target moment determined based on the at least one time interval is random, which realizes the randomness of the vehicle cut-in event in the time dimension, making the traffic scenarios encountered by the vehicle to be tested richer.
[0116] In some embodiments, before determining the triggering vehicle to cut in from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information, the simulation driving test method provided in the embodiment of the present application also includes a step of determining whether the vehicle to be tested meets the condition for being cut in, and the step specifically includes: determining whether the vehicle to be tested meets the condition for being cut in; if the vehicle to be tested does not meet the condition for being cut in, caching the cut-in event; when it is determined that the vehicle to be tested has traveled to a position that meets the condition for being cut in, executing the step of determining the triggering vehicle to cut in from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information.
[0117] In a real driving scenario, when a vehicle is traveling in a certain lane, it is possible that a vehicle in the left lane changes lanes in front of the vehicle, or it is also possible that a vehicle in the right lane changes lanes in front of the vehicle. In a simulated driving scenario, the tester can pre-set the cut-in direction. For example, the tester can pre-set the vehicle to cut in from the left lane of the lane where the test vehicle is located, or set the vehicle to cut in from the right lane of the lane where the test vehicle is located, or set the probability of cutting in from the left lane to a% and the probability of cutting in from the right lane to (1-a)%.
[0118] In some embodiments, the computer device may determine whether the vehicle to be tested is on a road. If the vehicle to be tested is not on a road but is in the middle of an intersection or other non-road location, it is determined that the vehicle to be tested does not meet the conditions for being cut in.
[0119] In some embodiments, if the vehicle to be tested is on a road, and the tester sets a lane to cut in from the left lane of the lane where the vehicle to be tested is located, the computer device determines whether there is a lane to the left of the lane where the vehicle to be tested is located. If not, it is determined that the vehicle to be tested does not meet the conditions for being cut in.
[0120] In some embodiments, if the vehicle to be tested is on a road, and the tester sets a condition where the vehicle cuts in from the right lane of the lane where the vehicle to be tested is located, the computer device determines whether there is a lane to the right of the lane where the vehicle to be tested is located. If not, it is determined that the vehicle to be tested does not meet the conditions for being cut in.
[0121] In some embodiments, if the vehicle to be tested is on a road, and the tester sets the probability of cutting in from the left lane to a%, and the probability of cutting in from the right lane to (1-a)%, the computer device can count the proportion of vehicles cutting in from the left and the proportion of vehicles cutting in from the right in the vehicle cutting-in events that have been executed, compare the proportion of vehicles cutting in from the left with a%, and compare the proportion of vehicles cutting in from the right with (1-a)%, and determine the cutting-in direction of this vehicle cutting-in event based on the two comparison results. If the cutting-in direction of this vehicle cutting-in event is cutting in from the left lane, and there is no lane to the left of the lane where the vehicle to be tested is located, it is determined that the vehicle to be tested does not meet the condition of being cut in. Similarly, if the cutting-in direction of this vehicle cutting-in event is cutting in from the right lane, and there is no lane to the right of the lane where the vehicle to be tested is located, it is determined that the vehicle to be tested does not meet the condition of being cut in.
[0122] In some embodiments, when the vehicle to be tested does not meet the conditions for being cut in, the computer device may cache the cutting-in event in the event buffer of the vehicle to be tested. As the vehicle to be tested continues to move forward, when the clock in the simulation system advances to the next moment, the computer device determines whether the vehicle to be tested meets the conditions for being cut in based on the current position of the vehicle to be tested. If so, the computer device determines the triggering cutting-in vehicle from the vehicles on the corresponding lane based on the range setting information and the cutting-in direction pre-set by the tester; if not, the above judgment continues as the vehicle continues to move forward.
[0123] In the above embodiment, considering that the vehicle to be tested is in the middle of an intersection or other non-road place, or in a lane that other vehicles cannot cut in, the vehicle cutting-in event cannot be executed. Therefore, the embodiment of the present application proposes to determine whether the vehicle to be tested meets the conditions for being cut in before determining the triggering vehicle for cutting in from vehicles traveling in a lane different from the lane where the vehicle to be tested is located based on the range setting information. If the vehicle to be tested does not meet the conditions for being cut in, the cutting-in event is cached until the vehicle to be tested travels to a position that meets the conditions for being cut in, and then the subsequent steps are executed, thereby avoiding the waste of computing resources caused by still executing the vehicle cutting-in event when the vehicle to be tested does not meet the conditions for being cut in.
[0124] In some embodiments, the range setting information includes a longitudinal range. According to the range setting information, a triggering vehicle for cutting in is determined from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located, including: randomly extracting a target longitudinal distance from the longitudinal range; taking a position in front of the vehicle to be tested on a lane different from the lane in which the vehicle to be tested is located, at a longitudinal distance from the vehicle to be tested that is the target longitudinal distance, as the first position; in a lane different from the lane in which the vehicle to be tested is located, searching for vehicles in a driving state from the first position in the opposite direction of the lane in sequence, and if the currently found vehicle is not in the process of changing lanes, taking the currently found vehicle as the triggering vehicle for cutting in.
[0125] The tester can set the vertical distance threshold X through the visual interface provided by the computer device, and the computer device can use (0, X] as the vertical range.
[0126] The tester may set a random seed for the longitudinal range in advance. After obtaining the longitudinal range, the computer device may extract the target longitudinal distance from the longitudinal range through the random seed.
[0127] The tester may preset a cut-in direction, and the computer device may determine which lane the cutting-in vehicle is triggered from based on the tester's preset cut-in direction. For example, if the tester presets the cut-in direction to the left of the lane where the vehicle to be tested is located, the vehicle to be triggered to cut-in is determined to be in the left lane of the lane where the vehicle to be tested is located. If the tester presets the cut-in direction to the right of the lane where the vehicle to be tested is located, the vehicle to be triggered to cut-in is determined to be in the right lane of the lane where the vehicle to be tested is located.
[0128] In some embodiments, assuming that the tester has pre-set a vehicle to cut in from the left lane of the test vehicle, the computer device may search for a location in the left lane, along the lane direction of the left lane, that is at a target longitudinal distance from the test vehicle. The computer device may use this location as the first location. Starting from this first location, the computer device then searches for vehicles in motion in the opposite direction of the left lane. After finding the first vehicle, the computer device determines whether the vehicle is in the process of changing lanes. If the first vehicle is not in the process of changing lanes, the computer device uses the first vehicle as the trigger for cutting in. If the first vehicle is in the process of changing lanes, the computer device may search for a second vehicle and make the same determination for the second vehicle, and so on.
[0129] In some embodiments, the tester can pre-set the vehicle type that triggers the cut-in. During the search process, after the computer device finds a moving vehicle, it can determine whether the vehicle is of the preset model. If so, it uses the vehicle as the trigger for the cut-in. If not, it continues to search for the next moving vehicle and makes the same determination for the found vehicle. For example, the vehicle type here can be a truck.
[0130] For example, see Figure 4 As shown, the longitudinal distance threshold X refers to the maximum distance extending from the front of the vehicle's outer contour to the direction of travel. The target longitudinal distance x can be randomly extracted from the longitudinal range (0, X]. Assume that the tester has pre-set the vehicle to cut in from the left lane of the test vehicle. The tester can search for the first position in the left lane along the lane direction of the left lane. Starting from the first position, the tester searches for vehicles in the driving state in the opposite direction of the left lane. See Figure 4 As shown, after finding the first vehicle, since the first vehicle is in the process of changing lanes, it is determined that the first vehicle is not feasible, and the search continues for the second vehicle. Since the second vehicle is not in the process of changing lanes, the second vehicle can be used as a trigger to cut in.
[0131] It should be noted that each lane in the simulation system has a corresponding direction, and the vehicle can only travel in the direction corresponding to the lane and cannot go in the opposite direction. Therefore, the driving direction mentioned in the embodiment of this application can also be understood as the lane direction or the downstream direction of the lane.
[0132] In some embodiments, after extracting the target longitudinal distance x from the longitudinal range, see Figure 5 As shown, if the first position determined based on the target longitudinal distance x is outside the map of the simulated driving scene, or, see Figure 6 As shown, if a unique first position cannot be determined based on the target longitudinal distance x, then determining the target longitudinal distance x is not feasible, and the end of the road where the vehicle to be tested is currently located is used as the first position, see Figure 5 and Figure 6 The position indicated by the middle dot is used as the triggering cut-in vehicle. Based on this first position, the triggering cut-in vehicle is searched. If the triggering cut-in vehicle can be found, the triggering cut-in vehicle is subsequently controlled to cut in front of the vehicle to be tested. If the triggering cut-in vehicle cannot be found, the vehicle cut-in event is cached in the event buffer. As the vehicle to be tested continues to move forward, when the clock in the simulation system advances to the next moment, it is determined whether the target longitudinal distance x is feasible based on the current position of the vehicle to be tested. If feasible, the triggering cut-in vehicle is determined based on the target longitudinal distance x, and the time for the next vehicle cut-in event is calculated based on this moment. If it is still not feasible, the above judgment is continued as the clock in the simulation system advances.
[0133] In some embodiments, while the computer device is caching the vehicle cut-in event in the event buffer, it may also simultaneously cache relevant information such as the vehicle model that triggered the cut-in event corresponding to this event in the event buffer, thereby ensuring that the vehicle cut-in event executed by the computer device is consistent with the preset.
[0134] In the above embodiment, the range setting information includes a longitudinal range. When the current moment is determined to be the target moment based on the time setting information, the target longitudinal distance is randomly extracted from the longitudinal range, and the triggering vehicle to cut in is subsequently determined based on the target longitudinal distance. Since the target longitudinal distance is randomly extracted, the triggering vehicle to cut in based on the target longitudinal distance is also random, which realizes the randomness of the vehicle cutting in front of the vehicle to be tested, making the traffic scenes encountered by the vehicle to be tested richer.
[0135] In some embodiments, the simulation driving test method provided by the embodiments of the present application may also include: in the process of searching for a vehicle in a moving state along the opposite direction of the lane from the first position, if the triggering vehicle to cut in is not found, the cutting-in event is cached, and as the vehicle to be tested travels, the first position is updated until the triggering vehicle to cut in can be found along the opposite direction of the lane from the updated first position, and then the step of randomly selecting the target behavior information based on the cutting-in behavior setting information is executed.
[0136] In this example, the tester pre-sets that a vehicle cuts in from the left lane of the lane where the vehicle to be tested is located. The computer device can search for a first position in the left lane along the lane direction of the left lane. Starting from the first position, it searches for vehicles in a moving state in the opposite direction of the left lane. If no vehicle in a moving state is found, or all vehicles in a moving state are in the process of changing lanes, it is determined that there is no triggering vehicle to cut in at the current moment. In this case, the cutting-in event can be cached in the event buffer. As the vehicle to be tested continues to move forward, when the clock in the simulation system advances to the next moment, the corresponding first position is recalculated based on the current position of the vehicle to be tested, and the triggering vehicle to cut in is searched again based on the first position. If the triggering vehicle to cut in can be found, the step of randomly selecting target behavior information based on the cutting-in behavior setting information is executed. If the triggering vehicle to cut in is still not found, the above process is continued as the vehicle to be tested continues to move forward until the triggering vehicle to cut in is found. The process of recalculating the first position and the process of re-searching for the triggering vehicle to cut in are as described above, and the embodiment of the present application will not be repeated here.
[0137] It should be noted that: after the computer device caches the cut-in event in the event buffer, when the clock in the simulation system advances to a certain moment, if the triggering cut-in vehicle can be found based on the current position of the vehicle to be tested, this moment will be used as the moment of the previous execution of the vehicle cut-in event. The next time it is determined whether the current moment is the target moment, this moment will be used as the basis for judgment.
[0138] In the above embodiment, considering that the triggering vehicle to cut in may not be found in the process of searching for a vehicle in motion from the first position along the opposite direction of the lane, the embodiment of the present application proposes that, in this case, the cut-in event is cached, and the first position is updated as the vehicle to be tested travels until the triggering vehicle to cut in can be found from the updated first position along the opposite direction of the lane, thereby ensuring that each vehicle cut-in event can be executed.
[0139] In some embodiments, the cut-in behavior setting information includes a preset cut-in duration, and the step of randomly selecting target behavior information based on the cut-in behavior setting information includes: taking the preset cut-in duration as the mean, generating a duration set that conforms to a second preset distribution; randomly extracting the target duration from the duration set, and using the target duration as the target behavior information.
[0140] In particular, if the cut-in behavior setting information includes a preset cut-in duration, the computer device may use the preset cut-in duration as the mean to generate a set of durations that conform to a second preset distribution. The second preset distribution may be a normal distribution, an exponential distribution, or the like. The second preset distribution may be the same as or different from the first preset distribution, and this is not limited in this embodiment of the present application.
[0141] In some embodiments, the tester may set a random seed for the duration set in advance. After obtaining the duration set, the computer device may extract the target duration from the duration set using the random seed.
[0142] In the above embodiment, when the cut-in behavior setting information includes a preset cut-in duration, a set of durations conforming to a second preset distribution is generated, using the preset cut-in duration as the mean. A target duration is then randomly extracted from this set of durations, and the cut-in behavior that triggers the cut-in vehicle is subsequently determined based on the target duration. Because the target duration is randomly extracted, the cut-in behavior determined based on the target duration is also random, achieving randomness in the cut-in behavior dimension and enriching the traffic scenarios encountered by the tested vehicle.
[0143] In some embodiments, when the target behavior information meets the lane entry condition, before the step of controlling the triggered cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information, the simulation driving test method provided in the embodiment of the present application also includes a step of determining whether the target duration meets the lane entry condition. The step specifically includes: determining the first longitudinal driving distance of the triggered cutting-in vehicle during the cutting-in process based on the maximum speed of the lane where the vehicle to be tested is located and the target duration; determining the second position of the triggered cutting-in vehicle after the cutting-in is completed based on the current position of the triggered cutting-in vehicle and the first longitudinal driving distance; and determining that the target duration meets the lane entry condition when the second position is located on the road where the vehicle to be tested is currently located.
[0144] Considering that in real-world scenarios, vehicles in other lanes ahead of the vehicle rarely change lanes for safety reasons when approaching the end of the road, this embodiment of the present application proposes the concept of lane cut-in conditions to simulate such scenarios. When the target duration meets the lane cut-in condition, it is assumed that the triggering vehicle is still a certain distance away from the end of the road and can cut in front of the vehicle under test. When the target duration does not meet the lane cut-in condition, it is assumed that the triggering vehicle is approaching the end of the road and the cut-in process is dangerous.
[0145] Among them, in real scenarios, a road may consist of multiple lanes, and each lane has a corresponding maximum speed and minimum speed. In order to simulate such road rules in real scenarios, the maximum speed and minimum speed can be defined for each lane in the simulation system. The computer equipment can multiply the maximum speed of the lane where the vehicle to be tested is located by the target duration to obtain the first longitudinal driving distance of the triggering vehicle during the cutting-in process.
[0146] In some embodiments, the computer device can draw a perpendicular line from the front of the vehicle that triggers the cut-in to the center line of the lane where the vehicle to be tested is currently located, obtain the foot of the perpendicular, and extend the first longitudinal driving distance from the foot of the perpendicular to the driving direction of the vehicle to be tested to obtain the second position. It can be determined whether the second position is on the road where the vehicle to be tested is currently located. If the second position is on the road where the vehicle to be tested is currently located, it is determined that the target duration meets the lane cut-in condition. If the second position is not on the road where the vehicle to be tested is located, it is determined that the target duration does not meet the lane cut-in condition.
[0147] In some embodiments, the second position is on the next road of the road currently located by the vehicle to be tested; or the number of second positions is greater than one, that is, there are multiple forks at the end of the road currently located by the vehicle to be tested, and a second position is obtained on each fork; or the second position is outside the map of the simulated driving scenario. In all of the above situations, it can be determined that the second position is not on the road where the vehicle to be tested is located.
[0148] In the above embodiment, a target duration is randomly extracted from a duration set, and the target duration is used as the duration used for the triggering vehicle to cut in front of the vehicle to be tested. According to the maximum speed of the lane in which the vehicle to be tested is located and the target duration, the first longitudinal driving distance of the triggering vehicle to cut in during the cutting-in process is determined; according to the current position of the triggering vehicle to cut in and the first longitudinal driving distance, the second position of the triggering vehicle to cut in after the cutting-in is completed is determined; when the second position is on the road currently located by the vehicle to be tested, it is determined that the target duration meets the lane cutting condition, and at this time the triggering vehicle to cut in is controlled to cut in to the lane where the vehicle to be tested is located according to the target duration, which is closer to the real scene and the simulation test results are more accurate.
[0149] In some embodiments, the simulation driving test method provided by the embodiments of the present application also includes: when the second position is not on the road where the vehicle to be tested is currently located, determining the second longitudinal driving distance of the triggering vehicle during the cut-in process according to the maximum speed of the lane where the vehicle to be tested is located and the preset shortest lane change time; determining the third position of the triggering vehicle after the cut-in is completed according to the current position of the triggering vehicle and the second longitudinal driving distance; when the third position is on the road where the vehicle to be tested is currently located, using the shortest lane change time as the target behavior information, and determining that the target behavior information meets the lane cut-in condition.
[0150] The computer device may multiply the maximum speed of the lane in which the vehicle to be tested is located by a preset minimum lane change time to obtain a second longitudinal driving distance of the vehicle that triggers the cut-in process.
[0151] In some embodiments, the computer device can draw a perpendicular line from the front of the vehicle that triggers the cut-in to the center line of the lane where the test vehicle is currently located, obtain the foot of the perpendicular, and extend a second longitudinal driving distance from the foot of the perpendicular to the driving direction of the test vehicle to obtain a third position. It can be determined whether the third position is on the road where the test vehicle is currently located. If the third position is on the road where the test vehicle is currently located, it is determined that the preset minimum lane change time meets the lane cut-in condition. If the third position is not on the road where the test vehicle is located, it is determined that the preset minimum lane change time does not meet the lane cut-in condition.
[0152] In some embodiments, the third position is on the next road of the road currently located by the vehicle to be tested; or the number of third positions is greater than one, that is, there are multiple forks at the end of the road currently located by the vehicle to be tested, and a third position is obtained on each fork; or the third position is outside the map of the simulated driving scenario. In all of the above situations, it can be determined that the third position is not on the road where the vehicle to be tested is located.
[0153] In some embodiments, when the third position is on the road where the vehicle to be tested is currently located, the computer device may use the shortest lane change time as the target behavior information, and subsequently control the triggering vehicle to cut in and drive into the lane where the vehicle to be tested is located according to the preset shortest lane change time.
[0154] For example, see Figure 7 As shown, assuming that the target duration randomly extracted from the duration set is t d , set the target duration t d Multiplying by the maximum speed of the lane in which the vehicle to be tested is located, the first longitudinal distance D can be obtained. From the front of the vehicle that triggers the cut-in, the second position is obtained by extending D along the lane direction. Figure 7 As shown, assuming that the second position exceeds the current road end point, the maximum speed of the lane in which the vehicle to be tested is located is multiplied by the preset minimum lane change time to obtain the second longitudinal driving distance D'. From the front of the vehicle that triggers the cut-in, D' is extended along the lane direction to obtain the third position. Since the third position does not exceed the current road end point, the preset minimum lane change time is used as the target behavior information, and it is determined that the preset shortest lane change time meets the lane cut-in condition.
[0155] In some embodiments, if the preset shortest lane change time does not meet the lane cutting condition, it is considered that the currently determined triggering vehicle to cut in is not feasible. Figure 7 As shown, at this time, the next vehicle of the currently determined triggering cutting-in vehicle can be used as the triggering cutting-in vehicle to determine whether the target behavior information meets the lane cutting-in condition. The determination method is described above and will not be repeated in detail in the embodiment of this application.
[0156] In the above embodiment, after randomly selecting the target duration from the duration set, if it is determined that the target duration does not meet the lane entry condition, it can continue to judge whether the preset minimum lane change time meets the lane entry condition. If the preset shortest lane change time meets the lane entry condition, subsequent control triggers the cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the preset shortest lane change time, avoiding the problem of dangerous lane change caused by the randomly extracted target duration being too long.
[0157] In some embodiments, the triggered cutting-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information, including: determining the lateral driving distance of the triggered cutting-in vehicle during the cutting-in process according to the lane where the vehicle to be tested is located and the lane where the triggered cutting-in vehicle is located; determining the lateral driving speed of the triggered cutting-in vehicle during the cutting-in process according to the lateral driving distance and the target behavior information; obtaining the longitudinal driving speed of the triggered cutting-in vehicle during the cutting-in process; controlling the triggered cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the lateral driving speed and the longitudinal driving speed.
[0158] Among them, the computer equipment can obtain the center line of the lane where the vehicle to be tested is located and the center line of the lane where the triggering vehicle is located, and use the lateral distance between the two center lines as the lateral travel distance of the triggering vehicle during the cutting-in process.
[0159] In some embodiments, when the target duration meets the lane cutting condition, after obtaining the lateral driving distance, the computer device can use the lateral driving distance divided by the target duration to obtain the lateral driving speed of the vehicle that triggers the cut-in process.
[0160] In some embodiments, a fixed longitudinal speed may be preset as the longitudinal speed of the vehicle triggering the cut-in during the cut-in process. Alternatively, the longitudinal speed of the vehicle triggering the cut-in during the cut-in process may be determined based on a car-following algorithm.
[0161] In some embodiments, after obtaining the lateral and longitudinal speeds of the triggering vehicle during the cutting-in process, the computer device can control the triggering vehicle to cut in according to the lateral and longitudinal speeds to cut into the lane where the vehicle to be tested is located.
[0162] In the above embodiment, since the target duration is randomly extracted, the lateral driving speed calculated based on the target duration is also random, which realizes the randomness of the cutting-in behavior of the triggered cutting-in vehicle, making the traffic scenarios encountered by the tested vehicle richer.
[0163] In some embodiments, the step of determining the test result of the simulated driving test on the test vehicle based on the detection result includes: recording the collision event in the event of a collision; and determining the test result obtained by the simulated driving test on the test vehicle based on the recorded collision event.
[0164] In some embodiments, during the driving process of the vehicle to be tested, the vehicle cut-in event will be executed multiple times based on the time setting information. Each time the vehicle cut-in event is executed, the computer device can determine whether the vehicle to be tested collides with the triggering cut-in vehicle. 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.
[0165] In some embodiments, the recorded collision event may include the lateral speed and longitudinal speed of the vehicle that triggered the cut-in when the collision occurred. The decision-making planning algorithm can be subsequently optimized based on the lateral speed and longitudinal speed.
[0166] In the above embodiment, during the execution of a vehicle cut-in event, the test vehicle is detected to see if it collides with the triggering vehicle; if so, the collision event is recorded; and based on the recorded collision event, the test result of a simulated driving test on the test vehicle is determined. Because the vehicle cut-in event is random in execution time, cutting-in vehicle, and cutting-in behavior, it covers a wide range of traffic scenarios, resulting in more accurate test results.
[0167] In some embodiments, a simulated driving test method is provided, the method comprising the following steps:
[0168] Acquire preset lane change setting information, where the lane change setting information includes time setting information, range setting information, and cut-in behavior setting information.
[0169] 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.
[0170] When the time setting information includes at least one time interval that follows a first preset distribution, a target time interval is determined from the at least one time interval, a previous moment when the vehicle to be tested was last triggered to cut in is obtained, and a duration between the previous moment and the current moment is determined. When the duration is the target time interval, the current moment is determined as the target moment.
[0171] Determine whether the vehicle to be tested meets the cut-in condition. If the vehicle to be tested does not meet the cut-in condition, cache the cut-in event. When it is determined that the vehicle to be tested has reached a position that meets the cut-in condition, execute the step of determining a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located based on the range setting information. If the vehicle to be tested meets the cut-in condition, randomly extract a target longitudinal distance from the longitudinal range. A position in front of the vehicle to be tested in a lane different from the lane in which the vehicle to be tested is located at a longitudinal distance equal to the target longitudinal distance is used as the first position. In the lane different from the lane in which the vehicle to be tested is located, search for vehicles in a moving state in the opposite direction of the lane from the first position. If the currently found vehicle is not in the process of changing lanes, use the currently found vehicle as the triggering cut-in vehicle.
[0172] In the process of searching for a vehicle in motion from the first position along the opposite direction of the lane, if the triggering vehicle for cutting in is not found, the cutting-in event is cached, and the first position is updated as the vehicle to be tested travels, until the triggering vehicle for cutting in can be found from the updated first position along the opposite direction of the lane, and then the step of randomly selecting the target behavior information based on the cutting-in behavior setting information is executed.
[0173] Taking the preset cut-in duration as the mean, a duration set that conforms to the second preset distribution is generated, a target duration is randomly extracted from the duration set, and the target duration is used as the target behavior information.
[0174] According to the maximum speed and target duration of the lane in which the vehicle to be tested is located, the first longitudinal driving distance of the triggering vehicle during the cutting-in process is determined; according to the current position of the triggering vehicle and the first longitudinal driving distance, the second position of the triggering vehicle after the cutting-in is completed is determined; when the second position is on the road currently located by the vehicle to be tested, it is determined that the target duration meets the lane cutting-in conditions.
[0175] When the second position is not on the road where the vehicle to be tested is currently located, the second longitudinal driving distance of the triggering vehicle during the cutting-in process is determined according to the maximum speed of the lane where the vehicle to be tested is located and the preset shortest lane changing time. According to the current position of the triggering vehicle to be tested and the second longitudinal driving distance, the third position of the triggering vehicle after the cutting-in is completed is determined. When the third position is on the road where the vehicle to be tested is currently located, the shortest lane changing time is used as the target behavior information, and it is determined that the target behavior information meets the lane cutting condition.
[0176] According to the lane in which the vehicle to be tested is located and the lane in which the triggering vehicle is located, the lateral travel distance of the triggering vehicle during the cutting-in process is determined; according to the lateral travel distance and the target behavior information, the lateral travel speed of the triggering vehicle during the cutting-in process is determined; the longitudinal travel speed of the triggering vehicle during the cutting-in process is obtained; and the triggering vehicle is controlled to cut into the lane in which the vehicle to be tested is located according to the lateral travel speed and the longitudinal travel speed.
[0177] Detect whether the vehicle to be tested collides with the triggering cut-in vehicle, record the collision event in the event of a collision, and determine the test result obtained by performing a simulated driving test on the vehicle to be tested based on the recorded collision event.
[0178] The simulated driving test method provided by the embodiment of the present application first obtains pre-set lane change setting information, which includes time setting information, range setting information, and cut-in behavior setting information. The time setting information can be used to determine the random time point for executing the vehicle cut-in event, the range setting information can be used to determine the random vehicle that cuts in front of the vehicle to be tested, and the cut-in behavior setting information can be used to determine the random cut-in behavior. After determining 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 trigger cut-in vehicle can be determined from vehicles traveling in a lane different from the lane where the vehicle to be tested is located; and the target behavior information is randomly selected based on the cut-in behavior setting information; when the target behavior information meets the lane cut-in condition, the trigger cut-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information; at the same time, it is detected whether the vehicle to be tested collides with the trigger cut-in vehicle, and the test result of the simulated driving test on the vehicle to be tested is determined based on the detection result. The above simulation process realizes the randomness of the three dimensions of entry time point, entry vehicle, and entry behavior. Compared with the manually defined method, the traffic scenarios encountered by the tested vehicles are richer and the simulated driving test results are more accurate.
[0179] In one possible scenario, the simulated driving scene includes multiple vehicles, see Figure 8 As shown, after the simulation begins, it prepares to execute the vehicle cut-in event. First, at the current simulation time, each vehicle is traversed. For the current vehicle traversed, 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 the vehicle cut-in event needs to be executed 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 to advance, and the total simulation time is determined in real time to determine whether it has expired. If the total simulation time has expired, the simulation ends. If the total simulation time has not expired, other simulation modules are executed.
[0180] If multiple vehicles to be tested are determined through the above traversal, one of the vehicles to be tested is selected, and it is determined whether there is a time for the next vehicle cut-in event. If not, the time for the next vehicle cut-in event is calculated based on the time setting information corresponding to the vehicle to be tested. If there is a time for the next vehicle cut-in event, it is further determined whether a vehicle cut-in event has been stored in the event buffer corresponding to the vehicle to be tested. In addition, when the time for the next vehicle cut-in event is calculated, it is also further determined whether a vehicle cut-in event has been stored in the event buffer corresponding to the vehicle to be tested.
[0181] If a vehicle cut-in event is already stored in the event buffer, determine whether the vehicle to be tested meets the conditions for being cut in. If the vehicle to be tested meets the conditions for being cut in, the vehicle to be tested is considered feasible. A target longitudinal distance is randomly extracted from the longitudinal range corresponding to the vehicle to be tested. The target longitudinal distance is extended from the front of the vehicle to be tested along the lane direction to obtain a first position. It is determined whether the first position is on the current road. If the first position is on the current road, the target longitudinal distance is considered feasible. Based on the first position, a triggering cut-in vehicle is searched. If the vehicle can be found, a target duration is randomly extracted from the duration set. Based on the target duration and the maximum speed of the lane in which the vehicle to be tested is located, a first longitudinal driving distance is determined. Based on the position of the triggering cut-in vehicle and the first longitudinal driving distance, a second position is determined. It is determined whether the second position is on the current road. If the second position is on the current road, the target duration is considered feasible. The triggering cut-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target duration. The event buffer is cleared, and the time for executing the next vehicle cut-in event is calculated according to the time setting information. The step of returning to each vehicle is returned. If the second position is not on the current road, the target time is considered not feasible. Based on the preset minimum lane change time and the maximum speed of the lane in which the vehicle to be tested is located, the second longitudinal driving distance is determined. Based on the position of the triggering vehicle and the second longitudinal driving distance, the third position is determined to determine whether the third position is on the current road. If the third position is on the current road, the preset minimum lane change time is considered feasible, and the triggering vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the preset shortest lane change time.
[0182] If there is no vehicle cut-in event in the event buffer, then determine again whether the current moment is the target moment of the vehicle to be tested. If so, jump to the step of determining whether the vehicle to be tested meets the conditions for being cut in. If the first position is not on the current road, it is considered that the target longitudinal distance is not feasible, and the end of the road where the vehicle to be tested is currently located is taken as the first position, and jump to the step of searching for the trigger cut-in vehicle based on the first position. If the trigger cut-in vehicle cannot be found based on the first position, then determine again whether there is a vehicle cut-in event in the event buffer corresponding to the vehicle to be tested. If the result of this judgment is that a vehicle cut-in event has been stored in the event buffer, then return to the step of traversing each vehicle. If the result of this judgment is that there is no vehicle cut-in event in the event buffer, then store the vehicle cut-in event in the event buffer and return to the step of traversing each vehicle. If the preset minimum lane change time is not feasible, start with the currently determined trigger cut-in vehicle and continue searching in the opposite direction of the lane. If a feasible vehicle can be found, the found feasible vehicle will be used as the trigger cut-in vehicle, and jump to the step of determining whether the target duration is feasible. If no feasible vehicle is found, determine again whether there is a vehicle cut-in event in the event buffer corresponding to the vehicle to be tested. If the result of this judgment is that a vehicle cut-in event has been stored in the event buffer, return to the step of traversing each vehicle. If the result of this judgment is that there is no vehicle cut-in event in the event buffer, store the vehicle cut-in event in the event buffer, and return to the step of traversing each vehicle.
[0183] 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-type simulation environment, and the above algorithm can be executed when the virtual city-type simulation environment is running. Based on the purpose of executing a vehicle cut-in event in a virtual city-type simulation environment, the following assumptions can be made: 1. In a vehicle cut-in event, there is only one leading vehicle that changes lanes and cuts in in front of the vehicle to be tested. In the embodiment of the present application, the leading vehicle is referred to as a triggering cut-in vehicle. 2. In order to avoid a vehicle suddenly appearing in front of the vehicle to be tested to change lanes and cut in, the lane-changing cut-in behavior is only effective for background traffic vehicles that already exist in front of the vehicle to be tested. 3. The vehicle cut-in event starts from the moment when the lateral speed of the triggering cut-in vehicle begins to be greater than 0, and ends at the moment when the lateral speed changes from a positive value back to 0, and its center of mass changes to the center line of the lane where the vehicle to be tested is currently located. 4. The lane where the vehicle to be tested is located is determined by the position of the center of mass of the vehicle to be tested. If the center of mass is exactly between two lanes, any one of them is selected as the lane where the vehicle to be tested is located. 5. Once the triggering vehicle begins cutting in, it will change lanes along the predetermined trajectory or duration, without avoiding the test vehicle or other traffic participants. 6. If there are multiple test vehicles in the simulation environment, the corresponding vehicle cutting events for each test vehicle will be calculated separately.
[0184] Based on the above assumptions, the tester can set the time setting information, the range setting information, and the cut-in behavior setting information. For the vehicle to be tested in the simulation environment, when the current moment is determined to be the target moment based on the time setting information, the trigger cut-in vehicle is determined from the vehicles traveling in a lane different from the lane where the vehicle to be tested is located according to the range setting information; the target behavior information is randomly selected based on the cut-in behavior setting information; when the target behavior information meets the lane cut-in condition, the trigger cut-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the target behavior information; detect whether the vehicle to be tested collides with the trigger cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result. Since the embodiments of the present application can cover most traffic scenarios, the test results are more accurate.
[0185] 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.
[0186] 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.
[0187] 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.
[0188] In one embodiment, Figure 9 As shown, a simulated driving test device is provided, comprising:
[0189] The acquisition module 901 is used to acquire preset lane change setting information, where the lane change setting information includes time setting information, range setting information, and cut-in behavior setting information.
[0190] The first determining module 902 is configured to determine a vehicle to be tested that is in a driving state in a simulated driving scenario.
[0191] The second determining module 903 is configured to determine, when the current moment is determined as the target moment based on the time setting information, a triggering cut-in vehicle from vehicles traveling in a lane different from the lane where the vehicle to be tested is located according to the range setting information.
[0192] The selection module 904 is configured to randomly select target behavior information based on the cut-in behavior setting information.
[0193] The control module 905 is configured to control the triggering cutting-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information when the target behavior information satisfies the lane cutting-in condition.
[0194] The detection module 906 is used to detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
[0195] In some embodiments, the first determination module 902 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.
[0196] In some embodiments, the time setting information includes at least one time interval that obeys a first preset distribution, and the second determination module 903 is further used to: determine a target time interval from the at least one time interval; obtain the previous moment when the vehicle to be tested was last triggered to cut in, and determine the duration between the previous moment and the current moment; if the duration is the target time interval, determine the current moment as the target moment.
[0197] In some embodiments, the second determination module 903 is further used to: determine whether the vehicle to be tested meets the conditions for being cut in; if the vehicle to be tested does not meet the conditions for being cut in, cache the cut-in event; when it is determined that the vehicle to be tested has traveled to a position that meets the conditions for being cut in, execute the step of determining a triggering vehicle to cut in from vehicles traveling in a lane different from the lane where the vehicle to be tested is located based on the range setting information.
[0198] In some embodiments, the range setting information includes a longitudinal range, and the second determination module 903 is specifically used to: randomly extract a target longitudinal distance from the longitudinal range; use a position in front of the vehicle to be tested on a lane different from the lane where the vehicle to be tested is located, at a longitudinal distance from the vehicle to be tested that is the target longitudinal distance, as the first position; in a lane different from the lane where the vehicle to be tested is located, search for vehicles in motion from the first position along the opposite direction of the lane, and if the currently found vehicle is not in the process of changing lanes, use the currently found vehicle as the trigger vehicle to cut in.
[0199] In some embodiments, the second determination module 903 is also used for: when searching for a vehicle in motion from the first position along the opposite direction of the lane, if no triggering vehicle for cutting in is found, the cutting-in event is cached, and the first position is updated as the vehicle to be tested travels, until a triggering vehicle for cutting in can be found from the updated first position along the opposite direction of the lane, and then the step of randomly selecting target behavior information based on the cutting-in behavior setting information is executed.
[0200] In some embodiments, the selection module 904 is specifically used to: generate a duration set that conforms to a second preset distribution with a preset cut-in duration as the mean; randomly extract a target duration from the duration set, and use the target duration as target behavior information.
[0201] In some embodiments, the control module 905 is also used to: determine the first longitudinal driving distance of the triggering vehicle during the cutting-in process based on the maximum speed and target duration of the lane in which the vehicle to be tested is located; determine the second position of the triggering vehicle after the cutting-in is completed based on the current position of the triggering vehicle and the first longitudinal driving distance; and determine that the target duration meets the lane cutting-in condition when the second position is on the road where the vehicle to be tested is currently located.
[0202] In some embodiments, the control module 905 is also used to: when the second position is not on the road where the vehicle to be tested is currently located, determine the second longitudinal driving distance of the triggering vehicle during the cutting-in process according to the maximum speed of the lane where the vehicle to be tested is located and the preset shortest lane changing time; determine the third position of the triggering vehicle after the cutting-in is completed according to the current position of the triggering vehicle and the second longitudinal driving distance; when the third position is on the road where the vehicle to be tested is currently located, use the shortest lane changing time as the target behavior information, and determine that the target behavior information meets the lane cutting-in condition.
[0203] In some embodiments, the control module 905 is specifically used to: determine the lateral driving distance of the triggering cutting-in vehicle during the cutting-in process based on the lane in which the vehicle to be tested is located and the lane in which the triggering cutting-in vehicle is located; determine the lateral driving speed of the triggering cutting-in vehicle during the cutting-in process based on the lateral driving distance and the target behavior information; obtain the longitudinal driving speed of the triggering cutting-in vehicle during the cutting-in process; and control the triggering cutting-in vehicle to cut into the lane in which the vehicle to be tested is located according to the lateral driving speed and the longitudinal driving speed.
[0204] In some embodiments, the detection module 906 is specifically configured to: record a collision event in the event of a collision; and determine a test result obtained by performing a simulated driving test on the vehicle to be tested based on the recorded collision event.
[0205] 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.
[0206] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 10As 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.
[0207] Those skilled in the art will understand that Figure 10 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.
[0208] 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.
[0209] 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.
[0210] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0211] 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.
[0212] 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.
[0213] 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: Acquiring preset lane change setting information, the lane change setting information including time setting information, range setting information, and cut-in 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 to be the target moment based on the time setting information, determining a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located according to the range setting information; Randomly selecting target behavior information based on the cut-in behavior setting information; When the target behavior information satisfies the lane cut-in condition, controlling the triggering cut-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information; Detecting whether the vehicle to be tested collides with the triggering cut-in vehicle, and determining a test result of a simulated driving test on the vehicle to be tested based on the detection result.
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 that follows a first preset distribution. When determining the current time as the target time based on the time setting information, before determining a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located based on the range setting information, the method further includes: determining a target time interval from the at least one time interval; Obtaining a previous moment when the vehicle to be tested was triggered to cut in, 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 Before determining, based on the range setting information, a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located, the method further includes: Determining whether the vehicle to be tested meets the conditions for being cut in; If the vehicle to be tested does not meet the conditions for being cut in, the cut-in event is cached; When it is determined that the vehicle to be tested has traveled to a position that satisfies the cut-in condition, the step of determining a triggering cut-in vehicle from vehicles traveling in a lane different from the lane where the vehicle to be tested is located according to the range setting information is performed.
5. The method according to claim 1, wherein The range setting information includes a longitudinal range, and determining, based on the range setting information, a triggering cut-in vehicle from vehicles traveling in a lane different from a lane in which the vehicle to be tested is located, includes: randomly extracting a target longitudinal distance from the longitudinal range; A position in front of the vehicle to be tested, in a lane different from the lane where the vehicle to be tested is located, and whose longitudinal distance from the vehicle to be tested is the target longitudinal distance, is used as a first position; In a lane different from the lane where the vehicle to be tested is located, vehicles in motion are searched in sequence from the first position along the opposite direction of the lane. If the currently found vehicle is not in the process of changing lanes, the currently found vehicle is used as the triggering vehicle to cut in.
6. The method according to claim 5, characterized in that The method further comprises: In the process of searching for a vehicle in motion along the opposite direction of the lane from the first position, if no vehicle that triggers cutting in is found, the cutting-in event is cached, and the first position is updated as the vehicle to be tested travels, until a vehicle that triggers cutting in can be found along the opposite direction of the lane from the updated first position, and then the step of randomly selecting target behavior information based on the cutting-in behavior setting information is executed.
7. The method according to claim 1, characterized in that The cut-in behavior setting information includes a preset cut-in duration, and the randomly selecting target behavior information based on the cut-in behavior setting information includes: Taking the preset cut-in duration as the mean, generating a duration set that conforms to a second preset distribution; A target duration is randomly extracted from the duration set, and the target duration is used as the target behavior information.
8. The method according to claim 7, characterized in that When the target behavior information satisfies the lane cut-in condition, controlling the triggering vehicle to cut in according to the target behavior information until the vehicle to be tested is in the lane where the vehicle is located, the method further includes: Determining a first longitudinal distance traveled by the triggering vehicle during the cut-in process based on the maximum speed of the lane in which the vehicle to be tested is located and the target duration; determining a second position of the triggering cut-in vehicle after the cut-in is completed according to the current position of the triggering cut-in vehicle and the first longitudinal travel distance; When the second position is located on the road where the vehicle to be tested is currently located, it is determined that the target duration satisfies a lane cutting condition.
9. The method according to claim 8, characterized in that The method further comprises: When the second position is not on the road currently located by the vehicle to be tested, determining a second longitudinal distance traveled by the triggering vehicle during the cut-in process according to the maximum speed of the lane located by the vehicle to be tested and a preset minimum lane change time; determining a third position of the triggering cut-in vehicle after the cut-in is completed according to the current position of the triggering cut-in vehicle and the second longitudinal travel distance; In a case where the third position is located on the road where the vehicle to be tested is currently located, the shortest lane change time is used as target behavior information, and it is determined that the target behavior information meets a lane cutting condition.
10. The method according to claim 1, characterized in that The controlling the triggering cut-in vehicle to cut in and drive in the lane where the vehicle to be tested is located according to the target behavior information includes: Determining a lateral travel distance of the triggering cut-in vehicle during the cut-in process according to the lane in which the vehicle to be tested is located and the lane in which the triggering cut-in vehicle is located; determining a lateral travel speed of the triggering cut-in vehicle during the cut-in process according to the lateral travel distance and the target behavior information; Obtaining the longitudinal speed of the vehicle triggering the cut-in during the cut-in process; The triggering cut-in vehicle is controlled to cut into the lane where the vehicle to be tested is located according to the lateral driving speed and the longitudinal driving speed.
11. The method according to any one of claims 1 to 10, characterized in that The step of determining a test result of a simulated driving test on the vehicle to be tested based on the detection result includes: Record the collision event in the event of a collision; Based on the recorded collision event, a 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: include: an acquisition module, configured to acquire preset lane change setting information, wherein the lane change setting information includes time setting information, range setting information, and cut-in behavior setting information; A first determination module is used to determine a vehicle to be tested that is in a driving state in a simulated driving scenario; a second determining module configured to, when determining that the current moment is the target moment based on the time setting information, determine, according to the range setting information, a triggering cut-in vehicle from vehicles traveling in a lane different from the lane in which the vehicle to be tested is located; A selection module, configured to randomly select target behavior information based on the cut-in behavior setting information; a control module, configured to control the triggering cut-in vehicle to cut into the lane where the vehicle to be tested is located according to the target behavior information when the target behavior information satisfies the lane cut-in condition; The detection module is used to detect whether the vehicle to be tested collides with the triggering cut-in vehicle, and determine the test result of the simulated driving test on the vehicle to be tested based on the detection result.
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
Method, apparatus and device for testing automatic driving vehicle and storage medium
CN110285977A
Vehicle simulation control method and device, computer equipment and storage medium
CN111967163A