Collision detection method and device for autonomous vehicle
By modeling vehicles and obstacles into convex polygon models, using vector misalignment and simplex sets, the problems of low accuracy and high calculation amount of collision detection between vehicles and special-shaped obstacles in the prior art are solved, and high efficiency is achieved , real-time collision detection improves the safety of autonomous vehicles.
Patent Information
- Application Number
- CN202411333489.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-10
AI Technical Summary
The existing collision detection algorithm has low accuracy in collision detection between vehicles and irregular obstacles, and is large in calculations, making it difficult to meet real-time requirements, resulting in the safety of autonomous vehicles not guaranteed.
Model the vehicle and obstacles as convex polygon models. By calculating the set of vector misalignment and simplex, we can determine whether the origin is in the set. If not, the support direction will be updated until the origin is in the set or the direction of the vector misalignment is different from the support direction, so as to Judge collision.
It improves the accuracy of vehicle and obstacle modeling, enhances the accuracy and real-time nature of collision detection, improves the speed and accuracy of autonomous vehicles to identify potential collision risks, and improves safety.
Smart Images

Figure CN119283850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous driving vehicles, and in particular to a collision detection method and device for an autonomous driving vehicle. Background Art
[0002] When autonomous vehicles plan their paths, they need to rely on collision detection algorithms to avoid potential collision risks. The vehicle uses various sensors on the body to perceive the surrounding environment and detect obstacles. The collision detection algorithm identifies collision risks based on the predicted position of the detected obstacles and the predicted position of the body, providing a basis for the path planning algorithm to reduce collisions between the vehicle and other vehicles, pedestrians and other obstacles.
[0003] Existing collision detection algorithms generally model both vehicles and obstacles as regular shapes, such as regular rectangles, and determine whether a collision with an obstacle occurs by judging whether two regular shapes intersect. However, this type of collision detection algorithm has low accuracy in collision detection between vehicles and irregularly shaped obstacles, and has a large amount of calculation, making it difficult to meet the real-time requirements of collision detection, and the safety of autonomous driving vehicles cannot be guaranteed. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a collision detection method and device for an autonomous driving vehicle, aiming to solve the technical problems that the existing collision detection algorithm has low accuracy in collision detection between vehicles and irregularly shaped obstacles, and has a large amount of calculation, making it difficult to meet the real-time requirements of collision detection, and the safety of autonomous driving vehicles cannot be guaranteed.
[0005] One aspect of the present invention is to provide a method for detecting collision of an autonomous driving vehicle, comprising:
[0006] Obtaining the center of the vehicle and establishing a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygon models;
[0007] The opposite direction of the vehicle's forward direction is selected as the support direction, the farthest boundary point of the vehicle model along the opposite direction of the support direction is calculated as the vehicle's farthest point, the farthest boundary point of the obstacle model along the support direction is calculated as the obstacle's farthest point, and the vector difference from the obstacle's farthest point to the vehicle's farthest point is calculated as the vector difference point;
[0008] Determine whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction;
[0009] If they are in the same direction, add the vector difference to the simplex set and iteratively update the simplex set;
[0010] Determine whether the origin is within the simplex set;
[0011] If the origin is not within the simplex set, the direction within the simplex set toward the origin is used as the new support direction, and the step of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle is returned to the original direction until the direction of the vector formed by the origin toward the vector difference is different from the support direction.
[0012] Compared with the prior art, the beneficial effect of the autonomous driving vehicle collision detection method of the present invention is that: by modeling the vehicle and the obstacle as a convex polygon model, the convex polygon model is more in line with the actual vehicle and obstacle shape, which greatly improves the accuracy of vehicle and obstacle modeling, and significantly improves the accuracy of collision detection between vehicles and special-shaped obstacles. Moreover, the collision detection can be completed through only a small number of iterations, with small calculation amount and high real-time performance, which improves the speed and accuracy of the autonomous driving vehicle in identifying potential collision risks during driving, thereby greatly improving the safety of the autonomous driving vehicle.
[0013] In addition, the above-mentioned autonomous driving vehicle collision detection method according to the present invention may also have the following additional technical features:
[0014] Further, the step of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle includes:
[0015] The projections of all boundary points on the vehicle model in the direction opposite to the support direction are calculated, and the boundary point with the largest projection is taken as the extreme far point of the vehicle.
[0016] Furthermore, the step of calculating the farthest boundary point of the obstacle model along the support direction as the farthest point of the obstacle includes:
[0017] The projections of all boundary points on the obstacle model along the support direction are calculated, and the boundary point with the largest projection is taken as the farthest point of the obstacle.
[0018] Furthermore, the step of determining whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction also includes:
[0019] If they are in different directions, it is determined that the vehicle and the obstacle do not collide.
[0020] Further, the step of iteratively updating the simplex set includes:
[0021] Selecting the direction from the origin to the center of the obstacle model as the iteration direction, recalculating the corresponding vector difference point, and adding the vector difference point formed by the origin toward the vector difference point and the same direction as the iteration direction to the simplex set, wherein the simplex set includes at most three vector difference points;
[0022] And, if the number of vector differences in the simplex set exceeds three, the vector difference that was first added to the simplex set is removed.
[0023] Furthermore, the step of determining whether the origin is located within the simplex set further comprises:
[0024] If the origin is within the simplex set, it is determined that the vehicle collides with the obstacle.
[0025] Another aspect of the present invention is to provide an autonomous driving vehicle collision detection device, comprising:
[0026] An acquisition module, which acquires the center of the vehicle and establishes a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygon models;
[0027] A vector difference calculation module is used to select the opposite direction of the vehicle's forward direction as the support direction, calculate the farthest boundary point of the vehicle model along the opposite direction of the support direction as the vehicle's extreme far point, calculate the farthest boundary point of the obstacle model along the support direction as the obstacle's extreme far point, and calculate the vector difference from the obstacle's extreme far point to the vehicle's extreme far point as the vector difference;
[0028] The collision detection module is used to determine whether the direction of the vector formed by the origin towards the vector difference is the same as the support direction, and to determine whether the origin is located in the simplex set.
[0029] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the collision detection method provided in the first aspect embodiment are implemented.
[0030] The present invention also provides a computer-readable storage medium, characterized in that a computer program is stored therein, and when the computer program is executed by a processor, the steps of the collision detection method provided in the above-mentioned first aspect embodiment are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of a collision detection method for an autonomous driving vehicle in a first embodiment of the present invention;
[0032] Figure 2 is a flow chart of a collision detection method for an autonomous driving vehicle in a second embodiment of the present invention;
[0033] Figure 3 is a schematic diagram of a vehicle model and an obstacle model in a second embodiment of the present invention;
[0034] Figure 4 is a block diagram of the autonomous driving vehicle collision detection device of the present invention;
[0035] Figure 5 The figure is a schematic diagram of the structure of an electronic device of the present invention.
[0036] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0037] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0038] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0040] In order to solve the technical problem that the existing collision detection algorithm generally models both the vehicle and the obstacle as regular shapes, such as regular rectangles, and determines whether the two regular shapes intersect to determine whether there is a collision with the obstacle, but this collision detection algorithm has low accuracy for collision detection between the vehicle and the irregularly shaped obstacle, and the amount of calculation is large, it is difficult to meet the real-time requirements of collision detection, and the safety of the autonomous driving vehicle cannot be guaranteed. The present application provides a collision detection method and device for an autonomous driving vehicle, which greatly improves the accuracy of vehicle and obstacle modeling by modeling the vehicle and the obstacle as a convex polygon model, which is more in line with the actual vehicle and obstacle shape, and significantly improves the accuracy of collision detection between the vehicle and the irregularly shaped obstacle, and can complete the collision detection through only a small number of iterations, with a small amount of calculation and high real-time performance, which improves the speed and accuracy of the autonomous driving vehicle in identifying potential collision risks during driving, thereby greatly improving the safety of the autonomous driving vehicle.
[0041] In order to facilitate understanding of the present invention, several embodiments of the present invention are provided below. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0042] Embodiment 1
[0043] See also Figure 1 , which is a flow chart of a collision detection method for an autonomous driving vehicle in a first embodiment of the present invention, and the method includes steps S101 to S104:
[0044] S101, obtaining the center of the vehicle and establishing a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygonal models.
[0045] Specifically, sensor data collected by various sensors installed on the vehicle are obtained, the shape data of the vehicle and obstacles are extracted from the sensor data, and the vehicle center is obtained based on the vehicle shape data. A vehicle model and an obstacle model are established with the vehicle center as the origin. Specifically, a number of boundary points are selected according to the shape data of the vehicle and the obstacle, and the corresponding boundary points are arranged in a clockwise direction to form a closed convex polygon point set model, and the corresponding convex polygon model is used as the vehicle model or obstacle model.
[0046] S102, selecting the opposite direction of the vehicle's forward direction as the support direction, calculating the farthest boundary point of the vehicle model along the opposite direction of the support direction as the vehicle's farthest point, calculating the farthest boundary point of the obstacle model along the support direction as the obstacle's farthest point, and calculating the vector difference from the obstacle's farthest point to the vehicle's farthest point as the vector difference point.
[0047] Specifically, the direction opposite to the vehicle's forward direction is selected as the initial support direction, the projections of all boundary points on the vehicle model along the direction opposite to the support direction are calculated, and the boundary point with the largest projection is taken as the farthest point of the vehicle model; similarly, the projections of all boundary points on the obstacle model along the support direction are calculated, and the boundary point with the largest projection is taken as the farthest point of the obstacle as the obstacle model; finally, the vector difference from the farthest point of the obstacle to the farthest point of the vehicle is calculated to obtain the vector difference point.
[0048] S103, determining whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction;
[0049] If they are in the same direction, the vector difference is added to the simplex set and the simplex set is updated iteratively.
[0050] Specifically, the dot product of the vector from the origin to the vector difference point and the support direction is calculated, and based on the dot product result, it is determined whether the vector from the origin to the vector difference point and the support direction are in the same direction. If the dot product is greater than or equal to 0, it is determined to be in the same direction. At this time, the vector difference point is added to the simplex set, and the simplex set is iteratively updated.
[0051] S104, judging whether the origin is located in the simplex set;
[0052] If the origin is not within the simplex set, the direction within the simplex set toward the origin is used as the new support direction, and the step of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle is returned to the step until the direction of the vector formed by the origin toward the vector difference is different from the support direction.
[0053] Embodiment 2
[0054] See also Figure 2 , which is a flow chart of a collision detection method for an autonomous driving vehicle in a second embodiment of the present invention, the method comprises steps S201 to S206:
[0055] S201, obtaining the center of the vehicle and establishing a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygonal models.
[0056] Specifically, sensor data collected by various sensors installed on the vehicle are obtained, the shape data of the vehicle and obstacles are extracted from the sensor data, and the center of the vehicle is obtained based on the shape data of the vehicle, and the vehicle model and obstacle model are established with the center of the vehicle as the origin. Specifically, Figure 3 As shown in the figure, the center of the vehicle is taken as the origin O(0, 0) and the forward direction of the vehicle is taken as the y-axis to establish the vehicle coordinate system xoy. According to the shape data of the vehicle and the obstacle, several boundary points are selected, and the corresponding boundary points are arranged along the clockwise line to form a closed convex polygon point set model. The corresponding convex polygon model is used as the vehicle model or obstacle model.
[0057] S202, selecting the opposite direction of the vehicle's forward direction as the support direction, calculating the farthest boundary point of the vehicle model along the opposite direction of the support direction as the vehicle's farthest point, calculating the farthest boundary point of the obstacle model along the support direction as the obstacle's farthest point, and calculating the vector difference from the obstacle's farthest point to the vehicle's farthest point as the vector difference point.
[0058] Specifically, select the opposite direction vector of the vehicle's forward direction As the initial support direction, calculate the direction vector of all boundary points on the vehicle model The projection in the opposite direction of, for example, the boundary point A(x, y) on the vehicle model along the direction vector The projection of Its projection among all boundary points of the vehicle model is the largest, which is the farthest boundary point. Then boundary point A is taken as the farthest point of the vehicle model.
[0059] Calculate the direction vector of all boundary points on the obstacle model The projection of, for example, the boundary point B(a, b) on the obstacle model along the direction vector The projection of Its projection among all boundary points of the obstacle model is the largest and is the farthest boundary point. Then boundary point B is taken as the farthest obstacle point of the obstacle model.
[0060] The vector difference between the obstacle's farthest point B and the vehicle's farthest point A is calculated to obtain the vector difference point C (ax, by).
[0061] S203, determining whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction.
[0062] If they are in the same direction, execute step S204.
[0063] If they are in different directions, it is determined that the vehicle and the obstacle do not collide.
[0064] Specifically, calculate the vector from the origin O to the vector difference C With support direction If the dot product is less than 0, it is judged as and On the other hand, the vehicle does not collide with the obstacle. If the dot product is greater than or equal to 0, it is judged as and In the same direction, step S204 is executed at this time.
[0065] S204, adding the vector difference to the simplex set, and iteratively updating the simplex set.
[0066] The iterative update steps of the simplex set include:
[0067] The direction from the origin to the center of the obstacle model is used as the iteration direction. According to step S102, a new vector difference D is calculated and the vector is judged. and Whether they are in the same direction: If they are not in the same direction, the vehicle and the obstacle do not collide, and the iterative update step is exited. If they are in the same direction, the vector difference D is added to the simplex set. At this time, when there are two vector differences in the simplex, the direction of the two vector differences toward the origin is used as the next iteration direction; when there are three vector differences in the simplex, step S205 is executed. In this embodiment, the simplex set includes at most three vector differences. If the number of vector differences in the simplex set exceeds three, the vector difference that was first added to the simplex set is removed.
[0068] S205, judging whether the origin is located in the simplex set;
[0069] If the origin is within the simplex set, it is determined that the vehicle collides with the obstacle.
[0070] If the origin is not within the simplex set, step S206 is executed.
[0071] S206. Use the direction toward the origin in the simplex set as the new support direction, and return to the step of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle, until the direction of the vector formed by the origin toward the vector difference is different from the support direction.
[0072] Specifically, if the simplex set includes three vector difference points, the separating axis algorithm is used to determine whether the origin O is located inside the triangle formed by the lines connecting the three vector difference points. If the origin is inside the triangle, it is determined that the vehicle collides with the obstacle.
[0073] If there is an edge in the triangle that can separate the origin O outside the triangle and the origin is not in the simplex set, the direction of the simplex set toward the origin is used as the new support direction, and the process returns to step S201 until the direction of the origin toward the vector difference in step S203 is different from the support direction.
[0074] See also Figure 4 , shown is an automatic driving vehicle collision detection device provided by the present application, comprising:
[0075] An acquisition module 31 is used to acquire the center of the vehicle and establish a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygon models;
[0076] A vector difference calculation module 32 is used to select the opposite direction of the vehicle's forward direction as the support direction, calculate the farthest boundary point of the vehicle model along the opposite direction of the support direction as the vehicle's extreme far point, calculate the farthest boundary point of the obstacle model along the support direction as the obstacle's extreme far point, and calculate the vector difference from the obstacle's extreme far point to the vehicle's extreme far point as the vector difference;
[0077] The collision detection module 33 is used to determine whether the direction of the vector formed by the origin and the vector difference is the same as the support direction, and to determine whether the origin is located in the simplex set.
[0078] See also Figure 5 The present application also provides an electronic device, the electronic device includes a memory 41 and a processor 42, the memory 41 stores a computer program, and the processor 42 implements the steps in the embodiment of the above-mentioned automatic driving vehicle collision detection method when executing the computer program. Among them, the memory can be a high-speed RAM memory or a stable memory, such as a disk memory.
[0079] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the embodiment of the above-mentioned autonomous driving vehicle collision detection method are implemented.
[0080] In summary, the autonomous driving vehicle collision detection method and device of the present application, by modeling the vehicle and obstacles as convex polygon models, the convex polygon models are more in line with the actual vehicle and obstacle shapes, thereby greatly improving the accuracy of vehicle and obstacle modeling, and significantly improving the accuracy of collision detection between vehicles and special-shaped obstacles. Moreover, the collision detection can be completed with only a small number of iterations, with small computational complexity and high real-time performance, thereby improving the speed and accuracy of autonomous driving vehicles in identifying potential collision risks during driving, thereby greatly improving the safety of autonomous driving vehicles.
[0081] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0082] The above-described embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of application of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention application shall be subject to the attached claims.
Claims
1. A collision detection method for an autonomous driving vehicle, characterized in that: include: Obtaining the center of the vehicle and establishing a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygon models; The opposite direction of the vehicle's forward direction is selected as the support direction, the farthest boundary point of the vehicle model along the opposite direction of the support direction is calculated as the vehicle's farthest point, the farthest boundary point of the obstacle model along the support direction is calculated as the obstacle's farthest point, and the vector difference from the obstacle's farthest point to the vehicle's farthest point is calculated as the vector difference point; Determine whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction; If they are in the same direction, add the vector difference to the simplex set and iteratively update the simplex set; Determine whether the origin is within the simplex set; If the origin is not within the simplex set, the direction within the simplex set toward the origin is used as the new support direction, and the step of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle is returned to the original direction until the direction of the vector formed by the origin toward the vector difference is different from the support direction.
2. The automatic driving vehicle collision detection method according to claim 1, characterized in that: The steps of calculating the farthest boundary point of the vehicle model in the opposite direction of the support direction as the farthest point of the vehicle include: The projections of all boundary points on the vehicle model in the direction opposite to the support direction are calculated, and the boundary point with the largest projection is taken as the extreme far point of the vehicle.
3. The automatic driving vehicle collision detection method according to claim 1, characterized in that: The steps of calculating the farthest boundary point of the obstacle model along the support direction as the farthest point of the obstacle include: The projections of all boundary points on the obstacle model along the support direction are calculated, and the boundary point with the largest projection is taken as the farthest point of the obstacle.
4. The automatic driving vehicle collision detection method according to claim 1, characterized in that: The step of determining whether the direction of the vector formed by the origin toward the vector difference is the same as the support direction also includes: If they are in different directions, it is determined that the vehicle and the obstacle do not collide.
5. The automatic driving vehicle collision detection method according to claim 1, characterized in that: The step of iteratively updating the simplex set comprises: Selecting the direction from the origin to the center of the obstacle model as the iteration direction, recalculating the corresponding vector difference point, and adding the vector difference point formed by the origin toward the vector difference point and the same direction as the iteration direction to the simplex set, wherein the simplex set includes at most three vector difference points; And, if the number of vector differences in the simplex set exceeds three, the vector difference that was first added to the simplex set is removed.
6. The automatic driving vehicle collision detection method according to claim 1, characterized in that: The step of determining whether the origin is located within the simplex set also includes: If the origin is within the simplex set, it is determined that the vehicle collides with the obstacle.
7. An autonomous driving vehicle collision detection device, characterized in that: include: An acquisition module, which acquires the center of the vehicle and establishes a vehicle model and an obstacle model with the center of the vehicle as the origin, wherein both the vehicle model and the obstacle model are convex polygon models; A vector difference calculation module is used to select the opposite direction of the vehicle's forward direction as the support direction, calculate the farthest boundary point of the vehicle model along the opposite direction of the support direction as the vehicle's extreme far point, calculate the farthest boundary point of the obstacle model along the support direction as the obstacle's extreme far point, and calculate the vector difference from the obstacle's extreme far point to the vehicle's extreme far point as the vector difference; The collision detection module is used to determine whether the direction of the vector formed by the origin towards the vector difference is the same as the support direction, and to determine whether the origin is located in the simplex set.
8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.