A collision detection method, device, vehicle and storage medium

By performing convex decomposition and separation axis processing on obstacles, a target separation axis set is constructed, which solves the problem of collision misjudgment in automatic emergency braking systems when dealing with irregular geometries, and realizes the requirements for rapid and accurate collision risk assessment and real-time operation of the system.

CN121043868BActive Publication Date: 2026-07-07BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI
Filing Date
2025-09-15
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing automatic emergency braking systems suffer from problems such as misjudgment of collision status and insufficient response time when dealing with irregular geometric shapes and concave obstacles. Furthermore, high-order algorithms are difficult to implement on vehicle electronic control units with limited computing resources.

Method used

A convex decomposition algorithm is used to geometrically process obstacles, construct a candidate separation axis set, and then removes them through normalization, hash deduplication, and approximately parallel axis removal to form a target separation axis set. Collision risk assessment is then performed in conjunction with projection judgment.

Benefits of technology

It enables rapid and accurate assessment of collision risks in dynamic traffic environments, reduces computational complexity, and improves the safety and reliability of automatic emergency braking systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121043868B_ABST
    Figure CN121043868B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automatic driving, and discloses a collision detection method and device, a vehicle and a storage medium. The method comprises the following steps: in response to the fact that a host vehicle is in a turning working condition and a perception system identifies that a front obstacle is a concave polyhedron, a geometric model of the obstacle is constructed; a convex decomposition algorithm is used to decompose the geometric model of the obstacle to obtain at least two convex polygons; a candidate separation axis set is constructed based on a geometric model of the host vehicle and each convex polygon; each separation axis vector in the candidate separation axis set is subjected to unitization processing, and the unitized vector is subjected to deduplication based on a hash algorithm to obtain a deduplicated candidate separation axis set; according to the included angles between each separation axis in the deduplicated candidate separation axis set, approximately parallel axes are removed to obtain a target separation axis set; and projection judgment is sequentially performed on each separation axis in the target separation axis set, and if the projections on any separation axis do not overlap, it is determined that there is no collision risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and in particular to a collision detection method, device, vehicle, and storage medium. Background Technology

[0002] Current Automatic Emergency Braking (AEB) systems typically employ a multimodal perception architecture, integrating sensors such as radar, cameras, and lidar, and combining them with traditional bounding box detection algorithms (such as AABB and OBB) or distance-threshold-based decision mechanisms for collision risk assessment. In engineering practice, Axis-aligned bounding boxes (AABB) and Oriented bounding boxes (OBB) have become widely used technical solutions due to their computational efficiency advantages. However, these methods have inherent limitations at the geometric representation level—they approximate obstacles geometrically using simplified rectangles or cubes, making it difficult to accurately reconstruct the true contour features of the target object. Especially when dealing with irregular geometries and concave obstacles (such as the rear structure of a truck, temporary road barriers, and irregularly shaped traffic objects), the deficiencies in the geometric representation capabilities of bounding box methods may lead to misjudgments of the collision state between the vehicle and the obstacle.

[0003] It is worth noting that the motion state of obstacles in dynamic traffic scenarios exhibits significant uncertainty. Existing technical solutions generally suffer from two key problems: first, insufficient modeling of the relative motion relationship between obstacles and the vehicle; and second, a lack of prediction mechanisms based on velocity vectors and changes in motion direction. These shortcomings limit the system's response timeliness and decision-making accuracy when dealing with rapidly evolving traffic situations. In terms of computational efficiency, while the bounding box method can meet the basic real-time requirements of embedded systems, its robustness in complex traffic environments still needs improvement. In contrast, higher-order algorithms based on spatial discretization or geometric approximation theories, although theoretically superior in detection accuracy, suffer from exponentially increasing algorithm complexity, making them difficult to implement in engineering deployments on computationally limited vehicle electronic control units (ECUs). Summary of the Invention

[0004] In view of the above, embodiments of this application provide a collision detection method, apparatus, vehicle, and computer-readable storage medium.

[0005] In a first aspect, embodiments of this application provide a collision detection method, including:

[0006] When the vehicle is turning and the perception system identifies the obstacle ahead as a concave polyhedron, a geometric model of the obstacle is constructed.

[0007] The geometric model of the obstacle is decomposed using a convex decomposition algorithm to obtain at least two convex polygons;

[0008] A set of candidate separation axes is constructed based on the vehicle's geometric model and the aforementioned convex polygons;

[0009] Each separation axis vector in the candidate separation axis set is normalized, and the normalized vectors are deduplicated based on a hash algorithm to obtain a deduplicated candidate separation axis set.

[0010] The approximately parallel axes are removed based on the included angles between the separation axes in the deduplication candidate separation axis set to obtain the target separation axis set.

[0011] Projection judgment is performed sequentially on each separation axis in the target separation axis set. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

[0012] In an optional implementation, the vehicle-based geometric model and each of the convex polygons construct a candidate separation axis set, including:

[0013] Obtain each edge of the vehicle geometry model, and calculate the corresponding vehicle edge direction vector based on the two vertices of each edge;

[0014] Obtain each edge of each convex polygon, and calculate the corresponding obstacle edge direction vector based on the two vertices of each edge;

[0015] Based on the edge direction vector of each edge of the vehicle, the corresponding vertical direction vector is determined and used as the surface normal vector of the vehicle.

[0016] Based on the edge direction vector of each edge of the obstacle, the corresponding vertical direction vector is determined and used as the surface normal vector of the obstacle;

[0017] Calculate the relative velocity direction vector based on the difference between the vehicle's speed and the obstacle's speed;

[0018] The vehicle side direction vector, obstacle side direction vector, vehicle surface normal vector, obstacle surface normal vector, and relative velocity direction vector are used as the constituent elements of the candidate separation axis set.

[0019] In an optional implementation, the step of normalizing each separation axis vector in the candidate separation axis set and deduplicating the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set includes:

[0020] Normalize each separation axis vector in the candidate separation axis set;

[0021] Perform sign normalization on each of the normalized separation axis vectors so that the separation axis vectors with opposite directions are mapped to the same hemisphere;

[0022] The components of each separation axis vector on each coordinate axis are rounded to a preset precision to obtain the integer coordinates of each separation axis vector on each coordinate axis.

[0023] The integer coordinates are packaged into unsigned integer keys according to a preset number of bits to obtain a key-value array;

[0024] The key-value array is sorted by size, and a linear scan is performed to remove duplicate key-values ​​to obtain the deduplication candidate separation axis set.

[0025] In an optional implementation, the step of removing approximately parallel axes based on the included angles between the separation axes in the deduplication candidate separation axis set to obtain a target separation axis set includes:

[0026] Traverse any two separation axis vectors in the set of candidate separation axes for deduplication, and calculate the cosine of the angle between the two separation axis vectors;

[0027] If the cosine value of the included angle is greater than the preset included angle threshold, then the current separation axis vector is determined to be an approximately parallel axis;

[0028] One of the separation axis vectors is retained, and another separation axis vector is removed from the set of deduplicated candidate separation axes to obtain the target set of separation axes.

[0029] In an optional implementation, the step of sequentially projecting each separation axis in the target separation axis set, and determining that there is no collision risk if the projections on any separation axis do not overlap, includes:

[0030] The separation axes in the target separation axis set are sorted according to a preset priority rule;

[0031] Projection calculations are performed on each of the separation axes according to the sorting results;

[0032] If the projections of the vehicle and the obstacle do not overlap on any separation axis, the projection calculation terminates, and it is determined that there is no risk of collision between the vehicle and the obstacle.

[0033] The preset priority rule is as follows: the separation axis corresponding to the relative velocity direction vector has the highest priority, the separation axis corresponding to the surface normal vector has the second highest priority, and the separation axis corresponding to the edge direction vector has the lowest priority.

[0034] In an optional implementation, it further includes:

[0035] The detached axes that were determined to have no collision risk in the previous time period are cached and marked as cached detached axes;

[0036] If the cache separation axis exists in the currently constructed candidate separation axis set during the current time period, then projection calculation is performed based on the cache separation axis.

[0037] If the projections on the buffer separation axis do not overlap, it is directly determined that there is no risk of collision between the vehicle and the obstacle.

[0038] In an optional implementation, it further includes:

[0039] If the projections on all target separation axes in the target separation axis set overlap, then the collision time is predicted based on the relative velocity direction vector;

[0040] If the collision time is less than a preset time threshold, an emergency braking command is triggered, and the collision risk level and collision time are output to the vehicle control system.

[0041] Secondly, embodiments of this application provide a collision detection device, comprising:

[0042] The model building module is used to build a geometric model of the obstacle when the vehicle is turning and the perception system recognizes that the obstacle in front is a concave polyhedron.

[0043] The decomposition module is used to decompose the geometric model of the obstacle using a convex decomposition algorithm to obtain at least two convex polygons;

[0044] A separation axis construction module is used to construct a set of candidate separation axes based on the vehicle's geometric model and the convex polygons.

[0045] The deduplication module is used to normalize each separation axis vector in the candidate separation axis set, and to deduplicatize the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set.

[0046] The deduplication module is also used to remove approximately parallel axes based on the included angle between each of the separation axes in the deduplication candidate separation axis set, so as to obtain a target separation axis set;

[0047] The judgment module is used to sequentially judge the projection of each separation axis in the target separation axis set. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

[0048] Thirdly, embodiments of this application provide a vehicle, wherein the terminal device includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the collision detection method described in the foregoing embodiments.

[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed on a processor, implements the collision detection method described in the foregoing embodiments.

[0050] The embodiments of this application have the following beneficial effects: This application constructs a geometric model of an obstacle in response to the vehicle being in a turning state and recognizing the obstacle as a concave polyhedron, and uses a convex decomposition algorithm to perform geometric processing on the obstacle. Then, based on the geometric models of the vehicle and the obstacle, a candidate separation axis set is constructed. Through processing such as normalization, hash deduplication, and removal of approximately parallel axes, a target separation axis set is constructed, thereby achieving rapid and accurate judgment of collision risk. This method improves collision detection accuracy while effectively reducing computational complexity, making it suitable for the real-time operation requirements of in-vehicle embedded systems. It also enhances the safety and reliability of the Automatic Emergency Braking (AEB) system in dynamic traffic environments. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 A schematic diagram of the separation line of the separation shaft according to an embodiment of this application is shown;

[0053] Figure 2 A schematic diagram of the separation shaft selection according to an embodiment of this application is shown;

[0054] Figure 3 A first flowchart of the collision detection method according to an embodiment of this application is shown;

[0055] Figure 4 A schematic diagram of the vehicle geometry model according to an embodiment of this application is shown;

[0056] Figure 5 This illustration shows a concave obstacle decomposed into a convex polygon according to an embodiment of this application;

[0057] Figure 6 A second flowchart of the collision detection method according to an embodiment of this application is shown;

[0058] Figure 7 A schematic diagram of the third process of the collision detection method according to an embodiment of this application is shown;

[0059] Figure 8A schematic diagram of the fourth process of the collision detection method according to an embodiment of this application is shown;

[0060] Figure 9 A fifth flowchart of the collision detection method according to an embodiment of this application is shown;

[0061] Figure 10 A projection diagram of an embodiment of this application is shown;

[0062] Figure 11 A schematic diagram of a collision detection device according to an embodiment of this application is shown. Detailed Implementation

[0063] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0064] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0065] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0066] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0067] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0068] Before explaining the solution of this embodiment, first explain the separating axis principle adopted in this embodiment.

[0069] The Separating Axis Theorem (SAT) is a collision detection algorithm applied in computational geometry, which can be used to determine whether two convex polygons or convex polyhedrons overlap. Its theoretical basis stems from the hyperplane separation theorem of convex sets, and the core idea is: if there is a separating axis between two convex geometric bodies such that their projections on this axis do not overlap, then these two geometric bodies do not intersect; conversely, if there is overlap in the projections on all possible separating axes, then the two geometric bodies collide.

[0070] In two-dimensional space, for two convex polygons A and B, their separating axes usually include the following categories: 1. The normal direction of each side of the polygon (i.e., the direction perpendicular to the side); 2. The relative motion direction between the two polygons (for dynamic collision detection); 3. The direction of the line connecting the vertices of the polygon (optional in specific algorithms).

[0071] Specifically, the execution process of SAT is as follows: for each side, calculate its corresponding normal direction as a candidate separating axis; project the two polygons onto this axis to obtain two projection intervals; determine whether these two projection intervals overlap; if there is no overlap in the projection on any axis, it is determined that there is no collision; if there is overlap in the projections on all candidate axes, it is determined that a collision has occurred.

[0072] As Figure 1 shown, L1 is the separating line, and L2 is the separating axis perpendicular to L1. The dashed lines in the figure represent the projections of the polygons on this axis. If there is no intersection in the projection intervals of the two polygons on the L2 axis, it can be determined that the two polygons do not collide.

[0073] In practical applications, considering computational efficiency and implementation complexity, it is unrealistic to traverse all possible separating axes. Thanks to the geometric characteristics of polygons, it is only necessary to traverse the normal directions of all sides of each polygon, as Figure 2 shown. In the figure, A and B are two polygons, each having 7 sides. The normal direction of each side is used as the separating axis for projection judgment in turn. If the maximum value of the projection of A on a certain axis is less than the minimum value of the projection of B (i.e., PAmax < PBmin), it indicates that there is no overlap between the two polygons on this axis, and it can be immediately determined that there is no collision risk, and there is no need to continue detecting other axes.

[0074] This method has good implementability in embedded systems, and is especially suitable for vehicle collision detection scenarios with high real-time requirements. Building upon this, the present invention further introduces a candidate axle selection mechanism, a projection priority sorting strategy, and a separate axle caching mechanism, effectively improving the algorithm's efficiency and applicability, making it more suitable for automatic emergency braking (AEB) systems in dynamic traffic environments.

[0075] The collision detection method will be described below with reference to some specific embodiments.

[0076] Figure 3 A schematic flowchart of a collision detection method according to an embodiment of this application is shown. Exemplarily, the collision detection method includes the following steps:

[0077] Step S310: In response to the vehicle being in a turning state and the perception system recognizing the obstacle in front as a concave polyhedron, construct the geometric model of the obstacle.

[0078] For example, the vehicle's operating status information and surrounding environment perception data are first acquired, including but not limited to: the vehicle's speed and acceleration, the vehicle's heading angle, steering wheel angle, steering wheel speed, the vehicle's current turning radius, and the collection information of obstacles in front (including the position, speed, acceleration, heading angle, etc. of the obstacles). The above information can be obtained by fusing perception systems such as radar, cameras, or lidar.

[0079] After obtaining the above data, the relationship between the steering wheel angle and the vehicle's current turning radius can be used to determine whether the vehicle is turning. If the absolute value of the steering wheel angle is greater than a preset threshold (e.g., 5°), and the radius of curvature of the vehicle's current turn is less than a preset threshold (e.g., 80 meters), then the vehicle is determined to be turning.

[0080] Once a turning condition is identified, the collision detection process begins. Based on the obstacle type identified by the perception system, it is further determined whether its geometry is a concave polyhedron. For example, the recessed structure of crash barriers, temporary guardrails, and the rear of vehicles transporting irregularly shaped goods all fall into the category of concave obstacles. If it is a concave polyhedron, a geometric model of the obstacle is constructed.

[0081] For the vehicle geometry model, such as Figure 4 As shown ( Figure 4 'a' is a real car model. Figure 4 In this embodiment, b is simplified to a rectangular model. To balance accuracy and computational efficiency, it is simplified to a rectangle (i.e., AABB or OBB model). Its size is set according to the actual width and length of the vehicle, and its direction is adjusted according to the heading angle of the vehicle to accurately reflect the attitude of the vehicle at the current moment.

[0082] In this embodiment, a geometric model of the vehicle and the obstacle in front is constructed through the above method, which provides an accurate input basis for the subsequent collision detection algorithm based on the improved split axis theorem (SAT).

[0083] Step S320: Use a convex decomposition algorithm to decompose the geometric model of the obstacle to obtain at least two convex polygons.

[0084] Exemplary for example, when an obstacle is identified as a concave structure, directly using bounding boxes or the Standard Separating Axis Theorem (SAT) for collision detection will lead to significant errors, or even misjudgments. Therefore, this embodiment introduces a fast convex decomposition algorithm (such as Hull Trick, Voronoi-based Convex Decomposition, Approximate Convex Decomposition, etc.) to decompose the original concave polygon into several convex polygons.

[0085] This decomposition process, based on the vertex information and boundary topology of obstacles, divides concave obstacles into multiple convex polygons with geometric integrity (such as...) by identifying concave points and dividing them into segmented surfaces. Figure 5 As shown, where, Figure 5 'a' is a schematic diagram of the geometric model of the obstacle to be identified. Figure 5 b is a pair Figure 5 (A schematic diagram after segmentation of A). During the decomposition process, the system can control the number and quality of the decomposed convex polygons according to preset accuracy requirements and computational resource limitations, so as to achieve a balance between detection accuracy and computational efficiency.

[0086] The multiple convex polygons obtained after decomposition will be used as input models for subsequent collision detection. They will be compared with the vehicle model using the Separating Axis Theorem (SAT) to improve the system's ability to detect concave obstacles and its robustness.

[0087] Step S330: Construct a set of candidate separation axes based on the vehicle's geometric model and each convex polygon.

[0088] As an example, both the vehicle's and the obstacle's geometric models are polygonal. This embodiment analyzes the geometric features of both the vehicle and obstacle geometries to extract multiple direction vectors that could potentially serve as separation axes. These direction vectors form the basis for subsequent collision detection using the Separation Axis Theorem (SAT).

[0089] The candidate separation axis set typically includes, but is not limited to, the following types of direction vectors: vehicle side direction vector, obstacle side direction vector, vehicle surface normal vector, obstacle surface normal vector, and relative velocity direction vector.

[0090] By constructing a candidate separation axis set containing the aforementioned various types of direction vectors, the system can comprehensively judge the geometric relationship between the vehicle and obstacles from multiple dimensions. Specifically: edge direction vectors and surface normal vectors describe the shape characteristics of the geometry, ensuring accurate judgment of whether two objects are in contact under static or low-speed motion conditions; relative velocity direction vectors introduce dynamic information, enabling the system to predict collision trends and respond in advance in high-speed or significantly changing motion scenarios; the candidate axis set not only provides a basis for subsequent projection calculations but also provides a dual-dimensional analytical foundation for collision risk assessment, encompassing both geometric and kinematic dimensions, thereby improving the system's judgment accuracy and response capability in complex traffic environments.

[0091] In subsequent steps, the above-mentioned candidate separation axis set can be further screened and optimized to improve detection efficiency and adapt to the computing resource limitations of the vehicle-mounted embedded system.

[0092] In some implementations, such as Figure 6 As shown, step S330 includes steps S610-S660:

[0093] Step S610: Obtain each edge of the vehicle's geometric model and calculate the corresponding vehicle edge direction vector based on the two vertices of each edge.

[0094] Step S620: Obtain each edge of each convex polygon, and calculate the corresponding obstacle edge direction vector based on the two vertices of each edge.

[0095] Among them, the edge direction vector is used to describe the orientation of each edge of the convex body in space. In a two-dimensional polygon, it is the vector of each edge. For example, for an edge composed of vertices A and B, its direction vector is BA, which is the "arrow" pointing from B to A. This arrow may be very long or very short. In this embodiment, only its direction is needed, not its length.

[0096] For the ego vehicle's side direction vector, the ego vehicle model is simplified to a rectangle (e.g., AABB or OBB model), which consists of several vertices. The coordinates of the two vertices of each side are obtained in sequence, and the direction vector of that side is obtained through vector operations.

[0097] For the obstacle edge direction vector, after the obstacle undergoes convex decomposition in step S320, multiple convex polygons are generated. Each edge of each convex polygon is traversed sequentially, and the edge direction vector is calculated based on the vector between two vertices.

[0098] Using the methods described above, the system can accurately acquire the geometric structural features of the vehicle and obstacles, thereby providing support for subsequent collision detection.

[0099] Step S630: Based on the edge direction vector of each edge of the vehicle, determine the corresponding vertical direction vector as the surface normal vector of the vehicle.

[0100] Step S640: Based on the edge direction vector of each edge of the obstacle, determine the corresponding vertical direction vector as the surface normal vector of the obstacle.

[0101] Examplely, steps S630 and S640 are used together to obtain the surface normal vectors of the vehicle and obstacle geometry models as an important component of the candidate separation axis set.

[0102] Specifically, in this embodiment, based on the direction vector of each edge of the vehicle, the corresponding perpendicular direction vector is calculated and used as the surface normal vector of the vehicle's geometric model. In two-dimensional space, the direction vector of an edge is perpendicular to its corresponding normal vector. For example, if the direction vector of an edge is v = (x, y), then its corresponding normal vector can be represented as n = (-y, x) or n = (y, -x). The system selects one of the directions and maintains consistency (e.g., uniformly facing outwards from the polygon) to ensure the uniformity of subsequent projection judgments.

[0103] Similarly, based on the direction vector of each edge of the obstacle, the corresponding vertical direction vector is calculated and used as the surface normal vector of the obstacle's geometric model. This calculation process is consistent with the vehicle's processing method, ensuring the system's consistency and versatility when handling different geometric objects.

[0104] Face normals describe the outward normal directions of each side of a polygon. In two dimensions, they degenerate into the normal directions of the edges and are one of the standard candidate sources of separation axes in the Separation Axis Theorem (SAT). Using this method, the geometric boundary features of the vehicle and obstacles can be accurately obtained, thus providing a reliable basis for subsequent collision detection based on SAT.

[0105] Step S650: Calculate the relative velocity direction vector based on the difference between the vehicle's speed and the obstacle's speed.

[0106] As an example, in dynamic traffic scenarios, relative motion is a crucial factor influencing the collision risk between the vehicle and obstacles. The system calculates the relative velocity vector between the vehicle (v_self) and the obstacle (v_obstacle) obtained from the perception module: v_rel = v_self - v_obstacle. This vector is then normalized to extract its orientation information, unify the scale of projection calculations, and improve the consistency of orientation judgment.

[0107] This relative velocity direction vector reflects the relative motion trend between the vehicle and the obstacle. As a key component of the candidate separation axis set, it is used for subsequent projection judgment and time-to-collision (TCC) prediction. By introducing this dynamic information, this embodiment can more accurately predict collision trends in scenarios with changing motion states, and improve the real-time performance and robustness of the overall detection.

[0108] Step S660: The vehicle side direction vector, obstacle side direction vector, vehicle surface normal vector, obstacle surface normal vector, and relative velocity direction vector are used as constituent elements of the candidate separation axis set.

[0109] In this embodiment, the five types of direction vectors obtained in steps S610-S650 are used as components of the candidate separation axis set. The constructed candidate separation axis set integrates geometric structural features (such as edge directions and surface normals) and dynamic motion information (such as relative velocity directions), thus providing a complete judgment basis for subsequent collision detection based on the Separation Axis Theorem (SAT). By integrating geometric and dynamic information, this embodiment can more accurately identify potential collision risks between the vehicle and obstacles.

[0110] Step S340: Normalize each separation axis vector in the candidate separation axis set, and remove duplicates from the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set.

[0111] In this step, the separation axis vectors in the candidate separation axis set are normalized to unify their orientation scale. Then, a hash algorithm is used to deduplicate the normalized vectors, removing duplicate or nearly identical separation axis vectors, thus obtaining a deduplicated candidate separation axis set. This step reduces redundant computation, thereby improving the efficiency of the collision detection algorithm.

[0112] In some implementations, such as Figure 7 As shown, step S340 includes steps S710-S750:

[0113] Step S710: Normalize each separation axis vector in the candidate separation axis set.

[0114] After obtaining the candidate separation axis set, each separation axis vector in the candidate separation axis set is first normalized. Specifically, for any separation axis vector, its magnitude is calculated and converted into a unit vector.

[0115] Normalization can unify the directional scale of each axis vector, avoiding projection errors caused by differences in vector length, and thus providing standardized input for subsequent hash deduplication and projection judgment.

[0116] Step S720: Perform sign normalization on each normalized separation axis vector so that separation axis vectors with opposite directions are mapped to the same hemisphere.

[0117] Considering that in the Separated Axis Theorem (SAT), axis vectors with opposite directions have the same projection judgment effect, this embodiment performs sign normalization on the normalized vectors to avoid redundant calculations. Specifically, a fixed reference vector r = (1, 0) can be introduced. If the dot product of a certain unit vector d and the reference vector is less than zero (i.e., dot(d, r) < 0), it is replaced with -d, thereby mapping all vectors to the same hemisphere bounded by r, thus reducing redundant judgments.

[0118] Step S730: Round the components of each separation axis vector on each coordinate axis with a preset precision to obtain the integer coordinates of each separation axis vector on each coordinate axis.

[0119] Exemplary, in order to eliminate the hash key inconsistency problem caused by floating-point precision errors, this embodiment uses a preset precision (e.g., The coordinate components of each normalized vector are rounded to integer coordinates. This process effectively compresses the representation space of the vector in the hash key, thereby improving deduplication efficiency.

[0120] Step S740: Pack the integer coordinates into unsigned integer key values ​​according to a preset number of bits to obtain a key-value array.

[0121] In this embodiment, the integer coordinates of each vector are packaged into a 32-bit unsigned integer key value according to a preset number of bits (e.g., 16 bits for x-coordinates and 16 bits for y-coordinates). For example, if the integer part of the x-coordinate of a vector is qx and the integer part of the y-coordinate is qy, then its key value can be represented as: This key-value array is used for subsequent sorting and deduplication operations.

[0122] In step S750, the key-value array is sorted by size, and a linear scan is performed to remove duplicate key-values ​​to obtain a set of candidate deduplication axes.

[0123] Finally, the key-value array is sorted in ascending order, and duplicate keys are removed by a single linear scan. The resulting set of candidate deduplicated axes will serve as input for subsequent projection decisions, thereby reducing the computational overhead of redundant axes and improving the overall system efficiency.

[0124] Step S350: Remove approximately parallel axes based on the included angles between the separation axes in the deduplication candidate separation axis set to obtain the target separation axis set.

[0125] In this step, any two axis vectors in the candidate deduplication axis set are traversed sequentially, and the cosine of the angle between them is calculated. If the cosine value is greater than a preset angle threshold (e.g., 0.995, corresponding to an angle of approximately 5.7°), the two axes are determined to be approximately parallel. Only one axis vector is retained, and the other axis vector is removed from the set, thereby further reducing redundant calculations. The purpose of this step is to improve the computational efficiency of the collision detection algorithm, especially suitable for resource-constrained operating environments such as automotive embedded systems.

[0126] In some implementations, such as Figure 8 As shown, step S350 includes steps S810-S830:

[0127] Step S810: Traverse any two separation axis vectors in the deduplication candidate separation axis set and calculate the cosine value of the angle between the two separation axis vectors.

[0128] After normalizing and deduplicating the candidate axis set, the system proceeds to the approximately parallel axis removal stage. Specifically, the system iterates through any two axis vectors u and v in the current candidate axis set and calculates the cosine of the angle between them based on the vector dot product formula: cosθ=|u•v|. Since each axis vector has been normalized in step S340, this cosine of the angle can be directly obtained through the dot product calculation.

[0129] Step S820: If the cosine value of the included angle is greater than the preset included angle threshold, then the current separation axis vector is determined to be an approximately parallel axis.

[0130] In this step, the calculated cosine value of the included angle is compared with a preset included angle threshold. If the value is greater than the set threshold (e.g., 0.995, corresponding to an included angle of approximately 5.7°), the two axis vectors are determined to be in the same direction and are approximately parallel. This judgment criterion can be dynamically adjusted according to the actual system error tolerance and computing resources.

[0131] Step S830: Keep one of the separation axis vectors and remove the other separation axis vector from the deduplication candidate separation axis set to obtain the target separation axis set.

[0132] To avoid redundant judgments and repeated calculations, in this step, after determining the approximate parallel relationship, only one axis vector is retained (e.g., the one with the larger magnitude, the one with the more stable direction, or the one that appears for the first time), and the other axis vector is removed from the deduplication candidate axis set. The final target separation axis set will serve as the basis for subsequent projection judgments and collision risk assessments.

[0133] By using the steps S810 to S830 described above, the number of redundant axes in the candidate axis set can be effectively reduced.

[0134] Step S360: For each separation axis in the target separation axis set, perform projection judgment in sequence. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

[0135] In some implementations, such as Figure 9 As shown, step S360 specifically includes steps S910-S930:

[0136] Step S910: Sort each separation axis in the target separation axis set according to a preset priority rule.

[0137] In this step, after deduplication of candidate separation axes and removal of approximately parallel axes, the system enters the projection judgment stage. To improve detection efficiency, the system sorts the axes in the target separation axis set according to preset priority rules, prioritizing the detection of axes most likely to produce a separation effect.

[0138] Specifically, the preset priority rules are as follows: the separation axis corresponding to the relative velocity direction vector has the highest priority and is used to determine whether a separation effect may occur in a dynamic scene; the separation axis corresponding to the surface normal vector has the next highest priority, where the priority of the surface normal vector is sorted according to the area of ​​the corresponding surface, and the normal vector of the surface with a larger area has a higher priority; the separation axis corresponding to the edge direction vector has the lowest priority, where the priority of the edge direction vector is sorted according to the length of the corresponding edge, and the axis corresponding to the longer edge has a higher priority.

[0139] This priority setting takes into account the separation probability and judgment efficiency of each axis in different scenarios, which helps to quickly terminate the collision-free judgment process with limited computing resources, thereby improving the real-time performance and stability of the system in dynamic traffic environments.

[0140] Step S920: Perform projection calculations on each separation axis in sequence according to the sorting results.

[0141] In this step, the geometric models of the vehicle and obstacles are projected sequentially onto each separation axis according to the sorted order, and the overlap between the two projection intervals is calculated. Specifically, if the two projection intervals intersect, it indicates a potential collision on that axis; if they do not intersect, it indicates that the two geometric shapes have separated on that axis. Figure 10 As shown, the two vehicles do not intersect on the separation axle A, but they do intersect on the separation axle B.

[0142] In step S930, if the projections of the vehicle and the obstacle do not overlap on any separation axle, the projection calculation terminates, and it is determined that there is no risk of collision between the vehicle and the obstacle.

[0143] In this step, if step S920 detects that the projections on any axis do not overlap, the projection calculation process for subsequent axes is immediately terminated, and it is determined that there is no risk of collision between the vehicle and the obstacle. This mechanism can reduce unnecessary computational overhead and improve the system's operating efficiency and response speed.

[0144] Through the above steps S910 to S930, efficient sorting and rapid judgment of the target separation axis set can be achieved, providing a performance optimization path for collision detection based on the separation axis theorem (SAT), which is especially suitable for automatic emergency braking (AEB) systems in dynamic traffic scenarios.

[0145] In some implementations, this embodiment further includes: caching the separation axes that were determined to have no collision risk in the previous time period and marking them as cached separation axes; in the current time period, if the cached separation axis exists in the currently constructed candidate separation axis set, then performing projection calculation based on the cached separation axis; if the projections on the cached separation axis do not overlap, then directly determining that there is no collision risk between the vehicle and the obstacle.

[0146] It is understandable that separation axes determined to have no collision risk in the previous time period are cached and marked as cached separation axes. In the current time period, if the cached separation axis exists in the currently constructed candidate separation axis set, then the projection judgment is performed based on the cached separation axis first.

[0147] If the projections on the buffer separation axis do not overlap, it can be immediately determined that there is no risk of collision between the vehicle and the obstacle, and the subsequent projection judgment process can be terminated. This method is applicable in dynamic traffic scenarios where the direction and speed of the vehicle and the obstacle usually change little, and the axis that was determined to be separated in the previous cycle may still remain separated in the current cycle.

[0148] To prevent the buffer separation axis from failing due to rapid movement of the vehicle or obstacles, this embodiment can also set an attitude change threshold mechanism. When the displacement change or heading angle change of the vehicle or obstacle exceeds a preset threshold, the buffer axis will be abandoned and a complete set of candidate separation axes will be reconstructed for judgment to ensure the accuracy of the detection results.

[0149] Through the aforementioned caching mechanism, this embodiment can quickly complete the collision judgment process in most cases, significantly reducing CPU load and thereby improving the response speed and operating efficiency of the Automatic Emergency Braking (AEB) system.

[0150] In some implementations, if the projections on all target separation axes in the target separation axis set overlap, the collision time is predicted based on the relative velocity direction vector; if the collision time is less than a preset time threshold, an emergency braking command is triggered, and the collision risk level and collision time are output to the vehicle control system.

[0151] It is understandable that when all separation axes in the target separation axis set overlap in the projection judgment, the collision time (TTC) between the vehicle and the obstacle will be further predicted based on the relative velocity direction vector to determine whether emergency braking needs to be triggered.

[0152] Specifically, the relative velocity vector between the vehicle and the obstacle, v_rel = v_self - v_obstacle, is projected onto the relative velocity direction axis. The estimated collision time (TTC) is then calculated by combining the overlap length of the current projection interval with the magnitude of the relative velocity. For example, if the overlap length of the projection interval is d_overlap, and the projection of the relative velocity onto this axis is v_proj, the TTC can be estimated using the following formula: This estimation method is well-suited for dynamic traffic scenarios, especially when there is relative motion between the vehicle and obstacles. If the calculated TTC is less than a preset time threshold (e.g., 2 seconds), a high-risk collision is determined, triggering an AEB braking command. The TTC value and collision risk level (e.g., low, medium, high) are output to the vehicle control system for automatic emergency braking or driver warning.

[0153] To enhance the adaptability of this embodiment, the preset time threshold can be dynamically adjusted according to the actual driving scenario (such as urban roads or highways) or the current driving status of the vehicle (such as vehicle speed or road conditions), thereby achieving a smarter and safer collision intervention mechanism.

[0154] This embodiment improves the accuracy and efficiency of collision detection by constructing a geometric model of the vehicle and obstacles, and combining this with the construction of a candidate separation axis set, normalization and deduplication, removal of approximately parallel axes, priority sorting, caching mechanisms, and dynamic projection judgment. Especially when facing concave obstacles and dynamic traffic scenarios, this solution enhances the ability to recognize complex-shaped obstacles and the response speed to motion trends by introducing a fast convex decomposition algorithm and a relative velocity direction axis. Simultaneously, the separation axis caching mechanism and projection priority sorting strategy effectively reduce redundant calculations, significantly reducing the system's computational load while ensuring detection accuracy, thus improving the real-time performance and stability of the algorithm in automotive embedded platforms.

[0155] Figure 11 A schematic diagram of a collision detection device according to an embodiment of this application is shown. Exemplarily, the collision detection device includes:

[0156] The model building module 100 is used to build a geometric model of the obstacle when the vehicle is turning and the perception system recognizes that the obstacle in front is a concave polyhedron.

[0157] The decomposition module 200 is used to decompose the geometric model of the obstacle using a convex decomposition algorithm to obtain at least two convex polygons.

[0158] Separation axis construction module 300 is used to construct a set of candidate separation axes based on the vehicle's geometric model and each convex polygon.

[0159] The deduplication module 400 is used to normalize each separation axis vector in the candidate separation axis set, and to deduplicatize the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set.

[0160] The deduplication module 400 is also used to remove approximately parallel axes based on the included angle between each separation axis in the deduplication candidate separation axis set, so as to obtain the target separation axis set.

[0161] The judgment module 500 is used to sequentially judge the projection of each separation axis in the target separation axis set. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

[0162] It is understood that the device in this embodiment corresponds to the collision detection method in the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.

[0163] This application also provides a vehicle, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor, by running the computer program, causes the vehicle to perform the functions of the various modules in the above-described collision detection method or collision detection device.

[0164] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0165] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.

[0166] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned vehicle. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0167] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0168] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0169] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0170] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A collision detection method, characterized in that, include: When the vehicle is turning and the perception system identifies the obstacle ahead as a concave polyhedron, a geometric model of the obstacle is constructed. The geometric model of the obstacle is decomposed using a convex decomposition algorithm to obtain at least two convex polygons; A set of candidate separation axes is constructed based on the vehicle's geometric model and the aforementioned convex polygons; Each separation axis vector in the candidate separation axis set is normalized, and the normalized vectors are deduplicated based on a hash algorithm to obtain a deduplicated candidate separation axis set. The approximately parallel axes are removed based on the included angles between the separation axes in the deduplication candidate separation axis set to obtain the target separation axis set. Projection judgment is performed sequentially on each separation axis in the target separation axis set. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

2. The collision detection method according to claim 1, characterized in that, The vehicle-based geometric model and each of the convex polygons construct a candidate separation axis set, including: Obtain each edge of the vehicle's geometric model, and calculate the corresponding vehicle edge direction vector based on the two vertices of each edge; Obtain each edge of each convex polygon, and calculate the corresponding obstacle edge direction vector based on the two vertices of each edge; Based on the edge direction vector of each edge of the vehicle, the corresponding vertical direction vector is determined and used as the surface normal vector of the vehicle. Based on the edge direction vector of each edge of the obstacle, the corresponding vertical direction vector is determined and used as the surface normal vector of the obstacle; Calculate the relative velocity direction vector based on the difference between the vehicle's speed and the obstacle's speed; The vehicle side direction vector, the obstacle side direction vector, the vehicle surface normal vector, the obstacle surface normal vector, and the relative velocity direction vector are used as the constituent elements of the candidate separation axis set.

3. The collision detection method according to claim 1, characterized in that, The step of normalizing each separation axis vector in the candidate separation axis set and deduplicating the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set includes: Normalize each separation axis vector in the candidate separation axis set; Perform sign normalization on each of the normalized separation axis vectors so that the separation axis vectors with opposite directions are mapped to the same hemisphere; The components of each separation axis vector on each coordinate axis are rounded to a preset precision to obtain the integer coordinates of each separation axis vector on each coordinate axis. The integer coordinates are packaged into unsigned integer keys according to a preset number of bits to obtain a key-value array; The key-value array is sorted by size, and a linear scan is performed to remove duplicate key-values ​​to obtain the deduplication candidate separation axis set.

4. The collision detection method according to claim 1, characterized in that, The step of removing approximately parallel axes based on the included angles between the separation axes in the deduplication candidate separation axis set to obtain the target separation axis set includes: Traverse any two separation axis vectors in the set of candidate separation axes for deduplication, and calculate the cosine of the angle between the two separation axis vectors; If the cosine value of the included angle is greater than the preset included angle threshold, then the current separation axis vector is determined to be the approximate parallel axis; One of the separation axis vectors is retained, and another separation axis vector is removed from the set of deduplicated candidate separation axes to obtain the target set of separation axes.

5. The collision detection method according to claim 1, characterized in that, The step of sequentially projecting each separation axis in the target separation axis set, and determining that there is no collision risk if the projections on any separation axis do not overlap, includes: The separation axes in the target separation axis set are sorted according to a preset priority rule; Projection calculations are performed on each of the separation axes according to the sorting results; If the projections of the vehicle and the obstacle do not overlap on any separation axis, the projection calculation terminates, and it is determined that there is no risk of collision between the vehicle and the obstacle. The preset priority rule is as follows: the separation axis corresponding to the relative velocity direction vector has the highest priority, the separation axis corresponding to the surface normal vector has the second highest priority, and the separation axis corresponding to the edge direction vector has the lowest priority.

6. The collision detection method according to claim 5, characterized in that, Also includes: The detached axes that were determined to have no collision risk in the previous time period are cached and marked as cached detached axes; If the cache separation axis exists in the currently constructed candidate separation axis set during the current time period, then projection calculation is performed based on the cache separation axis. If the projections on the buffer separation axis do not overlap, it is directly determined that there is no risk of collision between the vehicle and the obstacle.

7. The collision detection method according to claim 1, characterized in that, Also includes: If the projections on all target separation axes in the target separation axis set overlap, then the collision time is predicted based on the relative velocity direction vector; If the collision time is less than a preset time threshold, an emergency braking command is triggered, and the collision risk level and collision time are output to the vehicle control system.

8. A collision detection device, characterized in that, include: The model building module is used to build a geometric model of the obstacle when the vehicle is turning and the perception system recognizes that the obstacle in front is a concave polyhedron. The decomposition module is used to decompose the geometric model of the obstacle using a convex decomposition algorithm to obtain at least two convex polygons; A separation axis construction module is used to construct a set of candidate separation axes based on the vehicle's geometric model and the convex polygons. The deduplication module is used to normalize each separation axis vector in the candidate separation axis set, and to deduplicatize the normalized vectors based on a hash algorithm to obtain a deduplicated candidate separation axis set. The deduplication module is also used to remove approximately parallel axes based on the included angle between each of the separation axes in the deduplication candidate separation axis set, so as to obtain a target separation axis set; The judgment module is used to sequentially judge the projection of each separation axis in the target separation axis set. If the projections on any separation axis do not overlap, it is determined that there is no risk of collision.

9. A vehicle, characterized in that, The vehicle includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the collision detection method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed on a processor, implements the collision detection method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Unmanned vehicle dynamic path planning method based on free space and fast search random tree algorithm

    CN112833904A

  • Collision detection method and device for vehicle automatic driving system and electronic equipment

    CN115432007A