An obstacle collision distance determination method, device, equipment and storage medium
By rotating the vehicle's outer contour to obtain the collision rotation angle and turning radius, the problem of inaccurate collision distance calculation by ultrasonic radar sensors during turning is solved, enabling more accurate obstacle collision distance judgment and early warning, thus improving the user experience.
Patent Information
- Application Number
- CN202510085573.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-20
AI Technical Summary
Existing ultrasonic radar sensors have poor directionality and blind spots in smart parking, resulting in inaccurate calculation of collision distance. Especially when turning, they can easily cause sudden braking, reducing the user experience.
By identifying obstacle segments that pose a collision risk, and rotating the vehicle's outer contour while the vehicle is turning, the collision rotation angle at which the vehicle's outer contour first intersects with the obstacle segment or when the obstacle segment first lies within the vehicle's outer contour is obtained. This angle is then combined with the turning radius to determine the obstacle collision distance.
It improves the accuracy of obstacle collision distance calculation, ensuring that accurate braking or adjustment actions can be taken in advance when turning, thus enhancing the user experience.
Smart Images

Figure CN119705436B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent auxiliary driving, in particular to a method and device for determining collision distance of an obstacle, equipment and storage medium. BACKGROUND
[0002] With the continuous maturity of intelligent parking technology, ultrasonic radar sensors are widely used in collision distance detection and safety assistance in intelligent parking due to their low cost, simple principle and high short-range detection accuracy. They can inform the driver of the situation of the surrounding obstacles through sound or more intuitive display, helping the driver to eliminate the dead angle of view.
[0003] However, ultrasonic radar sensors also have certain limitations, such as poor directivity and blind area. Only obstacles that enter the ultrasonic radar sector can be detected. If the obstacle does not enter the ultrasonic sector and is close to the vehicle body, or suddenly enters the ultrasonic sector at close range, there will be a collision risk and strong user stress.
[0004] Using a specific distance as the basis for determining braking or inaccurate collision distance calculation, especially when turning, if the collision distance calculation is inaccurate and the obstacle suddenly enters the ultrasonic sector at close range, it will cause sudden braking and reduce the experience. SUMMARY
[0005] The present application provides a method and device for determining collision distance of an obstacle, equipment and storage medium, which can solve the technical problem of inaccurate collision distance calculation in the prior art, which can cause sudden braking and reduce the experience.
[0006] To achieve the above purpose, the technical solution adopted by the present application is:
[0007] In a first aspect, the present application provides a method for determining collision distance of an obstacle, comprising the following steps:
[0008] Screening an obstacle segment with a collision risk;
[0009] If the vehicle is in a turning state, rotating the vehicle outer contour based on the turning radius, obtaining the collision rotation angle at which the vehicle outer contour first intersects with the obstacle segment or the obstacle segment first locates within the vehicle outer contour;
[0010] Determining the collision distance of the obstacle according to the collision rotation angle and the turning radius.
[0011] In some optional schemes, the vehicle outer contour is rotated step by step until the vehicle outer contour first intersects with the obstacle segment or the obstacle segment first locates within the vehicle outer contour.
[0012] In some alternatives, the step-by-step rotating the vehicle outer contour comprises:
[0013] determining an initial rotation angle according to the position relationship between the obstacle line segment and the vehicle outer contour;
[0014] rotating the vehicle outer contour by the initial rotation angle;
[0015] when the condition that the vehicle outer contour does not intersect with the obstacle line segment or the obstacle line segment is located within the vehicle outer contour is not met, continuing to rotate the vehicle outer contour by a set rotation step.
[0016] In some alternatives, the determining an initial rotation angle according to the position relationship between the obstacle line segment and the vehicle outer contour comprises:
[0017] when two first included angles formed between a line connecting the rotation center and two end points of the obstacle line segment and a line on which a rear axle of the vehicle is located are both greater than all second included angles formed between the line connecting the rotation center and all end points of the vehicle outer contour in a traveling direction of the vehicle and the line on which the rear axle of the vehicle is located, taking a minimum included angle among all the included angles as the initial rotation angle;
[0018] when the first included angle is less than the second included angle, setting the initial rotation angle to zero.
[0019] In some alternatives, when judging whether the condition that the vehicle outer contour intersects with the obstacle line segment or the obstacle line segment is located within the vehicle outer contour is met:
[0020] firstly judging whether the vehicle outer contour intersects with the obstacle line segment;
[0021] when the vehicle outer contour does not intersect with the obstacle line segment, secondly judging whether the obstacle line segment is located within the vehicle outer contour.
[0022] In some alternatives, a coordinate system is established with a center point of the rear axle of the vehicle as a coordinate origin, and before rotating the vehicle outer contour based on the turning radius, the vehicle outer contour and the obstacle line segment are both translated by a distance of the turning radius away from the turning center.
[0023] In some alternatives, when the vehicle is in a straight-line driving state, an obstacle collision distance is determined according to coordinate values of the obstacle line segment and coordinate values of the vehicle contour.
[0024] In a second aspect, the present application provides an obstacle collision distance determination device, the obstacle collision distance determination device comprising:
[0025] a screening module configured to screen out the obstacle segment with a collision risk;
[0026] a rotating module configured to rotate the vehicle outer contour based on a turning radius when the vehicle is in a turning state, and obtain a collision rotation angle at which the vehicle outer contour first intersects with the obstacle segment or the obstacle segment first locates within the vehicle outer contour;
[0027] a collision distance calculation module configured to determine the obstacle collision distance according to the collision rotation angle and the turning radius.
[0028] In a third aspect, the present application provides an obstacle collision distance determination device, which comprises a processor, a memory, and an obstacle collision distance determination program stored in the memory and executable by the processor, wherein the obstacle collision distance determination program, when executed by the processor, implements the steps of the obstacle collision distance determination method according to any one of the above.
[0029] In a fourth aspect, the present application provides a computer readable storage medium, which stores an obstacle collision distance determination program, wherein the obstacle collision distance determination program, when executed by a processor, implements the steps of the obstacle collision distance determination method according to any one of the above.
[0030] Compared with the prior art, the present application has the following advantages: in the turning state, the rotation angle at which the vehicle outer contour first intersects with the obstacle segment or the obstacle segment first locates within the vehicle outer contour is obtained by rotating the vehicle outer contour, as the collision rotation angle at which the vehicle and the obstacle have a collision risk after the vehicle is rotated, and then the obstacle collision distance is determined according to the collision rotation angle and the turning radius, so that the timing of the collision risk is more accurate, the calculation accuracy of the collision distance between the vehicle and the obstacle is improved, and after the more accurate collision distance is obtained, the user experience can be improved by making brake or direction adjustment actions in advance. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0032] Figure 1 Flowchart of the obstacle collision distance determination method in the embodiments of the present application;
[0033] Figure 2 Flowchart of rotating the vehicle outer contour in the embodiments of the present application;
[0034] Figure 3 Flow chart for judging the position relationship between the vehicle outer contour and the obstacle line segment in the embodiment of the present application;
[0035] Figure 4 Schematic diagram for simplifying the vehicle outer contour in the embodiment of the present application;
[0036] Figure 5 Straight-ahead advancing risk area division diagram in the embodiment of the present application;
[0037] Figure 6 Straight-ahead retreating risk area division diagram in the embodiment of the present application;
[0038] Figure 7 Advancing turning risk area division diagram in the embodiment of the present application;
[0039] Figure 8 Retreating turning risk area division diagram in the embodiment of the present application;
[0040] Figure 9 Straight-ahead advancing collision distance calculation schematic diagram in the embodiment of the present application;
[0041] Figure 10 Advancing turning collision distance calculation schematic diagram in the embodiment of the present application;
[0042] Figure 11 Schematic diagram of the obstacle collision distance determination device in the embodiment of the present application;
[0043] Figure 12 Schematic diagram of the obstacle collision distance determination device in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable persons skilled in the art to better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor fall within the scope of protection of the present application.
[0045] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail in conjunction with the drawings.
[0046] In a first aspect, the embodiments of the present application provide an obstacle collision distance determination method.
[0047] In an embodiment, with reference to Figure 1 , Figure 1This is a schematic flowchart of the first embodiment of the method for determining the obstacle collision distance in this application. As Figure 1 shown, the method for determining the obstacle collision distance includes:
[0048] S100: Screen out the obstacle line segments with collision risks.
[0049] Both the obstacle and the vehicle are simplified. Specifically, the obstacle is simplified into obstacle line segments. For irregular obstacles, they can be simplified into multiple obstacle line segments. The vehicle is simplified into a vehicle outer contour that is roughly the same shape as the vehicle.
[0050] By judging whether the obstacle line segment overlaps with the collision risk coverage area in the vehicle traveling direction, screen out the obstacle line segments with collision risks. When at least part of the obstacle line segment is located within the collision risk coverage area in the vehicle traveling direction, it is considered that the obstacle line segment has a collision risk; when the obstacle line segment is entirely located outside the collision risk coverage area in the vehicle traveling direction, it is considered that the obstacle line segment has no collision risk.
[0051] As Figure 4 shown, in this example, the vehicle outer contour is an octagon formed by connecting eight points from P1 to P8, and the center point of the vehicle rear axle is O. Taking the center point O of the rear axle as the coordinate origin to establish the vehicle coordinate system, the coordinates of the eight vehicle vertices can be obtained. In other embodiments, the vehicle outer contour can be simplified into different shapes according to the shape of the vehicle.
[0052] Taking the example of simplifying the vehicle into an octagon, the specific method for screening out the obstacle line segments with collision risks is as follows:
[0053] (1) When the vehicle is moving straight forward
[0054] As Figure 5 shown, in the vehicle coordinate system, the coordinates of the two endpoints of the obstacle line segment cluster are (x1, y1) and (x2, y2). Denote the maximum value of x1 and x2 in the abscissa as x max , and the minimum value as x min , and denote the maximum value of the ordinates y1 and y2 as y max . If the following conditions are met:
[0055] (~(x max <x6 - w || x min <x3 + w)) && (y max > y3)
[0056] where, x max <x6 - w means that the maximum value of the abscissas of the two endpoints of the obstacle line segment is outside the leftmost side of the vehicle outer contour, and x min<The minimum value of the abscissas of the two endpoints of the obstacle line segment is located outside the outermost right side of the vehicle outline. Take the negation of the above two conditions, and satisfy y max >y3, that is, the maximum value of the ordinates of the two endpoints of the obstacle line segment cluster is located in front of the p3 point of the vehicle outline, then it is determined that there is a collision risk for the obstacle corresponding to this obstacle line segment.
[0057] According to the above judgment conditions, if Figure 5 Two points of the obstacle line segment 2 in the figure are within the collision risk coverage area, or, if one point of the obstacle line segment 3 is within the collision risk coverage area, it is recorded as a valid obstacle line segment cluster. In the formula, w is the distance extended outward from the left and right boundaries of the vehicle outline, x6 is the X-axis coordinate of the p6 point of the vehicle outline, x3 is the X-axis coordinate of the p3 point of the vehicle outline, and y3 is the Y-axis coordinate of the p3 point of the vehicle outline.
[0058] (2) Vehicle going straight and reversing
[0059] If Figure 6 As shown in the figure, similarly, the maximum value of the abscissas x1 and x2 of the two endpoints of the obstacle line segment is denoted as x max , and the minimum value is denoted as x min , and the minimum value of the ordinates y1 and y2 is denoted as y min , if the conditions are met:
[0060] (~(x max <x7 - w || x min <x2 + w)) && (y min <y2)
[0061] x max <x7 - w indicates that the maximum value of the abscissas of the two endpoints of the obstacle line segment is located outside the outermost left side of the vehicle outline, and x min <x p2 + w indicates that the minimum value of the abscissas of the two endpoints of the obstacle line segment is located outside the outermost right side of the vehicle outline. Take the negation of the above two conditions, and y min <y2, that is, the minimum value of the ordinates of the two endpoints of the obstacle line segment cluster is located behind the p2 point of the vehicle outline, then it is determined that there is a collision risk for the obstacle corresponding to this obstacle line segment.
[0062] According to the above judgment conditions, at least one point of this obstacle line segment is within the collision risk coverage area, which is recorded as a valid obstacle line segment. In the formula, x7 is the X-axis coordinate of the p7 point of the vehicle outline, x2 is the X-axis coordinate of the p2 point of the vehicle outline, and y2 is the Y-axis coordinate of the p2 point of the vehicle outline.
[0063] (3) Moving forward and turning
[0064] According to the steering wheel angle, the vehicle transmission ratio and the vehicle wheelbase, the vehicle turning radius length is CenterP, and the center coordinate is (CenterP, 0).
[0065] As shown in Figure 7 , the maximum value of the horizontal coordinates x1 and x2 of the two end points of the obstacle line segment is denoted as x max , and the maximum value of the vertical coordinates y1 and y2 is denoted as y max , and when the following condition is met:
[0066] x max >x6-w&&y max ≥0
[0067] where x max >x6-w represents the maximum horizontal coordinate of the two end points of the obstacle line segment, which is located inside the vehicle outer contour plus the safety distance, and y max ≥0 represents the maximum vertical coordinate of the two end points of the obstacle line segment, which is located in front of the rear axle of the vehicle outer contour.
[0068] The distances between the two end points of the obstacle line segment cluster satisfying the above conditions and the turning center point (CenterP, 0) are calculated respectively, and the larger value is denoted as R Pmax , and the smaller value is denoted as R Pmin , where x6 is the X-axis coordinate of the vehicle outer contour p6 point.
[0069] The distance between the vehicle outer contour vertex P6 and the turning center point (CenterP, 0) is denoted as R Vmax , and the distance obtained by subtracting half the vehicle width from the turning radius is denoted as R Vmin .
[0070] If the following condition is met:
[0071] ~(R Pmax <R Vmin -w||R Pmin >R Vmax +w)
[0072] That is, at least one point of the obstacle line segment is in the collision risk coverage area, which is denoted as an effective obstacle line segment, where w is the distance of the vehicle left and right boundaries extending outward.
[0073] (4) Reverse turning
[0074] As shown in Figure 8 , the larger value of the horizontal coordinates x1 and x2 of the two end points of the obstacle line segment is denoted as x max , and the smaller value of y1 and y2 is denoted as y min , and the larger value is denoted as y max , and when the following condition is met:
[0075] y min <y3
[0076] Calculate the distance between the two points of the obstacle line segment that meet the above conditions and the turning circle center point (CenterP, 0) respectively, and take the larger value as R Pmax , take the smaller value and record it as R Pmin . Calculate the distance between the vehicle's outer contour vertex P6 and the turning circle center point (CenterP,0) and record it as R Vmax , deduct half the vehicle width from the turning radius and record it as R Vmin , y3 is the Y-axis coordinate of point p3 on the vehicle's outer contour.
[0077] If any of the following conditions are met:
[0078] (~(R Pmax <R Vmin -w||R Pmin >R Vmax ))&&y min ≤0
[0079] (~(x max <x2+w||R Pmin >R Vmax ))&&y max ≥0
[0080] That is, at least one point of the obstacle line segment is within the collision risk coverage area, which is recorded as a valid obstacle line segment. Where w is the distance extended outward from the left and right boundaries of the vehicle, and x2 is the X-axis coordinate of point p2 on the vehicle's outer contour.
[0081] Under different vehicle movement patterns, the corresponding judgment criteria are used to judge the obstacle segments, thereby screening out valid obstacle segments, that is, obstacle segments with collision risks. In the subsequent collision distance calculation, only the collision distance of these obstacle segments needs to be calculated.
[0082] S200: If the vehicle is in a turning state, the outer contour of the vehicle is rotated based on the turning radius to obtain a collision rotation angle when the outer contour of the vehicle intersects with the obstacle line segment for the first time or when the obstacle line segment is located within the outer contour of the vehicle for the first time.
[0083] Preferably, the vehicle outer contour is rotated in steps until the vehicle outer contour intersects the obstacle line segment for the first time or the obstacle line segment is located within the vehicle outer contour for the first time.
[0084] When distributing the rotation of the vehicle's outer contour, the rotation step size of each step can be set according to needs. By adjusting the rotation step size of each step, the calculation accuracy of the collision distance can be adjusted.
[0085] like Figure 2As shown, in addition, the rotation step of each step can be equal or not equal. In the embodiment, the vehicle outer contour is rotated in steps, including the following steps:
[0086] S210: determining an initial rotation angle according to the positional relationship between the obstacle line segment and the vehicle outer contour.
[0087] In this example, the center of rotation is denoted as O, the obstacle line segment 2 is selected, and the two endpoints of the obstacle line segment 2 are denoted as X 21 and X 22 on the left and right sides of the figure, respectively. The lines connecting the center of rotation and the two endpoints of the obstacle line segment are OX 21 and OX 22 , respectively. All the endpoints of the vehicle outer contour in the direction of travel are P3, P4, P5, and P6, respectively. The lines connecting the center of rotation and all the endpoints of the vehicle outer contour in the direction of travel are OP3, OP4, OP5, and OP6, respectively. All the angles are ∠X 21 OP3, ∠X 21 OP4, ∠X 21 OP5, and ∠X 21 OP6. 22 OP3, ∠X 22 OP4, ∠X 22 OP5, and ∠X 22 OP6.
[0088] As can be seen from the figure, after the vehicle outer contour is rotated by ∠X 21 OP4, the vehicle outer contour will not be in contact with the obstacle line segment. Therefore, since there is a difference of ∠X 21 OP4 between the obstacle line segment located far away in the direction of travel of the vehicle and the vehicle outer contour, the rotation angle ∠X 21 OP4 will not cause the obstacle line segment to intersect the vehicle outer contour directly. Therefore, according to the positional relationship between the obstacle line segment and the vehicle outer contour, an initial rotation angle is determined, which can avoid directly rotating the vehicle outer contour by a set rotation step, resulting in the need for many steps to rotate the vehicle outer contour to the obstacle line segment, or the obstacle line segment being located inside the vehicle outer contour, thereby saving calculation amount.
[0089] Preferably, determining the initial rotation angle according to the positional relationship between the obstacle line segment and the vehicle outer contour includes:
[0090] S211: when the two first angles formed between the line connecting the center of rotation and the two endpoints of the obstacle line segment and the line on which the rear axle of the vehicle is located are both greater than all the second angles formed between the lines connecting the center of rotation and all the endpoints of the vehicle outer contour in the direction of travel and the line on which the rear axle of the vehicle is located, the smallest angle among all the angles formed by the line connecting the center of rotation and the two endpoints of the obstacle line segment and the lines connecting the center of rotation and all the endpoints of the vehicle outer contour in the direction of travel is taken as the initial rotation angle.
[0091] Take forward turning as an example, Figure 10 As shown, OX 21 and OX 22 The first angles between the rear axle of the vehicle and the straight line are ∠O'OX 21 and ∠O'OX 22 The straight line where the rear axle of the vehicle is located is the line segment between the rear axle of the vehicle and the center of rotation. The second angles between OP3, OP4, OP5 and OP6 and the straight line where the rear axle of the vehicle is located are ∠O'OP3, ∠O'OP4, ∠O'OP5 and ∠O'OP6 respectively. 21 and ∠O'OX 22 Any angle in ∠O'OP3, ∠O'OP4, ∠O'OP5, and ∠O'OP6 is greater than any angle in ∠O'OP3, ∠O'OP4, ∠O'OP5, and ∠O'OP6. In this example, the straight line on which the rear axle of the vehicle lies refers to the line connecting the rear axle of the vehicle and the center of the rotation circle.
[0092] Take all angles ∠X 21 OP3, ∠X 21 OP4, ∠X 21 OP5, ∠X 21 OP6, ∠X 22 OP3, ∠X 22 OP4, ∠X 22 OP5 and ∠X 22 Minimum angle ∠X in OP6 21 OP4, as the initial rotation angle, ensures that the vehicle's outer contour does not directly intersect the obstacle line segment. Since the obstacle line segment and the vehicle's outer contour are already close, only a few subsequent rotation steps with the set rotation step size are required to ensure that the vehicle's outer contour intersects with the obstacle line segment or that the obstacle line segment lies within the vehicle's outer contour, saving computational effort. Selecting other angles may result in excessive or insufficient rotation. Therefore, the minimum angle formed by the line connecting the rotation center and the two endpoints of the obstacle line segment with the line connecting all endpoints in the direction of travel of the vehicle's outer contour is selected as the initial rotation angle.
[0093] S212: When the first angle is smaller than the second angle, the initial rotation angle is set to zero.
[0094] When the first included angle is smaller than the second included angle, the straight line connecting the center of the rotation circle and the two end points of the obstacle line segment has already passed through the vehicle contour when the vehicle contour is not rotated, and the minimum included angle among all the included angles is taken as the initial rotation angle. In this case, there is a possibility of over-rotation, which results in inaccurate calculation of the final collision distance. For example, when the obstacle line segment is at a close distance in front of the top point P5 of the vehicle contour in the figure, or when the obstacle line segment is located inside the turning of the vehicle and the longitudinal coordinates of the two end points are smaller than the front end point of the vehicle contour, there is still a risk of collision, and the collision distance needs to be calculated. By setting the initial rotation angle to zero and subsequently rotating the vehicle contour by a set rotation step, the vehicle contour and the obstacle line segment will still intersect after a certain rotation step.
[0095] The above method for determining the initial rotation angle ensures that the straight line connecting the end points of the effective obstacle line segment and the center of the rotation circle does not pass through the vehicle contour, and the minimum included angle is taken as the initial rotation angle for the initial rotation calculation. At the same time, the effective obstacle line segment whose straight line connecting the end points and the center of the rotation circle passes through the vehicle contour when the vehicle contour is not rotated is not missed.
[0096] S220: Rotate the vehicle contour by the initial rotation angle.
[0097] As shown in the figure, in this embodiment, the obstacle line segment No. 2 is taken as an example. After calculating the initial rotation angle, the distances between the 8 top points of the vehicle contour and the origin O are calculated as veh_radius[i], and the angles of the 8 top points in the vehicle coordinate system are calculated as an array veh_theta[i], where i is the top point number. Figure 10
[0098] The angles of the 8 top points of the vehicle are all reduced by the initial rotation angle theta_init, and the coordinate values (X(i), Y(i)) of the 8 top points after the angle change are calculated, to obtain the dashed vehicle contour in the figure:
[0099] X(i) = veh_radius(i) * cos(veh_theta(i))
[0100] Y(i) = veh_radius(i) * sin(veh_theta(i))
[0101] Preferably, a coordinate system is established with the center point of the rear axle of the vehicle as the origin, and before rotating the vehicle contour based on the turning radius, both the vehicle contour and the obstacle line segment are translated by a distance of the turning radius away from the turning center.
[0102] In this embodiment, the vehicle contour and the obstacle line segment are translated, and the center point of the rear axle of the vehicle is taken as the coordinate origin. At this time, the rotation center is taken as the coordinate center, and the coordinates of the vertex of the vehicle contour and the obstacle line segment are located on the same side of the coordinate origin, which facilitates calculation.
[0103] In addition, if the vehicle contour and the obstacle line segment are not translated, the rotation center is the turning center,
[0104] As shown in FIG. 1, the right front turning of the vehicle is taken as an example for illustration, and the principle of backward movement is consistent with that of forward movement. A specific embodiment for determining the initial rotation angle by using the above method is given. Figure 10
[0105] The vehicle contour is translated by Center_P unit lengths away from the turning center, and the front end vertex of the vehicle contour and the effective obstacle line segment are located in the second quadrant of the coordinate system established with the center point of the rear axle of the vehicle as the coordinate origin. The atan2(y, x) function (the value range of the second quadrant is 0.5pi-pi) is called to obtain the angles corresponding to the points P3, P4, P5 and P6 in the vehicle coordinate system, i.e., the angles between the lines connecting the points P3, P4, P5, P6 and the X positive ray, and the minimum angle is taken as theta_veh_min, and the angle corresponding to P4 in the figure is the minimum value.
[0106] theta vehmin =atan2(y4,x4), theta_veh_min∈(0.5pi,pi)
[0107] The same step is taken to obtain the angles corresponding to the two end points of each effective obstacle line segment after translation, i.e., the angles between the lines connecting the two end points of the obstacle line segment and the X positive ray, and the maximum value among the angles corresponding to the two end points of the obstacle line segment is taken as theta_od_max. The angle corresponding to the lower left end point X 21 of the second obstacle line segment in the figure is the maximum value.
[0108] The difference between the maximum angle corresponding to the end point of the effective obstacle line segment and the minimum angle corresponding to the vertex of the vehicle contour is taken as the initial rotation angle theta_init, and if the result is negative, the initial rotation angle is taken as 0.
[0109] theta_init=theta_veh_min-theta_od_max
[0110] According to the above method, the minimum angle difference obtained by taking the second obstacle line segment as an example is ∠X 21 OP4.
[0111] In other embodiments, the first angle formed between the line connecting the two end points of the obstacle line segment and the center of the rotating circle and the rear axle of the vehicle, and the second angle formed between the line connecting the center of the rotating circle and all the end points of the vehicle contour in the direction of travel and the rear axle of the vehicle, the minimum value of the difference between all the first angles and all the second angles, that is, the minimum value of the first angle ∠O'OX 21 The difference between the minimum value of the first angle and the maximum value of the second angle ∠O'OP4, that is, ∠O'OX 21 -∠O'OP4=∠X 21 OP4, is taken as the initial rotating angle.
[0112] S230: When the condition that the vehicle contour intersects with the obstacle line segment or the obstacle line segment is located within the vehicle contour is not met, the vehicle contour is continuously rotated by a set rotating step.
[0113] After the initial rotating angle is rotated, it is determined whether the condition that the vehicle contour intersects with the obstacle line segment or the obstacle line segment is located within the vehicle contour is met. When the condition is not met, the vehicle contour is rotated by a set rotating step until the vehicle contour first intersects with the obstacle line segment or the obstacle line segment is first located within the vehicle contour. In this example, the rotating step can be a set arc length or a set rotating angle.
[0114] Since the obstacle line segment is only rotated to be parallel to the vehicle contour, there is a rotating step in which the obstacle line segment is directly rotated to be located within the vehicle contour.
[0115] As shown in FIG. 8, preferably, when the condition that the vehicle contour intersects with the obstacle line segment or the obstacle line segment is located within the vehicle contour is determined: Figure 3
[0116] A: It is first determined whether the vehicle contour intersects with the obstacle line segment.
[0117] B: When the vehicle contour does not intersect with the obstacle line segment, it is further determined whether the obstacle line segment is located within the vehicle contour.
[0118] In this embodiment, after the vehicle contour is rotated, the obstacle line segment only intersects with the end of the vehicle in the direction of travel and the simplified line segments of the vehicle contour on both sides. Therefore, it is first determined whether the vehicle in the direction of travel and the simplified line segments of the vehicle contour on both sides intersect with the obstacle line segment. When all the simplified line segments do not intersect with the obstacle line segment, it is further determined whether the obstacle line segment is located within the vehicle contour. In this way, the calculation amount can be reduced.
[0119] Specifically, A: determining whether the vehicle contour intersects with the obstacle line segment includes the following steps:
[0120] (1) judging whether the obstacle line segment AB intersects with the simplified line segment XY of the vehicle outer contour, specifically, judging by the following two conditions:
[0121]
[0122] If the above two conditions are satisfied simultaneously, then the obstacle line segment AB intersects with the simplified line segment XY of the vehicle outer contour. In the formula, A and B respectively represent two end points of the obstacle line segment, XY represents two end points of a simplified line segment of the vehicle outer contour, and → represents a vector.
[0123] In the scheme, the vehicle outer contour is simplified into a plurality of simplified line segments connected in sequence, and the simplified line segment XY is one of them.
[0124] Taking the simplified line segment P3P4 of the vehicle outer contour as an example, specifically, as shown in Figure 10 the coordinates of the two vertices of the obstacle line segment are A(xa, ya) and B(xb, yb), the vectors AB, AP3, AP4 and the vectors P3P4, P3A, P3B are calculated, and if the following conditions are satisfied simultaneously, then the obstacle line segment AB intersects with the simplified line segment P3P4 of the vehicle outer contour:
[0125]
[0126] (2) judging whether the obstacle line segment AB intersects with the simplified line segment XY of the vehicle outer contour, and one end point of the obstacle line segment AB is on the simplified line segment XY of the vehicle outer contour, specifically, judging by the following two conditions:
[0127]
[0128] If any of the above conditions is satisfied, then the obstacle line segment AB intersects with the simplified line segment XY of the vehicle outer contour, and one end point of the obstacle line segment AB is on the simplified line segment XY of the vehicle outer contour. In the formula, x X is the X-axis coordinate of the X point in the simplified line segment of the vehicle outer contour, and x Y is the X-axis coordinate of the Y point in the simplified line segment of the vehicle outer contour.
[0129] Similarly, taking the simplified line segment P3P4 of the vehicle outer contour as an example, specifically, if any of the following two conditions is satisfied, then the obstacle line segment AB intersects with the simplified line segment P3P4 of the vehicle outer contour, and one of the points is on the simplified line segment P3P4 of the vehicle outer contour:
[0130]
[0131] In the formula, x3 is the X-axis coordinate of the p3 point of the vehicle outer contour, and x4 is the X-axis coordinate of the p4 point of the vehicle outer contour.
[0132] (3) Determine whether the obstacle line segment AB intersects the simplified line segment XY of the vehicle outer contour, and one end point of the simplified line segment XY of the vehicle outer contour is on the obstacle line segment AB, specifically, by the following two conditions:
[0133]
[0134] If any of the above conditions is met, then the obstacle line segment AB intersects the simplified line segment XY of the vehicle outer contour, and one end point of the simplified line segment XY of the vehicle outer contour is on the obstacle line segment AB.
[0135] Similarly, take the simplified line segment P3P4 of the vehicle outer contour as an example, specifically, if any of the following two conditions is met, then the obstacle line segment intersects the simplified line segment P3P4 of the vehicle outer contour, and one of the points is on the obstacle line segment:
[0136]
[0137] If one of the above (1), (2) and (3) is met, then the obstacle line segment intersects the simplified line segment of the vehicle outer contour, indicating a collision risk.
[0138] In addition, the obstacle line segment AB and the simplified line segment XY of the vehicle outer contour intersect directly. First, determine whether the obstacle line segment AB and the simplified line segment XY of the vehicle outer contour intersect, and when AB and XY do not intersect, then determine conditions (2) and (3).
[0139] Specifically, B: Determine whether the obstacle line segment is located within the vehicle outer contour, including the following steps:
[0140] Determine whether the two end points of the obstacle line segment AB are located within the quadrilateral WXYZ formed by the three edges of the vehicle outer contour connected in turn, W, X, Y and Z respectively represent the vertices of the three edges of the vehicle outer contour connected in turn. Let any end point of the obstacle line segment AB be Q, and determine whether the Q point is within the quadrilateral WXYZ according to the following conditions:
[0141] F1>0 && F2>0 && F3>0 && F4>0
[0142] F1<0 && F2<0 && F3<0 && F4<0
[0143] Wherein,
[0144] If any of the following two conditions is met, then the Q point is within the boundary of the quadrilateral WXYZ, i.e. whether the obstacle line segment is located within the vehicle outer contour.
[0145] As shown in Figure 10 two vertices of the obstacle line segment are A(xa,ya) and B(xb,yb), and the four vertices P3, P4, P5 and P6 of the front end of the vehicle contour when the vehicle is driving straight are taken as an example to calculate. The vectors P6P5, P5P4, P4P3, P3P6 and the vectors P3A, P4A, P5A, P6A are calculated, and the following cross product calculation is performed:
[0146]
[0147]
[0148] If any one of the following two conditions is met, then point A is on or inside the quadrilateral P3P4P5P6 boundary:
[0149] F1>0&&F2>0&&F3>0&&F4>0
[0150] F1<0&&F2<0&&F3<0&&F4<0
[0151] S300: Determine the obstacle collision distance according to the collision rotation angle and the turning radius.
[0152] In this example, the collision rotation angle is the sum of the initial rotation angle and the multiple set rotation step length.
[0153] When the set rotation step length is an angle, Q = theta_init + n*△Q, n is the number of set rotation step length, and △Q is the angle of the set rotation step length.
[0154] When the set rotation step length is an arc length, n is the number of set rotation step length, and length_init is the arc length of the set rotation step length.
[0155] The obstacle collision distance is S = Q*CenterP, where CenterP is the turning radius. By controlling length_init or △Q, the precision can be controlled.
[0156] As shown in Figure 9 In this embodiment, if the vehicle is in a straight driving state, the obstacle collision distance is determined according to the coordinate values of the obstacle line segment and the coordinate values of the vehicle contour.
[0157] In this example, the minimum value of the difference between the longitudinal coordinate value of the obstacle line segment and the longitudinal coordinate value of the vehicle contour is taken as the obstacle collision distance.
[0158] Taking the vehicle advancing as an example, the principle of retreating and advancing is the same.
[0159] The calculation formula is: length init =min(y a ,y b )-y4, in the formula, y a ,y b are the coordinates of the two endpoints of the obstacle segment, y4 is the ordinate of point p4, length init is the obstacle collision distance.
[0160] In summary, this solution rotates the vehicle outline when turning to obtain the angle at which the vehicle's outer contour will collide with the obstacle segment after rotation. This angle is used as the collision rotation angle at which the vehicle will collide with the obstacle after rotation. This makes it more accurate to judge the timing of the collision risk. The obstacle collision distance is determined based on the collision rotation angle and the turning radius, which can improve the calculation accuracy of the collision distance between the vehicle and the obstacle.
[0161] In a second aspect, an embodiment of the present application also provides a device for determining an obstacle collision distance.
[0162] In one embodiment, referring to Figure 11 , Figure 11 This is a schematic diagram of the functional modules of an embodiment of the obstacle collision distance determination device of the present application.
[0163] like Figure 11 As shown, the obstacle collision distance determination device includes: a screening module, a rotation module and a collision distance calculation module.
[0164] The screening module is used to screen out obstacle segments that pose a collision risk; the rotation module is used to rotate the vehicle's outer contour based on the turning radius when the vehicle is in a turning state, and obtain the collision rotation angle at which the vehicle's outer contour first intersects with the obstacle segment or the obstacle segment first lies within the vehicle's outer contour; the collision distance calculation module is used to determine the obstacle collision distance based on the collision rotation angle and turning radius.
[0165] Furthermore, in one embodiment, the obstacle collision distance determination device further includes a straight line collision distance calculation module, which is used to determine the obstacle collision distance according to the coordinate values of the obstacle line segment and the coordinate values of the vehicle outline.
[0166] Furthermore, in one embodiment, the obstacle collision distance determination device also includes a translation module, which is used to: establish a coordinate system with the center point of the vehicle's rear axle as the coordinate origin, and before rotating the vehicle's outer contour based on the turning radius, translate the vehicle's outer contour and the obstacle line segment away from the center of the turning circle by the distance of the turning radius.
[0167] The functions of each module in the obstacle collision distance determination apparatus correspond to the steps in the obstacle collision distance determination method, and the functions and implementation processes will not be described here.
[0168] In a third aspect, the embodiments of the present application provide an obstacle collision distance determination device. The obstacle collision distance determination device can be a personal computer (PC), a notebook computer, a server, or other device with data processing function.
[0169] Reference Figure 12 , Figure 12 FIG. 1 is a schematic diagram of a hardware structure of an obstacle collision distance determination device according to an embodiment of the present application. In the embodiment of the present application, the obstacle collision distance determination device can include a processor, a memory, a communication interface, and a communication bus.
[0170] The communication bus can be of any type, and is used to interconnect the processor, the memory, and the communication interface.
[0171] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, and is used to interconnect devices inside the obstacle collision distance determination device, and is also used to interconnect the obstacle collision distance determination device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber interface, an ATM interface, etc. The user device can be a display (Display), a keyboard (Keyboard), etc.
[0172] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0173] The processor can be a general processor, which can invoke an obstacle collision distance determination program stored in the memory and execute the obstacle collision distance determination method provided in the embodiments of the present application. For example, the general processor can be a central processing unit (CPU). The method executed by the obstacle collision distance determination program when invoked can refer to various embodiments of the obstacle collision distance determination method of the present application, which will not be described herein.
[0174] Those skilled in the art can understand that the hardware structure shown in the above-mentioned embodiments is not a limitation to the present application, and can include more or less components, or combine certain components, or different arrangement of components. Figure 12
[0175] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium.
[0176] The computer readable storage medium of the present application stores an obstacle collision distance determination program, wherein the obstacle collision distance determination program is executed by the processor to implement the steps of the obstacle collision distance determination method as described above.
[0177] The method implemented by the obstacle collision distance determination program when executed can refer to various embodiments of the obstacle collision distance determination method of the present application, which will not be described herein.
[0178] It should be noted that the above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0179] The terms "comprising" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover not exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device. The terms "first", "second" and "third" and the like descriptions are used to distinguish different objects, and do not represent the order or limit the types of "first", "second" and "third".
[0180] In the description of the embodiments of the present application, "exemplary", "for example" or "for instance" is used to mean as an example, illustration or description. Any embodiment or design scheme described as "exemplary", "for example" or "for instance" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "exemplary", "for example" or "for instance" are used to present the relevant concept in a specific manner.
[0181] In the description of the embodiments of the present application, unless otherwise specified, " / " means the meaning of or, for example, A / B can mean A or B; "and / or" in the text only describes the relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0182] In some of the processes described in the embodiments of the present application, a plurality of operations or steps are included in a specific order, but it should be understood that these operations or steps can be executed or in parallel without the order in which they appear in the embodiments of the present application, and the serial number of the operation is only used to distinguish different operations, and the serial number itself does not represent any execution order. In addition, these processes can include more or fewer operations, and these operations or steps can be executed in sequence or in parallel, and these operations or steps can be combined.
[0183] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) as described above, and includes a plurality of instructions for making a terminal device execute the method described in each embodiment of the present application.
[0184] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An obstacle collision distance determination method characterized by, The method comprises the following steps: screening out the obstacle line segment with collision risk; if the vehicle is in a turning state, rotating the vehicle outer contour based on the turning radius, obtaining a collision rotation angle at which the vehicle outer contour first intersects with the obstacle line segment or the obstacle line segment first locates within the vehicle outer contour; determining the obstacle collision distance according to the collision rotation angle and the turning radius.
2. The obstacle collision distance determination method according to claim 1, wherein: rotating the vehicle outer contour step by step until the vehicle outer contour first intersects with the obstacle line segment or the obstacle line segment first locates within the vehicle outer contour.
3. The obstacle collision distance determination method according to claim 2, characterized by, The step of rotating the vehicle outer contour step by step comprises: determining an initial rotation angle according to the position relationship between the obstacle line segment and the vehicle outer contour; rotating the vehicle outer contour at the initial rotation angle; when the condition that the vehicle outer contour intersects with the obstacle line segment or the obstacle line segment locates within the vehicle outer contour is not met, continuing to rotate the vehicle outer contour at a set rotation step.
4. The obstacle collision distance determination method according to claim 3, characterized by, The step of determining the initial rotation angle according to the position relationship between the obstacle line segment and the vehicle outer contour comprises: when two first included angles formed between the line connecting the rotation center and the two end points of the obstacle line segment and the line on which the rear axle of the vehicle is located are both greater than all second included angles formed between the line connecting the rotation center and all end points of the vehicle outer contour in the running direction and the line on which the rear axle of the vehicle is located, taking the smallest included angle among all the included angles formed by the rotation center and the line connecting the two end points of the obstacle line segment and the line connecting all the end points of the vehicle outer contour in the running direction as the initial rotation angle; when the first included angle is smaller than the second included angle, setting the initial rotation angle to zero.
5. The obstacle collision distance determination method according to claim 3, wherein, When judging whether the condition that the vehicle outer contour intersects with the obstacle line segment or the obstacle line segment locates within the vehicle outer contour is met, the following steps are performed: firstly judging whether the vehicle outer contour intersects with the obstacle line segment; when the vehicle outer contour does not intersect with the obstacle line segment, judging whether the obstacle line segment locates within the vehicle outer contour.
6. The obstacle collision distance determination method of claim 1, wherein, establishing a coordinate system with the center point of the rear axle of the vehicle as the coordinate origin, and translating the vehicle outer contour and the obstacle line segment away from the turning center by a distance of the turning radius before rotating the vehicle outer contour based on the turning radius.
7. The obstacle collision distance determination method of claim 1, wherein, if the vehicle is in a straight running state, determining the obstacle collision distance according to the coordinate value of the obstacle line segment and the coordinate value of the vehicle contour.
8. An obstacle collision distance determination apparatus characterized by comprising: The obstacle collision distance determination device comprises: a screening module for screening out the obstacle line segment with collision risk; a rotating module for rotating the vehicle outer contour based on the turning radius when the vehicle is in a turning state, and obtaining a collision rotation angle at which the vehicle outer contour first intersects with the obstacle line segment or the obstacle line segment first locates within the vehicle outer contour; a collision distance calculation module for determining the obstacle collision distance according to the collision rotation angle and the turning radius.
9. An obstacle collision distance determination device characterized by comprising: The obstacle collision distance determination device includes a processor, a memory, and an obstacle collision distance determination program stored on the memory and executable by the processor, wherein the obstacle collision distance determination program, when executed by the processor, implements the steps of the obstacle collision distance determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium has stored thereon an obstacle collision distance determination program, wherein the obstacle collision distance determination program, when executed by a processor, implements the steps of the obstacle collision distance determination method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Automatic parking path obstacle collision detection method, device and system
CN107672588A
Collision distance determination method and system, vehicle and storage medium
CN111309013A