Collision detection method and detection device
By constructing vehicle and obstacle models in the target coordinate system, it can directly determine whether obstacles are outside the vehicle or do not intersect, thus solving the collision detection accuracy problem on platforms with low computing power and achieving efficient collision detection and improved user experience of automatic parking systems.
Patent Information
- Application Number
- CN202411484002.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-10-23
AI Technical Summary
In existing technologies, the accuracy of collision detection is not effective on platforms with low computing power, and it is impossible to predict collisions before they occur. Furthermore, coordinate system transformation requires high computing power and cannot be applied to platforms with low computing power.
By acquiring vehicle configuration and location information, a vehicle model is constructed. An obstacle model is then directly constructed in the target coordinate system. It is determined whether the obstacle is outside the vehicle model or does not intersect with the vehicle model, thus confirming the collision detection result.
It improves the accuracy and efficiency of collision detection, is suitable for platforms with lower computing power, reduces the amount of computation, and enhances the user experience of automatic parking systems.
Smart Images

Figure CN119198124B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and in particular to a collision detection method and detection device. Background Technology
[0002] Automated Parking Assist (APA) technology is widely used in driver assistance systems and advanced driver assistance systems. Related technologies either use onboard sensors to obtain collision signals or acquire predicted trajectories of obstacles, transforming these predicted trajectories from the Frenet coordinate system to the Cartesian coordinate system before collision detection.
[0003] The former cannot predict collisions before they occur, while the latter requires coordinate system transformation and has high computing power requirements, making it unsuitable for platforms with low computing power. Summary of the Invention
[0004] In view of this, embodiments of this application provide a collision detection method and a detection device to solve the problem of how to improve detection accuracy when performing collision detection on a platform with low computing power in the prior art.
[0005] A first aspect of this application provides a collision detection method for providing collision detection results for a vehicle performing an automatic parking operation, including:
[0006] Obtain vehicle configuration information, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information;
[0007] Obtain the vehicle's position information in the target coordinate system, and construct a first vehicle model in the preset coordinate system based on the vehicle configuration information, vehicle position information, and preset expansion coefficient;
[0008] Obtain obstacle location information, and determine the obstacle model in the target coordinate system based on the obstacle location information. The obstacle model can be an obstacle point or an obstacle vector.
[0009] In response to determining that the obstacle point is outside the first vehicle model, or that the obstacle vector does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection.
[0010] A second aspect of this application provides a collision detection device, comprising:
[0011] The acquisition module is configured to acquire vehicle configuration information, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information.
[0012] The vehicle model determination module is configured to acquire the vehicle's position information in the target coordinate system and construct a first vehicle model in the preset coordinate system based on the vehicle configuration information, vehicle position information, and preset expansion coefficient.
[0013] The obstacle model determination module is configured to acquire obstacle position information and determine the obstacle model in the target coordinate system based on the obstacle position information. The obstacle model is an obstacle point or an obstacle vector.
[0014] The detection module is configured to determine that the collision detection result is passed in response to determining that the obstacle point is outside the first vehicle model or that the obstacle vector does not intersect with the first vehicle model.
[0015] The beneficial effects of this application embodiment compared with the prior art are as follows: This application embodiment obtains vehicle configuration information including at least one of the vehicle length, vehicle width and axle information, as well as the vehicle's position information in the target coordinate system. Based on the vehicle configuration information, vehicle position information and a preset expansion coefficient, a first vehicle model is constructed in a preset coordinate system. At the same time, obstacle information is obtained, and an obstacle model is constructed in the target coordinate system based on the obstacle information. When it is determined that the obstacle model is outside the first vehicle model, or the obstacle model does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic flowchart of a collision detection method provided in an embodiment of this application.
[0018] Figure 2 This is a flowchart illustrating the automatic parking process.
[0019] Figure 3 This is a flowchart illustrating another collision detection method provided in an embodiment of this application.
[0020] Figure 4 This is a schematic flowchart of another collision detection method provided in the embodiments of this application.
[0021] Figure 5 This is a schematic diagram provided in the embodiments of this application, which divides the first vehicle model and the second vehicle model, represented by quadrilaterals, into a nine-square grid.
[0022] Figure 6 This is a schematic diagram of dividing a third vehicle model, represented by an octagon, into a nine-square grid, as provided in an embodiment of this application.
[0023] Figure 7 This is a flowchart illustrating the method for determining whether an obstacle point is located within a vehicle model, as provided in an embodiment of this application.
[0024] Figure 8 This is a flowchart illustrating the method for determining whether an obstacle vector intersects with a vehicle model, as provided in an embodiment of this application.
[0025] Figure 9 This is a flowchart illustrating another method for determining whether an obstacle vector intersects with a vehicle model, provided in an embodiment of this application.
[0026] Figure 10 This is a schematic diagram of a method for determining whether an obstacle point is inside a quadrilateral using vector cross product, provided in an embodiment of this application.
[0027] Figure 11 This is a schematic diagram of another method for determining whether an obstacle point is inside a quadrilateral using vector cross product, provided in an embodiment of this application.
[0028] Figure 12 This is a schematic flowchart of another collision detection method provided in the embodiments of this application.
[0029] Figure 13 This is a schematic diagram of a vehicle model and a simulated boundary provided in an embodiment of this application.
[0030] Figure 14 This is a schematic diagram of a collision detection device provided in an embodiment of this application.
[0031] Figure 15 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0032] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0033] A collision detection method and apparatus according to an embodiment of this application will now be described in detail with reference to the accompanying drawings.
[0034] As mentioned above, related technologies either obtain collision signals through onboard sensors or require acquiring predicted trajectories of obstacles and transforming these trajectories from the Frenet coordinate system to the Cartesian coordinate system before collision detection. The former cannot predict collisions beforehand, while the latter requires coordinate system transformation, placing high demands on computing power and making it unsuitable for platforms with limited computing power.
[0035] In view of this, embodiments of this application provide a collision detection method, which obtains vehicle configuration information including at least one of the following: vehicle length, vehicle width, and axle information, as well as the vehicle's position information in a target coordinate system. Based on the vehicle configuration information, vehicle position information, and a preset expansion coefficient, a first vehicle model is constructed in a preset coordinate system. At the same time, obstacle information is obtained, and an obstacle model is constructed in the target coordinate system based on the obstacle information. When it is determined that the obstacle model is outside the first vehicle model, or the obstacle model does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection.
[0036] Figure 1 This is a schematic flowchart of a collision detection method provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0037] In step S101, vehicle configuration information is obtained.
[0038] The vehicle configuration information includes at least one of the following: overall vehicle length, overall vehicle width, and axle information.
[0039] In step S102, the vehicle's position information in the target coordinate system is obtained, and a first vehicle model is constructed in the preset coordinate system based on the vehicle configuration information, vehicle position information, and preset expansion coefficient.
[0040] In step S103, obstacle location information is obtained, and obstacle model is determined in the target coordinate system based on obstacle location information. The obstacle model is an obstacle point or an obstacle vector.
[0041] In step S104, in response to determining that the obstacle point is outside the first vehicle model, or that the obstacle vector does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection.
[0042] In some embodiments of this application, the collision detection method is used to provide collision detection results for a vehicle performing an automatic parking operation. In one example, the method can be executed by an onboard processing unit or by other terminals with certain processing capabilities connected to the vehicle; no limitation is made here.
[0043] Figure 2 This is a flowchart illustrating the automatic parking process. For example... Figure 2As shown, when a vehicle performs an automatic parking operation, it acquires perception input, i.e., the detection results from the vehicle's onboard sensors. This perception input is post-processed to determine available parking spaces. If, based on other factors, such as the user's selection that the available parking space is unavailable, the search for a parking space continues. Conversely, if the available parking space is determined to be available, path planning is performed, followed by collision detection. If the detection result is no collision, the parking operation is executed. During parking, collision detection is continuously performed based on the perception results. If no collision is detected, the parking operation continues until parking is complete. If a collision is detected, meaning the vehicle may collide with an obstacle, path planning needs to be re-performed.
[0044] In other words, the parking system continuously assesses whether the vehicle will collide with obstacles during the parking process. These obstacles can include moving obstacles, stationary obstacles, road edges, walls, wheel chocks, etc. For platforms with low computing power, the collision detection model must be simple enough, and the collision detection algorithm must be fast enough to provide timely collision detection results to the vehicle.
[0045] In some embodiments of this application, vehicle configuration information can be obtained, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information. The overall vehicle length is the maximum length of the vehicle, the overall vehicle width is the maximum width of the vehicle, and the axle information may include the lengths of the front and / or rear axles, and the wheelbase of the vehicle. The vehicle configuration information can be pre-stored in the vehicle or retrieved from the cloud; no limitation is imposed here.
[0046] In some embodiments of this application, the vehicle's position information in a target coordinate system can also be obtained. The target coordinate system can be a global Cartesian coordinate system, and the vehicle's position information in the target coordinate system can be obtained through a positioning system, such as obtaining the vehicle's real-time coordinates from an onboard GPS (Global Positioning System) module. Alternatively, when the vehicle performs an automatic parking task in an area with weak GPS signals, such as an underground parking garage, the vehicle's position information in the target coordinate system can also be obtained through a vehicle perception module, such as through an onboard LiDAR, infrared detector, or image detection device.
[0047] When the vehicle's position information is obtained by the vehicle perception module, the target coordinate system can be a relative coordinate system generated by the vehicle using algorithms such as DR (Dead Reckoning).
[0048] Based on the acquired vehicle configuration information and the vehicle's position in the target coordinate system, a first vehicle model can be constructed in the preset coordinate system using a preset expansion coefficient. This first vehicle model can be a quadrilateral model. The expansion coefficient provides redundancy for the vehicle model used in collision detection, preventing a collision from occurring when a collision has actually occurred. The value of the preset expansion coefficient can be determined according to actual needs and is not limited here. In one example, the preset expansion coefficient can range from 10 to 20 centimeters, for example, 15 centimeters.
[0049] In some embodiments of this application, obstacle location information can also be obtained. This obstacle location information can be acquired by the vehicle perception module, and used to construct an obstacle model in a relative coordinate system created by the vehicle. The obstacle model can be one or more obstacle points, or one or more obstacle vectors.
[0050] This method allows for the direct addition of obstacle models within the relative coordinate system created by the vehicle, eliminating the need for coordinate system transformation of obstacle position information such as trajectories. This significantly reduces the computational load of collision detection and is highly compatible with low-computing-power platforms.
[0051] Furthermore, the positional relationship between the constructed first vehicle model and the obstacle model can also be detected. If all obstacle points in the obstacle model are located outside the first vehicle model, and / or all obstacle vectors in the obstacle model do not intersect with the first vehicle model, then it can be determined that no collision has occurred, and the collision detection result can be "detection passed".
[0052] According to the technical solution provided in the embodiments of this application, by acquiring vehicle configuration information including at least one of the vehicle length, vehicle width, and axle information, as well as the vehicle's position information in the target coordinate system, a first vehicle model is constructed in the preset coordinate system based on the vehicle configuration information, vehicle position information, and a preset expansion coefficient. At the same time, obstacle information is acquired, and an obstacle model is constructed in the target coordinate system based on the obstacle information. When it is determined that the obstacle model is outside the first vehicle model, or the obstacle model does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection.
[0053] In some embodiments of this application, the preset obstacles may include wheel chocks and parking boundary obstacles. Parking boundary obstacles may include, for example, parking boundary lines formed by parking space lines, walls, pillars, and other moving or stationary vehicles in adjacent parking spaces.
[0054] If the preset obstacle is a wheel chock, the first vehicle model is determined as follows: The quadrilateral formed by the front and rear axles of the vehicle is determined as the initial vehicle model; the initial vehicle model is expanded outward by a preset expansion coefficient to obtain the first vehicle model. Specifically, expanding the initial vehicle model outward by the preset expansion coefficient can be achieved by moving each side of the quadrilateral corresponding to the initial vehicle model away from the center of the quadrilateral by the preset expansion coefficient.
[0055] In other words, when the preset obstacle is a wheel chock, the quadrilateral formed by the front and rear axles of the vehicle can be used as the initial vehicle model. Furthermore, to prevent the rear axle from pressing on or passing over the wheel chock, the quadrilateral can be expanded during its construction, and the expanded quadrilateral can be used as the first vehicle model.
[0056] On the other hand, if the preset obstacle is the parking boundary, the first vehicle model is determined as follows: the center of the vehicle is the center of the quadrilateral, the length of the vehicle is the length of the quadrilateral, and the width of the vehicle is the width of the quadrilateral to determine the initial vehicle model; the initial vehicle model is expanded outward by a preset expansion coefficient to obtain the first vehicle model.
[0057] In other words, when the preset obstacle is the parking boundary, the initial vehicle model can be determined based on the length, width and center position of the vehicle. Then, the initial vehicle model is expanded outward by a preset expansion coefficient to obtain the first vehicle model, thereby avoiding the vehicle from scraping against the wall or other obstacles that constitute the parking boundary during the parking process.
[0058] Figure 3 This is a schematic flowchart of another collision detection method provided in an embodiment of this application. Wherein, Figure 3 Steps S301 to S304 in the illustrated embodiment are Figure 1 Steps S101 to S104 in the embodiments are basically the same, and will not be repeated here. Figure 3 As shown, the method also includes the following steps:
[0059] In step S305, in response to determining that the obstacle point is located within the first vehicle model, or determining that the obstacle vector intersects with the first vehicle model, the collision depth between the vehicle and the obstacle is obtained.
[0060] In step S306, in response to determining that the collision depth is less than the preset expansion coefficient, the initial vehicle model is determined to be the second vehicle model.
[0061] In step S307, in response to determining that the obstacle point is outside the second vehicle model, or that the obstacle vector does not intersect with the second vehicle model, the collision detection result is determined to be a successful detection.
[0062] In some embodiments of this application, if it is determined that the obstacle point is located within the first vehicle model, or that the obstacle vector intersects with the first vehicle model, it can be determined that the obstacle has collided with the vehicle simulated by the first vehicle model. In this case, the collision depth between the vehicle and the obstacle can be obtained. If it is determined that the collision depth is less than a preset expansion coefficient, the initial vehicle model can be further determined to be a second vehicle model, and then it can be detected whether the obstacle has collided with the second vehicle model. In one example, if the obstacle point is located outside the second vehicle model, or that the obstacle vector does not intersect with the second vehicle model, it can be determined that the vehicle has not collided with the vehicle simulated by the second vehicle model, and thus the collision detection result is determined to be a successful detection.
[0063] Figure 4 This is a schematic flowchart of another collision detection method provided in an embodiment of this application. Wherein, Figure 4 Steps S401 to S407 in the illustrated embodiment are Figure 3 Steps S301 to S307 in the illustrated embodiment are basically the same and will not be repeated here. Figure 4 As shown, the method also includes the following steps:
[0064] In step S408, in response to determining that the obstacle point is located within the second vehicle model, or determining that the obstacle vector intersects with the second vehicle model, the coordinates of the collision point between the vehicle and the obstacle are obtained.
[0065] The collision point is either the obstacle point or the point in the obstacle vector that is closest to the center point of the second vehicle model.
[0066] In step S409, in response to determining that the distances from the collision point to two adjacent sides in the second vehicle model are both less than a preset threshold based on the collision point coordinates, a third vehicle model is constructed in the target coordinate system based on the second vehicle model and the preset segmentation coefficient.
[0067] The preset segmentation coefficient is determined based on the vehicle's outer contour.
[0068] In step S410, in response to determining that the obstacle point is outside the third vehicle model, or that the obstacle vector does not intersect with the third vehicle model, the collision detection result is determined to be a successful detection.
[0069] In step S411, in response to determining that the obstacle point is located within the third vehicle model, or determining that the obstacle vector intersects with the third vehicle model, the collision detection result is determined to be a failure.
[0070] In some embodiments of this application, if it is determined that an obstacle point is located within the second vehicle model, or that an obstacle vector intersects with the second vehicle model, it can be determined that the obstacle has collided with the vehicle simulated by the second vehicle model. In this case, the coordinates of the collision point between the vehicle and the obstacle can be obtained. Specifically, when the obstacle model is an obstacle point, the collision point is that obstacle point; conversely, when the obstacle model is an obstacle vector, the collision point is the point in the obstacle vector that is closest to the center point of the second vehicle model.
[0071] If, based on the collision point coordinates, the distances from the collision point to two adjacent sides of the second vehicle model are both less than a preset threshold (meaning the collision point is close to a vertex of the quadrilateral in the second vehicle model), the collision location could be one of the four corners of the vehicle's outer contour: front left, front right, rear left, or rear right. Since the four corners of a vehicle are typically designed to be streamlined rather than right angles, a third vehicle model can be constructed to more accurately simulate the vehicle, and this third model can then be used for collision detection again.
[0072] In some implementations, a third vehicle model can be constructed in the target coordinate system based on a second vehicle model and preset segmentation coefficients. The preset segmentation coefficients can be determined based on the vehicle's outer contour. In one example, the distances to be segmented in the vehicle's length and width directions can be determined based on the vehicle's outer contour. Then, segmentation lines corresponding to the four vertices in the second vehicle model are determined based on these distances. These segmentation lines are then used to segment the four vertices, resulting in an octagonal model, which is the third vehicle model.
[0073] In other words, constructing a third vehicle model in the target coordinate system based on the second vehicle model and preset segmentation coefficients can be achieved by determining the corner cutting positions based on the preset segmentation coefficients; and then cutting off the four corners of the second vehicle model at the corner cutting positions to obtain the third vehicle model. The third vehicle model is an octagonal model.
[0074] For any vertex of the quadrilateral corresponding to the second vehicle model, its cut-off angle position can include a first cut-off point and a second cut-off point. The first cut-off point is determined by moving the vertex along the length direction of the vehicle model by a first cutting distance, and the second cut-off point is determined by moving the vertex along the width direction of the vehicle model by a second cutting distance. By connecting the first cut-off point and the second cut-off point, the triangle including the vertex is cut out from the quadrilateral, thus completing the cutting off of that corner of the quadrilateral.
[0075] Furthermore, if the obstacle point is located outside the third vehicle model, or the obstacle vector does not intersect with the third vehicle model, the collision detection result can be determined as a successful detection. Conversely, if the obstacle point is located inside the third vehicle model, or the obstacle vector intersects with the third vehicle model, the collision detection result can be determined as a failed detection.
[0076] In some embodiments of this application, if quadrilaterals or octagons are directly used to simulate the vehicle model, then if a collision fails during collision detection, it can only be confirmed that the vehicle collided with the obstacle, but the collision depth and approximate collision area are unknown. In this case, it is difficult to determine whether the collision was caused by the vehicle's inability to pass or by the collision area itself. Therefore, the quadrilateral or octagon representing the vehicle model can be decomposed into N smaller quadrilaterals, and the collision between each smaller quadrilateral and the obstacle model can be detected separately. This allows for rapid localization of the collision area and collision depth when a collision is confirmed.
[0077] In some embodiments of this application, the first vehicle model, the second vehicle model, and the third vehicle model can each be divided into N quadrilaterals. These N quadrilaterals include i parallelograms and j trapezoids, where N is a positive integer greater than 1, i is a positive integer greater than 1 and less than or equal to N, and j is a positive integer greater than or equal to 0 and less than N. The value of N is set according to actual needs, for example, 9. Furthermore, when dividing into N quadrilaterals, the length and width of each quadrilateral are also set according to actual needs and are not limited here.
[0078] Furthermore, the collision depth between the vehicle and the obstacle can be determined as follows: In response to determining the obstacle model as an obstacle point, the collision depth is the shortest distance between the obstacle point and the outer boundary of the first vehicle model. Alternatively, in response to determining the obstacle model as an obstacle vector, the collision point between the vehicle and the obstacle is determined, and the collision point is the point in the obstacle vector that is closest to the center point of the first vehicle model; the shortest distance between the collision point and the outer boundary of the first vehicle model is then determined as the collision depth.
[0079] In other words, collision detection requires knowing the collision depth of collided obstacle points or obstacle vectors to determine the severity of the collision. For obstacle points, the collision depth can be calculated by taking the shortest distance from that point to each edge of the vehicle model. For obstacle vectors, the point on the line segment corresponding to the obstacle vector that is closest to the vehicle's geometric center can be found first, and this point can be taken as the point with the deepest collision. Then, the shortest distance from this point to each edge of the vehicle model can be used as the collision depth.
[0080] Figure 5 This is a schematic diagram illustrating the division of a first vehicle model and a second vehicle model, represented by quadrilaterals, into a nine-square grid, as provided in an embodiment of this application. For example... Figure 5As shown, when dividing the vehicle model into a nine-square grid, we can first determine the first dividing distance along the length direction and the second dividing distance along the width direction. Then, starting from any vertex in the vehicle model, extending the first distance along the length line and the second distance along the width line will result in a quadrilateral. Performing the same operation on the four vertices of the vehicle model will yield the following result: Figure 5 The quadrilaterals shown are numbered 1, 3, 7, and 9. Using the vertex coordinates of these quadrilaterals, the remaining quadrilaterals numbered 2, 4, 5, 6, and 8 can be determined.
[0081] In other words, the vertex coordinates of each quadrilateral in the nine-square grid can be calculated using the vertex coordinates of the vehicle model, thus determining the quadrilaterals. This further saves computing power.
[0082] In this design, quadrilaterals 1, 3, 7, and 9 have the same length and width, representing the front left, front right, rear left, and rear right corners of the vehicle, respectively. The first and second segmentation distances can be set according to actual needs and are not limited here. In one example, the vehicle model has a width of 2.9 meters, so the second segmentation distance can be set to 0.6 meters.
[0083] Figure 6 This is a schematic diagram illustrating the division of a third vehicle model, represented by an octagon, into a nine-square grid, as provided in an embodiment of this application. For example... Figure 6 As shown, the nine-square grid includes i = 5 quadrilaterals and j = 4 trapezoids. The method for dividing the octagonal vehicle model into a nine-square grid is the same as described above. Figure 5 The method for creating a quadrilateral nine-square grid is basically the same, so it will not be repeated here.
[0084] Figure 7 This is a flowchart illustrating the method for determining whether an obstacle point is located within a vehicle model, as provided in an embodiment of this application. Figure 7 As shown, the method includes the following steps:
[0085] In step S701, the vehicle model is divided into N quadrilaterals.
[0086] In step S702, the minimum target x-coordinate, maximum target x-coordinate, minimum target y-coordinate, and maximum target y-coordinate of the target quadrilateral are determined by the vertex coordinates of the target quadrilateral.
[0087] The target quadrilateral is any one of the N quadrilaterals.
[0088] In step S703, in response to determining that the x-coordinate of the obstacle point is greater than or equal to the minimum target x-coordinate and less than or equal to the maximum target x-coordinate, and the y-coordinate of the obstacle point is greater than or equal to the minimum target y-coordinate and less than or equal to the maximum target y-coordinate, it is determined that the obstacle point is located within the vehicle model.
[0089] In step S704, otherwise it is determined that the obstacle point is located outside the vehicle model.
[0090] In some embodiments of this application, when the obstacle model is an obstacle point, determining whether the obstacle point is located within the vehicle model can be done by first dividing the vehicle model into N quadrilaterals, for example, into a 3x3 grid. Then, the minimum target x-coordinate, maximum target x-coordinate, minimum target y-coordinate, and maximum target y-coordinate of the target quadrilateral are determined by the vertex coordinates of the target quadrilateral. The target quadrilateral can be any one of the N quadrilaterals.
[0091] If the x-coordinate of an obstacle point is greater than or equal to the minimum x-coordinate of the target and less than or equal to the maximum x-coordinate of the target, and the y-coordinate of the obstacle point is greater than or equal to the minimum y-coordinate of the target and less than or equal to the maximum y-coordinate of the target, then the obstacle point is determined to be inside the vehicle model. Otherwise, the obstacle point is determined to be outside the vehicle model.
[0092] Figure 8 This is a flowchart illustrating the method for determining whether an obstacle vector intersects with a vehicle model, as provided in an embodiment of this application. Figure 8 As shown, the method includes the following steps:
[0093] In step S801, the vehicle model is divided into N quadrilaterals.
[0094] In step S802, the minimum target x-coordinate, maximum target x-coordinate, minimum target y-coordinate, and maximum target y-coordinate of the target quadrilateral are determined by the vertex coordinates of the target quadrilateral.
[0095] The target quadrilateral is any one of the N quadrilaterals.
[0096] In step S803, in response to determining that the maximum value of the abscissa of the obstacle vector is less than the minimum value of the target abscissa, and the maximum value of the ordinate of the obstacle vector is less than the minimum value of the target ordinate, it is determined that the obstacle vector does not intersect with the vehicle model.
[0097] In step S804, in response to determining that the minimum value of the abscissa of the obstacle vector is greater than the maximum value of the target abscissa, and the minimum value of the ordinate of the obstacle vector is greater than the maximum value of the target ordinate, it is determined that the obstacle vector does not intersect with the vehicle model.
[0098] In some embodiments of this application, when the obstacle model is an obstacle vector, determining whether the obstacle vector intersects with the vehicle model can be done by first dividing the vehicle model into N quadrilaterals, for example, into a 3x3 grid. Then, the minimum and maximum values of the target abscissa, the minimum and maximum values of the target ordinate, are determined by the vertex coordinates of the target quadrilateral.
[0099] If the maximum value of the obstacle vector's x-coordinate is less than the minimum value of the target's x-coordinate, and the maximum value of the obstacle vector's y-coordinate is less than the minimum value of the target's y-coordinate, then it can be determined that the obstacle vector and the vehicle model do not intersect. Alternatively, if it is determined that the minimum value of the obstacle vector's x-coordinate is greater than the maximum value of the target's x-coordinate, and the minimum value of the obstacle vector's y-coordinate is greater than the maximum value of the target's y-coordinate, then it can also be determined that the obstacle vector and the vehicle model do not intersect.
[0100] In other words, we can first use a quick elimination method to determine whether the obstacle vector intersects with the vehicle model. Further, if the quick elimination method determines that the obstacle vector and the vehicle model do not intersect, then a more accurate method is needed for further judgment. In one example, the cross product of vectors can be used to determine whether the obstacle vector and the vehicle model intersect.
[0101] Figure 9 This is a flowchart illustrating another method for determining whether an obstacle vector intersects with a vehicle model, provided in an embodiment of this application. Figure 9 Steps S901 to S904 in the illustrated embodiment are Figure 8 Steps S801 to S804 in the illustrated embodiment are basically the same and will not be repeated here. Figure 9 As shown, the method also includes the following steps:
[0102] In step S905, the target edge of the target quadrilateral is obtained. The target edge is any edge of the target quadrilateral and includes the first endpoint and the second endpoint.
[0103] In step S906, the starting point and the ending point of the obstacle vector are determined to be the third endpoint and the fourth endpoint, respectively.
[0104] In step S907, a first vector from the first endpoint to the third endpoint, a second vector from the first endpoint to the second endpoint, and a third vector from the first endpoint to the fourth endpoint are constructed.
[0105] In step S908, in response to determining that the first product of the cross product of the first vector and the second vector has a different sign from the second product of the cross product of the third vector and the second vector, it is determined that the obstacle vector intersects with the vehicle model.
[0106] In some embodiments of this application, when using vector cross product to determine whether an obstacle vector intersects with a vehicle model, the target edge in the target quadrilateral can be obtained, and the starting point and ending point of the obstacle vector can be determined as the third endpoint and the fourth endpoint, respectively. The target edge is any edge in the target quadrilateral, and includes the first endpoint and the second endpoint. Further, a first vector from the first endpoint to the third endpoint, a second vector from the first endpoint to the second endpoint, and a third vector from the first endpoint to the fourth endpoint can be constructed.
[0107] The first product is obtained by cross-product of the first and second vectors, and the second product is obtained by cross-product of the third and second vectors. If the signs of the first and second products are determined to be different, for example, the first product is positive and the second product is negative, or the first product is negative and the second product is positive, then it can be determined that the obstacle vector intersects with the vehicle model.
[0108] In other words, the cross product of vectors can be used to determine whether the line segments corresponding to the vectors intersect. By determining whether the line segment corresponding to the obstacle vector intersects each side of the quadrilateral, it can be determined whether the obstacle vector intersects with the vehicle model.
[0109] Understandably, when the obstacle model is an obstacle point, the cross product of vectors can also be used to determine whether the obstacle point is inside the quadrilateral. Figure 10 and Figure 11 These are all schematic diagrams illustrating the use of vector cross product to determine whether an obstacle point is inside a quadrilateral, as provided in the embodiments of this application. Figure 10 and Figure 11 As shown, the four vertices of the quadrilateral can be represented by A, B, C, and D, and the obstacle point can be represented by O.
[0110] like Figure 10 As shown, we can take any pair of opposite sides of the quadrilateral, such as AB and CD, and perform a cross product on vectors OC and OA to obtain the third product, and perform a cross product on vectors OB and OA to obtain the fourth product. If the signs of the third and fourth products are different, we can determine that the obstacle point O is outside the quadrilateral ABCD. Otherwise, we continue to perform a cross product on vectors OD and OA to obtain the fifth product.
[0111] like Figure 11 As shown, if the signs of the fifth and fourth products are still the same, then the opposite sides AC and BD of quadrilateral ABCD are reselected, and cross products are performed on vectors OA and OB respectively to obtain the sixth product, and on vectors OD and OB respectively to obtain the seventh product. If the signs of the sixth and seventh products are the same, the cross products of vectors OC and OB are continued to obtain the eighth product. If this process is repeated for both sets of opposite sides, and it is determined that the line segments corresponding to all vectors do not intersect, then the obstacle point O is located inside quadrilateral ABCD.
[0112] Figure 12 This is a schematic flowchart of another collision detection method provided in an embodiment of this application. Figure 12 As shown, during collision detection, the collision detection tool can first read the configuration parameters and select an appropriate vehicle model. In one example, the default preferred vehicle model is the first vehicle model. Users can select other vehicle models according to their actual needs, or the detection tool can automatically switch to other vehicle models based on the detection results.
[0113] Perception systems typically have high accuracy within a range of 2 to 5 meters (with an error of approximately 5 to 10 centimeters within this range). Therefore, the input to the perception system will change slightly during the parking process. For example, the accuracy of boundary line perception will continuously improve as the vehicle approaches the boundary line. Especially in parking spaces with narrow rear frames, higher accuracy increases the probability of the vehicle successfully parking. Therefore, collision detection algorithms are continuously and periodically invoked throughout the parking process. A good collision detection model is crucial for a parking system.
[0114] When constructing a vehicle model, the quadrilateral constructed for the wheel chock boundary is the quadrilateral enclosed by the front and rear axles. To prevent the rear axle from pressing on or passing over the wheel chock, the quadrilateral can be expanded during construction, for example, by expanding both its length and width by 15 centimeters, thus obtaining an expanded quadrilateral. Collision detection is then performed based on the relationship between the wheel chock and the quadrilateral.
[0115] For ordinary boundary lines and points, the edges of parking space frames and parking lot road edges are determined by line segments, while points are generally determined by obstacle coordinates provided by ultrasonic radar. It's important to note that since the four corners of a vehicle are not right angles, an octagonal model can be constructed by modifying the coordinates of the four vertices during the model building process.
[0116] When determining the quadrilateral vehicle model, the coordinates of the four vertices of the quadrilateral are obtained based on the length and width of the vehicle. At the same time, in order to better adapt to the collision detection model, the original quadrilateral can also be expanded, with an expansion coefficient of, for example, 10 centimeters, to ensure that the vehicle will not scrape against walls or other objects during parking.
[0117] When approximating a vehicle as a quadrilateral, the four vertices (front, back, left, and right) are determined based on the vehicle's length and width, while the coordinates are constructed using the vehicle's own coordinates. The principle is that if the vehicle has global localization (GNU), its GNU coordinates are used to construct the four corner points. If there is no GNU in areas with weak localization signals, such as parking garages, relative coordinates can be generated using algorithms such as DR (Depth Recognition) algorithms. Expanding the original quadrilateral yields the expanded quadrilateral, which is the first vehicle model.
[0118] After obtaining the quadrilateral after the collision, the coordinates of its four vertices can be obtained. These coordinates can be the original coordinates or the coordinates after coordinate transformation. The transformation principle is to obtain the coordinates of the four vertices of the quadrilateral from the coordinates of the vehicle (relative or absolute coordinates) using a rotation matrix.
[0119] Next, to determine the collision area and collision depth, a nine-square grid can be constructed. Given the coordinates of each vertex of a quadrilateral, the coordinates of the vertices of each smaller quadrilateral within the nine-square grid can be calculated using vector relationships based on the first and second cutting distances when dividing the grid.
[0120] In actual testing, if some parking spaces are narrow, using a quadrilateral model requires expanding by a safety distance. This can lead to collision detection at some obstacle or boundary points, even though the collision actually occurs within the safe collision distance. To better simulate vehicles, an octagonal vehicle model can be used. The construction method for the octagonal vehicle model is basically the same as that for the quadrilateral model; simply modify the smaller quadrilaterals at the four vertices of the quadrilateral to trapezoids based on the actual streamline parameters at the front and rear corners of the vehicle.
[0121] By performing collision detection using a pre-built vehicle model, detection results can be obtained. When a collision is detected, further information such as the collision depth can be output.
[0122] Figure 13 This is a schematic diagram of a vehicle model and a simulated boundary provided in an embodiment of this application. Figure 13 As shown, the vehicle model is represented by a nine-square grid of quadrilaterals. Line segment 1 is the simulation boundary, point 2 is the geometric center of the vehicle, and point 3 is the point on the simulation boundary line segment closest to point 2. Simulation results show that the collision depth calculated directly using data from the relative coordinate system created by the vehicle is the same as the collision depth calculated by first transforming the above values to the global coordinate system using a rotation matrix and then using data from the global coordinate system.
[0123] In other words, since the embodiments of this application use vector relationships to determine the coordinate values of each point in the nine-square grid and calculate the collision depth, there is no need to perform coordinate system transformation, which further improves the efficiency of collision detection on low computing power platforms and enhances the user experience.
[0124] The technical solution adopted in this application constructs quadrilaterals and octagons to simulate and represent vehicle models, and simultaneously constructs a nine-square grid to detect collision areas and depth information, which can conveniently and quickly assist APA in collision detection. While improving algorithm testing efficiency, it can meet various narrow boundary and narrow parking space conditions, reducing the probability of APA failure due to vehicle collision detection being too narrow. Furthermore, the nine-square grid corner coordinates calculated through vectors and geometric relationships for collision-related detection significantly reduce the algorithm's computational power consumption.
[0125] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0126] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0127] Figure 14 This is a schematic diagram of a collision detection device provided in an embodiment of this application. Figure 14 As shown, the device includes:
[0128] The acquisition module 1401 is configured to acquire vehicle configuration information, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information.
[0129] The vehicle model determination module 1402 is configured to acquire the vehicle's position information in the target coordinate system and construct a first vehicle model in the preset coordinate system based on the vehicle configuration information, vehicle position information, and preset expansion coefficient.
[0130] The obstacle model determination module 1403 is configured to acquire obstacle position information and determine the obstacle model in the target coordinate system based on the obstacle position information. The obstacle model is an obstacle point or an obstacle vector.
[0131] The detection module 1404 is configured to determine that the collision detection result is passed in response to determining that the obstacle point is outside the first vehicle model or that the obstacle vector does not intersect with the first vehicle model.
[0132] According to the technical solution provided in the embodiments of this application, by acquiring vehicle configuration information including at least one of the vehicle length, vehicle width, and axle information, as well as the vehicle's position information in the target coordinate system, a first vehicle model is constructed in the preset coordinate system based on the vehicle configuration information, vehicle position information, and a preset expansion coefficient. At the same time, obstacle information is acquired, and an obstacle model is constructed in the target coordinate system based on the obstacle information. When it is determined that the obstacle model is outside the first vehicle model, or the obstacle model does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection.
[0133] In some implementations, the preset obstacles include wheel chocks and parking boundary obstacles; in response to determining that the preset obstacle is a wheel chock, the first vehicle model is determined as follows: a quadrilateral formed by the front and rear axles of the vehicle is determined as the initial vehicle model; the initial vehicle model is expanded outward by a preset expansion coefficient to obtain the first vehicle model; in response to determining that the preset obstacle is a parking boundary, the first vehicle model is determined as follows: the center of the vehicle is the center of the quadrilateral, the overall length of the vehicle is the length of the quadrilateral, and the overall width of the vehicle is the width of the quadrilateral to determine the initial vehicle model; the initial vehicle model is expanded outward by a preset expansion coefficient to obtain the first vehicle model.
[0134] In some implementations, the method further includes: in response to determining that the obstacle point is located within the first vehicle model, or determining that the obstacle vector intersects with the first vehicle model, obtaining the collision depth between the vehicle and the obstacle; in response to determining that the collision depth is less than a preset expansion coefficient, determining that the initial vehicle model is the second vehicle model; and in response to determining that the obstacle point is located outside the second vehicle model, or that the obstacle vector does not intersect with the second vehicle model, determining that the collision detection result is a successful detection.
[0135] In some implementations, the method further includes: in response to determining that the obstacle point is within the second vehicle model, or determining that the obstacle vector intersects with the second vehicle model, obtaining the coordinates of the collision point between the vehicle and the obstacle, wherein the collision point is the obstacle point, or the point in the obstacle vector that is closest to the center point of the second vehicle model; in response to determining, based on the collision point coordinates, that the distances from the collision point to two adjacent sides in the second vehicle model are both less than a preset threshold, constructing a third vehicle model in the target coordinate system based on the second vehicle model and a preset segmentation coefficient, wherein the preset segmentation coefficient is determined based on the outer contour of the vehicle; in response to determining that the obstacle point is outside the third vehicle model, or that the obstacle vector does not intersect with the third vehicle model, determining that the collision detection result is a successful detection; in response to determining that the obstacle point is within the third vehicle model, or determining that the obstacle vector intersects with the third vehicle model, determining that the collision detection result is a failed detection.
[0136] In some implementations, a third vehicle model is constructed in the target coordinate system based on the second vehicle model and a preset segmentation coefficient, including: determining the corner cutting position based on the preset segmentation coefficient; cutting off the four corners of the second vehicle model at the corner cutting position to obtain the third vehicle model; wherein the third vehicle model is an octagonal model.
[0137] In some implementations, determining whether an obstacle point is located within the vehicle model in response to the obstacle model being an obstacle point includes: dividing the vehicle model into N quadrilaterals, where the N quadrilaterals include i parallelograms and j trapezoids, where N is a positive integer greater than 1, i is a positive integer greater than 1 and less than or equal to N, and j is a positive integer greater than or equal to 0 and less than N; determining the minimum target x-coordinate, maximum target x-coordinate, minimum target y-coordinate, and maximum target y-coordinate of the target quadrilateral using the vertex coordinates of the target quadrilateral, where the target quadrilateral is any one of the N quadrilaterals; in response to determining that the x-coordinate of the obstacle point is greater than or equal to the minimum target x-coordinate and less than or equal to the maximum target x-coordinate, and the y-coordinate of the obstacle point is greater than or equal to the minimum target y-coordinate and less than or equal to the maximum target y-coordinate, determining that the obstacle point is located within the vehicle model; otherwise, determining that the obstacle point is located outside the vehicle model.
[0138] In some implementations, determining whether an obstacle vector intersects with a vehicle model in response to the obstacle model being an obstacle vector includes: dividing the vehicle model into N quadrilaterals, where the N quadrilaterals include i parallelograms and j trapezoids, where N is a positive integer greater than 1, i is a positive integer greater than 1 and less than or equal to N, and j is a positive integer greater than or equal to 0 and less than N; determining the minimum target x-coordinate, maximum target x-coordinate, minimum target y-coordinate, and maximum target y-coordinate of the target quadrilateral using the vertex coordinates of the target quadrilateral, where the target quadrilateral is any one of the N quadrilaterals; determining that the obstacle vector does not intersect with the vehicle model in response to determining that the maximum target x-coordinate of the obstacle vector is less than the minimum target x-coordinate and the maximum target y-coordinate of the obstacle vector is less than the minimum target y-coordinate; or determining that the obstacle vector does not intersect with the vehicle model in response to determining that the minimum target x-coordinate of the obstacle vector is greater than the maximum target x-coordinate and the minimum target y-coordinate of the obstacle vector is greater than the maximum target y-coordinate.
[0139] In some implementations, the method further includes: obtaining a target edge in the target quadrilateral, wherein the target edge is any edge in the target quadrilateral and includes a first endpoint and a second endpoint; determining that the starting point and the ending point of the obstacle vector are the third endpoint and the fourth endpoint, respectively; constructing a first vector from the first endpoint to the third endpoint, a second vector from the first endpoint to the second endpoint, and a third vector from the first endpoint to the fourth endpoint; and determining that the obstacle vector intersects with the vehicle model in response to determining that the first product of the cross product of the first vector and the second vector has a different sign than the second product of the cross product of the third vector and the second vector.
[0140] In some implementations, obtaining the collision depth between the vehicle and the obstacle includes: in response to determining that the obstacle model is an obstacle point, the collision depth is the shortest distance between the obstacle point and the outer boundary of the first vehicle model; in response to determining that the obstacle model is an obstacle vector, determining the collision point between the vehicle and the obstacle, the collision point being the point in the obstacle vector that is closest to the center point of the first vehicle model; and determining the shortest distance between the collision point and the outer boundary of the first vehicle model as the collision depth.
[0141] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0142] Figure 15 This is a schematic diagram of the electronic device provided in an embodiment of this application. For example... Figure 15 As shown, the electronic device 15 of this embodiment includes: a processor 1501, a memory 1502, and a computer program 1503 stored in the memory 1502 and executable on the processor 1501. When the processor 1501 executes the computer program 1503, it implements the steps in the various method embodiments described above. Alternatively, when the processor 1501 executes the computer program 1503, it implements the functions of each module / unit in the various device embodiments described above.
[0143] Electronic device 15 may be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 15 may include, but is not limited to, processor 1501 and memory 1502. Those skilled in the art will understand that... Figure 15 This is merely an example of electronic device 15 and does not constitute a limitation on electronic device 15. It may include more or fewer components than shown, or different components.
[0144] The processor 1501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0145] The memory 1502 can be an internal storage unit of the electronic device 15, such as a hard disk or RAM of the electronic device 15. The memory 1502 can also be an external storage device of the electronic device 15, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, FlashCard, etc., equipped on the electronic device 15. The memory 1502 can also include both internal and external storage units of the electronic device 15. The memory 1502 is used to store computer programs and other programs and data required by the electronic device.
[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0147] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A collision detection method, characterized in that, The method is used to provide collision detection results for a vehicle performing an automatic parking operation, and the method includes: Obtain vehicle configuration information, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information; Obtain the vehicle's position information in the target coordinate system, and construct a first vehicle model in the preset coordinate system based on the vehicle configuration information, the vehicle position information, and a preset expansion coefficient; Obtain obstacle location information, and determine the obstacle model in the target coordinate system based on the obstacle location information. The obstacle model is an obstacle point or an obstacle vector. In response to determining that the obstacle point is located outside the first vehicle model, or that the obstacle vector does not intersect with the first vehicle model, the collision detection result is determined to be a successful detection; In response to determining that the obstacle point is located within the first vehicle model, or determining that the obstacle vector intersects with the first vehicle model, the collision depth between the vehicle and the obstacle is obtained; In response to determining that the collision depth is less than the preset expansion coefficient, the initial vehicle model is determined to be the second vehicle model; In response to determining that the obstacle point is located within the second vehicle model, or determining that the obstacle vector intersects with the second vehicle model, the coordinates of the collision point between the vehicle and the obstacle are obtained, wherein the collision point is the obstacle point, or the point in the obstacle vector that is closest to the center point of the second vehicle model; In response to determining, based on the coordinates of the collision point, that the distances from the collision point to two adjacent sides in the second vehicle model are both less than a preset threshold, a third vehicle model is constructed in the target coordinate system based on the second vehicle model and a preset segmentation coefficient, wherein the preset segmentation coefficient is determined based on the outer contour of the vehicle. In response to determining that the obstacle point is located outside the third vehicle model, or that the obstacle vector does not intersect with the third vehicle model, the collision detection result is determined to be a successful detection.
2. The method according to claim 1, characterized in that, The preset obstacles include wheel chocks and parking boundary obstacles; In response to determining that the preset obstacle is a wheel chock, the first vehicle model is determined in the following manner: The quadrilateral formed by the front and rear axles of the vehicle is determined as the initial vehicle model; The initial vehicle model is expanded outward by the preset expansion coefficient to obtain the first vehicle model; In response to determining that the preset obstacle is a parking boundary, the first vehicle model is determined in the following manner: The initial vehicle model is determined by taking the center of the vehicle as the center of the quadrilateral, the overall length of the vehicle as the length of the quadrilateral, and the overall width of the vehicle as the width of the quadrilateral. The initial vehicle model is expanded outward by the preset expansion coefficient to obtain the first vehicle model.
3. The method according to claim 2, characterized in that, The method further includes: In response to determining that the obstacle point is located outside the second vehicle model, or that the obstacle vector does not intersect with the second vehicle model, the collision detection result is determined to be a successful detection.
4. The method according to claim 3, characterized in that, The method further includes: In response to determining that the obstacle point is located within the third vehicle model, or determining that the obstacle vector intersects with the third vehicle model, the collision detection result is determined to be a failure.
5. The method according to claim 1, characterized in that, The step of constructing a third vehicle model in the target coordinate system based on the second vehicle model and preset segmentation coefficients includes: The cutting angle position is determined according to the preset cutting coefficient; The four corners of the second vehicle model are cut off at the stated corner positions to obtain the third vehicle model; The third vehicle model is an octagonal model.
6. The method according to any one of claims 1 to 5, characterized in that, In response to the obstacle model being an obstacle point, determining whether the obstacle point is located within the vehicle model includes: The vehicle model is divided into N quadrilaterals, which include i parallelograms and j trapezoids, where N is a positive integer greater than 1, i is a positive integer greater than 1 and less than or equal to N, and j is a positive integer greater than or equal to 0 and less than N. The minimum and maximum values of the target abscissa, the minimum and maximum values of the target ordinate, and the target ordinate of the target quadrilateral are determined by the vertex coordinates of the target quadrilateral. The target quadrilateral is any one of the N quadrilaterals. In response to determining that the x-coordinate of the obstacle point is greater than or equal to the minimum target x-coordinate and less than or equal to the maximum target x-coordinate, and the y-coordinate of the obstacle point is greater than or equal to the minimum target y-coordinate and less than or equal to the maximum target y-coordinate, it is determined that the obstacle point is located within the vehicle model; Otherwise, the obstacle point is determined to be outside the vehicle model.
7. The method according to any one of claims 1 to 5, characterized in that, In response to the obstacle model being an obstacle vector, determining whether the obstacle vector intersects with the vehicle model includes: The vehicle model is divided into N quadrilaterals, which include i parallelograms and j trapezoids, where N is a positive integer greater than 1, i is a positive integer greater than 1 and less than or equal to N, and j is a positive integer greater than or equal to 0 and less than N. The minimum and maximum values of the target abscissa, the minimum and maximum values of the target ordinate, and the target ordinate of the target quadrilateral are determined by the vertex coordinates of the target quadrilateral. The target quadrilateral is any one of the N quadrilaterals. In response to determining that the maximum value of the obstacle vector's x-coordinate is less than the minimum value of the target x-coordinate, and the maximum value of the obstacle vector's y-coordinate is less than the minimum value of the target y-coordinate, it is determined that the obstacle vector does not intersect with the vehicle model; or In response to determining that the minimum x-coordinate of the obstacle vector is greater than the maximum x-coordinate of the target, and the minimum y-coordinate of the obstacle vector is greater than the maximum y-coordinate of the target, it is determined that the obstacle vector does not intersect with the vehicle model.
8. The method according to claim 7, characterized in that, The method further includes: Obtain the target edge in the target quadrilateral, wherein the target edge is any edge in the target quadrilateral, and the target edge includes a first endpoint and a second endpoint; The starting point and ending point of the obstacle vector are determined to be the third endpoint and the fourth endpoint, respectively; Construct a first vector from the first endpoint to the third endpoint, a second vector from the first endpoint to the second endpoint, and a third vector from the first endpoint to the fourth endpoint; In response to determining that the first product of the cross product of the first vector and the second vector has a different sign from the second product of the cross product of the third vector and the second vector, it is determined that the obstacle vector intersects with the vehicle model.
9. The method according to claim 1, characterized in that, The process of obtaining the collision depth between the vehicle and the obstacle includes: In response to determining that the obstacle model is an obstacle point, the collision depth is the shortest distance between the obstacle point and the outer boundary of the first vehicle model; In response to determining that the obstacle model is an obstacle vector, a collision point between the vehicle and the obstacle is determined, wherein the collision point is the point in the obstacle vector that is closest to the center point of the first vehicle model; The shortest distance between the collision point and the outer boundary of the first vehicle model is determined as the collision depth.
10. A collision detection device, characterized in that, include: The acquisition module is configured to acquire vehicle configuration information, which includes at least one of the following: overall vehicle length, overall vehicle width, and axle information. The vehicle model determination module is configured to acquire the vehicle's position information in the target coordinate system and construct a first vehicle model in the preset coordinate system based on the vehicle configuration information, the vehicle position information, and a preset expansion coefficient. An obstacle model determination module is configured to acquire obstacle position information and determine the obstacle model in the target coordinate system based on the obstacle position information, wherein the obstacle model is an obstacle point or an obstacle vector; The detection module is configured to determine that the collision detection result is passed in response to determining that the obstacle point is located outside the first vehicle model or that the obstacle vector does not intersect with the first vehicle model; The detection module is further configured to: in response to determining that the obstacle point is located within the first vehicle model, or determining that the obstacle vector intersects with the first vehicle model, obtain the collision depth between the vehicle and the obstacle; In response to determining that the collision depth is less than the preset expansion coefficient, the initial vehicle model is determined to be a second vehicle model; in response to determining that the obstacle point is located within the second vehicle model, or that the obstacle vector intersects with the second vehicle model, the coordinates of the collision point between the vehicle and the obstacle are obtained, wherein the collision point is the obstacle point, or the point in the obstacle vector that is closest to the center point of the second vehicle model; in response to determining, based on the collision point coordinates, that the distance from the collision point to two adjacent sides in the second vehicle model is less than a preset threshold, a third vehicle model is constructed in the target coordinate system based on the second vehicle model and a preset segmentation coefficient, wherein the preset segmentation coefficient is determined based on the outer contour of the vehicle; in response to determining that the obstacle point is located outside the third vehicle model, or that the obstacle vector does not intersect with the third vehicle model, the collision detection result is determined to be a successful detection.
Citation Information
Patent Citations
Collision detection method and device for vehicle automatic driving system and electronic equipment
CN115432007A
Automatic parking method, device and equipment and storage medium
CN116176567A