Collision avoidance method and device, storage medium and computer device
By predicting collisions between obstacles and the main vehicle and calculating avoidance deceleration, and adjusting the real-time speed of obstacles, the problem of unrealistic collisions in autonomous driving simulation testing is solved, improving the effectiveness and realism of simulation results.
Patent Information
- Application Number
- CN202211375709.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-11-04
AI Technical Summary
In simulation tests of autonomous driving algorithms, unrealistic collisions may occur between obstacles and the vehicle, affecting the validity of the simulation results.
By predicting future collisions between obstacles and the main vehicle, calculating avoidance deceleration, and adjusting the real-time speed of the obstacles during simulation to avoid collisions, an intelligent agent model is used to control the behavior of the obstacles.
This reduces the occurrence of unrealistic interactions and improves the effectiveness and realism of simulation results.
Smart Images

Figure CN115626157B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automatic driving, and particularly relates to a collision avoidance method and device, a storage medium and a computer device. BACKGROUND
[0002] In the process of simulating and testing an automatic driving algorithm, the automatic driving algorithm running in simulation may be different from the automatic driving algorithm running in road testing. In the case of different automatic driving algorithms, the motion behavior of the host vehicle in simulation is different from the motion behavior in road testing. In this case, when the obstacle moves along the motion trajectory in road testing, the obstacle and the host vehicle may have unreal interactions, that is, the collision between the obstacle and the host vehicle is not caused by the planning error of the automatic driving algorithm, but by other factors than the automatic driving algorithm, and such collision cannot indicate that the automatic driving algorithm running in simulation has a problem.
[0003] To minimize the impact of unreal interactions on simulation results, unreal collisions should be avoided as much as possible in simulation. Therefore, it is urgent to provide a collision avoidance scheme so that the obstacle can have real interactions with the host vehicle in simulation, thereby improving the efficiency of simulation results. SUMMARY
[0004] The purpose of the present application is to at least solve one of the above technical defects, in particular, the technical defect of low efficiency of simulation results in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a collision avoidance method, which comprises:
[0006] In the current simulation frame, whether the obstacle and the host vehicle will collide in a future simulation frame is predicted according to the obstacle prediction trajectory and the host vehicle prediction trajectory corresponding to the current simulation frame;
[0007] If the obstacle and the host vehicle will collide in the future simulation frame, a target obstacle prediction position at the time of collision is obtained;
[0008] The target obstacle prediction position, the real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle prediction trajectory are used to calculate the avoidance deceleration corresponding to the current simulation frame;
[0009] The avoidance deceleration corresponding to the current simulation frame and the real-time speed of the obstacle corresponding to the current simulation frame are used to determine the real-time speed of the obstacle corresponding to the next simulation frame, and the next simulation frame is entered.
[0010] In one of the embodiments, the host vehicle prediction trajectory comprises host vehicle prediction positions of the host vehicle at a plurality of prediction simulation frames, each of the prediction simulation frames corresponding to a simulation time later than a collision time at which the collision occurs;
[0011] The step of calculating the avoidance deceleration corresponding to the current simulation frame according to the target obstacle prediction position, the real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle prediction trajectory comprises:
[0012] According to the time sequence of the plurality of prediction simulation frames, a first interval distance between the host vehicle prediction position of the host vehicle at each of the prediction simulation frames and the target obstacle prediction position is calculated frame by frame until a latest obtained first interval distance is greater than a preset safety distance or the plurality of prediction simulation frames are traversed;
[0013] If the latest obtained first interval distance is greater than the preset safety distance, an interval time length between the current simulation frame and the prediction simulation frame corresponding to the latest obtained first interval distance is determined, a second interval distance between the target obstacle prediction position and an actual position of the obstacle at the current simulation frame is calculated, and a candidate deceleration is determined according to the interval time length, the second interval distance, and the real-time speed of the obstacle corresponding to the current simulation frame;
[0014] If the plurality of prediction simulation frames are traversed, a third interval distance between the obstacle and the host vehicle at the current simulation frame is calculated according to the actual position of the obstacle at the current simulation frame and an actual position of the host vehicle at the current simulation frame, and the candidate deceleration is determined according to the third interval distance, the real-time speed of the obstacle, and the preset safety distance;
[0015] The avoidance deceleration corresponding to the current simulation frame is determined according to the candidate deceleration.
[0016] In one of the embodiments, the step of determining the candidate deceleration according to the interval time length, the second interval distance, and the real-time speed of the obstacle corresponding to the current simulation frame comprises:
[0017] The candidate deceleration is determined by using the following expression:
[0018]
[0019] In the expression, a cal_1 is the candidate deceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, t od is the interval time length, s is the second interval distance, and t r is a preset reaction time length of the obstacle.
[0020] In one of the embodiments, the step of determining the candidate deceleration according to the third interval distance, the real-time speed of the obstacle and the preset safety distance comprises:
[0021] The candidate deceleration is determined by using the following expression:
[0022]
[0023] In the expression, a cal_1 is the candidate deceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, d is the third interval distance, OUT DANGER DIST is the preset safety distance, t r is the preset reaction time of the obstacle.
[0024] In one of the embodiments, the method further comprises:
[0025] If the obstacle and the host vehicle will not collide in the future simulation frame, a predicted collision-free duration corresponding to the current simulation frame is obtained;
[0026] In the case where the predicted collision-free duration is greater than or equal to the preset reaction time of the obstacle, an acceleration corresponding to the current simulation frame is calculated according to the real-time speed of the obstacle corresponding to the current simulation frame, a target obstacle speed and a preset maximum acceleration of the obstacle; the target obstacle speed is the actual motion speed of the obstacle at a simulation time corresponding to the current simulation frame in a road test process.
[0027] According to the acceleration corresponding to the current simulation frame and the real-time speed of the obstacle corresponding to the current simulation frame, a real-time speed of the obstacle corresponding to the next simulation frame is determined, and the next simulation frame is entered.
[0028] In one of the embodiments, the step of calculating the acceleration corresponding to the current simulation frame according to the real-time speed of the obstacle corresponding to the current simulation frame, the target obstacle speed and the preset maximum acceleration of the obstacle comprises:
[0029] The first candidate acceleration is calculated by using the following expression:
[0030]
[0031] In the expression, a cal_2 is the first candidate acceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, v t is the target obstacle speed, and Acc Max is the preset maximum acceleration of the obstacle.
[0032] The second candidate acceleration is calculated using the following expression:
[0033]
[0034] wherein a cal_3 is the second candidate acceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, Acc Max is the preset maximum acceleration of the obstacle, and t is the duration of the current simulation frame.
[0035] The smaller of the first candidate acceleration and the second candidate acceleration is taken as the acceleration corresponding to the current simulation frame.
[0036] In one of the embodiments, the method further includes: in the case where the predicted collision-free duration is less than the preset obstacle reaction duration, taking the real-time speed of the obstacle corresponding to the current simulation frame as the real-time speed of the obstacle corresponding to the next simulation frame, and entering the next simulation frame.
[0037] In a second aspect, the embodiments of the present application further provide a collision avoidance device, which includes:
[0038] A collision prediction module is configured to predict, in a current simulation frame, whether the obstacle and the host vehicle will collide in a future simulation frame according to an obstacle prediction trajectory corresponding to the current simulation frame and a host vehicle prediction trajectory.
[0039] A position acquisition module is configured to acquire a target obstacle prediction position at the time of collision in the case where the obstacle and the host vehicle will collide in the future simulation frame.
[0040] An avoidance deceleration calculation module is configured to calculate an avoidance deceleration corresponding to the current simulation frame according to the target obstacle prediction position, a real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle prediction trajectory.
[0041] An obstacle real-time speed determination module is configured to determine a real-time speed of the obstacle corresponding to a next simulation frame according to the avoidance deceleration corresponding to the current simulation frame and the real-time speed of the obstacle corresponding to the current simulation frame, and enter the next simulation frame.
[0042] In a third aspect, the embodiments of the present application provide a storage medium having computer readable instructions stored therein, which, when executed by one or more processors, cause the one or more processors to perform the steps of the collision avoidance method according to any of the above embodiments.
[0043] In a fourth aspect, the embodiments of the present application provide a computer device, which includes one or more processors and a memory.
[0044] The memory stores computer readable instructions which, when executed by the one or more processors, perform the steps of the collision avoidance method of any of the above embodiments.
[0045] In the collision avoidance method, device, storage medium and computer device of the present application, if it is predicted in the current simulation frame that the obstacle and the host vehicle will collide in a future simulation frame, the target obstacle prediction position at the time of collision can be obtained, and the avoidance deceleration corresponding to the current simulation frame is calculated according to the target obstacle prediction position, the real-time speed of the obstacle corresponding to the current simulation frame and the predicted trajectory of the host vehicle corresponding to the current simulation frame, so that the obstacle can determine the real-time speed of the obstacle corresponding to the next simulation frame according to the real-time speed of the obstacle corresponding to the current simulation frame and the avoidance deceleration, and simulate the next simulation frame accordingly. In this way, when it is predicted in the simulation process that a collision will occur in the future, the obstacle can adjust its speed to avoid the host vehicle, thereby reducing the occurrence of unrealistic interactions as much as possible, and improving the efficiency of the simulation result. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0047] Figure 1 A flowchart of the collision avoidance method in one embodiment;
[0048] Figure 2 A flowchart of the step of calculating the avoidance deceleration corresponding to the current simulation frame in one embodiment;
[0049] Figure 3 A schematic structural block diagram of the collision avoidance device in one embodiment;
[0050] Figure 4 A structural schematic diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0052] In one embodiment, the present application provides a collision avoidance method which can be applied to a computer device, which can be but is not limited to a desktop computer, a notebook computer, a single server or a server cluster, etc. The following embodiments take the application of the method to a simulation server as an example for illustration, wherein the simulation server is a single server or a server cluster running a simulation algorithm. In order to control the behavior of obstacles in the process of simulation, the simulation server can be configured with agent algorithm models of obstacles, each of which is used to control the movement of an obstacle in a simulation scene. In order to avoid unrealistic interactions, each agent algorithm model can be added with certain intelligent logic, so that the agent algorithm model can realistically interact based on the host vehicle behavior in simulation. For the agent algorithm model with intelligent logic, the following embodiments refer to it as an intelligent agent. The collision warning method herein can be implemented by the intelligent agent in the simulation server.
[0053] As shown in Figure 1 , the method specifically comprises the following steps:
[0054] S102: In the current simulation frame, whether the obstacle and the host vehicle will collide in the future simulation frame is predicted according to the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory.
[0055] Wherein each simulation frame corresponds to a simulation time, and the simulation time corresponding to the future simulation frame is later than the simulation time corresponding to the current simulation frame. The obstacle prediction trajectory includes the predicted position of the obstacle in at least one future simulation frame, and the host vehicle prediction trajectory includes the predicted position of the host vehicle in at least one future simulation time. For any two simulation frames, their corresponding obstacle prediction trajectories can be the same or different, and the same applies to their corresponding host vehicle prediction trajectories.
[0056] Specifically, the intelligent agent can obtain the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory corresponding to the current simulation frame, and predict whether the obstacle and the host vehicle will collide at the future simulation time according to the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory corresponding to the current simulation frame.
[0057] S104: If the obstacle and the host vehicle will collide in the future simulation frame, the target obstacle prediction position at the time of collision is obtained.
[0058] Specifically, if the host vehicle and the obstacle will collide at the future simulation time according to the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory corresponding to the current simulation frame, the intelligent agent can obtain the predicted position of the obstacle at the time of collision from the obstacle prediction trajectory corresponding to the current simulation frame, which is the target obstacle prediction position.
[0059] S106: Calculate the avoidance deceleration corresponding to the current simulation frame according to the target obstacle predicted position, the real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle predicted trajectory.
[0060] The real-time speed of the obstacle corresponding to the current simulation frame refers to the real-time speed of the obstacle in the current simulation frame. If the host vehicle and the obstacle are predicted to collide, the agent can calculate the avoidance deceleration corresponding to the current simulation frame according to the target obstacle predicted position, the real-time speed of the obstacle in the current simulation frame, and the host vehicle predicted trajectory corresponding to the current simulation frame. The avoidance deceleration is used to indicate that the obstacle decelerates in the next simulation frame to avoid the host vehicle.
[0061] S108: Determine the real-time speed of the obstacle corresponding to the next simulation frame according to the avoidance deceleration corresponding to the current simulation frame and the real-time speed of the obstacle corresponding to the current simulation frame, and enter the next simulation frame.
[0062] Specifically, after determining the avoidance deceleration corresponding to the current simulation frame, the agent can determine the real-time speed of the obstacle in the next simulation frame, i.e., the real-time speed of the obstacle corresponding to the next simulation frame, according to the avoidance deceleration and the real-time speed of the obstacle in the current simulation frame, so that the obstacle can run at a slower real-time speed in the next simulation frame to achieve deceleration avoidance.
[0063] After entering the next simulation frame, the current simulation frame is updated to the next simulation frame, and the agent can perform S102 to S108 according to the updated current simulation frame. For example, the second simulation frame is the next simulation frame of the first simulation frame, before entering the next simulation frame, the current simulation frame is the first simulation frame, and after entering the next simulation frame, the current simulation frame is the second simulation frame. After entering the next simulation frame, the agent can predict whether the obstacle and the host vehicle will collide in the future simulation frame of the second simulation frame according to the obstacle predicted trajectory and the host vehicle predicted trajectory corresponding to the second simulation frame, and adjust the running speed of the obstacle to decelerate and avoid collision in the case of predicting collision.
[0064] In the embodiment, if it is predicted in the current simulation frame that the obstacle and the host vehicle will collide in a future simulation frame, the target obstacle prediction position when the collision occurs can be obtained, and the current simulation frame corresponding avoidance deceleration can be calculated according to the target obstacle prediction position, the real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle prediction trajectory corresponding to the current simulation frame, so that the obstacle can determine the real-time speed of the obstacle corresponding to the next simulation frame according to the real-time speed of the obstacle corresponding to the current simulation frame and the avoidance deceleration, and simulation of the next simulation frame is performed accordingly. In this way, when it is predicted in the simulation process that a collision will occur in the future, the obstacle can adjust its speed to avoid the host vehicle, thereby reducing the occurrence of unrealistic interactions as much as possible, and improving the efficiency of the simulation result.
[0065] In one embodiment, the host vehicle prediction trajectory includes host vehicle prediction positions of the host vehicle in a plurality of prediction simulation frames, and each simulation time corresponding to each prediction simulation frame is later than the collision time when the collision occurs.
[0066] The collision time refers to the simulation time when the collision is predicted to occur, and the collision time is later than the simulation time corresponding to the current simulation frame. The prediction simulation frame refers to a simulation frame whose corresponding simulation time is later than the collision time. Since the host vehicle prediction trajectory usually includes host vehicle prediction positions of the host vehicle in a plurality of future simulation frames, in each future simulation frame, the simulation time corresponding to part of the future simulation frames is earlier than or equal to the collision time, and the simulation time corresponding to the remaining future simulation frames is later than the collision time. The future simulation frame whose corresponding simulation time is later than the collision time is the “prediction simulation frame” described in the embodiments of the present application.
[0067] As shown in Figure 2 The step of calculating the current simulation frame corresponding avoidance deceleration according to the target obstacle prediction position, the real-time speed of the obstacle corresponding to the current simulation frame, and the host vehicle prediction trajectory includes:
[0068] S202: According to the time sequence of the plurality of prediction simulation frames, the first interval distance between the host vehicle prediction position of the host vehicle in each prediction simulation frame and the target obstacle prediction position is calculated frame by frame until the latest obtained first interval distance is greater than the preset safety distance or the plurality of prediction simulation frames are traversed.
[0069] Specifically, in the process of calculating the avoidance deceleration corresponding to the current simulation frame, the agent can fix the obstacle position as the target obstacle predicted position, and make the host vehicle continue to move along the host vehicle predicted trajectory after the collision time, calculate the interval distance between the host vehicle and the obstacle in each predicted simulation frame, which is the "first interval distance" in the embodiments of the present application, until the latest calculated first interval distance is greater than the preset safety distance or the traversal of each predicted simulation frame is completed. It can be understood that the specific value of the preset safety distance can be determined according to the actual situation, for example, according to the preset driving aggressiveness,
[0070] For example, the simulation time corresponding to the current simulation frame is t0, and the host vehicle predicted trajectory corresponding to the current simulation frame is [(t1, P1), (t2, P2), (t3, P3) … (tn, Pn)], where n is a positive integer, tn is the nth simulation time, the larger n is, the later tn is. Pn is the host vehicle predicted position corresponding to the nth simulation time. If the collision time is t2, the predicted simulation frame is the simulation frame corresponding to each simulation time from t3 to tn. In this case, the agent can calculate the first interval distance between P2 and the target obstacle predicted position, and determine whether the first interval distance is greater than the preset safety distance. If yes, the traversal is ended, otherwise, the first interval distance between P3 and the target obstacle predicted position can be calculated. Determine whether the first interval distance between P3 and the target obstacle predicted position is greater than the preset safety distance, if yes, the traversal is ended, otherwise, the first interval distance between P4 and the target obstacle predicted position can be calculated. In this way, until the latest calculated first interval distance is greater than the preset safety distance, or the agent traverses each predicted simulation frame.
[0071] It can be understood that the agent can calculate the first interval distance between the host vehicle predicted position and the target obstacle predicted position in each predicted simulation frame in any way. In one of the embodiments, in order to enable the obstacle to completely avoid the host vehicle to avoid collision, for the currently traversed predicted simulation frame, the agent can calculate the first interval distance according to the host vehicle predicted position corresponding to the currently traversed predicted simulation frame, the host vehicle contour, the obstacle contour and the target obstacle predicted position.
[0072] S204: If the latest obtained first interval distance is greater than the preset safety distance, determine the interval time length between the current simulation frame and the predicted simulation frame corresponding to the latest obtained first interval distance, and calculate the second interval distance between the target obstacle predicted position and the obstacle actual position of the obstacle in the current simulation frame, and determine the candidate deceleration according to the interval time length, the second interval distance and the obstacle real-time speed corresponding to the current simulation frame.
[0073] Specifically, if the newly obtained first interval distance is greater than the preset safety distance, it indicates that the host vehicle and the obstacle maintain a safety distance when the host vehicle moves to the host vehicle predicted position corresponding to the currently traversed predicted simulation frame, and no collision occurs. Therefore, the agent can exit the traversal and determine the braking duration according to the host vehicle predicted parameters corresponding to the last traversed predicted simulation frame.
[0074] Specifically, the agent can obtain an interval duration between the current simulation frame and the predicted simulation frame corresponding to the newly obtained first interval distance (i.e., the last traversed predicted simulation frame of the agent). The interval duration is the duration consumed by the host vehicle to move from the host vehicle real-time position corresponding to the current simulation frame to the host vehicle predicted position corresponding to the last traversed predicted simulation frame along the host vehicle predicted trajectory corresponding to the current simulation frame. The agent can determine the braking duration according to the obtained interval duration, for example, taking the interval duration as the braking duration.
[0075] The agent can also calculate an interval distance between the target obstacle predicted position and the obstacle actual position corresponding to the current simulation frame, i.e., the second interval distance. The second interval distance can reflect the distance of the target obstacle predicted position on the obstacle predicted trajectory corresponding to the current simulation frame, i.e., the distance of the obstacle moving from the obstacle actual position corresponding to the current simulation frame to the target obstacle predicted position along the obstacle predicted trajectory corresponding to the current simulation frame.
[0076] After obtaining the braking duration and the second interval distance, the agent can determine a candidate deceleration according to the braking duration, the second interval distance, and the obstacle real-time speed corresponding to the current simulation frame. In one embodiment, the agent can determine the candidate deceleration according to the following expression in this step:
[0077]
[0078] wherein a is the candidate deceleration, v0 is the obstacle real-time speed corresponding to the current simulation frame, t is the interval duration, s is the second interval distance, and t is the preset obstacle reaction duration. cal_1 od r
[0079] It can be understood that the obstacle reaction duration can be used to simulate the time required for the driver to make an avoidance reaction, and the specific value can be determined according to the actual situation, which is not limited in the present application. By introducing the preset obstacle reaction duration to determine the candidate deceleration, the braking mode of the obstacle can be more similar to the braking mode of the actual driver, and the efficiency of the simulation result can be further improved.
[0080] S206: If the traversal of the plurality of predicted simulation frames is completed, a third interval distance between the obstacle and the host vehicle in the current simulation frame is calculated according to the actual position of the obstacle in the current simulation frame and the actual position of the host vehicle in the current simulation frame, and a candidate deceleration is determined according to the third interval distance, the real-time speed of the obstacle, and the preset safety distance.
[0081] Specifically, if the traversal of each predicted simulation frame is completed, it indicates that the first interval distance corresponding to each predicted simulation frame is less than or equal to the preset safety distance. In this case, in order to determine a suitable deceleration so that the obstacle can successfully avoid the host vehicle to avoid collision, the agent can calculate the interval distance between the host vehicle and the obstacle in the current simulation frame, which is the third interval distance. And according to the third interval distance, the real-time speed of the obstacle in the current simulation frame, and the preset safety distance, the candidate deceleration is determined.
[0082] In one of the embodiments, in this step, the agent can determine the candidate deceleration by using the following expression:
[0083]
[0084] In the expression, a cal_1 is the candidate deceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, d is the third interval distance, OUT DABGER DIST is the preset safety distance, and t r is the preset obstacle reaction time.
[0085] It can be understood that the obstacle reaction time can be used to simulate the time required for the driver to make an avoidance reaction, and the specific value thereof can be determined according to actual conditions, which is not limited in the present application. By introducing the preset obstacle reaction time to determine the candidate deceleration, the braking mode of the obstacle can be made more similar to the braking mode of the actual driver, and thus the efficiency of the simulation result can be further improved.
[0086] S208: The avoidance deceleration corresponding to the current simulation frame is determined according to the candidate deceleration.
[0087] In one of the embodiments, the agent can take the candidate deceleration as the avoidance deceleration corresponding to the current simulation frame. In another embodiment, in order to make the motion mode of the agent more consistent with the actual situation to further improve the efficiency of the simulation result, the agent can take min(a cal_1 ,Decel Max ) as the avoidance deceleration corresponding to the current simulation frame. Wherein, min(A, B) means taking the smaller value between value A and value B; Decel MaxThe preset maximum deceleration of the obstacle can be determined according to the vehicle type to which the obstacle belongs.
[0088] In this embodiment, through the steps S202 to S208, the agent can determine the appropriate avoidance deceleration. On the one hand, the obstacle can successfully avoid the host vehicle to avoid collision, and on the other hand, the agent can avoid adopting too large avoidance deceleration to decelerate and cause unrealistic interaction, so that the obstacle controlled by the agent can be consistent with the actual vehicle performance, thereby improving the efficiency of the simulation result.
[0089] In one embodiment, the collision avoidance method of the present application can further include the following steps:
[0090] If the obstacle and the host vehicle will not collide in the future simulation frame, a predicted collision-free duration corresponding to the current simulation frame is obtained;
[0091] In the case where the predicted collision-free duration is greater than or equal to a preset obstacle reaction duration, an acceleration corresponding to the current simulation frame is calculated according to the real-time speed of the obstacle corresponding to the current simulation frame, a target obstacle speed and a preset maximum acceleration of the obstacle; the target obstacle speed is the actual motion speed of the obstacle at the simulation time corresponding to the current simulation frame in the road test process.
[0092] According to the acceleration corresponding to the current simulation frame and the real-time speed of the obstacle corresponding to the current simulation frame, the real-time speed of the obstacle corresponding to the next simulation frame is determined, and the next simulation frame is entered.
[0093] Specifically, if it is predicted that the obstacle and the host vehicle will not collide in the future simulation frame according to the predicted trajectory of the obstacle corresponding to the current simulation frame and the predicted trajectory of the host vehicle corresponding to the current simulation frame, a predicted collision-free duration can be obtained. The predicted collision-free duration refers to the duration for which it is predicted that there will be no collision in the future simulation frame. For example, the first simulation frame, the second simulation frame and the third simulation frame are three simulation frames that are adjacent in sequence, if it is predicted that the host vehicle and the obstacle will not collide in the future simulation frame in the first simulation frame, the second simulation frame and the third simulation frame, and the current simulation frame is the third simulation frame, then the predicted collision-free duration corresponding to the current simulation frame is the time interval between the simulation time corresponding to the third simulation frame and the simulation time corresponding to the first simulation frame.
[0094] The intelligent agent can compare the predicted collision-free duration with the preset obstacle reaction duration to simulate the time required for the driver to make an acceleration reaction. If the predicted collision-free duration is greater than or equal to the preset obstacle reaction duration, the intelligent agent can control the obstacle to accelerate. In this case, the intelligent agent can take the actual motion speed of the obstacle at the simulation time corresponding to the current simulation frame in the road test as the target obstacle speed, and calculate the acceleration corresponding to the current simulation frame according to the target obstacle speed, the real-time speed of the obstacle at the current simulation frame, and the preset maximum acceleration of the obstacle. It can be understood that the specific value of the maximum acceleration of the obstacle can be determined according to the actual situation, and the present application does not make specific limitations thereon, for example, it can be determined according to the vehicle type to which the obstacle belongs.
[0095] After determining the acceleration corresponding to the current simulation frame, the intelligent agent can determine the real-time speed of the obstacle in the next simulation frame according to the acceleration corresponding to the current simulation frame and the real-time speed of the obstacle at the current simulation frame, so that the real-time speed of the obstacle can gradually recover to the target obstacle speed.
[0096] In one of the embodiments, the collision avoidance method of the present application can further include the step of: if the predicted collision-free duration is less than the preset obstacle reaction duration, taking the real-time speed of the obstacle corresponding to the current simulation frame as the real-time speed of the obstacle corresponding to the next simulation frame, and entering the next simulation frame. That is, when it is predicted according to the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory corresponding to the current simulation frame that the obstacle and the host vehicle will not collide in the future simulation frame, and the predicted collision-free duration corresponding to the current simulation frame is less than the preset obstacle reaction duration, the intelligent agent can keep the real-time speed of the obstacle unchanged and not accelerate. In this way, the acceleration reaction of the obstacle can be more similar to the acceleration reaction of the actual driver, and the efficiency of the simulation result can be further improved.
[0097] In the present embodiment, when the intelligent agent detects that the collision with the host vehicle no longer occurs, it can calculate an acceleration and adjust the real-time speed of the obstacle according to the acceleration, so that the obstacle can gradually accelerate to the real-time speed of the obstacle in the road test, thereby simulating the situation in the road test after avoiding the collision, making the simulation scene more realistic, and further improving the efficiency of the simulation result.
[0098] In one embodiment, the step of calculating the acceleration corresponding to the current simulation frame according to the real-time speed of the obstacle corresponding to the current simulation frame, the target obstacle speed, and the preset maximum acceleration of the obstacle comprises:
[0099] The first candidate acceleration is calculated using the following expression:
[0100]
[0101] wherein a cal_2 is the first candidate acceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, v t is the target obstacle speed, Acc Max is the preset maximum acceleration of the obstacle.
[0102] The second candidate acceleration is calculated using the following expression:
[0103]
[0104] wherein a cal_3 is the second candidate acceleration, v0 is the real-time speed of the obstacle corresponding to the current simulation frame, v Max is the preset maximum acceleration of the obstacle.
[0105] The smaller of the first candidate acceleration and the second candidate acceleration is taken as the acceleration corresponding to the current simulation frame.
[0106] Specifically, in the process of calculating the acceleration of the current simulation frame, the agent can calculate the first candidate acceleration based on the acceleration calculation formula. However, generally, the value of the first candidate acceleration is relatively large, resulting in poor comfort during acceleration. However, the driver will not be too aggressive when accelerating, but will also consider the comfort during acceleration, so it is necessary to smooth the magnitude of the acceleration to obtain an acceleration that is more consistent with the actual driving situation. After a large number of real vehicle experiments, the following table shows the comfortable acceleration:
[0107] Table 1 Comfortable acceleration at different real-time speeds
[0108] Real-time velocity v (m / s) Comfortable acceleration a (m / s 2 )]]> 0 2.0 4 1.6 10 1.4 15 1.3 20 1.25 30 1.15 40 1.05
[0109] When using a function to fit the speed-acceleration curve, a smooth acceleration equation can be obtained:
[0110]
[0111] Therefore, the agent can calculate the second candidate acceleration through the smooth acceleration equation, and take the smaller of the first candidate acceleration and the second candidate acceleration as the acceleration corresponding to the current simulation frame, so that the actual speed of the obstacle can gradually recover to the target obstacle speed through appropriate acceleration, so that the obstacle controlled by the agent can be consistent with the actual vehicle performance, thereby improving the efficiency of the simulation result.
[0112] The collision avoidance device provided by the embodiments of the present application is described below. The collision avoidance device described below can be correspondingly referred to the collision avoidance method described above.
[0113] In one embodiment, the present application provides a collision avoidance device 300. As shown in the figure, the device 300 includes a collision prediction module 310, a position acquisition module 320, an avoidance deceleration calculation module 330, and an obstacle real-time speed determination module 340. Wherein: Figure 3
[0114] The collision prediction module 310 is configured to, in a current simulation frame, predict whether the obstacle and the host vehicle will collide in a future simulation frame according to the obstacle prediction trajectory corresponding to the current simulation frame and the host vehicle prediction trajectory.
[0115] The position acquisition module 320 is configured to, in the case that the obstacle and the host vehicle will collide in the future simulation frame, acquire a target obstacle prediction position at the time of collision.
[0116] The avoidance deceleration calculation module 330 is configured to calculate an avoidance deceleration corresponding to the current simulation frame according to the target obstacle prediction position, the obstacle real-time speed corresponding to the current simulation frame, and the host vehicle prediction trajectory.
[0117] The obstacle real-time speed determination module 340 is configured to determine an obstacle real-time speed corresponding to a next simulation frame according to the avoidance deceleration corresponding to the current simulation frame and the obstacle real-time speed corresponding to the current simulation frame, and enter the next simulation frame.
[0118] In one embodiment, the host vehicle prediction trajectory includes host vehicle prediction positions of the host vehicle in a plurality of prediction simulation frames, and each simulation time corresponding to each prediction simulation frame is later than a collision time at the time of collision.
[0119] The avoidance deceleration calculation module 330 includes a traversal unit, a first candidate deceleration determination unit, a second candidate deceleration determination unit, and an avoidance deceleration determination unit. Wherein, the traversal unit is configured to calculate a first interval distance between the host vehicle prediction position of the host vehicle in each prediction simulation frame and the target obstacle prediction position frame by frame according to the time sequence of the plurality of prediction simulation frames, until the latest obtained first interval distance is greater than a preset safety distance or the traversal of the plurality of prediction simulation frames is completed.
[0120] The first candidate deceleration determining unit is configured to determine an interval duration between the current simulation frame and a predicted simulation frame corresponding to the latest obtained first interval distance, and calculate a second interval distance between the target obstacle predicted position and an obstacle actual position of the obstacle in the current simulation frame, and determine a candidate deceleration according to the interval duration, the second interval distance and an obstacle real-time speed corresponding to the current simulation frame, when the latest obtained first interval distance is greater than the preset safety distance.
[0121] The second candidate deceleration determining unit is configured to calculate a third interval distance between the obstacle and the host vehicle in the current simulation frame according to the obstacle actual position of the obstacle in the current simulation frame and a host vehicle actual position of the host vehicle in the current simulation frame, and determine the candidate deceleration according to the third interval distance, the obstacle real-time speed and the preset safety distance, when the traversal of the plurality of predicted simulation frames is completed.
[0122] The avoidance deceleration determining unit is configured to determine an avoidance deceleration corresponding to the current simulation frame according to the candidate deceleration.
[0123] In one embodiment, the first candidate deceleration determining unit comprises a first calculating unit configured to determine the candidate deceleration by using the following expression:
[0124]
[0125] wherein a is the candidate deceleration, v0 is an obstacle real-time speed corresponding to the current simulation frame, t is the interval duration, s is the second interval distance, and t is a preset obstacle reaction duration. cal_1 od r
[0126] In one embodiment, the second candidate deceleration calculating unit comprises a second calculating unit configured to determine the candidate deceleration by using the following expression:
[0127]
[0128] wherein a is the candidate deceleration, v0 is an obstacle real-time speed corresponding to the current simulation frame, d is the third interval distance, OUT DANGER DIST is the preset safety distance, and t is a preset obstacle reaction duration. cal_1 r
[0129] In one embodiment, the collision avoidance device 300 further comprises a duration obtaining module and an acceleration calculating module. The duration obtaining module is configured to obtain a predicted collision-free duration corresponding to the current simulation frame, in the case that the obstacle and the host vehicle will not collide in future simulation frames. The acceleration calculating module is configured to calculate an acceleration corresponding to the current simulation frame according to an obstacle real-time speed corresponding to the current simulation frame, a target obstacle speed and a preset obstacle maximum acceleration, in the case that the predicted collision-free duration is greater than or equal to a preset obstacle reaction duration; wherein the target obstacle speed is an actual motion speed of the obstacle at a simulation moment corresponding to the current simulation frame in a road test process. The obstacle real-time speed determining module 340 is further configured to determine an obstacle real-time speed corresponding to the next simulation frame according to the acceleration corresponding to the current simulation frame and the obstacle real-time speed corresponding to the current simulation frame, and enter the next simulation frame.
[0130] In one embodiment, the acceleration calculating module comprises a first candidate acceleration calculating unit, a second candidate acceleration calculating unit and an acceleration determining unit. The first candidate acceleration calculating unit is configured to calculate a first candidate acceleration using the following expression:
[0131]
[0132] wherein a cal_2 is the first candidate acceleration, v0 is the obstacle real-time speed corresponding to the current simulation frame, v t is the target obstacle speed, and Acc Max is the preset obstacle maximum acceleration.
[0133] The second candidate acceleration calculating unit is configured to calculate a second candidate acceleration using the following expression:
[0134]
[0135] wherein a cal_3 is the second candidate acceleration, v0 is the obstacle real-time speed corresponding to the current simulation frame, and Acc Max is the preset obstacle maximum acceleration.
[0136] The acceleration determining unit is configured to take the smaller value between the first candidate acceleration and the second candidate acceleration as the acceleration corresponding to the current simulation frame.
[0137] In one embodiment, the obstacle real-time speed determination module 340 is further configured to, in the case that the predicted collision-free duration is less than a preset obstacle reaction duration, take the obstacle real-time speed corresponding to the current simulation frame as the obstacle real-time speed corresponding to the next simulation frame, and enter the next simulation frame.
[0138] In one embodiment, the present application further provides a storage medium, wherein the storage medium stores computer readable instructions, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the collision avoidance method according to any of the above embodiments.
[0139] In one embodiment, the present application further provides a computer device. The computer device stores computer readable instructions, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the collision avoidance method according to any of the above embodiments.
[0140] Schematically, Figure 4 An internal structure schematic diagram of a computer device provided by an embodiment of the present application is shown in the figure. In one example, the computer device can be a server. Referring to Figure 4 The computer device 900 includes a processing component 902, which further includes one or more processors, and a memory resource represented by the memory 901, for storing instructions executable by the processing component 902, such as an application program. The application program stored in the memory 901 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 902 is configured to execute the instructions to perform the steps of the collision avoidance method according to any of the above embodiments.
[0141] The computer device 900 can further include a power supply component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input / output (I / O) interface 905. The computer device 900 can operate based on an operating system stored in the memory 901, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0142] Those skilled in the art can understand that the internal structure of the computer device shown in the present application is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0143] Finally, it should be noted that the terms "first" and "second", and the like, herein do not denote any order, quantity, combination or importance, but are used to identify one element from another, and do not imply that the specific identities thereof are essential or that the identities are chronological or related in their occurrence. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element. Also, "a", "an", "the", and "said" are used to refer to one or more than one (i.e., to "at least one") of the referenced elements, unless otherwise specified. A plurality also means two or more, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of one or more of the associated listed items.
[0144] The various embodiments described in this specification are presented by way of example, and are not intended to limit the scope of the application. Each embodiment is presented in a way that emphasizes the differences between the embodiments and the other embodiments, but the embodiments can be combined according to the needs of the user, and the same or similar parts are cross-referenced.
[0145] The above description of disclosed embodiments provides enabling disclosure sufficient for one of ordinary skill in the art to implement or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A collision avoidance method, characterized in that, The method includes: In the current simulation frame, based on the obstacle prediction trajectory and the main vehicle prediction trajectory corresponding to the current simulation frame, it is predicted whether the obstacle and the main vehicle will collide in future simulation frames. If the obstacle and the main vehicle will collide in a future simulation frame, then the predicted position of the target obstacle at the time of the collision is obtained; Based on the predicted position of the target obstacle, the real-time speed of the obstacle corresponding to the current simulation frame, and the predicted trajectory of the main vehicle, calculate the avoidance deceleration corresponding to the current simulation frame; Based on the avoidance deceleration and the real-time speed of the obstacle in the current simulation frame, determine the real-time speed of the obstacle in the next simulation frame, and proceed to the next simulation frame. If the obstacle and the main vehicle will not collide in a future simulation frame, then the predicted collision-free duration corresponding to the current simulation frame is obtained. If the predicted duration of no collision is greater than or equal to the preset obstacle reaction time, the acceleration corresponding to the current simulation frame is calculated based on the real-time speed of the obstacle, the speed of the target obstacle, and the preset maximum acceleration of the obstacle; wherein, the speed of the target obstacle is the actual speed of the obstacle at the simulation moment corresponding to the current simulation frame during the road test. Based on the acceleration corresponding to the current simulation frame and the real-time velocity of the obstacle corresponding to the current simulation frame, determine the real-time velocity of the obstacle corresponding to the next simulation frame, and then proceed to the next simulation frame.
2. The collision avoidance method according to claim 1, characterized in that, The predicted trajectory of the main vehicle includes the predicted position of the main vehicle in multiple prediction simulation frames, and the simulation time corresponding to each prediction simulation frame is later than the collision time when the collision occurs. The step of calculating the avoidance deceleration corresponding to the current simulation frame based on the predicted position of the target obstacle, the real-time speed of the obstacle corresponding to the current simulation frame, and the predicted trajectory of the main vehicle includes: Based on the time sequence of the multiple prediction simulation frames, the first interval distance between the predicted position of the main vehicle and the predicted position of the target obstacle in each prediction simulation frame is calculated frame by frame until the latest obtained first interval distance is greater than the preset safety distance or the multiple prediction simulation frames are traversed. If the newly obtained first interval distance is greater than the preset safety distance, then the interval duration between the current simulation frame and the predicted simulation frame corresponding to the newly obtained first interval distance is determined, and the second interval distance between the predicted position of the target obstacle and the actual position of the obstacle in the current simulation frame is calculated. Then, based on the interval duration, the second interval distance and the real-time speed of the obstacle corresponding to the current simulation frame, a candidate deceleration is determined. If multiple predicted simulation frames are traversed, then based on the actual position of the obstacle in the current simulation frame and the actual position of the main vehicle in the current simulation frame, the third interval distance between the obstacle and the main vehicle in the current simulation frame is calculated, and the candidate deceleration is determined based on the third interval distance, the real-time speed of the obstacle, and the preset safety distance. The avoidance deceleration corresponding to the current simulation frame is determined based on the candidate deceleration.
3. The collision avoidance method according to claim 2, characterized in that, The step of determining candidate decelerations based on the interval duration, the second interval distance, and the real-time velocity of the obstacle corresponding to the current simulation frame includes: The candidate deceleration is determined using the following expression: ; In the formula, For the candidate deceleration, The real-time velocity of the obstacle corresponding to the current simulation frame. The interval duration is... This is the second interval distance. The preset reaction time to obstacles.
4. The collision avoidance method according to claim 2, characterized in that, The step of determining the candidate deceleration based on the third interval distance, the real-time speed of the obstacle, and the preset safety distance includes: The candidate deceleration is determined using the following expression: ; In the formula, For the candidate deceleration, The real-time velocity of the obstacle corresponding to the current simulation frame. The third interval distance, This is the preset safe distance. The preset reaction time to obstacles.
5. The collision avoidance method according to claim 1, characterized in that, The step of calculating the acceleration corresponding to the current simulation frame based on the real-time velocity of the obstacle, the velocity of the target obstacle, and the preset maximum acceleration of the obstacle corresponding to the current simulation frame includes: The first candidate acceleration is calculated using the following expression: ; In the formula, For the first candidate acceleration, The real-time velocity of the obstacle corresponding to the current simulation frame. The speed of the target obstacle, The maximum acceleration of the preset obstacle; The second candidate acceleration is calculated using the following expression: ; In the formula, The second candidate acceleration, The real-time velocity of the obstacle corresponding to the current simulation frame. The maximum acceleration of the preset obstacle; The smaller value between the first candidate acceleration and the second candidate acceleration is taken as the acceleration corresponding to the current simulation frame.
6. The collision avoidance method according to claim 1, characterized in that, The method further includes: If the predicted duration of no collision is less than the preset obstacle reaction time, the real-time speed of the obstacle corresponding to the current simulation frame is used as the real-time speed of the obstacle corresponding to the next simulation frame, and the next simulation frame is entered.
7. A collision avoidance device, characterized in that, The collision avoidance device includes: The collision prediction module is used to predict whether the obstacle and the main vehicle will collide in future simulation frames based on the obstacle prediction trajectory and the main vehicle prediction trajectory corresponding to the current simulation frame. The location acquisition module is used to acquire the predicted position of the target obstacle at the time of the collision if the obstacle and the main vehicle will collide in a future simulation frame. The obstacle avoidance deceleration calculation module is used to calculate the obstacle avoidance deceleration corresponding to the current simulation frame based on the predicted position of the target obstacle, the real-time speed of the obstacle corresponding to the current simulation frame, and the predicted trajectory of the main vehicle. The obstacle real-time speed determination module is used to determine the obstacle real-time speed for the next simulation frame based on the avoidance deceleration and the obstacle real-time speed for the current simulation frame, and then proceed to the next simulation frame. The duration acquisition module is used to acquire the predicted collision-free duration corresponding to the current simulation frame when the obstacle and the main vehicle will not collide in future simulation frames. An acceleration calculation module is used to calculate the acceleration corresponding to the current simulation frame based on the real-time velocity of the obstacle, the velocity of the target obstacle, and the preset maximum acceleration of the obstacle when the predicted duration of no collision is greater than or equal to a preset obstacle reaction time. The target obstacle velocity is the actual speed of the obstacle at the simulation moment corresponding to the current simulation frame during the road test. The obstacle real-time velocity determination module is further configured to determine the obstacle real-time velocity corresponding to the next simulation frame based on the acceleration corresponding to the current simulation frame and the obstacle real-time velocity corresponding to the current simulation frame, and then enter the next simulation frame.
8. A storage medium, characterized in that, The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the collision avoidance method as described in any one of claims 1 to 6.
9. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions that, when executed by the one or more processors, perform the steps of the collision avoidance method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Test method and device, equipment and storage medium
CN110287529A