Obstacle collision distance determination method and device, equipment and storage medium
By rotating the vehicle's outer contour in a cornering state, determining the collision rotation angle between the obstacle line segment and the vehicle's outer contour, the problem of inaccurate calculation of collision distance during turning is solved, and the accuracy and user experience of collision distance calculation are improved.
Patent Information
- Application Number
- CN202510085573.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-20
AI Technical Summary
In the prior art, ultrasonic radar sensors have problems with inaccurate calculations when detecting the collision distance of obstacles, especially when turning, resulting in sudden braking execution and reducing user experience.
By screening out the obstacle segments that are at risk of collision, and when the vehicle is in a turning state, the vehicle's outer contour is rotated based on the turning radius, the collision rotation angle between the vehicle's outer contour and the obstacle segment intersects for the first time or the obstacle segment is located in the vehicle's outer contour for the first time, and the obstacle segment is located in the vehicle's outer contour for the first time, determine the collision distance between the obstacle.
It improves the calculation accuracy of the collision distance between the vehicle and the obstacle, accurately determines the timing of the collision risk, and makes braking or adjusting direction actions in advance to improve user experience.
Smart Images

Figure CN119705436A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent assisted driving technology, and in particular to a method, device, equipment and storage medium for determining an obstacle collision distance. Background Art
[0002] As smart parking technology continues to mature, ultrasonic radar sensors are widely used in collision distance detection and safety assistance in smart parking due to their low cost, simple principle, and high short-range detection accuracy. They can inform the driver of surrounding obstacles through sound or more intuitive displays, helping the driver to clear blind spots in the field of vision.
[0003] However, ultrasonic radar sensors also have certain limitations. They have poor directionality and blind spots. 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 a close distance, there will be a risk of collision and a strong sense of pressure on the user.
[0004] Using a specific distance as the basis for determining braking or inaccurate calculation of the collision distance, especially when turning, if the collision distance is inaccurate, and an obstacle suddenly enters the ultrasonic sector at a close distance, it will cause sudden braking and reduce the experience. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for determining an obstacle collision distance, which can solve the technical problem in the prior art that inaccurate collision distance calculation may lead to sudden execution of braking commands and reduce the user experience.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0007] In a first aspect, the present invention provides a method for determining an obstacle collision distance, comprising the following steps:
[0008] Screen out obstacle segments with collision risks;
[0009] If the vehicle is in a turning state, rotating the outer contour of the vehicle based on the turning radius, and obtaining a collision rotation angle at which the outer contour of the vehicle intersects the obstacle line segment for the first time or the obstacle line segment is located within the outer contour of the vehicle for the first time;
[0010] The obstacle collision distance is determined according to the collision rotation angle and the turning radius.
[0011] In some optional solutions, the vehicle outer contour is rotated in steps until the vehicle outer contour intersects with the obstacle line segment for the first time or the obstacle line segment is located within the vehicle outer contour for the first time.
[0012] In some optional solutions, the stepwise rotating of the vehicle outer contour includes:
[0013] Determine the initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle;
[0014] Rotating the outer contour of the vehicle at the initial rotation angle;
[0015] When 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 not satisfied, the vehicle outer contour continues to be rotated at a set rotation step length.
[0016] In some optional solutions, determining the initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle includes:
[0017] When the two first angles formed between the rotation center and the line connecting the two endpoints of the obstacle line segment and the straight line where the rear axle of the vehicle is located are both greater than all the second angles formed between the rotation center and the line connecting all the endpoints of the vehicle outer contour in the direction of travel and the straight line where the rear axle of the vehicle is located, the minimum angle among all the angles formed by the rotation center and the line connecting all the endpoints of the obstacle line segment and the line connecting all the endpoints of the vehicle outer contour in the direction of travel is used as the initial rotation angle;
[0018] When the first angle is smaller than the second angle, the initial rotation angle is set to zero.
[0019] In some optional solutions, when determining 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] First, determine whether the outer contour of the vehicle intersects with the obstacle line segment;
[0021] When the vehicle outer contour does not intersect with the obstacle line segment, it is determined whether the obstacle line segment is located within the vehicle outer contour.
[0022] In some optional schemes, a coordinate system is established 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, the vehicle's outer contour and obstacle line segments are translated away from the center of the turning circle by the distance of the turning radius.
[0023] In some optional solutions, if the vehicle is in a straight-line driving state, the obstacle collision distance is determined based on the coordinate value of the obstacle line segment and the coordinate value of the vehicle contour.
[0024] In a second aspect, the present invention provides an obstacle collision distance determination device, the obstacle collision distance determination device comprising:
[0025] A screening module, which is used to screen out obstacle segments with collision risks;
[0026] A rotation module, which is used to rotate the outer contour of the vehicle based on the turning radius when the vehicle is in a turning state, and obtain a collision rotation angle at which the outer contour of the vehicle intersects the obstacle line segment for the first time or the obstacle line segment is located within the outer contour of the vehicle for the first time;
[0027] The collision distance calculation module is used to determine the obstacle collision distance according to the collision rotation angle and turning radius.
[0028] In a third aspect, the present invention provides an obstacle collision distance determination device, which includes a processor, a memory, and an obstacle collision distance determination program stored in the memory and executable by the processor, wherein when the obstacle collision distance determination program is executed by the processor, the steps of any one of the above-mentioned obstacle collision distance determination methods are implemented.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium, on which is stored an obstacle collision distance determination program, wherein when the obstacle collision distance determination program is executed by a processor, the steps of any of the above-mentioned obstacle collision distance determination methods are implemented.
[0030] Compared with the prior art, the advantages of the present invention are: in a turning state, by rotating the outer contour of the vehicle, the rotation angle at which the outer contour of the vehicle intersects with the obstacle line segment for the first time or the obstacle line segment is first located within the outer contour of the vehicle is obtained, which is used as the collision rotation angle at which there is a risk of collision with the obstacle after the vehicle rotates, and then the obstacle collision distance is determined based on the collision rotation angle and the turning radius, so that the timing of the collision risk is judged more accurately, and the calculation accuracy of the collision distance between the vehicle and the obstacle can be improved. After obtaining a more accurate collision distance, braking or direction adjustment actions can be made in advance to improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 is a flow chart of a method for determining an obstacle collision distance in an embodiment of the present invention;
[0033] Figure 2 A flow chart of rotating the outer contour of a vehicle in an embodiment of the present invention;
[0034] Figure 3 A flowchart of determining the position relationship between the outer contour of a vehicle and an obstacle line segment in an embodiment of the present invention;
[0035] Figure 4 A schematic diagram of a simplified vehicle outer contour in an embodiment of the present invention;
[0036] Figure 5 This is a risk area division diagram for straight ahead in an embodiment of the present invention;
[0037] Figure 6 This is a diagram showing the division of risk areas for going straight and falling back in an embodiment of the present invention;
[0038] Figure 7 A forward turning risk area division diagram in an embodiment of the present invention;
[0039] Figure 8 A diagram showing the division of the risk area of a backward turn in an embodiment of the present invention;
[0040] Fig. 9 This is a schematic diagram of calculating the collision distance for straight-ahead driving in an embodiment of the present invention;
[0041] Fig.10 This is a schematic diagram of forward turning collision distance calculation in an embodiment of the present invention;
[0042] Fig.11 is a schematic diagram of an obstacle collision distance determination device in an embodiment of the present invention;
[0043] Fig.12 Schematic diagram of an obstacle collision distance determination device in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0046] In a first aspect, an embodiment of the present application provides a method for determining an obstacle collision distance.
[0047] In one embodiment, referring 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 an irregular obstacle, it 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's 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 vehicle simplified into an octagon as an example, 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 . Denote the maximum value of the ordinates y1 and y2 as y max . If the condition is satisfied:
[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 located 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 the obstacle corresponding to the obstacle line segment has a collision risk.
[0057] According to the above judgment conditions, if Figure 5 Two points of the obstacle line segment 2 in 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. Where 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, similarly, take the maximum value of the abscissas x1 and x2 of the two endpoints of the obstacle line segment and record it as x max , and the minimum value is recorded as x min , take the minimum value of the ordinates y1 and y2 and record it 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 the obstacle corresponding to the obstacle line segment has a collision risk.
[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. Where 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, vehicle transmission ratio and vehicle wheelbase, the length of the vehicle turning radius can be obtained as CenterP, and the center coordinates are (CenterP, 0).
[0065] like Figure 7 As shown in the figure, take the maximum value of the horizontal coordinates x1 and x2 of the two end points of the obstacle line segment and record it as x max , take the maximum value of y1 and y2 as y max , if the conditions are met:
[0066] x max >x6-w&&y max ≥0
[0067] Among them, x max >x6-w represents the maximum horizontal coordinate of the two end points of the obstacle segment, which is located inside the outer contour of the vehicle plus the safety distance, y max ≥0 indicates the maximum ordinate of the two end points of the obstacle line segment, which is located in front of the rear axle of the vehicle's outer contour.
[0068] Calculate the distances between the two endpoints of the obstacle line segment cluster that meets 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 , where x6 is the X-axis coordinate of point p6 on the outer contour of the vehicle.
[0069] Find the distance between the outer contour vertex P6 of the vehicle and the center point of the turning circle (CenterP, 0) and record it as R Vmax , the distance obtained by subtracting half the width of the vehicle from the turning radius is recorded as R Vmin .
[0070] If the conditions are met:
[0071] ~(R Pmax <R Vmin -w||R Pmin >R Vmax +w)
[0072] That is, the obstacle line segment has at least one point within the collision risk coverage area, which is recorded as a valid obstacle line segment, where w is the distance from the left and right boundaries of the vehicle to the outside.
[0073] (4) Backward turn
[0074] like Figure 8 As shown in the figure, the larger value of the horizontal coordinates x1 and x2 of the two endpoints of the obstacle segment is recorded as x max ; The smaller value of y1 and y2 is recorded as y min , the larger value is recorded as y max , if the following conditions are 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 center point of the turning circle (CenterP, 0) respectively, and take the larger value as R Pmax , take the smaller value and record it as R Pmin . Find the distance between the outer contour vertex P6 of the vehicle and the center point of the turning circle (CenterP,0) and record it as R Vmax , the distance obtained by subtracting half the width of the vehicle from the turning radius is recorded as R Vmin , y3 is the Y-axis coordinate of point p3 on the outer contour of the vehicle.
[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, the obstacle line segment has at least one point within the collision risk coverage area, which is recorded as a valid obstacle line segment. In the formula, w is the distance extended outward from the left and right boundaries of the vehicle, and x2 is the X-axis coordinate of the point p2 on the outer contour of the vehicle.
[0081] When the vehicle is traveling in different ways, the corresponding judgment conditions are used to judge the obstacle segments, so as to screen out the effective obstacle segments, that is, the 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 with 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 the outer contour of the vehicle is distributedly rotated, the rotation step length of each step can be set according to the needs. By adjusting the rotation step length of each step, the calculation accuracy of the collision distance can be adjusted.
[0085] like Figure 2As shown, in addition, the rotation step length of each step may be equal or unequal. In this embodiment, rotating the outer contour of the vehicle in steps includes the following steps:
[0086] S210: Determine an initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle.
[0087] In this example, the center of the rotating circle is denoted as O, and obstacle segment 2 is selected. The two endpoints of obstacle segment 2 are denoted as the left point in the figure as X. 21 and the right point is X 22 The lines connecting the center of the rotating circle and the two end points of the obstacle segment are OX 21 and OX 22 , all endpoints of the vehicle's outer contour in the direction of travel are P3, P4, P5 and P6, and the lines connecting the center of the rotation circle and all ends of the vehicle's outer contour in the direction of travel are OP3, OP4, OP5 and OP6. All angles are ∠X 21 OP3, ∠X 21 OP4, ∠X 21 OP5, ∠X 21 OP6, ∠X 22 OP3, ∠X 22 OP4, ∠X 22 OP5 and ∠X 22 OP6.
[0088] It can be seen from the figure that the outer contour of the vehicle is rotated by ∠X 21 After OP4, the outer contour of the vehicle will not touch the obstacle line segment. Therefore, there is a rotation angle ∠X between the obstacle line segment located farther away from the vehicle's direction of travel and the outer contour of the vehicle. 21 Difference of OP4, rotation angle ∠X 21 OP4 will not make the obstacle line segment directly intersect with the vehicle outer contour. Therefore, according to the positional relationship between the obstacle line segment and the vehicle outer contour, an initial rotation angle is determined to avoid directly rotating the vehicle outer contour with a set rotation step, which results in many steps required to rotate to the vehicle outer contour and the obstacle line segment, or the obstacle line segment is located within the vehicle outer contour, which can save calculation.
[0089] Preferably, determining the initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle includes:
[0090] S211: When the two first angles formed between the line connecting the center of the rotation circle and the two endpoints of the obstacle line segment and the straight line where the rear axle of the vehicle is located are both greater than all the second angles formed between the line connecting the center of the rotation circle and all the endpoints of the vehicle's outer contour in the direction of travel and the straight line where the rear axle of the vehicle is located, the minimum angle among all the angles formed by the line connecting the center of the rotation circle and the two endpoints of the obstacle line segment and all the endpoints of the vehicle's outer contour in the direction of travel is used as the initial rotation angle.
[0091] Take forward turning as an example. Fig.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, and 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. ∠O'OX 21 and ∠O'OX 22 Any angle in is greater than any angle in ∠O'OP3, ∠O'OP4, ∠O'OP5 and ∠O'OP6. In this example, the straight line where the rear axle of the vehicle is located 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, after rotating the outer contour of the vehicle, the obstacle line segment will not directly intersect with the outer contour of the vehicle, and the obstacle line segment and the outer contour of the vehicle are already close. Only a few steps of rotation with the set rotation step length are needed to meet the intersection of the outer contour of the vehicle with the obstacle line segment or the obstacle line segment is located within the outer contour of the vehicle, which can save calculation. If other angles are selected, there may be too much or too little rotation. Therefore, the minimum angle among all the angles formed by the line connecting the center of the rotation circle and the two end points of the obstacle line segment and the line connecting all the end points of the outer contour of the vehicle in the direction of travel 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 angle is smaller than the second 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's outer contour when the vehicle's outer contour is not rotated. If the minimum angle among all the angles is used as the initial rotation angle, there may be too much rotation, resulting in inaccurate calculation of the final collision distance. For example, when the obstacle line segment is closer to the vertex P5 of the vehicle's outer contour in the figure, or when the obstacle line segment is located on the inside of the vehicle's turn and the ordinates of the two end points are smaller than the front end point of the vehicle's outer contour, there is still a risk of collision, and the collision distance needs to be calculated. Set the initial rotation angle to zero, and then rotate the vehicle's outer contour with a set rotation step size. The vehicle's outer contour and the obstacle line segment will still intersect after a certain number of rotation steps.
[0095] The above method is used to determine the initial rotation angle, which not only ensures the calculation efficiency of the initial rotation using the above minimum angle as the initial rotation angle when the straight line connecting the endpoint of the effective obstacle segment and the center of the rotation circle does not pass through the outer contour of the vehicle, but also ensures that the effective obstacle segment where the straight line connecting the endpoint and the center of the rotation circle passes through the outer contour of the vehicle when the outer contour of the vehicle is not rotated is not missed.
[0096] S220: Rotate the outer contour of the vehicle at an initial rotation angle.
[0097] like Fig.10 As shown, in this embodiment, taking obstacle line segment No. 2 as an example, after calculating the initial rotation angle, when the outer contour of the vehicle is rotated toward the direction of the obstacle line segment at the initial rotation angle, the distance between the 8 vertices of the outer contour of the vehicle and the origin O is recorded as veh_radius[i]; the angles of the 8 vertices of the outer contour of the vehicle in the vehicle coordinate system are recorded as array veh_theta[i], where i is the vertex number.
[0098] Subtract the initial rotation angle theta_init from the angles of the eight vertices of the vehicle, calculate the coordinate values (X(i), Y(i)) of the eight vertices after the angle change, and obtain the dashed vehicle border in the figure:
[0099] X(i)=veh_radius(i)*cos(veh_theta(i))
[0100] Y(i)=veh_radius(i)xsin(veh_theta(i))
[0101] Preferably, a coordinate system is established with the center point of the rear axle of the vehicle as the coordinate origin, and before rotating the outer contour of the vehicle based on the turning radius, the outer contour of the vehicle and the obstacle line segment are translated away from the center of the turning circle by the distance of the turning radius.
[0102] In this embodiment, after the vehicle outer contour and the obstacle line segment are translated, the center point of the vehicle rear axle is taken as the coordinate origin. At this time, the center of the rotation circle is the center of the coordinate circle, and the coordinates of the vehicle outer contour vertices and the obstacle line segment are located on the same side of the coordinate origin, which is convenient for calculation.
[0103] In addition, if the method of translating the outer contour of the vehicle and the obstacle line segment is not adopted, the center of the rotation circle is the center of the turning circle.
[0104] like Fig.10 As shown, the vehicle is taken as an example to turn right front. The principle of moving backward is the same as that of moving forward. A specific embodiment of determining the initial rotation angle using the above method is given:
[0105] The outer contour of the vehicle is translated Center_P units away from the center of the turning circle. The front vertex of the outer contour of the vehicle and the effective obstacle line segment are all in the second quadrant of the coordinate system established with the center point of the rear axle of the vehicle as the coordinate origin; call the atan2(y,x) function (the value range of the second quadrant is 0.5pi-pi) to calculate the angles corresponding to points P3, P4, P5, and P6 in the vehicle coordinate system, that is, the angles between the lines connecting points P3, P4, P5, and P6 and the coordinate origin and the positive X-ray, and take the minimum angle, recorded 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] In the same steps, translate the two endpoints of each valid obstacle segment and obtain the corresponding angle. The angle between the two endpoints of the obstacle segment and the coordinate origin and the positive X-ray is recorded as theta_od. The maximum value of the angles corresponding to the two endpoints of all obstacles is recorded as theta_od_max. The lower left endpoint X of obstacle segment No. 2 in the figure is 21 The corresponding angle is the maximum value.
[0108] Calculate the difference between the maximum angle corresponding to the endpoint of the valid obstacle line segment and the minimum angle corresponding to the vertex of the vehicle's outer contour, and record it as the initial rotation angle theta_init. If the result is a negative number, the initial rotation angle is 0.
[0109] theta_init=theta_veh_min-theta_od_max
[0110] According to the above calculation method, the minimum angle difference obtained by taking obstacle segment No. 2 as an example is ∠X 21 OP4.
[0111] In other embodiments, the following method may be used: obtaining a first angle formed between the line connecting the center of the rotation circle and the two end points of the obstacle line segment and the straight line where the rear axle of the vehicle is located, and a second angle formed between the line connecting the center of the rotation circle and all the end points of the vehicle outer contour in the direction of travel and the straight line where the rear axle of the vehicle is located, and taking the minimum value of the difference between all the first angles and all the second angles, that is, taking the minimum value of the first angle ∠O'OX 21 The difference between the maximum value of the second angle ∠O'OP4 and ∠O'OX 21 -∠O'OP4=∠X 21 OP4, as the initial rotation angle.
[0112] S230: When 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 not satisfied, continue to rotate the vehicle outer contour with a set rotation step size.
[0113] After the initial rotation angle is rotated, it is determined whether the vehicle outer contour intersects with the obstacle line segment or the obstacle line segment is located within the vehicle outer contour. If the above conditions are not met, the vehicle outer contour is rotated with the set rotation step length until the vehicle outer contour intersects with the obstacle line segment for the first time or the obstacle line segment is located within the vehicle outer contour for the first time. In this example, the rotation step length can be a set arc length or a set rotation angle.
[0114] Only when the obstacle line segment is rotated to be exactly parallel to the outer contour of the vehicle, there will be a rotation step in which the obstacle line segment is directly rotated to be located within the outer contour of the vehicle.
[0115] like Figure 3 As shown, preferably, when judging whether the condition that the outer contour of the vehicle intersects with the obstacle line segment or the obstacle line segment is located within the outer contour of the vehicle is met:
[0116] A: First determine whether the vehicle's outer contour intersects with the obstacle line segment.
[0117] B: When the outer contour of the vehicle does not intersect with the obstacle line segment, determine whether the obstacle line segment is within the outer contour of the vehicle.
[0118] In this embodiment, after the vehicle's outer contour is rotated, the obstacle line segment will only intersect with the end of the vehicle's travel direction and the simplified line segments of the vehicle's outer contour on both sides. Therefore, it is first determined whether the vehicle's travel direction and the simplified line segments of the vehicle's outer contour on both sides intersect with the obstacle line segment. When all simplified line segments do not intersect with the obstacle line segment, it is then determined whether the obstacle line segment is within the vehicle's outer contour. This method can reduce the amount of calculation.
[0119] Specifically, A: determining whether the outer contour of the vehicle intersects with the obstacle line segment includes the following steps:
[0120] (1) Determine whether the obstacle line segment AB intersects the simplified line segment XY of the vehicle's outer contour. Specifically, the determination is made based on the following two conditions:
[0121]
[0122] If the above two conditions are met at the same time, the obstacle line segment AB intersects with the simplified line segment XY of the vehicle's outer contour. In the formula, A and B represent the two endpoints of the obstacle line segment, XY represents the two endpoints of a simplified line segment of the vehicle's outer contour, and → represents a vector.
[0123] In this solution, the outer contour of the vehicle is simplified into a plurality of sequentially connected simplified line segments according to the vehicle shape, and the simplified line segment XY is one of them.
[0124] Take the simplified line segment P3P4 of the vehicle's outer contour as an example. Specifically, Fig.10 As shown, let the coordinates of the two vertices of the obstacle segment be A(xa, ya) and B(xb, yb), and find the vectors AB, AP3, AP4 and the vectors P3P4, P3A, P3B. If the following conditions are met at the same time, the obstacle segment AB intersects with the simplified segment P3P4 of the vehicle's outer contour:
[0125]
[0126] (2) Determine whether the obstacle line segment AB intersects with the simplified line segment XY of the vehicle's outer contour, and one endpoint of the obstacle line segment AB is on the simplified line segment XY of the vehicle's outer contour. Specifically, the determination is made based on the following two conditions:
[0127]
[0128] If any of the above conditions is met, the obstacle line segment AB intersects with the simplified line segment XY of the vehicle's outer contour, and one end point of the obstacle line segment AB is on the simplified line segment XY of the vehicle's outer contour. X is the X-axis coordinate of point X in the simplified line segment of the vehicle's outer contour, x Y It is the X-axis coordinate of the Y point in the simplified line segment of the vehicle's outer contour.
[0129] Taking the simplified line segment P3P4 of the vehicle's outer contour as an example, specifically, if any one of the following two conditions is met, the obstacle line segment AB intersects with the simplified line segment P3P4 of the vehicle's outer contour, and one of the points is on the simplified line segment P3P4 of the vehicle's outer contour:
[0130]
[0131] Where: x3 is the X-axis coordinate of point p3 of the vehicle's outer contour, and x4 is the X-axis coordinate of point p4 of the vehicle's outer contour.
[0132] (3) Determine whether the obstacle line segment AB intersects with the simplified line segment XY of the vehicle's outer contour, and one endpoint of the simplified line segment XY of the vehicle's outer contour is on the obstacle line segment AB. Specifically, the determination is made based on the following two conditions:
[0133]
[0134] If any of the above conditions is met, the obstacle line segment AB intersects with the simplified line segment XY of the vehicle outer contour, and one endpoint of the simplified line segment XY of the vehicle outer contour is on the obstacle line segment AB.
[0135] Taking the simplified line segment P3P4 of the vehicle's outer contour as an example, specifically, if any one of the following two conditions is met, the obstacle line segment intersects with the simplified line segment P3P4 of the vehicle's outer contour, and one of the points is on the obstacle line segment:
[0136]
[0137] If any of the above three conditions (1), (2) and (3) is met, the obstacle line segment intersects with the simplified line segment of the vehicle's outer contour, indicating a collision risk.
[0138] In addition, the obstacle line segment AB is most likely to directly intersect with the simplified line segment XY of the vehicle's outer contour. First, determine whether the obstacle line segment AB intersects with the simplified line segment XY of the vehicle's outer contour. If AB and XY do not intersect, then determine conditions (2) and (3).
[0139] Specifically, B: determining whether the obstacle line segment is located within the outer contour of the vehicle includes the following steps:
[0140] Determine whether the two endpoints of the obstacle line segment AB are located in the quadrilateral WXYZ formed by the three consecutive sides of the vehicle's outer contour. W, X, Y and Z represent the vertices of the three consecutive sides of the vehicle's outer contour. Let any endpoint of the obstacle line segment AB be Q, and determine whether point Q is in 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] in,
[0144] If any of the following two conditions is met, point Q is within the boundary of the quadrilateral WXYZ, that is, whether the obstacle line segment is within the outer contour of the vehicle.
[0145] like Fig.10 As shown, let the coordinates of the two vertices of the obstacle line segment be A(xa, ya) and B(xb, yb), and take point A and the four vertices P3, P4, P5 and P6 at the front end of the vehicle's outer contour forming a quadrilateral P3P4P5P6 as an example for calculation. Obtain vectors P6P5, P5P4, P4P3, P3P6 and vectors P3A, P4A, P5A, P6A, and perform the following cross product calculation:
[0146]
[0147]
[0148] If any of the following two conditions are met, then point A is on or inside the boundary of quadrilateral P3P4P5P6:
[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 multiple set rotation steps.
[0153] When the rotation step is set to an angle, Q = theta_init + n*△Q, n is the number of times the rotation step is set, and △Q sets the angle of the rotation step.
[0154] When the rotation step is set to arc length, n is the number of rotation steps, and length_init sets the arc length of the rotation step.
[0155] Then the obstacle collision distance is S = Q*CenterP, where CenterP is the turning radius. Controlling length_init or △Q can control the accuracy.
[0156] like Fig. 9 As shown, in this embodiment, if the vehicle is in a straight-line driving state, the obstacle collision distance is determined according to the coordinate value of the obstacle line segment and the coordinate value of the vehicle contour.
[0157] In this example, the minimum value of the difference between the longitudinal coordinate of the obstacle line segment and the longitudinal coordinate of the vehicle contour is used as the obstacle collision distance.
[0158] Taking the vehicle moving forward as an example, the principle of moving backward is the same as that of moving forward.
[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, and length init is the obstacle collision distance.
[0160] In summary, in this scheme, when the vehicle is in a turning state, the vehicle contour is rotated to obtain the angle at which the vehicle outer contour is rotated and there is a risk of collision with the obstacle line segment. This angle is used as the collision rotation angle at which the vehicle rotates and there is a risk of collision with the obstacle. The timing of the collision risk is judged more accurately. 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 Fig.11 , Fig.11 This is a schematic diagram of the functional modules of an embodiment of an obstacle collision distance determination device of the present application.
[0163] like Fig.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 the 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 value of the obstacle line segment and the coordinate value of the vehicle contour.
[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 rear axle of the vehicle as the coordinate origin, and before rotating the outer contour of the vehicle based on the turning radius, translate the outer contour of the vehicle and the obstacle line segment away from the center of the turning circle by the distance of the turning radius.
[0167] Among them, the functional implementation of each module in the above-mentioned obstacle collision distance determination device corresponds to the various steps in the above-mentioned obstacle collision distance determination method embodiment, and its functions and implementation processes are no longer repeated here one by one.
[0168] In a third aspect, an embodiment of the present application provides an obstacle collision distance determination device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0169] Reference Fig.12 , Fig.12 Schematic diagram of the hardware structure of the obstacle collision distance determination device involved in the embodiment of the present application. In the embodiment of the present application, the obstacle collision distance determination device may include a processor, a memory, a communication interface and a communication bus.
[0170] The communication bus may 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, etc., which are used to interconnect the devices inside the obstacle collision distance determination device, and an interface 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, an optical fiber interface, an ATM interface, etc.; the user device can be a display, a 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 may be a general-purpose processor, and the general-purpose processor may call the obstacle collision distance determination program stored in the memory and execute the obstacle collision distance determination method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the obstacle collision distance determination program is called may refer to the various embodiments of the obstacle collision distance determination method of the present application, which will not be repeated here.
[0174] Those skilled in the art will understand that Fig.12 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0175] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0176] The computer-readable storage medium of the present application stores an obstacle collision distance determination program, wherein when the obstacle collision distance determination program is executed by a processor, the steps of the obstacle collision distance determination method as described above are implemented.
[0177] Among them, the method implemented when the obstacle collision distance determination program is executed can refer to the various embodiments of the obstacle collision distance determination method of the present application, and will not be repeated here.
[0178] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0179] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0180] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0181] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0182] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0184] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for determining an obstacle collision distance, characterized in that: The following steps are involved: Screen out obstacle segments with collision risks; If the vehicle is in a turning state, rotating the outer contour of the vehicle based on the turning radius, and obtaining a collision rotation angle at which the outer contour of the vehicle intersects the obstacle line segment for the first time or the obstacle line segment is located within the outer contour of the vehicle for the first time; The obstacle collision distance is determined according to the collision rotation angle and the turning radius.
2. The obstacle collision distance determination method according to claim 1, characterized in that: The vehicle outer contour is rotated step by step until the vehicle outer contour intersects with the obstacle line segment for the first time or the obstacle line segment is located within the vehicle outer contour for the first time.
3. The obstacle collision distance determination method according to claim 2, characterized in that: The stepwise rotating of the vehicle outer contour comprises: Determine the initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle; Rotating the outer contour of the vehicle at the initial rotation angle; When 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 not satisfied, the vehicle outer contour continues to be rotated at a set rotation step length.
4. The obstacle collision distance determination method according to claim 3, characterized in that: The determining of the initial rotation angle according to the positional relationship between the obstacle line segment and the outer contour of the vehicle includes: When the two first angles formed between the rotation center and the line connecting the two endpoints of the obstacle line segment and the straight line where the rear axle of the vehicle is located are both greater than all the second angles formed between the rotation center and the line connecting all the endpoints of the vehicle outer contour in the direction of travel and the straight line where the rear axle of the vehicle is located, the minimum angle among all the angles formed by the rotation center and the line connecting all the endpoints of the obstacle line segment and the line connecting all the endpoints of the vehicle outer contour in the direction of travel is used as the initial rotation angle; When the first angle is smaller than the second angle, the initial rotation angle is set to zero.
5. The obstacle collision distance determination method according to claim 3, characterized in that: When determining 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: First, determine whether the outer contour of the vehicle intersects with the obstacle line segment; When the vehicle outer contour does not intersect with the obstacle line segment, it is determined whether the obstacle line segment is located within the vehicle outer contour.
6. The obstacle collision distance determination method according to claim 1, characterized in that: A coordinate system is established with the center point of the rear axle of the vehicle as the coordinate origin. Before rotating the outer contour of the vehicle based on the turning radius, the outer contour of the vehicle and the obstacle line segment are translated away from the center of the turning circle by the distance of the turning radius.
7. The obstacle collision distance determination method according to claim 1, characterized in that: If the vehicle is in a straight-line driving state, the obstacle collision distance is determined based on the coordinate value of the obstacle line segment and the coordinate value of the vehicle outline.
8. An obstacle collision distance determination device, characterized in that: The obstacle collision distance determination device comprises: A screening module, which is used to screen out obstacle segments with collision risks; A rotation module, which is used to rotate the outer contour of the vehicle based on the turning radius when the vehicle is in a turning state, and obtain a collision rotation angle at which the outer contour of the vehicle intersects the obstacle line segment for the first time or the obstacle line segment is located within the outer contour of the vehicle for the first time; The collision distance calculation module is used to determine the obstacle collision distance according to the collision rotation angle and turning radius.
9. An obstacle collision distance determination device, characterized in that: The obstacle collision distance determination device includes a processor, a memory, and an obstacle collision distance determination program stored in the memory and executable by the processor, wherein when the obstacle collision distance determination program is executed by the processor, the steps of the obstacle collision distance determination method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an obstacle collision distance determination program, wherein when the obstacle collision distance determination program is executed by a processor, the steps of the obstacle collision distance determination method according to any one of claims 1 to 7 are implemented.
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
Collision damage reduction device upon right / left turn
JP2019012345A
Method for mapping the surroundings of a vehicle
US20120303258A1
Apparatus and method for collision avoidance assistance
US20240262348A1