Parking path planning method and device, electronic equipment and vehicle
Through a multi-threaded parallel architecture and real-time environmental data update method, the problems of low efficiency and accuracy in assisted driving parking path planning are solved, achieving more efficient and accurate path planning.
Patent Information
- Application Number
- CN202511324384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-09-17
AI Technical Summary
In the existing technology, assisted driving parking path planning has low efficiency and poor accuracy, and is prone to planning failures, especially in complex scenarios, affecting the user experience.
A multi-threaded parallel architecture is adopted. The first working thread performs the reachability judgment task, and the second working thread determines the expansion node in parallel. When the expansion node is unreachable, it is added to the open set. The grid map is updated with real-time environmental data to perform validity detection and optimize path planning.
It improves the efficiency and accuracy of parking path planning, reduces planning time, and enhances user experience.
Smart Images

Figure CN120817067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of path planning technology, and in particular to a parking path planning method, device, electronic equipment and vehicle. Background Art
[0002] With the rapid development of the automotive industry, intelligence, connectivity, and the full utilization of data resources have become new trends in the industry. Path planning is a core module of assisted parking systems. Its mission is to generate a collision-free trajectory from a starting position to a target position within the constraints of the surrounding environment. This trajectory must not only meet the vehicle's kinematic constraints to ensure control system trackability, but also conform to the user's driving habits to enhance the comfort and naturalness of automated parking.
[0003] However, planning algorithms based on geometric / motion models in related technologies rely on generating a segmented path (e.g., a combination of arcs and straight lines) based on the vehicle's kinematic model and parking space geometry. Because this technology relies on fixed geometric rules, it has poor adaptability in complex scenarios (e.g., confined spaces and irregular parking spaces) and is prone to planning failures. Another related technology, a planning algorithm based on sampling search, generates feasible paths through heuristic search and outputs a parking trajectory. However, this technology's path planning is time-consuming, resulting in system responsiveness and a poor user experience. Consequently, current parking path planning in assisted driving suffers from low efficiency and accuracy. Summary of the Invention
[0004] This application provides a parking path planning method, device, electronic device, and vehicle to at least address the technical issues of low efficiency and poor accuracy in parking path planning in assisted driving in related technologies. The technical solutions of this application are as follows: According to a first aspect of the present application, a parking path planning method is provided, comprising: using a first working thread to perform a reachability determination task, the reachability determination task comprising: extracting a current node from an open set and determining whether the current node is reachable from a terminal node; while the first working thread is performing the reachability determination task, using a second working thread to determine an extension node of the current node; if it is determined that the current node is unreachable from the terminal node, using the first working thread to add the extension node to the open set; and if it is determined that the current node is reachable from the terminal node, using the first working thread to sequentially trace back from the terminal node to the parent node to the starting node to obtain a parking path.
[0005] According to the above technical means, when planning a parking path, the present application can use a first worker thread to perform a reachability determination task, extracting the current node from the open set and determining whether the current node is reachable from the end node. Simultaneously, while the first worker thread is performing the reachability determination task, a second worker thread can also be used to concurrently determine the current node's extended nodes. Therefore, if it is determined that the current node is unreachable from the end node, the extended node can be added to the open set, further selecting the current node from the open set and determining whether the node is reachable from the end node. If it is determined that the current node is reachable from the end node, the parking path can be obtained by tracing back from the end node to the parent node to the start node. In this way, the present application can improve the efficiency of parking path planning by having the first and second worker threads perform different tasks in parallel, eliminating the need to execute multiple tasks sequentially. Furthermore, if it is determined that the current node is unreachable from the end node, the extended node can be added to the open set, and another node from the extended node can be selected as the current node to further determine whether the current node is reachable from the end node, thereby accurately planning the parking path.
[0006] In a possible implementation, the parking path planning method further includes: after the first working thread completes the reachability determination task, if the second working thread fails to determine the expansion node, blocking the first working thread.
[0007] According to the above technical means, the present application can temporarily block the first worker thread after the first worker thread determines the reachability of the current node, if the second worker thread has not yet determined the expansion node. In this way, the first worker thread and the second worker thread can execute different tasks in parallel. After the second worker thread completes the node expansion task and adds the expansion node to the open set, the first worker thread continues to extract another current node from the open set and execute the reachability judgment task, so that the first worker thread and the second worker thread can still execute tasks in parallel, thereby improving the efficiency of task execution.
[0008] In one possible implementation, there are multiple second working threads, each corresponding to a movement direction. The above-mentioned method of using the second working thread to determine the expansion node of the current node includes: using the second working thread to determine a candidate expansion node of the current node in the corresponding movement direction; using the second working thread to perform a validity check on the candidate expansion node, and determining the candidate expansion node as the expansion node if the candidate expansion node passes the validity check.
[0009] According to the above technical means, the present application can use multiple second working threads to expand the current node in multiple different directions of movement, thereby obtaining candidate expansion nodes corresponding to multiple different directions. In addition, the candidate expansion nodes can be tested for validity, so that the candidate expansion nodes that pass the validity test can be used as expansion nodes. In this way, the present application can improve the efficiency of node expansion by performing node expansion in parallel through multiple second working threads. In addition, by performing validity testing on the expanded candidate expansion nodes, invalid nodes can be removed, and invalid nodes can be avoided from being added to the open set as expansion nodes. This avoids increasing the workload of subsequently selecting the current node from the open set for reachability judgment.
[0010] In one possible implementation, the parking path planning method further includes: using a first working thread to use a vector load instruction to read raster data of multiple grids in a grid map from a memory, where the raster data includes: grid occupancy data and grid type data; using the first working thread to use a vector comparison instruction to update the raster data of the multiple grids in parallel based on environmental data collected by vehicle sensors to obtain an updated grid map.
[0011] In a possible implementation, the using the second working thread to perform validity detection on the candidate expansion node includes: using the second working thread to perform validity detection on the candidate expansion node based on grid data of each grid in the updated grid map.
[0012] According to the above technical means, the present application can also use the first working thread to use the vector load instruction to read the raster data of multiple grids in the raster map from the memory, and use the vector comparison instruction to update the raster data of multiple grids in parallel based on the environmental data collected by the vehicle sensor, thereby obtaining an updated raster map. In this way, the raster data of the grids in the raster map is updated by the environmental data collected in real time, so as to ensure the accuracy of the raster map. Therefore, based on the raster data of each grid in the updated raster map, when the validity of the candidate extension node is detected, the validity of the candidate extension node can be determined more accurately, and then based on the accurate extension node, the accuracy of the planned path can be improved when performing path planning.
[0013] In one possible implementation, before using the second working thread to determine the extension node of the current node, the parking path planning method further includes: in response to using the first working thread to perform the reachability judgment task, selecting an idle thread from a thread resource pool as the second working thread; the thread resource pool includes a pre-created preset number of threads.
[0014] Based on the above technical means, the present application can pre-create a preset number of threads in the thread resource pool. Thus, when the first worker thread performs the reachability determination task, an idle thread can be selected as the second worker thread to expand the current node in parallel through the second worker thread to obtain an expanded node. In this way, by creating a preset number of threads, it can be ensured that when the reachability determination task is performed, there are idle threads available to perform the node expansion task in parallel, thereby ensuring the efficiency of path planning.
[0015] In one possible implementation, the parking path planning method further includes: while the vehicle is traveling along the parking path, using a third working thread to execute a task of replanning the remaining path in the parking path; after the new remaining path is planned, using the first working thread to select the optimal remaining path from the new remaining path and the original remaining path.
[0016] Based on the above technical means, the present application can use a third worker thread to re-plan the remaining path of the parking route while the vehicle is traveling along the planned parking route. Furthermore, after the new remaining path is planned, the optimal remaining path is selected by comparing the new remaining path with the original remaining path. In this way, by re-planning the remaining path, it is possible to determine whether a more optimal parking path exists, and thus parking can be performed based on the more optimal parking path.
[0017] In one possible implementation, the above-mentioned use of the third worker thread to execute the task of replanning the remaining path of the parking path includes: when a path replanning trigger condition is met, using the third worker thread to execute the task of replanning the remaining path of the parking path; wherein the parking path includes multiple path segments; the path replanning trigger condition includes at least one of the following: the total length of the current path segment of the vehicle is greater than a preset length; and the remaining distance of the current path segment is greater than a first length threshold.
[0018] Based on the above technical measures, the present application can use the third worker thread to execute the task of replanning the remaining path of the parking route only when the path replanning trigger condition is met. This is because the planned parking route includes multiple path segments. For the current path segment currently being traveled by the vehicle, only when the total length of the current path segment is greater than a preset length and / or the remaining distance of the current path segment is greater than a first length threshold will the vehicle have sufficient time to replan the remaining path of the parking route during the current path segment. In this way, by setting the path replanning trigger condition, it is possible to avoid ineffective planning of the remaining path and wasting computing resources.
[0019] In one possible implementation, the parking path planning method further includes: using a first working thread to create a first object and a second object; the first object is associated with the second object, and the state of the first object is synchronized with the state of the second object; after the third working thread plans a new remaining path, using the third working thread to update the second object to a ready state.
[0020] According to the above technical means, the present application can use the first working thread to create the associated first object and the second object, and synchronize the state of the first object with the state of the second object. In this way, after the third working thread plans the new remaining path, the third working thread is used to update the second object to the ready state. Therefore, based on the first object and the second object, the newly planned remaining path can be compared with the originally planned remaining path to determine whether the remaining path needs to be adjusted.
[0021] In one possible implementation, the parking path planning method further includes: while the third worker thread is executing the task of replanning the remaining path in the parking path, using the first worker thread to determine the length of the remaining path and comparing the length of the remaining path with a second length threshold; if the length of the remaining path is less than the second length threshold, controlling the third worker thread, through the first worker thread, to terminate the task of replanning the remaining path in the parking path.
[0022] Based on the above technical measures, the present application can determine the relationship between the length of the remaining path and a second length threshold during the third worker thread's execution of the task of replanning the remaining portion of the parking path. Therefore, if the remaining path length is less than the second length threshold, it can be determined that replanning the remaining path is unnecessary, and the third worker thread can be controlled to terminate the task of replanning the remaining portion of the parking path. In this way, when the remaining path length is short, it indicates that the vehicle is about to complete parking, and therefore, there is no need to replan the remaining path, thus avoiding wasting computing resources.
[0023] According to a second aspect of the present application, a parking path planning device is provided, comprising: a processing module; the processing module is configured to use a first working thread to perform a reachability determination task, wherein the reachability determination task includes: extracting a current node from an open set and determining whether the current node is reachable from the end node; the processing module is further configured to use a second working thread to determine an extension node of the current node while the first working thread is performing the reachability determination task; the processing module is further configured to use the first working thread to add the extension node to the open set if it is determined that the current node is unreachable from the end node; and the processing module is further configured to use the first working thread to trace back from the end node to the parent node to the start node in sequence to obtain a parking path if it is determined that the current node is reachable from the end node.
[0024] In a possible implementation, the processing module is further configured to block the first working thread if the second working thread fails to determine the extension node after the first working thread completes the reachability determination task.
[0025] In one possible implementation, there are multiple second working threads, each corresponding to a movement direction; the processing module is specifically configured to use the second working thread to determine a candidate expansion node for the current node in the corresponding movement direction; and the processing module is specifically configured to use the second working thread to perform a validity check on the candidate expansion node, and determine the candidate expansion node as an expansion node if the candidate expansion node passes the validity check.
[0026] In one possible implementation, the processing module is further used to use the first working thread to use vector load instructions to read raster data of multiple grids in the raster map from the memory, where the raster data includes: grid occupancy data and raster type data; the processing module is further used to use the first working thread to use vector comparison instructions to update the raster data of the multiple grids in parallel based on the environmental data collected by the vehicle sensor to obtain an updated raster map.
[0027] In a possible implementation, the processing module is specifically configured to use the second working thread to perform validity detection on the candidate expansion nodes based on the grid data of each grid in the updated grid map.
[0028] In a possible implementation, the processing module is further configured to select an idle thread from a thread resource pool as the second working thread in response to using the first working thread to perform the reachability determination task; the thread resource pool includes a preset number of pre-created threads.
[0029] In one possible implementation, the processing module is further configured to use a third working thread to execute a task of replanning the remaining path in the parking path while the vehicle is traveling based on the parking path; and the processing module is further configured to use the first working thread to select the optimal remaining path from the new remaining path and the original remaining path after the new remaining path is planned.
[0030] In one possible implementation, the processing module is specifically configured to, when a path replanning trigger condition is met, use a third worker thread to execute a task of replanning the remaining path in the parking path; wherein the parking path includes multiple path segments; and the path replanning trigger condition includes at least one of the following: the total length of the current path segment traveled by the vehicle is greater than a preset length; and the remaining distance of the current path segment is greater than a first length threshold.
[0031] In one possible embodiment, the processing module is also used to create a first object and a second object using a first working thread; the first object is associated with the second object, and the state of the first object is synchronized with the state of the second object; the processing module is also used to update the second object to a ready state using a third working thread after the third working thread plans a new remaining path.
[0032] In one possible implementation, the processing module is further configured to, while the third working thread is executing the task of replanning the remaining path in the parking path, use the first working thread to determine the length of the remaining path and compare the length of the remaining path with a second length threshold. The processing module is further configured to, when the length of the remaining path is less than the second length threshold, control the third working thread, through the first working thread, to terminate the task of replanning the remaining path in the parking path.
[0033] According to the third aspect provided by the present application, an electronic device is provided, comprising: a processor and a memory; wherein the memory is used to store one or more programs, and the one or more programs include computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory, and the electronic device executes the method of the above-mentioned first aspect and any possible implementation method thereof.
[0034] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the computer instructions stored in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation method thereof.
[0035] According to the fifth aspect provided by the present application, a computer program product is provided, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation method thereof.
[0036] According to a sixth aspect provided by the present application, a vehicle is provided, the vehicle including the parking path planning device as described in the second aspect, and the vehicle is used to implement the method of the above-mentioned first aspect and any possible implementation method thereof.
[0037] It should be noted that the technical effects brought about by any implementation method in the second to sixth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.
[0038] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0040] Figure 1 is a schematic structural diagram of a parking path planning system according to an exemplary embodiment; Figure 2 A process of a parking path planning method according to an exemplary embodiment is shown Figure 1 ; Figure 3 A process of a parking path planning method according to an exemplary embodiment is shown Figure 2 ; Figure 4 A process of a parking path planning method according to an exemplary embodiment is shown Figure 3 ; Figure 5 A process of a parking path planning method according to an exemplary embodiment is shown Figure 4 ; Figure 6 is a schematic diagram showing a node expansion according to an exemplary embodiment; Figure 7 A process of a parking path planning method according to an exemplary embodiment is shown Figure 5 ; Figure 8 A process of a parking path planning method according to an exemplary embodiment is shown Figure 6 ; Figure 9 A process of a parking path planning method according to an exemplary embodiment is shown Figure 7 ; Figure 10 is a block diagram of a parking path planning device according to an exemplary embodiment; Figure 11 is a block diagram of an electronic device according to an exemplary embodiment; Figure 12 The figure is a schematic structural diagram of a computer system of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0041] In order to enable ordinary people in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0042] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0043] The parking path planning method provided in the embodiment of the present application can be applied to a parking path planning system. Figure 1 Figure 2 shows a schematic diagram of the structure of a parking path planning system. Figure 1 As shown, the parking path planning system includes: a sensor 11 and a processor 12 .
[0044] The sensor 11 is used to collect environmental data of the vehicle's location, and the processor 12 may include multiple working threads, which can process different tasks in parallel.
[0045] The parking path planning system may further include a memory, the memory being used to store an open set, and the open set being used to store an extended node.
[0046] In some embodiments, the processor 12 is configured to use the first working thread to execute a reachability determination task, where the reachability determination task includes: extracting a current node from an open set, and determining whether the current node is reachable from the termination node.
[0047] The processor 12 is further configured to use the second working thread to determine an extended node of the current node while the first working thread is executing the reachability determination task.
[0048] The processor 12 is further configured to, when it is determined that the current node is unreachable from the terminal node, use the first working thread to add the extended node to the open set.
[0049] The processor 12 is further configured to, when determining that the current node is reachable from the end node, use the first working thread to sequentially trace back the parent nodes from the end node to the start node to obtain a parking path.
[0050] For ease of understanding, the parking path planning method provided in this application is described in detail below with reference to the accompanying drawings.
[0051] Figure 2 is a flow chart showing a parking path planning method according to an exemplary embodiment, which is applied to electronic devices such as Figure 2 As shown, the parking path planning method includes the following steps S201-S205: S201: Use a first working thread to perform a reachability determination task.
[0052] The reachability judgment task includes: taking the current node from the open set and judging whether the current node is reachable from the terminal node.
[0053] In embodiments of the present application, a Hybrid A-Star algorithm can be used to plan parking paths. The traditional Hybrid A-Star algorithm employs an open set management mechanism based on a priority queue, ensuring the asymptotic optimality of the solution by consistently expanding the node with the lowest current cost. Its core task is to determine whether the destination is reachable and to expand nodes. If the destination is reachable, no node expansion is necessary. However, in reality, finding a node that is reachable from the destination and thus planning a parking path requires thousands or even tens of thousands of search iterations.
[0054] Therefore, consider whether it is possible to break down the task of expanding nodes and let another thread calculate them in order to calculate the expanded nodes in advance. When the end point is unreachable, the expanded nodes can be directly added to the open set.
[0055] Based on this, the present application decouples parking path planning into two tasks based on a hybrid A-star algorithm: determining the reachability of the endpoint and expanding the node. That is, through a task-decoupled parallel architecture, the key tasks are split and the node processing flow is decoupled into two independent subtasks. The path planning curve (Reeds-Shepp curve) is used to analyze the plan to determine whether the endpoint is reachable (for example, executed by the main thread, i.e., the first worker thread), and node expansion is performed (executed by the worker thread, i.e., the second worker thread). In this way, a parallel architecture of pre-execution and conditional submission is adopted, with the first worker thread continuously performing the Reeds-Shepp analysis and planning task, while the second worker thread always asynchronously executes the node expansion task.
[0056] In the embodiment of the present application, the logical flow of the hybrid A-star algorithm is as follows: Step 1: Establish a parking coordinate system based on the selected target parking space. Divide the grid map into a 360×360 grid, with each grid measuring 0.1m×0.1m, to obtain an initialized grid map. Step 2: Obstacle coordinate information (also called a cluster, represented by multiple line segments) sensed by the sensor is acquired and converted into the grid map of the parking coordinate system. All grid points with obstacle information projections are marked as occupied grids. Step 3: Set the vehicle's current position as the starting node (start point), and the final parking posture position (i.e., the target parking space) as the ending node (target point) of the parking path planning. Step 4: Place the starting point into the open set (open set). Step 5: Determine whether the open set is empty. If the open set is empty, the entire path planning process ends; if not, the subsequent steps continue. Step 6: Select the node with the lowest cost from the open set as the current node. Step 7: Determine whether the current node can be directly planned using the Reeds-Shepp curve and connected directly to the terminal node. If it can be directly connected to the terminal node, the path planning is successful; if the connection fails, the subsequent process continues. Step 8: Based on the vehicle kinematics of the current node, the corresponding expansion node is expanded using different steering wheel angles, driving directions (forward or reverse), and driving distances. Step 9: Determine the cost of each expansion node and add the expansion node to the open set.
[0057] In one possible implementation, the path planned by the Reeds-Shepp curve is composed of a combination of straight segments (S) and arc segments (L / R, left turn / right turn). In this process, collision detection must be performed, and nodes that fail the collision detection are discarded. In addition, the vehicle is allowed to switch forward / reverse gears during path planning.
[0058] In this embodiment of the present application, when parking path planning is required, the vehicle's current location is first placed as the starting node in the open set. The current node is then retrieved from the open set and the determination of whether the current node is reachable from the ending node is determined. Since the initial open set is empty, after the vehicle's current location is placed as the starting node in the open set, the open set only contains one starting node. The current node retrieved from the open set is then the vehicle's current location (i.e., the starting node).
[0059] In this way, based on the current position of the vehicle (i.e., the starting node) and the selected target parking space (i.e., the ending node), the accessibility between the current position of the vehicle (i.e., the starting node) and the target parking space (i.e., the ending node) can be determined by the first working thread (e.g., the main thread).
[0060] S202: While the first working thread is executing the reachability determination task, the second working thread is used to determine an extension node of the current node.
[0061] In an embodiment of the present application, the first working thread and the second working thread can execute different tasks in parallel. In this way, while the first working thread is executing the reachability judgment task, the second working thread can determine the extension node of the current node in parallel.
[0062] In a possible implementation, after determining the expansion node of the current node, it is necessary to further determine the cost of each expansion node. The cost of the expansion node can be determined by the cost function f(n) shown in Formula 1.
[0063]
[0064] in, Indicates the cost from the planned starting point (i.e., the starting node) to the current node of the parking path, Represents the estimated cost from the current node to the end node, that is, the dynamic distance from the current node to the end node.
[0065] Specifically, the cost from the planned starting point (i.e., the starting node) to the current node of the parking path The estimated cost from the current node to the end node can be calculated by formula 2 It can be calculated using formula 3.
[0066]
[0067] in, Represents the weight of the path length cost item; Indicates the distance from the planned starting point (i.e., the starting node) of the parking path to the current node, which can be expressed as Euclidean distance or Manhattan distance; represents the shift cost weight; represents the gear shift cost; Represents the cost weight of searching the steering angle; Indicates the heading angle of the current vehicle body posture. Indicates the heading angle of the vehicle body at the previous node.
[0068] In some embodiments, before using the second working thread to determine the extension node of the current node, the parking path planning method also includes: in response to using the first working thread to perform the reachability judgment task, selecting an idle thread from the thread resource pool as the second working thread; the thread resource pool includes a pre-created preset number of threads.
[0069] In one possible implementation, a certain number of threads can be pre-created in a thread resource pool to avoid the resource overhead associated with frequent thread creation and destruction. This is because thread creation and destruction are resource-intensive operations, consuming significant system resources and time. Therefore, pre-creating a certain number of threads and reusing the threads in the thread resource pool can reduce resource waste and improve system stability.
[0070] Therefore, when it is necessary to expand the current node in parallel through the second working thread to obtain an expanded node, an idle thread can be selected from the thread resource pool as the second working thread to execute the node expansion task, thereby executing the task in parallel with the first working thread.
[0071] In an embodiment of the present application, a preset number of threads can be pre-created in a thread resource pool. Thus, when a reachability determination task is executed by a first working thread, an idle thread can be selected as a second working thread to expand the current node in parallel through the second working thread to obtain an expanded node. In this way, by creating a preset number of threads, it is ensured that when a reachability determination task is executed, there are idle threads that can execute the node expansion task in parallel, thereby ensuring the efficiency of path planning.
[0072] In some embodiments, after the first worker thread completes the reachability determination task, if the second worker thread fails to determine the expansion node, the first worker thread is blocked.
[0073] In one possible implementation, since the first worker thread and the second worker thread need to execute different tasks in parallel, when a worker thread (such as the first worker thread) completes the corresponding task, it is necessary to block the worker thread to wait for another worker thread (such as the second worker thread) to complete the corresponding task.
[0074] For example, when the second worker thread completes the node expansion task, but the first worker thread has not completed the reachability determination task for the current node, the second worker thread needs to be blocked to wait for the first worker thread to complete the reachability determination task for the current node. In this way, when the next current node needs to be determined in the next stage, the reachability determination task for the next current node can continue to be executed by the first worker thread, and the node expansion task for the next current node can be executed in parallel by the second worker thread.
[0075] In an embodiment of the present application, after the first worker thread determines the reachability of the current node, if the second worker thread has not yet determined the expansion node, the first worker thread can be temporarily blocked. In this way, the first worker thread and the second worker thread can execute different tasks in parallel. Thus, after the second worker thread completes the node expansion task and adds the expansion node to the open set, the first worker thread continues to extract another current node from the open set and execute the reachability determination task, so that the first worker thread and the second worker thread can still execute tasks in parallel, thereby improving the efficiency of task execution.
[0076] S203: Determine whether the current node is reachable to the end node.
[0077] S204: When it is determined that the current node is unreachable from the terminal node, use the first working thread to add the extended node to the open set.
[0078] In one possible implementation, when it is determined that the current node is reachable from the terminal node, it indicates that parking can be completed between the current node and the terminal node via a path, so there is no need to add the extended node of the current node to the open set.
[0079] That is, the extended node generated by the second working thread can be added to the open set only when the first working thread fails to plan the path resolution (i.e., the current node is unreachable from the terminal node), so that the current node can be reselected from the open set in the next stage.
[0080] In one possible implementation, before adding an expansion node to the open set, a collision check can be performed on each expansion node to determine whether there are obstacles at the location corresponding to each expansion node, or whether there are obstacles on the path from the vehicle to the expansion node. This ensures that the vehicle will not collide with obstacles when traveling to the expansion node. Therefore, expansion nodes that fail the collision check are discarded. Specifically, expansion nodes with obstacles at their location or on the path from the vehicle to the expansion node are discarded.
[0081] In this way, after discarding the expansion nodes that fail the collision detection, the remaining expansion nodes can be added to the open set.
[0082] Furthermore, after adding the extended node of the current node to the open set, it is necessary to select the next current node from the open set again (at this time the open set includes the newly added extended node but does not include the selected node), and use the first working thread to perform the reachability judgment task on the selected next current node, and use the second working thread to determine the extended node of the next current node.
[0083] In a possible implementation, after a node is selected from the open set as the current node, the selected node needs to be removed from the open set.
[0084] In one possible implementation, collision detection can be performed on the next extension node of the current node, and the remaining extension nodes after collision detection are added to the open set. This process is repeated until the node selected from the open set (as the current node) and the end node are reachable. This completes the path planning task and determines the parking path.
[0085] S205 : When it is determined that the current node is reachable from the end node, use the first working thread to sequentially trace back the parent nodes from the end node to the start node to obtain a parking path.
[0086] In this way, when the final determined current node is reachable from the end node, all the extended nodes between the start node and the end node can be determined by tracing back from the end node to the parent node until the start node, thereby obtaining the planned parking path.
[0087] In a complete embodiment, Figure 3 As shown, in the serial algorithm, based on an initialized grid map, obstacles are converted into sets of line segments to obtain an optimized grid map (e.g., a Grid A heuristic map or a quadtree map). The starting node is then added to the open set. Based on this, the open set is first checked to see if it is empty. If so, path planning fails and the algorithm exits. If the open set is not empty, the node with the lowest cost is selected from the open set as the current node. The Reeds-Shepp connection is then performed to determine if the current node is reachable. If the current node's destination is reachable, path planning succeeds and the algorithm exits. If the current node's destination is unreachable, the current node is expanded to obtain multiple extended nodes, which are then added to the open set. In this way, if the current node's destination is unreachable, the current node is retrieved from the open set and the path planning process is repeated.
[0088] In another complete embodiment, Figure 4As shown, in the parallel algorithm, based on an initialized grid map, obstacles are converted into sets of line segments to obtain an optimized grid map (e.g., a Grid A heuristic map or a quadtree map). The starting node is then added to the open set. First, a check is performed to determine whether the open set is empty. If so, path planning fails and the algorithm exits. If the open set is not empty, the node with the lowest cost is selected from the open set as the current node, and the Reeds-Shepp connection is performed on the terminating node. Furthermore, another worker thread is used to extend the current node to obtain multiple extended nodes in parallel, and the worker thread is blocked when it completes its task. Furthermore, a check is performed to determine whether the current node is reachable. If so, path planning succeeds and the algorithm exits. If the current node's endpoint is unreachable, path planning fails and the multiple extended nodes are added to the open set. In this way, if the current node's endpoint is unreachable, the current node is retrieved from the open set and the path planning process is repeated.
[0089] In an embodiment of the present application, when planning a parking path, the present application can use a first worker thread to perform a reachability determination task, extracting the current node from an open set and determining whether the current node is reachable from the end node. Simultaneously, while the first worker thread is performing the reachability determination task, a second worker thread can also be used to concurrently determine the current node's extended nodes. Therefore, if it is determined that the current node is unreachable from the end node, the extended node can be added to the open set to further select the current node from the open set and determine whether the node is reachable from the end node. If it is determined that the current node is reachable from the end node, the parking path can be obtained by tracing back from the end node to its parent nodes to the start node. In this way, the present application can improve the efficiency of parking path planning by having the first and second worker threads perform different tasks in parallel, eliminating the need to execute multiple tasks sequentially. Furthermore, if it is determined that the current node is unreachable from the end node, the extended node can be added to the open set to select another node from the extended nodes as the current node, further determining whether the current node is reachable from the end node, thereby accurately planning the parking path.
[0090] In some embodiments, there are multiple second working threads, each of which corresponds to a movement direction; Figure 5 As shown, in a parking path planning method provided by an embodiment of the present application, the above step S202 may specifically include S501-S502: S501. While the first working thread is executing a reachability determination task, the second working thread is used to determine a candidate expansion node of the current node in a corresponding movement direction.
[0091] In one possible implementation, when there are multiple second working threads and each second working thread corresponds to a movement direction, one second working thread can be used to determine the candidate expansion nodes of the current node in the corresponding movement direction, thereby obtaining multiple candidate expansion nodes of the current node in multiple movement directions through multiple second working threads.
[0092] In one possible implementation, when the second working thread is one thread, node expansion can be performed in sequence in multiple movement directions corresponding to the current node based on the one second working thread to obtain multiple candidate expansion nodes of the current node in multiple movement directions.
[0093] For example, Figure 6 The figure shows a schematic diagram of obtaining multiple candidate expansion nodes by performing node expansion on the current node in multiple movement directions. Each node in the figure can be used as the current node, so starting from the starting node, multiple expansion nodes can be obtained for each node by expanding in multiple movement directions.
[0094] S502: Use the second working thread to perform a validity check on the candidate extension node, and determine the candidate extension node as an extension node if the candidate extension node passes the validity check.
[0095] In one possible implementation, the validity check on candidate expansion nodes can be performed as a collision check on the candidate expansion nodes to determine whether there is an obstacle at the location corresponding to each candidate expansion node, or whether there is an obstacle on the path of the vehicle to the candidate expansion node, to ensure that the vehicle will not collide with the obstacle when traveling to the candidate expansion node. The candidate expansion node that passes the validity check is then selected from the multiple candidate expansion nodes as the expansion node.
[0096] In an embodiment of the present application, the present application can use multiple second working threads to expand the current node in multiple different directions of movement, thereby obtaining candidate expansion nodes corresponding to multiple different directions. In addition, the candidate expansion nodes can be tested for validity, so that the candidate expansion nodes that pass the validity test can be used as expansion nodes. In this way, the present application can improve the efficiency of node expansion by performing node expansion in parallel through multiple second working threads. In addition, by performing validity testing on the expanded candidate expansion nodes, invalid nodes can be removed, and invalid nodes can be avoided from being added to the open set as expansion nodes. This avoids increasing the workload of subsequently selecting the current node from the open set for reachability judgment.
[0097] In some embodiments, as Figure 7As shown, in a parking path planning method provided in an embodiment of the present application, the method may further include S701-S702, and the "using the second working thread to perform validity detection on the candidate extension node" in the above step S602 may specifically include S703: S701: Use a first working thread to read raster data of multiple grids in a raster map from a memory using a vector load instruction.
[0098] The grid data includes grid occupancy data and grid type data. The grid occupancy data indicates whether the grid is occupied by an obstacle, and the grid type data indicates the type of the grid: obstacle, parking space, curb, etc.
[0099] Because traditional grid map processing typically relies on serial access, cell by cell, it suffers from computational inefficiency when processing high-resolution grid maps (such as the large-scale grid maps used in autonomous driving scenarios). This serial processing model is particularly difficult to meet real-time requirements in applications that require simultaneous detection of multiple grid types (such as obstacles, parking spaces, and curbs).
[0100] Therefore, the embodiment of the present application proposes a raster map parallel processing method based on the ARM NEON instruction set, which realizes parallel access and processing of multi-raster data through Single Instruction, Multiple Data (SIMD) technology.
[0101] Specifically, because the traditional approach requires accessing the occupancy value (i.e., grid occupancy data) and type value (i.e., grid type data) of each grid in a raster map one by one, multiple memory accesses and instruction executions are required. However, the optimized solution using the NEON instruction set uses specialized vector load instructions that can read data from multiple grids (e.g., four or six grids) at a time from consecutive memory addresses, thereby simultaneously loading multiple 32-bit integer values into 128-bit vector registers. This parallel loading method fully utilizes the processor's memory bandwidth, reduces the number of memory accesses, and significantly improves data throughput efficiency.
[0102] S702 : Using a first working thread and a vector comparison instruction, the grid data of a plurality of grids are updated in parallel based on the environmental data collected by the vehicle sensor to obtain an updated grid map.
[0103] Furthermore, because traditional methods require multiple conditional checks for each raster, they generate a large number of repeated instructions and inefficient memory access, making them unable to meet the real-time processing requirements of high-resolution raster maps. However, the vectorized comparison instructions provided by the NEON instruction set can simultaneously generate judgment results for multiple types of conditions, allowing comparison operations to be performed on multiple raster data at the same time.
[0104] Specifically, the comparison operation includes two key comparison operations: one is to compare the grid occupancy data of multiple grids with the threshold in parallel, generating a mask vector representing the comparison result; the other is to compare the grid type data of multiple grids with the target type in parallel, also generating a corresponding mask vector. These comparison operations are performed by a dedicated parallel arithmetic logic unit within the processor. Multiple comparators operate simultaneously in the same clock cycle, and the operations in each channel are independent and the results are accurate.
[0105] In one possible implementation, when performing parallel occupancy threshold comparisons, the vcgtq_s32 instruction can be used to compare the grid occupancy data of multiple grids against the corresponding thresholds at once to generate an obstacle detection mask. Each mask channel stores the comparison result for the corresponding grid (for example, 0xFFFFFFFF indicates true (no obstacle), and 0x00000000 indicates false (obstacle present)). Parallel type matching is then performed using the vceqq_s32 instruction to synchronously match the grid type data of multiple grids against the target type, generating a mask for the corresponding type and occupancy.
[0106] The above operations can be completed in a single clock cycle and are executed synchronously by the Parallel Arithmetic Logic Unit (ALU) of the NEON architecture. Multiple comparators work independently without interfering with each other.
[0107] Furthermore, mask fusion is required. Because a target grid may meet multiple conditions simultaneously (for example, a grid may be both an occupied obstacle and a curb), multiple conditional masks must be combined into a unified valid grid identification. If any condition is true, the mask bit of the corresponding grid channel is 1, marking it as a valid grid for further processing. The final output, combined_mask, identifies all grid locations that meet any of the target conditions.
[0108] In an embodiment of the present application, a mask validity check is performed through an efficient result processing process, and the vmaxvq_u32 instruction is used to quickly determine whether the combined_mask contains valid grids. If the mask is all zero (indicating an obstacle), subsequent processing can be skipped to avoid invalid calculations. If there are valid bits, it means that the grid is not occupied by an obstacle, and the grid data extraction process can be entered. Thus, subsequent operations (such as coordinate calculation, type classification, etc.) are only performed on valid grids marked by the mask. When calculating the grid geographic coordinates, the grid coordinates can be calculated based on the coordinate origin of the odometer coordinate system (ODOM) of the grid map and the grid row and column indexes. When performing multi-target classification processing, the grids that specifically meet the conditional types can be distinguished and classified based on the original mask. When screening high-confidence grids, grids with high occupancy confidence are screened for collision detection during planning.
[0109] S703: Use the second working thread to perform validity detection on the candidate expansion nodes based on the grid data of each grid in the updated grid map.
[0110] In a possible implementation, when performing the path validity detection, whether the candidate extension node is valid may be determined by judging whether the candidate extension node will collide with obstacle information.
[0111] Specifically, node validity checks can be parallelized using a thread pool. First, the task is decomposed, encapsulating the path validity check for each candidate expansion node as an independent task. All possible next nodes of the current node are processed in parallel. Tasks for the paths generated by this node are added to the thread pool's task queue, and a std::future object representing the check result for each node is stored. Wait until all tasks are completed and process nodes whose check results are valid. If the node is not in the open set, its cost is calculated and added to the open set and priority queue.
[0112] Alternatively, perform asynchronous processing, submit all tasks corresponding to the extended nodes, and then use future.get() to block the tasks in the thread pool for each task, synchronize all check tasks, and only retain valid nodes.
[0113] In an embodiment of the present application, the present application can also use a first working thread to use a vector load instruction to read the raster data of multiple grids in the grid map from the memory, and use a vector comparison instruction to update the raster data of the multiple grids in parallel based on the environmental data collected by the vehicle sensor, thereby obtaining an updated raster map. In this way, the raster data of the grids in the grid map is updated by the environmental data collected in real time, so as to ensure the accuracy of the raster map. Therefore, based on the raster data of each grid in the updated raster map, when the validity of the candidate extension node is detected, the validity of the candidate extension node can be more accurately determined, and then based on the accurate extension node, the accuracy of the planned path can be improved when performing path planning.
[0114] In some embodiments, as Figure 8 As shown, a parking path planning method provided in an embodiment of the present application may further include S801-S802.
[0115] S801: While the vehicle is traveling along the parking path, a third working thread is used to execute a task of replanning the remaining path in the parking path.
[0116] In embodiments of the present application, an asynchronous dynamic planning mechanism can also be implemented to further replan the remaining path while parking is being performed based on a planned parking path. This is because in assisted-driving parking scenarios, due to the measurement accuracy limitations and blind spots of sensors (radar and cameras), obstacle information may exhibit the following issues: Initial planning may fail to detect certain obstacles; obstacle positions may exhibit significant deviations, manifesting as redetection or positional corrections as the sensors achieve a more optimal observation angle and distance as the vehicle moves. Therefore, under traditional synchronous planning mechanisms, the previously planned parking path is easily affected by real-time updated obstacle information, making parking impossible. Therefore, it is necessary to re-initiate parking path planning to obtain a higher-quality parking path to replace the original one.
[0117] In one possible implementation, when replanning the remaining path in a parking route, the following requirements (i.e., path replanning trigger conditions) must be met: real-time requirements, timeout management requirements, and resource constraints. The real-time requirement indicates that the planning thread must avoid blocking the main control cycle (e.g., 20ms, 40ms). The timeout management requirement indicates that when the vehicle completes the current path segment, unfinished planning threads must be terminated promptly. The resource constraint requirement indicates that low-computing domain controllers must be protected from resource overload due to frequent planning requests.
[0118] In some embodiments, using the third worker thread to execute the task of replanning the remaining path in the parking path includes: using the third worker thread to execute the task of replanning the remaining path in the parking path when a path replanning trigger condition is met.
[0119] The parking path includes multiple path segments; the path replanning triggering condition includes at least one of the following: the total length of the current path segment of the vehicle is greater than a preset length; the remaining distance of the current path segment is greater than a first length threshold.
[0120] In one possible implementation, path screening is required to initiate planning for forward gear paths exceeding a certain length (i.e., the total length of the current path segment exceeds a preset length). This is because if the current path segment is too short (less than the preset length), replanning the path is meaningless and increases resource consumption. Furthermore, the one-time principle must be met: only one dynamic planning request is allowed for each path segment, and the remaining paths are replanned.
[0121] In some embodiments, a parking path planning method provided in an embodiment of the present application may further include: using a first working thread to create a first object and a second object; the first object is associated with the second object, and the state of the first object is synchronized with the state of the second object; after the third working thread plans a new remaining path, using the third working thread to update the second object to a ready state.
[0122] In one possible implementation, a Promise / Future model can be used to implement non-blocking planning when replanning the remaining path in a parking route. First, the current path segment represents the vehicle's path from the current gear position to the next gear shift point. When the vehicle reaches the midpoint of the current path segment (halfway through the current path segment), a dynamic planning request can be initiated to another thread (the dynamic planning thread), creating a promise object (the first object) and simultaneously obtaining a future object (the second object) from the promise object. The dynamic planning thread is required to assign a value to the future object after completing the planning.
[0123] Furthermore, status monitoring is required, and the first worker thread periodically checks the status of the future object (whether it is ready or not ready).
[0124] In one possible implementation, resources can be released and timeout management can be performed based on forced exit conditions, so that based on termination conditions (for example, the remaining distance of the current path segment is less than a first length threshold), it is determined that the dynamically planned path is not yet ready and the remaining path cannot be replanned.
[0125] Specifically, the first worker thread checks the planning return status of the dynamic planning thread in real time during each task cycle and processes it according to the following rules: Remaining path check: In each task cycle, the length of the remaining path is checked. If the remaining path length is less than a first length threshold, the dynamic planning process is forcibly terminated regardless of whether dynamic planning is complete. This way, even in extreme cases where dynamic planning fails, normal tracking and subsequent path shifting and switching operations will not be blocked.
[0126] In an embodiment of the present application, the present application can use a first working thread to create a first object and a second object that are associated with each other, and synchronize the state of the first object with the state of the second object. In this way, after a third working thread plans a new remaining path, the third working thread is used to update the second object to a ready state. Thus, based on the first object and the second object, the newly planned remaining path can be compared with the originally planned remaining path to determine whether the remaining path needs to be adjusted.
[0127] In this embodiment of the present application, the present application may utilize a third worker thread to execute the task of replanning the remaining portion of the parking route only when a path replanning trigger condition is met. This is because the planned parking route includes multiple path segments. For the vehicle's current path segment, only when the total length of the current path segment exceeds a preset length and / or the remaining distance of the current path segment exceeds a first length threshold will the vehicle have sufficient time to replan the remaining portion of the parking route during the current path segment. By setting a path replanning trigger condition, ineffective planning of the remaining path and the resulting waste of computing resources can be avoided.
[0128] S802: After planning a new remaining path, use the first working thread to select an optimal remaining path from the new remaining path and the original remaining path.
[0129] In one possible implementation, when the dynamic planning state reaches "ready," a new remaining path is obtained by replanning the remaining path and compared with the original remaining path. Factors such as the distance to the end node, the number of gear changes, and the path length are comprehensively considered to select the optimal remaining path between the new and the original. If the new remaining path is superior, the paths are trimmed and spliced, thereby enabling the vehicle to dynamically plan a new path while driving.
[0130] In this embodiment of the present application, while the vehicle is traveling along the planned parking path, the third worker thread can be used again to replan the remaining path in the parking path. Furthermore, after the new remaining path is planned, the optimal remaining path is selected by comparing the new remaining path with the original remaining path. In this way, by replanning the remaining path, it is possible to determine whether a more optimal parking path exists, and thus parking can be performed based on the more optimal parking path.
[0131] In some embodiments, a parking path planning method provided in an embodiment of the present application may further include: while the third worker thread is executing the task of replanning the remaining path in the parking path, using the first worker thread to determine the length of the remaining path and comparing the length of the remaining path with a second length threshold; if the length of the remaining path is less than the second length threshold, controlling the third worker thread through the first worker thread to terminate the task of replanning the remaining path in the parking path.
[0132] In an embodiment of the present application, during the process of the third worker thread executing the task of replanning the remaining portion of the parking path, the present application can determine the relationship between the length of the remaining portion and a second length threshold. Therefore, if the length of the remaining portion is less than the second length threshold, it can be determined that the remaining portion does not need to be replanned, and the third worker thread can be controlled to terminate the task of replanning the remaining portion of the parking path. In this way, if the remaining portion is less than the second length threshold, it indicates that the vehicle is about to complete parking, and therefore, there is no need to replan the remaining portion, thereby avoiding wasting computing resources.
[0133] For example, Figure 9As shown, during the dynamic planning of a new route, a first worker thread controls the vehicle to park based on the planned parking route. When the vehicle reaches the current route segment, the first worker thread determines whether the length of the current route segment is greater than a preset length. If the length of the current route segment is not greater than the preset length, it is determined that a new route is not dynamically planned (i.e., no replanning of the remaining route is required). If the length of the current route segment is greater than the preset length, it is further determined whether the remaining distance of the vehicle in the current route segment is greater than a first length threshold. If the remaining distance is not greater than the first length threshold, it is determined that a new route is not dynamically planned. If the remaining distance is greater than the first length threshold, it is determined that a new route is not dynamically planned. If the remaining distance is greater than the first length threshold, it is determined that the first worker thread has not previously initiated a task for dynamically planning a new route. If the first worker thread has previously initiated a task for dynamically planning a new route, it is determined that a new route is not dynamically planned. If the first worker thread has not previously initiated a task for dynamically planning a new route, a task for dynamically planning a new route is initiated through the first worker thread. The first worker thread creates a promise object and a future object and starts the dynamic planning thread to replan the remaining route. The process then determines whether the remaining path has been replanned. If so, the future object is assigned a value and returns to the ready state, completing the replanning of the remaining path. If the remaining path replanning is not complete, the process continues to wait for the dynamic planning thread to plan the remaining path and returns to the not ready state. During this process, the process also determines whether the remaining distance of the current path segment is less than a first length threshold. If so, the task of dynamically planning a new path is terminated, and the status of the task indicating whether dynamic planning of a new path has been initiated is set to true. The process then further determines whether the first worker thread has not initiated the task of dynamically planning a new path. If the remaining distance of the current path segment is not less than the first length threshold, the first worker thread determines whether the future object is in the ready state. If the future object is not in the ready state (i.e., not ready), the first worker thread continues to control the vehicle along the original remaining path. If the future object is in the ready state, the first worker thread evaluates the new remaining path against the original remaining path based on parameters such as the distance to the end node and the number of gear shifts. The optimal remaining path between the new remaining path and the original remaining path is determined. If the new remaining path is optimal, the first working thread clips and splices the new remaining path, and controls the vehicle to park based on the planned parking path (i.e., the new remaining path); if the original remaining path is optimal, the first working thread continues to control the vehicle to travel based on the original remaining path.
[0134] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the parking path planning device or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0135] In the embodiments of the present application, the parking path planning device or electronic device can be divided into functional modules according to the above method. For example, the parking path planning device or electronic device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into a single processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the module division in the embodiments of the present application is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.
[0136] Figure 10 FIG. 1 is a block diagram of a parking path planning device according to an exemplary embodiment. Figure 10 The parking path planning device 1000 includes a processing module 1001. The processing module 1001 is configured to use a first working thread to perform a reachability determination task, wherein the reachability determination task includes: extracting a current node from an open set and determining whether the current node is reachable from the end node; the processing module 1001 is further configured to use a second working thread to determine an extension node of the current node while the first working thread is performing the reachability determination task; the processing module 1001 is further configured to use the first working thread to add the extension node to the open set if it is determined that the current node is unreachable from the end node; and the processing module 1001 is further configured to use the first working thread to trace back from the end node to the parent node to the start node to obtain a parking path if it is determined that the current node is reachable from the end node.
[0137] In a possible implementation, the processing module 1001 is further configured to block the first working thread if the second working thread fails to determine the extension node after the first working thread completes the reachability determination task.
[0138] In one possible implementation, there are multiple second working threads, each corresponding to a movement direction; processing module 1001 is specifically configured to use the second working thread to determine a candidate expansion node for the current node in the corresponding movement direction; processing module 1001 is specifically configured to use the second working thread to perform a validity check on the candidate expansion node, and determine the candidate expansion node as an expansion node if the candidate expansion node passes the validity check.
[0139] In one possible implementation, the processing module 1001 is further used to use the first working thread to use a vector load instruction to read raster data of multiple grids in the raster map from the memory, where the raster data includes: grid occupancy data and grid type data; the processing module 1001 is further used to use the first working thread to use a vector comparison instruction to update the raster data of the multiple grids in parallel based on the environmental data collected by the vehicle sensor to obtain an updated raster map.
[0140] In a possible implementation, the processing module 1001 is specifically configured to use the second working thread to perform validity detection on the candidate expansion nodes based on the grid data of each grid in the updated grid map.
[0141] In a possible implementation, the processing module 1001 is further configured to select an idle thread from a thread resource pool as a second working thread in response to using the first working thread to perform the reachability determination task; the thread resource pool includes a preset number of pre-created threads.
[0142] In one possible implementation, the processing module 1001 is further configured to use a third working thread to execute a task of replanning the remaining path in the parking path while the vehicle is traveling based on the parking path; and the processing module 1001 is further configured to use the first working thread to select the optimal remaining path from the new remaining path and the original remaining path after the new remaining path is planned.
[0143] In one possible implementation, processing module 1001 is specifically configured to, when a path replanning trigger condition is met, use a third worker thread to execute a task of replanning the remaining path in the parking path; wherein the parking path includes multiple path segments; and the path replanning trigger condition includes at least one of the following: the total length of the current path segment traveled by the vehicle is greater than a preset length; and the remaining distance of the current path segment is greater than a first length threshold.
[0144] In one possible embodiment, the processing module 1001 is also used to create a first object and a second object using a first working thread; the first object is associated with the second object, and the state of the first object is synchronized with the state of the second object; the processing module 1001 is also used to update the second object to a ready state using a third working thread after the third working thread plans a new remaining path.
[0145] In one possible implementation, processing module 1001 is further configured to, while the third working thread is executing the task of replanning the remaining path in the parking path, use the first working thread to determine the length of the remaining path and compare the length of the remaining path with a second length threshold. Processing module 1001 is further configured to, when the length of the remaining path is less than the second length threshold, control the third working thread, through the first working thread, to terminate the task of replanning the remaining path in the parking path.
[0146] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0147] Figure 11 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 11 As shown, electronic device 1100 includes, but is not limited to, a processor 1101 and a memory 1102. The memory 1102 is configured to store executable instructions for the processor 1101. It is understood that the processor 1101 is configured to execute instructions to implement the parking path planning method in the above embodiment.
[0148] It should be noted that those skilled in the art can understand that Figure 11 The electronic device structure shown in the figure does not limit the electronic device, and the electronic device may include Figure 11 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0149] The processor 1101 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 1102 and calling data stored in the memory 1102, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 1101 may include one or more processing units. Optionally, the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly handles wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1101.
[0150] Memory 1102 can be used to store software programs and various data. Memory 1102 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and application programs required by at least one functional module (such as a processing module or a storage module). Furthermore, memory 1102 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0151] In an exemplary embodiment, a computer-readable storage medium including instructions is further provided, such as a memory 1102 including instructions. The instructions can be executed by the processor 1101 of the electronic device 1100 to implement the parking path planning method in the above embodiment.
[0152] In actual implementation, Figure 10 The functions of the processing module 1001 in Figure 11 The processor 1101 in the embodiment calls the computer program stored in the memory 1102. The specific execution process can be referred to the description of the parking path planning method in the above embodiment, which will not be repeated here.
[0153] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0154] In an exemplary embodiment, the present application also provides a computer program product comprising one or more instructions, which can be executed by processor 1101 of electronic device 1100 to implement the parking path planning method described in the above embodiment. It should be noted that when the instructions in the computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, each of the processes of the above embodiment of the parking path planning method is implemented, and the same technical effects as those of the above embodiment of the parking path planning method are achieved. To avoid repetition, these details are not further described here.
[0155] Figure 12 A schematic diagram of the structure of a computer system of an electronic device is shown. Figure 12 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0156] like Figure 12As shown, the computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part into the random access memory (RAM), such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM. The CPU, ROM and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus. The I / O interface is used to implement functions such as data input, output, communication, and storage, and the storage function can be specifically implemented by removable media.
[0157] The following components are connected to the I / O interface: an input section including a keyboard, mouse, etc.; an output section including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section including a hard disk; and a communication section including a network interface card such as a LAN (Local Area Network) card and a modem. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc. are installed in the drive as needed so that computer programs read from them can be installed in the storage section as needed.
[0158] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication portion, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the system of the present application are executed.
[0159] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0160] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete the full classification or partial functions described above.
[0161] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0162] The units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the classified units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, or the entire classification part or part of the technical solution can be embodied in the form of a software product. The software product is stored in a storage medium and includes a number of instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute the entire classification part or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., various media that can store program code.
[0164] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A parking path planning method, characterized in that: The parking path planning method includes: Using a first working thread to perform a reachability determination task, the reachability determination task comprising: extracting a current node from an open set and determining whether the current node is reachable from a terminal node, the open set being a node set corresponding to the hybrid A-star algorithm; In the process of the first working thread performing the reachability determination task, using the second working thread to determine the extension node of the current node; When it is determined that the current node is unreachable from the termination node, using the first working thread to add the extended node to the open set; When it is determined that the current node is reachable from the end node, the first working thread is used to sequentially trace back parent nodes from the end node to the start node to obtain the parking path.
2. The parking path planning method according to claim 1, characterized in that: The parking path planning method further includes: After the first working thread completes the reachability determination task, if the second working thread fails to determine the extension node, the first working thread is blocked.
3. The parking path planning method according to claim 1, characterized in that: There are multiple second working threads, each second working thread corresponds to a movement direction; and determining the extended node of the current node using the second working thread includes: Determine, using the second working thread, a candidate expansion node of the current node in the corresponding movement direction; The second working thread is used to perform a validity check on the candidate extension node, and if the candidate extension node passes the validity check, the candidate extension node is determined to be the extension node.
4. The parking path planning method according to claim 3, characterized in that: The parking path planning method further includes: Using the first working thread to read raster data of a plurality of grids in the raster map from a memory using a vector load instruction, the raster data including: grid occupancy data and grid type data; The first working thread uses a vector comparison instruction to update the grid data of the multiple grids in parallel based on the environmental data collected by the vehicle sensor to obtain an updated grid map.
5. The parking path planning method according to claim 4, characterized in that: The using the second working thread to perform validity detection on the candidate extension node includes: The second working thread is used to perform validity detection on the candidate expansion node based on the grid data of each grid in the updated grid map.
6. The parking path planning method according to any one of claims 1 to 5, characterized in that: Before using the second working thread to determine the extended node of the current node, the parking path planning method further includes: In response to using the first working thread to execute the reachability determination task, an idle thread is selected from a thread resource pool as the second working thread; the thread resource pool includes a preset number of pre-created threads.
7. The parking path planning method according to claim 1, characterized in that: The parking path planning method further includes: During the process of the vehicle traveling along the parking path, using a third working thread to execute a task of replanning the remaining path in the parking path; After planning a new remaining path, the first working thread is used to select an optimal remaining path from the new remaining path and the original remaining path.
8. The parking path planning method according to claim 7, characterized in that: The step of using the third working thread to execute the task of replanning the remaining path in the parking path includes: When a path replanning trigger condition is met, using the third working thread to execute the task of replanning the remaining path in the parking path; Wherein, the parking path includes a plurality of path segments; The path replanning triggering condition includes at least one of the following: The total length of the current path segment of the vehicle is greater than a preset length; The remaining distance of the current path segment is greater than a first length threshold.
9. The parking path planning method according to claim 7, characterized in that: The parking path planning method further includes: Using the first working thread, a first object and a second object are created; the first object is associated with the second object, and a state of the first object is synchronized with a state of the second object; After the third worker thread plans a new remaining path, the third worker thread is used to update the second object to a ready state.
10. The parking path planning method according to claim 7, characterized in that: The parking path planning method further includes: During the process of the third working thread executing the task of replanning the remaining path in the parking path, using the first working thread to determine the length of the remaining path, and comparing the length of the remaining path with a second length threshold; When the length of the remaining path is less than a second length threshold, the first working thread controls the third working thread to end the task of replanning the remaining path in the parking path.
11. A parking path planning device, characterized in that: The parking path planning device includes: a processing module; The processing module is configured to use the first working thread to execute a reachability determination task, wherein the reachability determination task includes: extracting a current node from an open set and determining whether the current node is reachable from a terminal node; The processing module is further configured to use the second working thread to determine an extended node of the current node during the process in which the first working thread performs the reachability determination task; The processing module is further configured to, when it is determined that the current node is unreachable from the termination node, use the first working thread to add the extended node to the open set; The processing module is further configured to, when it is determined that the current node is reachable from the end node, use the first working thread to sequentially trace back parent nodes from the end node to the start node to obtain the parking path.
12. An electronic device, characterized in that: include: A processor and a memory; wherein the memory is used to store one or more programs, and the one or more programs include computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory, and the electronic device executes the parking path planning method according to any one of claims 1 to 10.
13. A vehicle, characterized in that: The vehicle includes the parking path planning device according to claim 11, and the vehicle is used to implement the parking path planning method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Systems and methods for optimizing route plans in an operating environment
CA3138062A1
Time window-based task segmentation multi-AGV path planning algorithm
CN110174111A
Parking path planning method and device, vehicle and storage medium
CN111301409A
Improved minimum path set searching method, device and equipment
CN114491887A
Path planning method and device and navigator
CN115451988A