A method and device for judging driver intervention in automatic driving of a vehicle
By obtaining and processing vehicle point data in the autonomous driving test system, calculating the distance and gradient from the reference reference line, performing fitting and curvature analysis, and accurately judging driver intervention, the problem of low test accuracy in the existing technology is solved, and the data reliability and scientificity of the evaluation of autonomous driving performance are improved.
Patent Information
- Application Number
- CN202510143877.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The existing autonomous driving test system fails to effectively consider driver interference factors, resulting in reduced test accuracy and making it difficult to ensure that analysis is based on data completely controlled by the autonomous driving system.
By obtaining multiple points in the car autonomous driving system at preset time intervals, calculating the distance and gradient of these points to the pre-planned reference line, performing fitting and curvature calculations, and determining whether there is driver intervention.
It realizes accurate judgment of driver intervention in car autonomous driving tests, improves the scientificity and accuracy of autonomous driving performance evaluation, and avoids data unreliability due to interference.
Smart Images

Figure CN119596961B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method and device for judging driver intervention in autonomous driving of a vehicle. Background Art
[0002] In the development of autonomous driving technology, the testing of autonomous driving is a key link in promoting the development of future intelligent transportation systems. The core significance of the test is to verify the safety and stability of the autonomous driving system in complex and changeable actual scenarios, optimize the perception, decision-making and control algorithms, and ensure that the vehicle can cope with challenges in different environments. At the same time, through data accumulation and technology iteration, it provides a basis for the formulation of relevant laws, regulations and industry standards, promotes the commercialization of technology, and ultimately achieves the goal of reducing traffic accident rates and improving travel efficiency and convenience. These tests not only provide strong support for the development of science and technology, but will also profoundly change the way people travel.
[0003] Patent CN109491370A proposes a safety control method and system for automobile autonomous driving testing, the method comprising: obtaining vehicle safety status information through the CAN bus, and judging whether the test vehicle meets the driving conditions based on the vehicle safety status information, and if not, controlling the vehicle to stop running. When the vehicle meets the driving conditions, the vehicle control signal is obtained and the correctness of the vehicle control signal is verified. If the verification fails, the vehicle control signal is judged to be an invalid signal. When the vehicle is running, it is judged whether the test vehicle, the hub or the autonomous driving robot is in an emergency state. If so, the vehicle is controlled to stop running. This method can stop running when the vehicle does not meet the driving conditions, but this method will result in low test efficiency.
[0004] In the test of autonomous driving, in order to avoid accidents, it is necessary to repeat the experiment on the same road section. In order to ensure the safety of the experiment, at least one safety driver must be on board to monitor the test vehicle, so that he can take over the vehicle operation in time in an emergency, and turn the steering wheel when the path deviates too much to avoid driving off the road and causing an accident. However, in order to analyze the performance of the autonomous driving system and ensure the reliability of the data, we need to determine whether the trajectory of the vehicle during the test is subject to driver intervention for each test experiment. If it is found that the driver has manually operated the steering wheel during the test, such as turning the steering wheel to cause the route to deviate, the relevant test data will be considered unreliable and eliminated. This screening process helps to ensure that subsequent analysis is based only on real data that is completely controlled by the autonomous driving system, but it is very difficult to screen the test data later, especially when multiple sets of trajectories need to be obtained during the test.
[0005] The autonomous driving test systems and methods that have been proposed so far do not take into account the factor of driver interference, thereby reducing the accuracy of the test. Summary of the invention
[0006] The present invention provides a method and device for judging driver intervention in automatic driving of a vehicle, which can accurately judge whether the driver intervenes in the automatic driving of the vehicle, thereby improving the scientificity and accuracy of the evaluation of the automatic driving performance.
[0007] A method for judging driver intervention in automatic driving of a vehicle, comprising:
[0008] Acquire multiple points of the vehicle's automatic driving at preset time intervals;
[0009] Determine a first determination point set by calculating based on the plurality of points and a pre-planned baseline reference line;
[0010] When the first determination point set is not empty, performing fitting calculation based on the first determination point set to obtain a second determination point set;
[0011] When the second determination point set is not empty, performing gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set, and a third determination point set;
[0012] When the third determination point set is not empty, performing curvature calculation based on the third determination point set to obtain a fourth determination point set;
[0013] When the fourth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention.
[0014] Furthermore, after obtaining multiple points in the automatic driving of the vehicle at preset time intervals, the method further includes:
[0015] Fitting is performed on a plurality of the points to obtain a vehicle driving trajectory curve.
[0016] Further, when the first determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or,
[0017] When the second determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or
[0018] When the third determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver.
[0019] Further, calculating based on the plurality of points and the pre-planned baseline reference line to determine a first determination point set includes:
[0020] Establish an initial point set based on the multiple points obtained;
[0021] Setting a tolerance threshold and initializing a first determination point set;
[0022] The distance from each point in the initial point set to the baseline reference line is calculated, and if the absolute distance from a point in the initial point set to the baseline reference line is greater than or equal to the tolerance threshold, the corresponding point is placed in the first determination point set.
[0023] Further, performing fitting calculation based on the first determination point set to obtain a second determination point set includes:
[0024] Set a distance threshold and initialize a second determination point set;
[0025] Performing straight line fitting on the points in the first determination point set to obtain a vehicle trajectory straight line;
[0026] Calculate the distance between each point in the first determination point set and the vehicle trajectory straight line. If the absolute distance between a point in the first determination point set and the vehicle trajectory straight line is greater than or equal to the distance threshold, place the corresponding point in the second determination point set.
[0027] Further, gradient calculation is performed based on the second determination point set to obtain a first-order gradient set, a second-order gradient set, and a third determination point set, including:
[0028] Initialize the first-order gradient set and the third decision point set;
[0029] Calculating the first-order gradient value of each point in the second determination point set, and putting the calculated first-order gradient value into the first-order gradient set;
[0030] Traversing the first-order gradient set, and placing one of the points corresponding to two adjacent first-order gradient values with different positive and negative values into the third determination point set;
[0031] Initialize the second-order gradient set;
[0032] Calculating the second-order gradient value of each point in the second determination point set, and putting the calculated second-order gradient value into the second-order gradient set;
[0033] The second-order gradient set is traversed, and one of the points corresponding to two adjacent second-order gradient values with different positive and negative values and not included in the third determination point set is included in the third determination point set.
[0034] Furthermore, the first-order gradient value of the current point is a difference obtained by subtracting the distance from the previous point to the reference line from the distance from the corresponding current point in the second determination point set to the reference line;
[0035] The second-order gradient value of the current point is a difference obtained by subtracting the first-order gradient value of the previous point from the first-order gradient value of the current point corresponding to the second determination point set.
[0036] Further, performing curvature calculation based on the third determination point set to obtain a fourth determination point set includes:
[0037] Setting a curvature threshold and initializing a fourth determination point set;
[0038] The curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set is calculated, and if the curvature is greater than or equal to the curvature threshold, the point corresponding to the curvature is placed in the fourth determination point set.
[0039] Furthermore, the method further comprises:
[0040] If the fourth determination point set is empty, determining the points in the third determination point set as local interference points;
[0041] Set the number of trend judgment points N and initialize the fifth judgment point set;
[0042] Take the first N first-order gradient values and the last N first-order gradient values corresponding to the local interference point in the first-order gradient set and calculate the median respectively, to obtain the first-order gradient median and the last-order gradient median of the local interference point;
[0043] If the positive and negative signs of the median of the previous order gradient and the median of the next order gradient are different, the corresponding local interference point is placed in the fifth determination point set;
[0044] Take the first N second-order gradient values and the last N second-order gradient values corresponding to the second-order gradient values of the local interference point in the second-order gradient set and calculate the median respectively, to obtain the first second-order gradient median and the last second-order gradient median of the local interference point;
[0045] If the positive and negative signs of the median of the first second-order gradient and the median of the second second-order gradient are different, the corresponding local interference point is added to the fifth determination point set;
[0046] When the fifth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention. When the fifth determination point set is empty, it is determined that the automatic driving of the vehicle is not subject to driver intervention.
[0047] A device for judging driver intervention in automatic driving of a vehicle, comprising:
[0048] A point acquisition module is used to acquire multiple points in the automatic driving of the vehicle at preset time intervals;
[0049] A first calculation module, used for calculating according to the plurality of points and a pre-planned baseline reference line to determine a first determination point set;
[0050] A second calculation module, configured to, when the first determination point set is not empty, perform fitting calculation based on the first determination point set to obtain a second determination point set;
[0051] A third calculation module, configured to, when the second determination point set is not empty, perform gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set;
[0052] a fourth calculation module, configured to, when the third determination point set is not empty, perform curvature calculation based on the third determination point set to obtain a fourth determination point set;
[0053] The judgment module is used to determine that the automatic driving of the vehicle is subject to driver intervention when the fourth judgment point set is not empty.
[0054] Furthermore, the device also includes a fitting module, which is used to obtain multiple points in the vehicle automatic driving test at preset time intervals, and then fit the multiple points to obtain a vehicle driving trajectory curve.
[0055] Furthermore, the judgment module is also used to determine that the automatic driving of the vehicle is not interfered by the driver when the first judgment point set is empty; or,
[0056] When the second determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or
[0057] When the third determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver.
[0058] Furthermore, the first calculation module performs calculation according to the plurality of points and the pre-planned baseline reference line to determine a first determination point set, including:
[0059] Establish an initial point set based on the multiple points obtained;
[0060] Setting a tolerance threshold and initializing a first determination point set;
[0061] The distance from each point in the initial point set to the baseline reference line is calculated, and if the absolute distance from a point in the initial point set to the baseline reference line is greater than or equal to the tolerance threshold, the corresponding point is placed in the first determination point set.
[0062] Furthermore, the second calculation module performs fitting calculation based on the first determination point set to obtain a second determination point set, including:
[0063] Set a distance threshold and initialize a second determination point set;
[0064] Performing straight line fitting on the points in the first determination point set to obtain a vehicle trajectory straight line;
[0065] Calculate the distance between each point in the first determination point set and the vehicle trajectory straight line. If the absolute distance between a point in the first determination point set and the vehicle trajectory straight line is greater than or equal to the distance threshold, place the corresponding point in the second determination point set.
[0066] Furthermore, the third calculation module performs gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set, including:
[0067] Initialize the first-order gradient set and the third decision point set;
[0068] Calculating the first-order gradient value of each point in the second determination point set, and putting the calculated first-order gradient value into the first-order gradient set;
[0069] Traversing the first-order gradient set, and placing one of the points corresponding to two adjacent first-order gradient values with different positive and negative values into the third determination point set;
[0070] Initialize the second-order gradient set;
[0071] Calculating the second-order gradient value of each point in the second determination point set, and putting the calculated second-order gradient value into the second-order gradient set;
[0072] The second-order gradient set is traversed, and one of the points corresponding to two adjacent second-order gradient values with different positive and negative values and not included in the third determination point set is included in the third determination point set.
[0073] Furthermore, the first-order gradient value of the current point is a difference obtained by subtracting the distance from the previous point to the reference line from the distance from the corresponding current point in the second determination point set to the reference line;
[0074] The second-order gradient value of the current point is a difference obtained by subtracting the first-order gradient value of the previous point from the first-order gradient value of the current point corresponding to the second determination point set.
[0075] Further, the fourth calculation module performs curvature calculation based on the third determination point set to obtain a fourth determination point set, including:
[0076] Setting a curvature threshold and initializing a fourth determination point set;
[0077] The curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set is calculated, and if the curvature is greater than or equal to the curvature threshold, the point corresponding to the curvature is placed in the fourth determination point set.
[0078] Furthermore, the device further includes a fifth calculation module, configured to:
[0079] If the fourth determination point set is empty, determining the points in the third determination point set as local interference points;
[0080] Set the number of trend judgment points N and initialize the fifth judgment point set;
[0081] Take the first N first-order gradient values and the last N first-order gradient values corresponding to the local interference point in the first-order gradient set and calculate the median respectively, to obtain the first-order gradient median and the last-order gradient median of the local interference point;
[0082] If the positive and negative signs of the median of the previous order gradient and the median of the next order gradient are different, the corresponding local interference point is placed in the fifth determination point set;
[0083] Take the first N second-order gradient values and the last N second-order gradient values corresponding to the second-order gradient values of the local interference point in the second-order gradient set and calculate the median respectively, to obtain the first second-order gradient median and the last second-order gradient median of the local interference point;
[0084] If the positive and negative signs of the median of the first second-order gradient and the median of the second second-order gradient are different, the corresponding local interference point is added to the fifth determination point set;
[0085] When the fifth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention. When the fifth determination point set is empty, it is determined that the automatic driving of the vehicle is not subject to driver intervention.
[0086] The method and device for judging driver intervention in automatic driving of a vehicle provided by the present invention have at least the following beneficial effects:
[0087] (1) It can accurately judge whether the driver intervenes during the autonomous driving test, which helps ensure that subsequent analysis is based only on real data that is completely controlled by the autonomous driving system, and improves the scientificity and accuracy of the evaluation of autonomous driving performance;
[0088] (2) Through fitting, distance calculation, first-order and second-order calculation, and curvature calculation of the points in the car's autonomous driving test, it is possible to determine whether the driver has intervened. The calculation speed is fast and the judgment result is accurate. It can effectively determine whether there is driver interference in the car's autonomous driving test;
[0089] (3) This method does not require additional testing equipment, does not require pre-processing of the vehicle or the test section, is low-cost, simple to operate, and highly reproducible;
[0090] (4) It can also be applied to actual autonomous driving to determine the sections of road where the driver intervened or did not intervene, and to screen out sections with more interventions through big data for analysis, thereby optimizing the corresponding autonomous driving algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 The present invention provides a flowchart of an embodiment of a method for determining driver intervention in automatic driving of a vehicle.
[0092] FIG. 2( a ) and FIG. 2( b ) are schematic diagrams of vehicle trajectory curves without intervention and without deviation in the method for determining driver intervention in automatic driving of a vehicle provided by the present invention.
[0093] FIG. 3( a ) and FIG. 3( b ) are schematic diagrams of vehicle trajectory curves with and without intervention in the method for determining driver intervention in automatic driving of a vehicle provided by the present invention.
[0094] FIG. 4( a ) and FIG. 4( b ) are schematic diagrams of vehicle trajectory curves in a case where there is driver intervention in the driver intervention judgment method in the automatic driving of a vehicle provided by the present invention.
[0095] FIG. 5( a ) and FIG. 5( b ) are schematic diagrams of vehicle trajectory curves in another case of driver intervention in the driver intervention judgment method in automatic driving of a vehicle provided by the present invention.
[0096] FIG. 6 ( a ) to FIG. 6 ( c ) are schematic diagrams of vehicle trajectory curves with local interference points in the driver intervention judgment method in the automatic driving of a vehicle provided by the present invention.
[0097] Figure 7 A flowchart of another embodiment of the method for determining driver intervention in automatic driving of a vehicle provided by the present invention.
[0098] FIG8 (a) to FIG8 (j) are schematic diagrams of vehicle trajectory curve judgment in an application scenario of the driver intervention judgment method in vehicle automatic driving provided by the present invention.
[0099] Fig. 9 The present invention provides a flowchart of an embodiment of a device for determining driver intervention in an automatic driving vehicle. DETAILED DESCRIPTION
[0100] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0101] refer to Figure 1 In some embodiments, a method for determining driver intervention in an automatic driving vehicle is provided, comprising:
[0102] S1. Acquire multiple points in the automatic driving of the vehicle at preset time intervals;
[0103] S2. Calculating based on the plurality of points and a pre-planned baseline reference line to determine a first determination point set;
[0104] S3, when the first determination point set is not empty, performing fitting calculation based on the first determination point set to obtain a second determination point set;
[0105] S4, when the second determination point set is not empty, performing gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set;
[0106] S5. When the third determination point set is not empty, performing curvature calculation based on the third determination point set to obtain a fourth determination point set;
[0107] S6: When the fourth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention.
[0108] Specifically, if the car is not disturbed during the automatic driving process, the trajectory curve of the car has two situations. One is that there is no deviation at all and the car keeps moving along the direction of the reference line. There may be slight disturbances in the process, or the curve may be slightly bent due to the positioning error of the car, as shown in Figure 2 (a) and Figure 2 (b); the other is that once the trajectory deviates significantly above or below the reference line, the curve will continue to deviate away from the reference line and there will be no trend back. The mathematical characteristic is that the absolute value of the slope of the curve should remain unchanged or increase continuously, as shown in Figure 3 (a) and Figure 3 (b). Figures 3 (a) and 3 (b) show the trajectory of the car deviating above the reference line without driver interference, and the same applies to the downward deviation.
[0109] If the car is interfered with by the driver during the automatic driving process, the following situations may occur: one is that the driver only adjusts the direction once or twice during this process, but the last adjustment happens to make the car return to the baseline reference line and drive along the baseline reference line. In this case, the trajectory of the car is C-shaped, as shown in Figures 4 (a) and 4 (b); the other is that the driver adjusts the direction multiple times during this process, causing the trajectory of the car to have two or more turning points, forming an S-shape, as shown in Figures 5 (a) and 5 (b).
[0110] In addition, errors in the vehicle positioning device itself and errors in the process of collecting trajectory point data will also cause fluctuations in the vehicle trajectory curve, but these fluctuations are sharp and rapid, that is, the curvature at the inflection point of the fluctuation is small. Such fluctuation points are called local interference points. As shown in Figure 6 (a), Figure 6 (b) and Figure 6 (c), Figure 6 (a) and Figure 6 (b) are two cases where local interference points appear, and Figure 6 (c) is a mark for local interference points that appear in a certain situation. Local interference points are easily misjudged as caused by driver interference, so it is important to distinguish these points from the inflection points that are actually caused by driver interference.
[0111] Furthermore, in step S1, multiple points in the car's autonomous driving test are obtained at preset time intervals. The points are the positions of the car at different times during the autonomous driving process. Assuming that the duration of the car's autonomous driving is T seconds, and a point is obtained every t milliseconds, then the total number of points is (1000*T / t). 向下取整 points, named p_ori_1, p_ori_2, ..., p_ori_(1000*T / t) 向下取整 An initial point set is established based on all the acquired points, and the initial point set is fitted into a trajectory curve using polynomial fitting or other fitting methods to obtain a vehicle trajectory curve.
[0112] A baseline reference line is set on the car trajectory curve. The baseline reference line is the car's driving trajectory without any deviation during the automatic driving process, that is, the planned driving path of the car.
[0113] Further, in step S2 to step S4, when the first determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or,
[0114] When the second determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or
[0115] When the third determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver.
[0116] Further, in step S2, calculations are performed based on the multiple points and a pre-planned reference line to determine a first set of judgment points, including:
[0117] S21. Establish an initial set of points based on the obtained multiple points;
[0118] S22. Set a tolerance threshold and initialize the first set of judgment points;
[0119] S23. Calculate the distance from each point in the initial set of points to the reference line. If the absolute distance from the point in the initial set of points to the reference line is greater than or equal to the tolerance threshold, put the corresponding point into the first set of judgment points.
[0120] Specifically, set a tolerance threshold x, the initialized first set of judgment points is empty, calculate the distance dis_baseline_i from each point p_ori_i in the initial set of points, (i = 1, 2,...(1000*T / t) 向下取整 ) to the reference line, (i = 1, 2,...(1000*T / t) 向下取整 ), stipulate that the reference line is horizontal. If the point is above the reference line, then dis_baseline_i > 0; if the point is below the reference line, then dis_baseline_i < 0. If the absolute value |dis_baseline_i| of the distance from the point to the reference line < x, it is considered that even if the point p_ori_i has a slight fluctuation, it is not caused by driver interference. If the absolute value |dis_baseline_i| of the distance from the point to the reference line ≥ x, put p_ori_i into the first set of judgment points. If the first set of judgment points is empty, it is considered that the curve is not interfered by the driver, and the algorithm ends. Otherwise, enter step S3.
[0121] Further, in step S3, fitting calculations are performed based on the first set of judgment points to obtain a second set of judgment points, including:
[0122] S31. Set a distance threshold and initialize the second set of judgment points;
[0123] S32. Perform linear fitting on the points in the first set of judgment points to obtain a straight line of the vehicle trajectory;
[0124] S33. Calculate the absolute distance between each point in the first determination point set and the straight line of the vehicle trajectory. If the absolute distance between the points in the first determination point set and the straight line of the vehicle trajectory is greater than or equal to the distance threshold, put the corresponding points into the second determination point set.
[0125] Specifically, assume that there are num1 points in the first determination point set, and all points are named p_fir_1, p_fir_2,... p_fir_num1 in order. Fit the straight line of the vehicle trajectory strline according to the first determination point set. The starting point of the straight line of the vehicle trajectory is p_fir_1, and the ending point of the straight line of the vehicle trajectory is p_fir_num1.
[0126] At the same time, set the distance threshold maxD and initialize the second determination point set. The distance threshold is a real number, representing the threshold of the distance between a point and the straight line of the vehicle trajectory; the second determination point set is initially set to be empty.
[0127] Calculate the absolute distance |dis_strline_i| from each point p_fir_i (i = 1, 2,... num1) in the first determination point set to the straight line of the vehicle trajectory. If |dis_strline_i| < maxD, it means that the point p_fir_i is very close to the straight line of the vehicle trajectory, and there is probably no driver interference here. Even if there is driver interference, it is impossible to be the only driver interference point in the entire trajectory. If |dis_strline_i| ≥ maxD, then store this point in the second determination point set. If the second determination point set is empty, it is considered that the curve is not interfered by the driver, and the algorithm ends; otherwise, go to step S4.
[0128] Further, in step S4, perform gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set, and a third determination point set, including:
[0129] S41. Initialize the first-order gradient set and the third determination point set;
[0130] S42. Calculate the first-order gradient values of each point in the second determination point set, and put the calculated first-order gradient values into the first-order gradient set;
[0131] S43. Traverse the first-order gradient set, and put one of the points corresponding to two adjacent first-order gradient values with different positive and negative signs into the third determination point set;
[0132] S44. Initialize the second-order gradient set;
[0133] S45, calculating the second-order gradient value of each point in the second determination point set, and putting the calculated second-order gradient value into the second-order gradient set;
[0134] S46, traversing the second-order gradient set, and placing one of the points corresponding to two adjacent second-order gradient values with different positive and negative values and not included in the third determination point set into the third determination point set.
[0135] The first-order gradient value of the current point is the difference between the distance from the corresponding current point in the second determination point set to the baseline reference line and the distance from the previous point to the baseline reference line;
[0136] The second-order gradient value of the current point is a difference obtained by subtracting the first-order gradient value of the previous point from the first-order gradient value of the current point corresponding to the second determination point set.
[0137] Specifically, assume that there are num2 points in the second determination point set, and all points are named p_sec_1, p_sec_2, ... p_sec_num2 in order. Initialize the first-order gradient set and the third determination point set, calculate the first-order gradient value g_i=dis_baseline_i- dis_baseline_i_before of the point p_sec_i (i=1, 2, ...num2) in the second determination point set, where dis_baseline_i is the distance from the current point to the baseline reference line, and dis_baseline_i_before is the distance from the previous point of the current point on the vehicle trajectory curve to the baseline reference line, and then store the first-order gradient value g_i in the first-order gradient set. Traverse the first-order gradient set. If the signs of the first-order gradient values are both positive and negative, then the points with inconsistent signs of the first-order gradient values of the two points before and after are stored in the third determination point set. If the first-order gradient values in a first-order gradient set are: 3, 7, 4, 2, -1, -2, -3, -2, then the point with the first-order gradient value of 2 (the 4th point) or the point with the first-order gradient value of -1 (the 5th point) is stored in the third judgment point set.
[0138] Initialize the second-order gradient set, and calculate the second-order gradient value gg_i = g_i - g_(i-1) of the point p_sec_i (i = 2,... num1) in the second determination point set, where g_i is the first-order gradient value of this point, and g_(i-1) is the first-order gradient value of the previous point of this point in the second determination point set. Then store the second-order gradient value gg_i in the second-order gradient set. Traverse the second-order gradient set. If the signs of the second-order gradient values are positive and negative, then store the points whose signs of the second-order gradient values of the two adjacent points are inconsistent and have not been put into the third determination point set into the third determination point set. Suppose the second-order gradient values in a certain second-order gradient set are: 7, 4, 2, -1, -2, -3, -2, -3. Then store the point with the second-order gradient value of 2 (the 3rd point) or the point with the second-order gradient value of -1 (the 4th point) into the third determination point set.
[0139] If the third determination point set is empty, it is considered that the curve is not interfered by the driver, and the algorithm ends; otherwise, go to step S5.
[0140] Furthermore, in step S5, based on the third determination point set, calculate the curvature to obtain the fourth determination point set, including:
[0141] S51. Set the curvature threshold and initialize the fourth determination point set;
[0142] S52. Calculate the curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set. If the curvature is greater than or equal to the curvature threshold, put the point corresponding to this curvature into the fourth determination point set.
[0143] Specifically, assume that there are num3 points in the third determination point set, and all points are named p_thi_1, p_thi_2,... p_thi_num3 in order. Set the curvature threshold c and initialize the fourth determination point set. First, calculate the curvature cur_i of the vehicle trajectory curve at all points p_thi_i (i = 1, 2,... num3) in the third determination point set. For the points where cur_i < c, it can be determined that these points are local interference points caused by positioning errors or data acquisition errors. If cur_i ≥ c, store this point into the fourth determination point set.
[0144] In step S6, if the fourth judgment point set is not empty, it is considered that the curve is interfered with by the driver and the algorithm ends; otherwise, it means that the points in the third judgment point set are all local interference points. At this time, the local interference points may be located at the points where the sign of the first-order or second-order gradient value of the overall curve changes. Therefore, it is necessary to make further judgments based on the vehicle trajectory curves at both ends of the local interference points and enter steps S71-S77.
[0145] Furthermore, the method further comprises:
[0146] S71, if the fourth determination point set is empty, determining a point in the third determination point set as a local interference point;
[0147] S72, setting the number of trend determination points N and initializing the fifth determination point set;
[0148] S73, taking the first N first-order gradient values and the last N first-order gradient values corresponding to the local interference point in the first-order gradient set and calculating the median respectively, to obtain the first-order gradient median and the last-order gradient median of the local interference point;
[0149] S74, if the positive and negative signs of the previous order gradient median and the next order gradient median are different, the corresponding local interference point is added into the fifth determination point set;
[0150] S75, taking the first N second-order gradient values and the last N second-order gradient values corresponding to the second-order gradient values of the local interference point in the second-order gradient set and calculating the median respectively, to obtain the first second-order gradient median and the last second-order gradient median of the local interference point;
[0151] S76, if the positive and negative signs of the median of the first second-order gradient and the median of the second second-order gradient are different, the corresponding local interference point is added to the fifth determination point set;
[0152] S77. When the fifth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention. When the fifth determination point set is empty, it is determined that the automatic driving of the vehicle is not subject to driver intervention.
[0153] If the local interference point has been placed in the fifth judgment point set after passing the first-order judgment, the second-order judgment will no longer be performed. The local interference point that does not meet the first-order judgment will be subjected to the second-order judgment.
[0154] Specifically, set the number of trend judgment points N and the fifth judgment point set. For all points in the third judgment point set, take the first-order gradient values of the N points behind it in the first-order gradient set and calculate the median, which is recorded as the median of the next first-order gradient g_backward, and take the first-order gradient values of the N points in front of it in the first-order gradient set and calculate the median, which is recorded as the median of the previous order gradient g_forward. If the signs of the median of the next first-order gradient g_backward and the median of the previous order gradient g_forward of the point are inconsistent, the point is stored in the fifth judgment point set.
[0155] If the fifth judgment point set is not empty, it is considered that the curve is interfered by the driver and the algorithm ends. Assume N=9, and there is a local interference point. The first-order gradients of the 9 points behind it are 4, 4, 5, 6, 5, 3, 1, -2, -5, and the first-order gradients of the 9 points in front of it are -4, 4, -2, 1, 3, 3, 4, 5. At this time, the median of the first-order gradients of the 9 points behind is g_backward=4, and the median of the first-order gradients of the 10 points in front is g_forward=3. The signs of g_backward and g_forward are the same, so continue to make the following judgment.
[0156] Otherwise, for each local interference point, take the second-order gradient values of the N points behind it in the second-order gradient set and calculate the median, recorded as the median of the second-order gradient behind gg_backward, and take the second-order gradient values of the N points in front of it in the second-order gradient set and calculate the median, recorded as the median of the first second-order gradient ahead gg_forward. If there is a local interference point, the sign of the median of the second-order gradient behind gg_backward is inconsistent with the sign of the median of the first second-order gradient ahead gg_forward, then the point is stored in the fifth judgment point set. If the fifth judgment point set is not empty, it is considered that the curve is interfered by the driver and the algorithm ends.
[0157] Otherwise, the curve is considered to be not interfered by the driver and the algorithm ends.
[0158] The method provided in the above embodiment is further described below through specific application scenarios.
[0159] Assume that the points of the car curve trajectory obtained in an experiment are shown in Figure 8 (a).
[0160] First, we preset the tolerance threshold x, represented by the distance from the two dotted lines in Figure 8 (b) to the baseline reference line, and calculate the absolute distance from each point in the vehicle trajectory point set to the baseline reference line. If the absolute distance is greater than or equal to x, then the point is stored in the first judgment point set, as shown by the solid point in Figure 8 (c). It can be seen that the first judgment point set is not empty.
[0161] Then, a straight line is fitted based on the first judgment point set, as shown by the upward dotted line in Figure 8 (d). A distance threshold maxD is set, represented by the distance from the two dotted lines in Figure 8 (e) to the fitting straight line, and the absolute distance from each point in the vehicle trajectory point set to the fitting straight line is calculated. If the absolute distance is greater than or equal to maxD, the point is stored in the second judgment point set, as shown by the solid point in Figure 8 (f). It can be seen that the second judgment point set is not empty, and the points of the second judgment point set are shown in Figure 8 (g).
[0162] Then calculate the first-order gradient and second-order gradient of each point in the second determination point set, find the points where the signs of the first-order gradient and second-order gradient values change, and store them in the third determination point set, as shown by the solid points in Figure 8 (h). It can be seen that the third determination point set is not empty, and the midpoint of the third determination point set is shown in Figure 8 (i).
[0163] Set the curvature threshold c and the fourth determination point set, calculate the curvature of each point in the third determination point set, and store the points whose curvature is greater than the curvature threshold into the fourth determination point set. As shown in the solid points in Figure 8 (j), it can be seen that the fourth determination point set is not empty, which means that the curve is disturbed by the driver. The judgment is completed and the algorithm ends.
[0164] refer to Fig. 9 In some embodiments, a device for determining driver intervention in an automatic driving vehicle is provided, comprising:
[0165] The point acquisition module 201 is used to acquire multiple points in the automatic driving of the vehicle according to a preset time interval;
[0166] A first calculation module 202 is used to calculate according to the plurality of points and a pre-planned baseline reference line to determine a first determination point set;
[0167] A second calculation module 203 is used to perform fitting calculation based on the first determination point set to obtain a second determination point set when the first determination point set is not empty;
[0168] A third calculation module 204 is used to perform gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set when the second determination point set is not empty;
[0169] A fourth calculation module 205, configured to, when the third determination point set is not empty, perform curvature calculation based on the third determination point set to obtain a fourth determination point set;
[0170] The judgment module 206 is used to determine that the automatic driving of the vehicle is subject to driver intervention when the fourth judgment point set is not empty.
[0171] Furthermore, the device also includes a fitting module, which is used to obtain multiple points in the automatic driving of the car at preset time intervals, and then fit the multiple points to obtain the car driving trajectory curve.
[0172] Furthermore, the judgment module 206 is further configured to determine that the automatic driving of the vehicle is not interfered by the driver when the first judgment point set is empty; or,
[0173] When the second determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or
[0174] When the third determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver.
[0175] Furthermore, the first calculation module 202 performs calculations based on the plurality of points and the pre-planned baseline reference line to determine a first determination point set, including:
[0176] Establish an initial point set based on the multiple points obtained;
[0177] Setting a tolerance threshold and initializing a first determination point set;
[0178] The distance from each point in the initial point set to the baseline reference line is calculated, and if the absolute distance from a point in the initial point set to the baseline reference line is greater than or equal to the tolerance threshold, the corresponding point is placed in the first determination point set.
[0179] Furthermore, the second calculation module 203 performs fitting calculation based on the first determination point set to obtain a second determination point set, including:
[0180] Set a distance threshold and initialize a second determination point set;
[0181] Performing straight line fitting on the points in the first determination point set to obtain a vehicle trajectory straight line;
[0182] Calculate the distance between each point in the first determination point set and the vehicle trajectory straight line. If the absolute distance between a point in the first determination point set and the vehicle trajectory straight line is greater than or equal to the distance threshold, place the corresponding point in the second determination point set.
[0183] Furthermore, the third calculation module 204 performs gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set, including:
[0184] Initialize the first-order gradient set and the third decision point set;
[0185] Calculating the first-order gradient value of each point in the second determination point set, and putting the calculated first-order gradient value into the first-order gradient set;
[0186] Traversing the first-order gradient set, and placing one of the points corresponding to two adjacent first-order gradient values with different positive and negative values into the third determination point set;
[0187] Initialize the second-order gradient set;
[0188] Calculating the second-order gradient value of each point in the second determination point set, and putting the calculated second-order gradient value into the second-order gradient set;
[0189] The second-order gradient set is traversed, and one of the points corresponding to two adjacent second-order gradient values with different positive and negative values and not included in the third determination point set is included in the third determination point set.
[0190] Furthermore, the first-order gradient value of the current point is a difference obtained by subtracting the distance from the previous point to the reference line from the distance from the corresponding current point in the second determination point set to the reference line;
[0191] The second-order gradient value of the current point is a difference obtained by subtracting the first-order gradient value of the previous point from the first-order gradient value of the current point corresponding to the second determination point set.
[0192] Further, the fourth calculation module 205 performs curvature calculation based on the third determination point set to obtain a fourth determination point set, including:
[0193] Setting a curvature threshold and initializing a fourth determination point set;
[0194] The curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set is calculated, and if the curvature is greater than or equal to the curvature threshold, the point corresponding to the curvature is placed in the fourth determination point set.
[0195] Furthermore, the device further includes a fifth calculation module 207, configured to:
[0196] If the fourth determination point set is empty, determining the points in the third determination point set as local interference points;
[0197] Set the number of trend judgment points N and initialize the fifth judgment point set;
[0198] Take the first N first-order gradient values and the last N first-order gradient values corresponding to the local interference point in the first-order gradient set and calculate the median respectively, to obtain the first-order gradient median and the last-order gradient median of the local interference point;
[0199] If the positive and negative signs of the median of the previous order gradient and the median of the next order gradient are different, the corresponding local interference point is placed in the fifth determination point set;
[0200] Take the first N second-order gradient values and the last N second-order gradient values corresponding to the second-order gradient values of the local interference point in the second-order gradient set and calculate the median respectively, to obtain the first second-order gradient median and the last second-order gradient median of the local interference point;
[0201] If the positive and negative signs of the median of the first second-order gradient and the median of the second second-order gradient are different, the corresponding local interference point is added to the fifth determination point set;
[0202] When the fifth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention. When the fifth determination point set is empty, it is determined that the automatic driving of the vehicle is not subject to driver intervention.
[0203] The above-mentioned embodiments provide a method and device for judging driver intervention in automatic driving of a vehicle, which have at least the following beneficial effects:
[0204] (1) It can accurately judge whether the driver intervenes during the autonomous driving test, which helps ensure that subsequent analysis is based only on real data that is completely controlled by the autonomous driving system, and improves the scientificity and accuracy of the evaluation of autonomous driving performance;
[0205] (2) Through fitting, distance calculation, first-order and second-order calculation, and curvature calculation of the points in the car's autonomous driving test, it is possible to determine whether the driver has intervened. The calculation speed is fast and the judgment result is accurate. It can effectively determine whether there is driver interference in the car's autonomous driving test;
[0206] (3) This method does not require additional testing equipment, does not require pre-processing of the vehicle or the test section, is low-cost, simple to operate, and highly reproducible;
[0207] (4) It can also be applied to actual autonomous driving to determine the sections of road where the driver intervened or did not intervene, and to screen out sections with more interventions through big data for analysis, thereby optimizing the corresponding autonomous driving algorithm.
[0208] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for judging driver intervention in automatic driving of a vehicle, characterized in that: include: Acquire multiple points in the automatic driving of the vehicle at preset time intervals, perform fitting on the multiple points, and obtain a vehicle driving trajectory curve; Calculation is performed based on the plurality of points and the pre-planned baseline reference line to determine a first determination point set: an initial point set is established based on the plurality of points acquired, a tolerance threshold is set and the first determination point set is initialized, and the distance from each point in the initial point set to the baseline reference line is calculated, and if the absolute distance from the point in the initial point set to the baseline reference line is greater than or equal to the tolerance threshold, the corresponding point is placed in the first determination point set; When the first determination point set is not empty, a fitting calculation is performed based on the first determination point set to obtain a second determination point set: a distance threshold is set and the second determination point set is initialized, a straight line is fitted to the points in the first determination point set to obtain a vehicle trajectory straight line, and an absolute distance between each point in the first determination point set and the vehicle trajectory straight line is calculated; if the absolute distance between a point in the first determination point set and the vehicle trajectory straight line is greater than or equal to the distance threshold, the corresponding point is placed in the second determination point set; When the second determination point set is not empty, gradient calculation is performed based on the second determination point set to obtain a first-order gradient set, a second-order gradient set, and a third determination point set: one of the points corresponding to two adjacent first-order gradient values with different positive and negative values in the first-order gradient set is placed in the third determination point set, and one of the points corresponding to two adjacent second-order gradient values with different positive and negative values in the second-order gradient set that has not been placed in the third determination point set is placed in the third determination point set; the first-order gradient value of the current point is the difference between the distance from the corresponding current point in the second determination point set to the baseline reference line and the distance from the previous point to the baseline reference line; The second-order gradient value of the current point is the difference obtained by subtracting the first-order gradient value of the previous point from the first-order gradient value of the current point corresponding to the second determination point set; When the third determination point set is not empty, a curvature calculation is performed based on the third determination point set to obtain a fourth determination point set: a curvature threshold is set and the fourth determination point set is initialized, and the curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set is calculated, and if the curvature is greater than or equal to the curvature threshold, the point corresponding to the curvature is placed in the fourth determination point set; When the fourth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention.
2. The method according to claim 1, characterized in that When the first determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or, When the second determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver; or, When the third determination point set is empty, it is determined that the automatic driving of the vehicle is not interfered by the driver.
3. The method according to claim 1, characterized in that Performing gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set, and a third determination point set includes: Initialize the first-order gradient set and the third decision point set; Calculating the first-order gradient value of each point in the second determination point set, and putting the calculated first-order gradient value into the first-order gradient set; Traversing the first-order gradient set, and placing one of the points corresponding to two adjacent first-order gradient values with different positive and negative values into the third determination point set; Initialize the second-order gradient set; Calculating the second-order gradient value of each point in the second determination point set, and putting the calculated second-order gradient value into the second-order gradient set; The second-order gradient set is traversed, and one of the points corresponding to two adjacent second-order gradient values with different positive and negative values and not included in the third determination point set is included in the third determination point set.
4. The method according to claim 1, characterized in that: The method further comprises: If the fourth determination point set is empty, determining the points in the third determination point set as local interference points; Set the number of trend judgment points N and initialize the fifth judgment point set; Take the first N first-order gradient values and the last N first-order gradient values corresponding to the local interference point in the first-order gradient set and calculate the median respectively, to obtain the first-order gradient median and the last-order gradient median of the local interference point; If the positive and negative signs of the median of the previous order gradient and the median of the next order gradient are different, the corresponding local interference point is placed into the fifth determination point set; Take the first N second-order gradient values and the last N second-order gradient values corresponding to the second-order gradient values of the local interference point in the second-order gradient set and calculate the median respectively, to obtain the first second-order gradient median and the last second-order gradient median of the local interference point; If the positive and negative signs of the median of the first second-order gradient and the median of the second second-order gradient are different, the corresponding local interference point is added to the fifth determination point set; When the fifth determination point set is not empty, it is determined that the automatic driving of the vehicle is subject to driver intervention. When the fifth determination point set is empty, it is determined that the automatic driving of the vehicle is not subject to driver intervention.
5. A device for judging driver intervention in automatic driving of a vehicle, characterized in that: include: A point acquisition module is used to acquire multiple points in the automatic driving of the vehicle at preset time intervals; A fitting module is used to obtain a vehicle driving trajectory curve after acquiring multiple points in the vehicle automatic driving at preset time intervals; A first calculation module is used to calculate according to the plurality of points and the pre-planned baseline reference line to determine a first determination point set: establish an initial point set according to the plurality of points obtained, set a tolerance threshold and initialize the first determination point set, calculate the distance from each point in the initial point set to the baseline reference line, and if the absolute distance from the point in the initial point set to the baseline reference line is greater than or equal to the tolerance threshold, put the corresponding point into the first determination point set; A second calculation module is used for, when the first determination point set is not empty, performing fitting calculation based on the first determination point set to obtain a second determination point set: setting a distance threshold and initializing the second determination point set, performing straight line fitting on the points in the first determination point set to obtain a vehicle trajectory straight line, calculating an absolute distance between each point in the first determination point set and the vehicle trajectory straight line, and if the absolute distance between a point in the first determination point set and the vehicle trajectory straight line is greater than or equal to the distance threshold, placing the corresponding point into the second determination point set; A third calculation module is used for, when the second determination point set is not empty, performing gradient calculation based on the second determination point set to obtain a first-order gradient set, a second-order gradient set and a third determination point set: placing one of the current points corresponding to two adjacent first-order gradient values of different positive and negative in the first-order gradient set into the third determination point set, placing one of the current points corresponding to two adjacent second-order gradient values of different positive and negative in the second-order gradient set and not placed in the third determination point set into the third determination point set; the first-order gradient value of the current point is the difference between the distance from the corresponding current point in the second determination point set to the baseline reference line and the distance from the previous point to the baseline reference line; the second-order gradient value of the current point is the difference between the first-order gradient value of the corresponding current point in the second determination point set and the first-order gradient value of the previous point; a fourth calculation module, configured to, when the third determination point set is not empty, perform curvature calculation based on the third determination point set to obtain a fourth determination point set: set a curvature threshold and initialize the fourth determination point set, calculate the curvature of the vehicle driving trajectory curve corresponding to each point in the third determination point set, and if the curvature is greater than or equal to the curvature threshold, put the point corresponding to the curvature into the fourth determination point set; The judgment module is used to determine that the automatic driving of the vehicle is subject to driver intervention when the fourth judgment point set is not empty.
Citation Information
Patent Citations
Safety control method and system for automobile automatic driving test
CN109491370A
Multi-driver in-the-loop driving test platform
CN113219955A
Online compliance verification system for automatic driving decision algorithm
CN116842688A