Collision detection method and device in parking trajectory planning
By dividing the target area into three sub-regions and performing overall collision detection, the problem of high computational load in traditional parking trajectory planning is solved, improving efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MOMENTA (SUZHOU) TECHNOLOGY CO LTD
- Filing Date
- 2024-04-25
- Publication Date
- 2026-07-07
AI Technical Summary
Traditional collision detection algorithms in parking trajectory planning involve large amounts of computation, resulting in high time consumption and low efficiency.
The area outside the target area is divided into three sub-areas, and each sub-area is treated as a virtual obstacle for collision detection with the target vehicle. Only sub-areas with collision risk are further detected, reducing the amount of computation.
By reducing the computational load of collision detection, the efficiency and accuracy of parking trajectory planning are improved, and the time consumption is reduced.
Smart Images

Figure CN120840602B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent driving technology, and more specifically, to a collision detection method and device for parking trajectory planning. Background Technology
[0002] Parking assistance systems can plan and execute the parking process in a semi-automatic or fully automatic manner. These systems pre-plan a parking trajectory and then control the vehicle to move along that trajectory into the parking space. One of the most crucial aspects of parking trajectory planning is collision detection, ensuring that the vehicle does not collide with surrounding obstacles while parking along the planned trajectory.
[0003] Traditional collision detection algorithms iterate through every obstacle around the vehicle, comparing the vehicle's geometry with the obstacle's geometry. However, the computational cost of this traditional collision detection algorithm increases with the number of obstacles, resulting in high overall time consumption and low efficiency for parking trajectory planning. Summary of the Invention
[0004] This application provides a collision detection method and apparatus for parking trajectory planning, which can solve the problem that the traditional collision detection algorithm, which performs collision detection by traversing each obstacle and the vehicle, has a large computational load, resulting in high overall time consumption and low efficiency in parking trajectory planning.
[0005] The specific technical solution is as follows:
[0006] In a first aspect, embodiments of this application provide a collision detection method for parking trajectory planning, the method comprising:
[0007] Define the target area defined by the parking spaces and the road the target vehicle will travel on;
[0008] The area outside the target area is divided into a first sub-area, a second sub-area, and a third sub-area. The first sub-area and the second sub-area are the areas on both sides of the parking space, respectively. The third sub-area is the area located on the opposite side of the parking space, with the road where the target vehicle is traveling as the center reference line.
[0009] The first sub-region, the second sub-region, and the third sub-region are treated as a whole as a virtual obstacle for collision detection with the target vehicle.
[0010] If there is no risk of collision between the target vehicle and any of the first, second, and third sub-regions, it is determined that there is no risk of collision between the target vehicle and any real obstacles in the sub-regions where there is no risk of collision.
[0011] If there is a collision risk between the target vehicle and any of the first, second, and third sub-regions, collision detection is performed on the target vehicle by traversing the real obstacles in the sub-regions with collision risk.
[0012] As can be seen from the above scheme, the embodiment of this application can first determine the target area based on the parking space and the road the target vehicle will travel on, then divide the area outside the target area into three sub-areas, and treat each sub-area as a virtual obstacle for collision detection with the target vehicle. Further collision detection is only performed on sub-areas with collision risk, that is, traversing the real obstacles in the sub-areas with collision risk and performing collision detection with the target vehicle, while sub-areas without collision risk are no longer subject to collision detection, directly determining that there is no collision risk between the real obstacles in the sub-area and the target vehicle. Therefore, compared with traditional collision detection algorithms that traverse each obstacle and perform collision detection with the target vehicle, this embodiment of this application can filter out sub-areas without collision risk by performing overall collision detection on the sub-areas, and only perform collision detection on the sub-areas with risk through traversal. Therefore, this embodiment of this application can greatly reduce the computational load of collision detection, thereby reducing the time consumption of parking trajectory planning and improving the efficiency of parking trajectory planning.
[0013] In a first possible implementation of the first aspect, the method further includes:
[0014] If there is a region in the target area where the road width is less than or equal to the width threshold, the area covered by the actual obstacle that causes the road width to be less than or equal to the width threshold will be divided into a fourth sub-region that is independent of the first sub-region, the second sub-region, and the third sub-region.
[0015] The target vehicle is then subjected to collision detection with each of the fourth sub-regions.
[0016] As can be seen from the above scheme, in order to avoid missing the collision risk between real obstacles affecting the road width and the target vehicle due to collision detection only for the first, second, and third sub-regions as a whole, the embodiment of this application independently divides the area covered by real obstacles that cause the road width to be less than or equal to the width threshold, and distinguishes it from the first, second, and third sub-regions as a fourth sub-region for separate collision detection, thereby improving the accuracy of collision detection and thus improving parking safety.
[0017] In a second possible implementation of the first aspect, real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road on which the target vehicle is traveling and / or parked vehicles that protrude into the road.
[0018] In a third possible implementation of the first aspect, determining the target area bounded by the parking space and the road traveled by the target vehicle includes:
[0019] Along the opposite direction of the target vehicle's travel direction, extend a road area of a first length from the location of the target vehicle to obtain the road starting point;
[0020] Along the positive direction of the target vehicle's travel direction, extend a road area of a second length from the road position facing the parking space to obtain the road end point;
[0021] The area formed by the road area from the starting point to the ending point of the road and the parking space to be parked is defined as the target area.
[0022] As can be seen from the above scheme, by appropriately expanding the road area in both the forward and reverse directions of the target vehicle's travel direction, the geographical range of collision detection can be reduced while ensuring the usability of the parking trajectory planning.
[0023] In a fourth possible implementation of the first aspect, the step of treating the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle for collision detection with the target vehicle includes:
[0024] Collision detection is performed between the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region, respectively. The common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
[0025] As can be seen from the above scheme, when performing collision detection on the target vehicle and the three sub-regions as a whole, this application embodiment only needs to perform collision detection on the common boundary between each sub-region and the target region and the target vehicle, without needing to perform collision detection on each polygonal obstacle in the sub-region, thereby greatly reducing the number of edges involved in collision detection and thus improving the efficiency of collision detection.
[0026] Secondly, embodiments of this application provide a collision detection device for parking trajectory planning, the device comprising:
[0027] The first determining unit is used to determine the target area enclosed by the parking space and the road traveled by the target vehicle;
[0028] A dividing unit is used to divide the area outside the target area into a first sub-area, a second sub-area, and a third sub-area, wherein the first sub-area and the second sub-area are the areas on both sides of the parking space, and the third sub-area is the area located on the opposite side of the parking space with the road where the target vehicle is traveling as the middle reference line.
[0029] The first collision detection unit is used to treat the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle and perform collision detection with the target vehicle.
[0030] The second determining unit is used to determine that, when there is no risk of collision between the target vehicle and any one of the sub-regions of the first sub-region, the second sub-region, and the third sub-region, there is no risk of collision between the target vehicle and any real obstacles in the sub-regions where there is no risk of collision.
[0031] The second collision detection unit is used to perform collision detection on the target vehicle by traversing the real obstacles in the sub-regions with collision risks when there is a collision risk between the target vehicle and any of the sub-regions of the first sub-region, the second sub-region, and the third sub-region.
[0032] In a first possible implementation of the second aspect, the dividing unit is further configured to, when there is a region in the target region where the road width is less than or equal to the width threshold, divide the region covered by the actual obstacle that causes the road width to be less than or equal to the width threshold into a fourth sub-region that is independent of the first sub-region, the second sub-region and the third sub-region.
[0033] The target vehicle is then subjected to collision detection with each of the fourth sub-regions.
[0034] In a second possible implementation of the second aspect, real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road on which the target vehicle is traveling and / or parked vehicles that protrude into the road.
[0035] In a third possible implementation of the second aspect, the first determining unit includes:
[0036] An extension module is used to extend a road area of a first length from the location of the target vehicle in the opposite direction of the target vehicle's travel direction to obtain a road starting point; and to extend a road area of a second length from the location of the road opposite to the parking space in the positive direction of the target vehicle's travel direction to obtain a road ending point.
[0037] The determination module is used to determine the area formed by the road area from the starting point of the road to the ending point of the road and the parking space to be parked as the target area.
[0038] In a fourth possible implementation of the second aspect, the first collision detection unit is configured to perform collision detection on the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region, respectively. The common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
[0039] As can be seen from the above scheme, the embodiment of this application can first determine the target area based on the parking space and the road the target vehicle will travel on, then divide the area outside the target area into three sub-areas, and treat each sub-area as a virtual obstacle for collision detection with the target vehicle. Further collision detection is only performed on sub-areas with collision risk, that is, traversing the real obstacles in the sub-areas with collision risk and performing collision detection with the target vehicle, while sub-areas without collision risk are no longer subject to collision detection, directly determining that there is no collision risk between the real obstacles in the sub-area and the target vehicle. Therefore, compared with traditional collision detection algorithms that traverse each obstacle and perform collision detection with the target vehicle, this embodiment of this application can filter out sub-areas without collision risk by performing overall collision detection on the sub-areas, and only perform collision detection on the sub-areas with risk through traversal. Therefore, this embodiment of this application can greatly reduce the computational load of collision detection, thereby reducing the time consumption of parking trajectory planning and improving the efficiency of parking trajectory planning.
[0040] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any possible implementation of the first aspect.
[0041] Fourthly, embodiments of this application provide an electronic device, which includes:
[0042] One or more processors;
[0043] The processor is coupled to a storage device for storing one or more programs;
[0044] When one or more programs are executed by one or more processors, the electronic device performs the method as described in any possible implementation of the first aspect.
[0045] Fifthly, embodiments of this application provide a vehicle that includes the apparatus as described in any possible implementation of the second aspect, or the electronic equipment as described in the fourth aspect.
[0046] In a sixth aspect, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the first aspect. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0048] Figure 1 A flowchart illustrating a collision detection method in parking trajectory planning provided in this application embodiment;
[0049] Figure 2 An example diagram illustrating the determination of a target region provided in this application embodiment;
[0050] Figure 3 An example diagram illustrating the determination of three sub-regions provided in this application embodiment;
[0051] Figure 4 A block diagram illustrating the composition of a collision detection device in parking trajectory planning, provided in an embodiment of this application;
[0052] Figure 5 This is a schematic diagram of the structure of an electronic device or computer device provided in an embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0054] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0055] Figure 1 This is a flowchart illustrating a collision detection method in parking trajectory planning. This method can be applied to electronic or computer equipment, specifically to vehicles or servers, and may include the following steps:
[0056] S110: Determine the target area bounded by the parking spaces and the road the target vehicle will travel.
[0057] Specifically, after activating the intelligent parking function (automatic parking or assisted parking), parking planning can be performed to determine available parking spaces. When multiple available parking spaces exist, the nearest available parking space can be selected as the parking space for the target vehicle. Alternatively, the available parking space with the fewest available parking spaces in the vicinity (such as an available parking space with available parking spaces on both sides) can be selected as the parking space for the target vehicle. The specific selection can be made according to the set strategy.
[0058] After identifying the parking space, a first-length road area can be extended from the location of the target vehicle in the opposite direction of its travel to obtain the road starting point. Then, a second-length road area can be extended from the location of the road opposite the direction of travel of the target vehicle to obtain the road ending point. The area formed by the road area from the starting point to the ending point and the parking space is defined as the target area. This target area can be T-shaped or other shapes, depending on the shape of the road and the parking space.
[0059] The first and second lengths can be set according to actual needs. For example, the final determined length of the road area can be [10m, 20m].
[0060] like Figure 2 As shown, the road on both sides of the target vehicle is a parking lot, some of which are occupied and some are vacant. The existence of available parking spaces is determined by LiDAR and image perception. From the available parking spaces, the waiting parking spaces are selected, and a part of the road area is extended in front of and behind the target vehicle. Finally, a T-shaped area composed of the waiting parking spaces and the road area is obtained as the target area.
[0061] It should be added that when the method provided in this application embodiment is applied to a vehicle, the target vehicle is a self-driving vehicle; when the method provided in this application embodiment is applied to a server, the target vehicle is a vehicle that requests collision detection or parking trajectory planning from the server.
[0062] S120: Divide the area outside the target area into a first sub-region, a second sub-region, and a third sub-region.
[0063] The first and second sub-areas are located on either side of the parking space, for example, the first sub-area is the area to the left of the parking space and the second sub-area is the area to the right of the parking space, or the second sub-area is the area to the left of the parking space and the first sub-area is the area to the right of the parking space. The third sub-area is located on the opposite side of the parking space, with the road where the target vehicle is traveling as the center reference line.
[0064] like Figure 3 As shown, the first sub-area is to the left of the parking space, the second sub-area is to the right, and the third sub-area is to the opposite side.
[0065] S130: Treat the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle and perform collision detection with the target vehicle.
[0066] After obtaining the first, second, and third sub-regions, each of these three sub-regions is treated as a whole and collision detection is performed with the target vehicle, rather than directly performing collision detection on each real obstacle in each sub-region one by one.
[0067] Specifically, the method for performing collision detection between the first sub-region, the second sub-region, and the third sub-region as a whole, treating them as a virtual obstacle and the target vehicle, includes: firstly, performing collision detection between the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region.
[0068] Among them, the common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
[0069] Since the embodiments of this application only need to perform collision detection on the common boundary between each sub-region and the target region and the target vehicle when performing collision detection on the target vehicle as a whole, without having to perform collision detection on every polygonal obstacle in the sub-region, the number of edges involved in collision detection is greatly reduced, thereby improving the efficiency of collision detection.
[0070] S140: If there is no risk of collision between the target vehicle and any of the sub-regions in the first, second, and third sub-regions, determine that there is no risk of collision between the target vehicle and any real obstacles in the sub-regions where there is no risk of collision.
[0071] If there is no collision risk between the target vehicle and any of the first, second, and third sub-regions, it means that the target vehicle will not collide with any real obstacle in the sub-region where there is no collision risk. Therefore, it can be directly determined that there is no collision risk between the target vehicle and any real obstacle in the sub-region where there is no collision risk, and there is no need to continue to conduct targeted collision detection in the sub-region where there is no collision risk.
[0072] Of course, if there is no risk of collision between the target vehicle and the first, second, and third sub-regions, then it means that the target vehicle will not collide with any of the real obstacles in the first, second, and third sub-regions, and there is no need to perform collision detection between the target vehicle and the real obstacles in each sub-region.
[0073] S150: If there is a collision risk between the target vehicle and any of the sub-regions in the first, second, and third sub-regions, perform collision detection on the real obstacles in the sub-regions with collision risk.
[0074] After treating the first, second, and third sub-regions as virtual obstacles and performing collision detection with the target vehicle to filter out sub-regions with collision risks, in order to improve the accuracy of parking trajectory planning, collision detection can be performed on each real obstacle traversed in the sub-regions with collision risks, one by one, with the target vehicle to determine the specific obstacle with collision risk, so as to update or calculate the parking planning trajectory and avoid the specific obstacle with collision risk.
[0075] In this embodiment of the application, the detection process involved in steps S130 and S140 can be called single-level collision detection, that is, it is only necessary to detect that there is no collision risk in the sub-region as a whole; the detection process involved in steps S130 and S150 can be called two-level collision detection, that is, first detect that there is a collision risk in the sub-region as a whole, and then specifically detect the collision risk of obstacles in the sub-region.
[0076] The collision detection method in parking trajectory planning provided in this application first determines the target area based on the parking space and the road the target vehicle will travel on. Then, the area outside the target area is divided into three sub-regions. Each sub-region is treated as a virtual obstacle for collision detection with the target vehicle. Further collision detection is only performed on sub-regions with a collision risk; that is, the actual obstacles in these sub-regions are traversed and collision detection is performed on the target vehicle. Sub-regions without a collision risk are not further tested, directly determining that there is no collision risk between the actual obstacles and the target vehicle in these sub-regions. Therefore, compared to traditional collision detection algorithms that traverse every obstacle and perform collision detection on the target vehicle, this application embodiment can significantly reduce the computational load of collision detection by performing overall collision detection on sub-regions, thereby reducing the time consumption of parking trajectory planning and improving its efficiency.
[0077] In one possible implementation, if there is a region in the target area where the road width is less than or equal to the width threshold, the area covered by the real obstacle that causes the road width to be less than or equal to the width threshold is divided into a fourth sub-region, which is independent of the first sub-region, the second sub-region, and the third sub-region; and the target vehicle is subjected to collision detection with each of the fourth sub-regions.
[0078] Among them, such as Figure 3 As shown, real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road traveled by the target vehicle and / or parked vehicles protruding into the road. Obstacles located in the road traveled by the target vehicle include cones, stones, etc. The width threshold can be determined based on practical experience, for example, it can be 5.5m.
[0079] In cases where the road width is less than or equal to a width threshold within the target area, a target vehicle may be unable to continue driving due to the narrow road width when it enters that area. Therefore, to avoid missing the collision risk between the target vehicle and real obstacles affecting the road width by only performing collision detection on the first, second, and third sub-regions as a whole, this application embodiment independently divides the area covered by real obstacles that cause the road width to be less than or equal to the width threshold, and distinguishes it from the first, second, and third sub-regions as a fourth sub-region for separate collision detection. This improves the accuracy of collision detection and thus enhances parking safety.
[0080] The following describes the collision detection effect of the embodiments of this application based on specific computational requirements:
[0081] To illustrate the theoretical computational complexity, a rough quantitative calculation is used. Assume that in a single search algorithm iteration, the collision detection calculation ratio for the first sub-region (e.g., the left sub-region of the parking space), the second sub-region (the right sub-region of the parking space), and the third sub-region (the opposite sub-region of the parking space) is 1:1:3. That is, if there are a total of 1000 detection cycles—meaning 1000 vehicle positions during the planning of the parking trajectory—and each collision detection cycle is based on each vehicle position and the three sub-regions, then the number of detection cycles for the three sub-regions would be 200, 200, and 600, respectively. Furthermore, assuming that each sub-region, during the entire parking trajectory planning process, performs only a single-level check in half of the detection cycles and confirms no collision, while the other half of the detection cycles requires full calculation of both levels, then the number of detection cycles corresponding to the left sub-region is split into 100 and 100, the number of detection cycles corresponding to the right sub-region is split into 100 and 100, and the number of detection cycles corresponding to the opposite sub-region is split into 300 and 300. As shown in Table 1, the collision detection method in parking trajectory planning provided in this application embodiment can reduce the computational load of the planning algorithm by approximately 50%.
[0082] Table 1
[0083]
[0084] Corresponding to the above method embodiments, another embodiment of this application provides a collision detection device for parking trajectory planning, such as... Figure 4 As shown, the device includes:
[0085] The first determining unit 210 is used to determine the target area enclosed by the parking space and the road traveled by the target vehicle;
[0086] The dividing unit 220 is used to divide the area outside the target area into a first sub-area, a second sub-area, and a third sub-area, wherein the first sub-area and the second sub-area are the areas on both sides of the parking space, and the third sub-area is the area located on the opposite side of the parking space with the road where the target vehicle is traveling as the middle reference line.
[0087] The first collision detection unit 230 is used to treat the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle and perform collision detection with the target vehicle.
[0088] The second determining unit 240 is used to determine that, when there is no risk of collision between the target vehicle and any of the sub-regions of the first sub-region, the second sub-region, and the third sub-region, ... third sub-region;
[0089] The second collision detection unit 250 is used to perform collision detection on the target vehicle by traversing the real obstacles in the sub-regions with collision risks when there is a collision risk between the target vehicle and any one of the sub-regions of the first sub-region, the second sub-region, and the third sub-region.
[0090] In one possible implementation, the segmentation unit 220 is further configured to, when there is a region in the target region where the road width is less than or equal to the width threshold, divide the region covered by the real obstacle that causes the road width to be less than or equal to the width threshold into a fourth sub-region that is independent of the first sub-region, the second sub-region, and the third sub-region; and perform collision detection between the target vehicle and each of the fourth sub-regions respectively.
[0091] In one possible implementation, real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road where the target vehicle is traveling and / or parked vehicles that protrude into the road.
[0092] In one possible implementation, the first determining unit 210 includes:
[0093] An extension module is used to extend a road area of a first length from the location of the target vehicle in the opposite direction of the target vehicle's travel direction to obtain a road starting point; and to extend a road area of a second length from the location of the road opposite to the parking space in the positive direction of the target vehicle's travel direction to obtain a road ending point.
[0094] The determination module is used to determine the area formed by the road area from the starting point of the road to the ending point of the road and the parking space to be parked as the target area.
[0095] In one possible implementation, the first collision detection unit 230 is configured to perform collision detection between the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region, respectively. The common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
[0096] The collision detection device in parking trajectory planning provided in this application embodiment can first determine the target area based on the parking space and the road traveled by the target vehicle. Then, the area outside the target area is divided into three sub-areas, and each sub-area is treated as a virtual obstacle for collision detection with the target vehicle. Further collision detection is only performed on sub-areas with collision risk; that is, the actual obstacles in the sub-areas with collision risk are traversed and collision detection is performed with the target vehicle. Sub-areas without collision risk are not further collision detected, directly determining that there is no collision risk between the actual obstacles in those sub-areas and the target vehicle. Therefore, compared with traditional collision detection algorithms that traverse every obstacle and perform collision detection with the target vehicle, this application embodiment can filter out sub-areas without collision risk by performing overall collision detection on the sub-areas, and only performs collision detection on sub-areas with risk through traversal. Therefore, this application embodiment can greatly reduce the computational load of collision detection, thereby reducing the time consumption of parking trajectory planning and improving the efficiency of parking trajectory planning.
[0097] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the above embodiments.
[0098] Based on the above method embodiments, another embodiment of this application provides an electronic device or computer device, such as... Figure 5 As shown, it includes:
[0099] One or more processors 310;
[0100] The processor 310 is coupled to a storage device 320, the storage device 320 being used to store one or more programs;
[0101] When the one or more programs are executed by the one or more processors 310, the electronic device or computer device performs the method as described in any of the above embodiments.
[0102] This application provides a vehicle that includes the device as described in any of the above embodiments, or includes the electronic device as described in the above embodiments.
[0103] The vehicle includes a CPU (Central Processing Unit), a T-Box (Telematics Box), and various sensors, such as image sensors and LiDAR. The image sensors and LiDAR can comprehensively detect available parking spaces around the vehicle, select a parking space, and detect obstacle information. After the CPU obtains a parking space, it can perform collision detection by executing the collision detection method in the parking trajectory planning provided in any of the above embodiments. The CPU can also upload the information measured by these sensors to a server via the T-Box. The server then executes the collision detection method in the parking trajectory planning provided in any of the above embodiments to perform collision detection and sends the parking trajectory planned based on the collision detection results back to the T-Box, so that the T-Box can park the vehicle into the parking space according to the trajectory.
[0104] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.
[0105] The above-described apparatus embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The apparatus embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.
[0106] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0107] Finally, it should be noted that 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.
Claims
1. A collision detection method in parking trajectory planning, characterized in that, The method includes: Define the target area defined by the parking spaces and the road the target vehicle will travel on; The area outside the target area is divided into a first sub-area, a second sub-area, and a third sub-area. The first sub-area and the second sub-area are the areas on both sides of the parking space, respectively. The third sub-area is the area located on the opposite side of the parking space, with the road where the target vehicle is traveling as the center reference line. The first sub-region, the second sub-region, and the third sub-region are treated as a whole as a virtual obstacle for collision detection with the target vehicle. If there is no risk of collision between the target vehicle and any of the first, second, and third sub-regions, it is determined that there is no risk of collision between the target vehicle and any real obstacles in the sub-regions where there is no risk of collision. If there is a collision risk between the target vehicle and any of the first, second, and third sub-regions, collision detection is performed on the target vehicle by traversing the real obstacles in the sub-regions with collision risk.
2. The method according to claim 1, characterized in that, The method further includes: If there is a region in the target area where the road width is less than or equal to the width threshold, the area covered by the actual obstacle that causes the road width to be less than or equal to the width threshold will be divided into a fourth sub-region that is independent of the first sub-region, the second sub-region, and the third sub-region. The target vehicle is then subjected to collision detection with each of the fourth sub-regions.
3. The method according to claim 2, characterized in that, Real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road where the target vehicle is traveling and / or parked vehicles that protrude into the road.
4. The method according to claim 1, characterized in that, The determination of the target area bounded by the parking space and the road traveled by the target vehicle includes: Along the opposite direction of the target vehicle's travel direction, extend a road area of a first length from the location of the target vehicle to obtain the road starting point; Along the positive direction of the target vehicle's travel direction, extend a road area of a second length from the road position facing the parking space to obtain the road end point; The area formed by the road area from the starting point to the ending point of the road and the parking space to be parked is defined as the target area.
5. The method according to any one of claims 1-4, characterized in that, The step of treating the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle for collision detection with the target vehicle includes: Collision detection is performed on the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region, respectively. The common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
6. A collision detection device for parking trajectory planning, characterized in that, The device includes: The first determining unit is used to determine the target area enclosed by the parking space to be parked and the road traveled by the target vehicle; A dividing unit is used to divide the area outside the target area into a first sub-area, a second sub-area, and a third sub-area, wherein the first sub-area and the second sub-area are the areas on both sides of the parking space, and the third sub-area is the area located on the opposite side of the parking space with the road where the target vehicle is traveling as the middle reference line. The first collision detection unit is used to treat the first sub-region, the second sub-region, and the third sub-region as a whole as a virtual obstacle and perform collision detection with the target vehicle. The second determining unit is used to determine that, when there is no risk of collision between the target vehicle and any one of the sub-regions of the first sub-region, the second sub-region, and the third sub-region, there is no risk of collision between the target vehicle and any real obstacles in the sub-regions where there is no risk of collision. The second collision detection unit is used to perform collision detection on the target vehicle by traversing the real obstacles in the sub-regions with collision risks when there is a collision risk between the target vehicle and any of the sub-regions of the first sub-region, the second sub-region, and the third sub-region.
7. The apparatus according to claim 6, characterized in that, The division unit is further configured to, in the case that there is a region in the target region where the road width is less than or equal to the width threshold, divide the region covered by the actual obstacle that causes the road width to be less than or equal to the width threshold into a fourth sub-region that is independent of the first sub-region, the second sub-region and the third sub-region. The target vehicle is then subjected to collision detection with each of the fourth sub-regions.
8. The apparatus according to claim 7, characterized in that, Real obstacles that cause the road width to be less than or equal to the width threshold include obstacles located in the road where the target vehicle is traveling and / or parked vehicles that protrude into the road.
9. The apparatus according to claim 6, characterized in that, The first determining unit includes: An extension module is used to extend a road area of a first length from the location of the target vehicle in the opposite direction of the target vehicle's travel direction to obtain a road starting point; and to extend a road area of a second length from the location of the road opposite to the parking space in the positive direction of the target vehicle's travel direction to obtain a road ending point. The determination module is used to determine the area formed by the road area from the starting point of the road to the ending point of the road and the parking space to be parked as the target area.
10. The apparatus according to any one of claims 6-9, characterized in that, The first collision detection unit is used to perform collision detection between the target vehicle and the common boundaries corresponding to the first sub-region, the second sub-region, and the third sub-region, respectively. The common boundary corresponding to the first sub-region is the common boundary between the first sub-region and the target region, the common boundary corresponding to the second sub-region is the common boundary between the second sub-region and the target region, and the common boundary corresponding to the third sub-region is the common boundary between the third sub-region and the target region.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
12. An electronic device, characterized in that, The electronic device includes: One or more processors; The processor is coupled to a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any one of claims 1-5.
13. A vehicle, characterized in that, The vehicle includes the device as described in any one of claims 6-10, or the electronic device as described in claim 12.