Parking path planning method and device, electronic equipment and vehicle

By employing a multi-threaded parallel architecture and real-time environmental data updates, the problem of low efficiency and accuracy in assisted driving parking path planning was solved, achieving more efficient and accurate parking path planning.

CN120817067BActive Publication Date: 2025-12-09CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511324384.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-12-09
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

In existing technologies, the efficiency and accuracy of parking path planning for assisted driving are relatively low, especially in complex scenarios where planning failures are prone to occur, affecting the user experience.

Method used

A multi-threaded parallel architecture is adopted. The first worker thread performs the reachability judgment task, and the second worker thread determines the expansion node in parallel. When the node is unreachable, it is added to the open set. The grid map is updated in combination with real-time environmental data to perform validity detection and optimize path planning.

Benefits of technology

It improves the efficiency and accuracy of parking route planning, reduces planning time, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120817067B_ABST
    Figure CN120817067B_ABST
Patent Text Reader

Abstract

The application relates to a parking path planning method and device, electronic equipment and a vehicle, and relates to the technical field of path planning. At least the technical problem of low efficiency and poor accuracy of planning a parking path in the related art is solved. The method comprises the following steps: using a first working thread to execute an accessibility judgment task, the accessibility judgment task comprising: taking a current node from an open set, judging whether the current node is accessible to a termination node; using a second working thread to determine an extended node of the current node in the process of executing the accessibility judgment task by the first working thread; in the case that it is determined that the current node is not accessible to the termination node, using the first working thread to add the extended node to the open set; in the case that it is determined that the current node is accessible to the termination node, using the first working thread to backtrack parent nodes from the termination node to a starting node in sequence until the starting node is obtained, and a parking path is obtained. The application is used for improving the efficiency and accuracy of planning a parking path.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of path planning, in particular to a parking path planning method and device, electronic equipment and vehicle. BACKGROUND

[0002] With the rapid development of the vehicle industry, intelligentization, interconnection and full utilization of data resources have become new trends in the development of the vehicle industry. Path planning is a core module of an assisted driving parking system, and its task is to generate a collision-free trajectory from a starting pose to a target pose under the constraint of the surrounding environment. The trajectory not only needs to meet the kinematic constraints of the vehicle to ensure the traceability of the control system, but also needs to conform to the driving habits of the user to improve the comfort and naturalness of automatic parking.

[0003] However, in the related art, the basic idea of the planning algorithm based on geometric / motion model is to generate a segmented path (such as a combination of circular arcs and straight lines) based on the kinematic model of the vehicle and the geometric parameters of the parking space. Since this technology relies on fixed geometric rules, its adaptability in complex scenarios (such as narrow spaces and irregular parking spaces) is poor, and it is prone to planning failure. In another related technology, the planning algorithm based on sampling search generates a feasible path through heuristic search and outputs a parking trajectory. However, the path planning of this technology takes too long, resulting in delayed system response and affecting user experience. Therefore, the current efficiency of planning a parking path in assisted driving is low and the accuracy is poor. SUMMARY

[0004] The present application provides a parking path planning method, device, electronic equipment and vehicle to at least solve the technical problem of low efficiency and poor accuracy of planning a parking path in assisted driving in the related art. The technical solution of the present application is as follows:

[0005] According to a first aspect of the present application, a parking path planning method is provided, which includes: using a first worker thread to perform a reachability judgment task, the reachability judgment task including: taking out a current node from an open set, and judging whether the current node is reachable to a termination node; using a second worker thread to determine an extended node of the current node during the execution of the reachability judgment task by the first worker thread; in the case that it is determined that the current node is not reachable to the termination node, using the first worker thread to add the extended node to the open set; in the case that it is determined that the current node is reachable to the termination node, using the first worker thread to backtrack parent nodes from the termination node in turn until a starting node is obtained, and a parking path is obtained.

[0006] According to the above technical means, when planning the parking path, the first working thread can be used to perform the reachability judgment task to take out the current node from the open set and judge whether the current node is reachable to the termination node. Meanwhile, in the process of executing the reachability judgment task by the first working thread, the second working thread can be used to determine the expansion node of the current node in parallel. Thus, in the case of determining that the current node is not reachable to the termination node, the expansion node can be added to the open set to further select the current node from the open set and judge whether the node is reachable to the termination node. Thus, in the case of determining that the current node is reachable to the termination node, the parent node is backtracked from the termination node to the starting node in turn, and the parking path can be obtained. In this way, the first working thread and the second working thread perform different tasks in parallel without sequentially executing multiple tasks, and the efficiency of path planning in the parking path planning can be improved. Moreover, when determining that the current node is not reachable to the termination node, the expansion node is added to the open set to select other nodes from the expansion node as the current node again to further determine whether the current node is reachable to the termination node, so that the parking path can be accurately planned.

[0007] In a possible implementation, the parking path planning method further includes: after the first working thread completes the reachability judgment task, if the second working thread does not determine the expansion node, the first working thread is blocked.

[0008] According to the above technical means, after the first working thread judges the reachability of the current node, if the second working thread has not determined the expansion node, the first working thread can be temporarily blocked. In this way, the first working thread and the second working thread can perform different tasks in parallel. Thus, after the second working thread completes the node expansion task and adds the expansion node to the open set, the first working thread continues to take out another current node from the open set and performs the reachability judgment task, so that the first working thread and the second working thread can still perform tasks in parallel, thereby improving the efficiency of task execution.

[0009] In a possible implementation, the second working thread is multiple, and each second working thread corresponds to a movement direction; the above 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 validity detection on the candidate expansion node, and determining the candidate expansion node as the expansion node in the case that the candidate expansion node passes the validity detection.

[0010] According to the technical means, the current node can be expanded in multiple different motion directions by using multiple second working threads, so as to obtain candidate expansion nodes corresponding to different directions. The candidate expansion nodes can be detected for validity, and the candidate expansion nodes passing the validity detection can be used as expansion nodes. In this way, the node expansion can be performed in parallel by using multiple second working threads, so as to improve the efficiency of node expansion. In addition, the invalid nodes can be removed by detecting the validity of the candidate expansion nodes, so as to avoid adding the invalid nodes as expansion nodes to the open set. Therefore, the workload of selecting the current node from the open set for reachability judgment in the subsequent process can be avoided.

[0011] In a possible implementation, the parking path planning method further includes: using the first working thread to read, by using a vector loading instruction, the grid data of the multiple grids in the grid map from the memory, the grid data including: grid occupancy data and grid type data; and using the first working thread to update, by using a vector comparison instruction, the grid data of the multiple grids based on the environment data collected by the vehicle sensor in parallel, to obtain an updated grid map.

[0012] In a possible implementation, the validity detection of the candidate expansion node by using the second working thread includes: detecting, by using the second working thread, the validity of the candidate expansion node based on the grid data of each grid in the updated grid map.

[0013] According to the technical means, the grid data of the multiple grids in the grid map can be read from the memory by using the first working thread and a vector loading instruction, so as to update the grid data of the multiple grids based on the environment data collected by the vehicle sensor in parallel by using a vector comparison instruction, to obtain an updated grid map. In this way, the grid data of the grids in the grid map can be updated based on the real-time collected environment data, so as to ensure the accuracy of the grid map. Therefore, when the validity of the candidate expansion node is detected based on the grid data of each grid in the updated grid map, the validity of the candidate expansion node can be determined more accurately, and the accuracy of the planned path can be improved when the path is planned based on the accurate expansion node.

[0014] In a possible implementation, before the expansion node of the current node is determined by using the second working thread, the parking path planning method further includes: in response to the execution of the reachability judgment task by using the first working thread, selecting an idle thread from a thread resource pool as the second working thread; and the thread resource pool includes a preset number of threads created in advance.

[0015] According to the technical means, the preset number of threads can be created in the thread resource pool in advance, so that when the reachability judgment task is executed by the first working thread, an idle thread can be selected as the second working thread to expand the current node in parallel by the second working thread to obtain an expanded node. In this way, by creating a preset number of threads, it can be ensured that there is an idle thread to perform the node expansion task in parallel when performing the reachability judgment task, thereby ensuring the efficiency of path planning.

[0016] In a possible implementation, the parking path planning method further includes: during the driving of the vehicle based on the parking path, using a third working thread to execute a task of re-planning a remaining path in the parking path; after a new remaining path is planned, using the first working thread to select an optimal remaining path from the new remaining path and the original remaining path.

[0017] According to the technical means, the third working thread can be used to execute the task of re-planning the remaining path in the parking path again during the driving of the vehicle based on the planned parking path. After a new remaining path is planned, the optimal remaining path can be selected by comparing the new remaining path with the original remaining path for continuous driving. In this way, by re-planning the remaining path, it can be determined whether there is a more optimal parking path, so that parking can be performed based on the more optimal parking path.

[0018] In a possible implementation, the task of re-planning the remaining path in the parking path using the third working thread includes: using the third working thread to execute the task of re-planning the remaining path in the parking path when a path re-planning trigger condition is met; the parking path includes a plurality of path segments; the path re-planning trigger condition includes at least one of the following: a total length of a current path segment on which the vehicle is driving is greater than a preset length; a remaining distance of the current path segment is greater than a first length threshold.

[0019] According to the technical means, the third working thread can be used to execute the task of re-planning the remaining path in the parking path only when the path re-planning trigger condition is met. Since the planned parking path includes a plurality of path segments, for the current path segment on which the vehicle is currently driving, only when the total length of the current path segment is greater than the preset length and / or the remaining distance of the current path segment on which the vehicle is driving is greater than the first length threshold, the vehicle has enough time to re-plan the remaining path in the parking path during the driving of the current path segment. In this way, by setting the path re-planning trigger condition, invalid planning of the remaining path can be avoided, and the computing resources can be saved.

[0020] In a possible implementation, the parking path planning method further includes: creating, using the first work thread, a first object and a second object; 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 work thread plans the new remaining path, the second object is updated to a preparation state using the third work thread.

[0021] According to the technical means described above, the first object and the second object associated with the first object can be created using the first work thread, and the state of the first object is synchronized with the state of the second object. In this way, after the third work thread plans the new remaining path, the second object is updated to a preparation state using the third work thread. Thus, the first object and the second object can be used to compare the newly planned remaining path with the originally planned remaining path, and determine whether the remaining path needs to be adjusted.

[0022] In a possible implementation, the parking path planning method further includes: during execution of the task of replanning the remaining path in the parking path by the third work thread, determining, using the first work thread, a length of the remaining path, and comparing a size relationship between the length of the remaining path and a second length threshold; in a case where the length of the remaining path is less than the second length threshold, controlling, by the first work thread, the third work thread to end the task of replanning the remaining path in the parking path.

[0023] According to the technical means described above, the length of the remaining path and the second length threshold can be compared during execution of the task of replanning the remaining path in the parking path by the third work thread. Thus, in a case where the length of the remaining path is less than the second length threshold, it can be determined that the remaining path does not need to be replanned, and thus the third work thread is controlled to end the task of replanning the remaining path in the parking path. In this way, when the remaining path is relatively small, it indicates that the vehicle is about to complete parking, and thus the remaining path does not need to be replanned, thereby avoiding waste of computing resources.

[0024] According to a second aspect provided by the present application, a parking path planning device is provided, and the parking path planning device includes: a processing module; the processing module is configured to execute a reachability judgment task using a first work thread, and the reachability judgment task includes: taking out a current node from an open set, and judging whether the current node is reachable to a termination node; the processing module is further configured to determine, using a second work thread, an expansion node of the current node during execution of the reachability judgment task by the first work thread; the processing module is further configured to add, using the first work thread, the expansion node to the open set in a case where it is determined that the current node is not reachable to the termination node; and the processing module is further configured to obtain, using the first work thread, a parking path by backtracking parent nodes from the termination node to a start node in a case where it is determined that the current node is reachable to the termination node.

[0025] In a possible implementation, the processing module is further configured to, after the first work thread completes the reachability judgment task, block the first work thread if the second work thread does not determine the extended node.

[0026] In a possible implementation, the second work thread is a plurality of work threads, and each second work thread corresponds to a movement direction; the processing module is specifically configured to determine, by using the second work thread, a candidate extended node of the current node in the corresponding movement direction; and the processing module is specifically configured to perform, by using the second work thread, validity detection on the candidate extended node, and determine the candidate extended node as the extended node if the candidate extended node passes the validity detection.

[0027] In a possible implementation, the processing module is further configured to read, by using the first work thread, raster data of a plurality of grids in the raster map from the memory by using a vector load instruction, the raster data including raster occupancy data and raster type data; and the processing module is further configured to update, by using the first work thread, the raster data of the plurality of grids based on the environment data collected by the vehicle sensor by using a vector comparison instruction, to obtain an updated raster map.

[0028] In a possible implementation, the processing module is specifically configured to perform, by using the second work thread, validity detection on the candidate extended node based on the raster data of each grid in the updated raster map.

[0029] In a possible implementation, the processing module is further configured to, in response to performing the reachability judgment task by using the first work thread, select an idle thread from a thread resource pool as the second work thread; and the thread resource pool includes a preset number of threads created in advance.

[0030] In a possible implementation, the processing module is further configured to, during driving of the vehicle based on the parking path, perform, by using a third work thread, a task of replanning a remaining path in the parking path; and the processing module is further configured to, after planning a new remaining path, select, by using the first work thread, an optimal remaining path from the new remaining path and the original remaining path.

[0031] In a possible implementation, the processing module is specifically configured to, in a case where a path replanning trigger condition is met, perform, by using the third work thread, the task of replanning the remaining path in the parking path; and the parking path includes a plurality of path segments; and the path replanning trigger condition includes at least one of the following: a total length of a current path segment on which the vehicle is driving is greater than a preset length; and a remaining distance of the current path segment is greater than a first length threshold.

[0032] In a possible implementation, the processing module is further configured to create the first object and the second object using the first worker thread; 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; and the processing module is further configured to update the second object to the preparation state using the third worker thread after the third worker thread plans the new remaining path.

[0033] In a possible implementation, the processing module is further configured to determine a length of the remaining path using the first worker thread and compare the length of the remaining path with the second length threshold during execution of the third worker thread on the task of replanning the remaining path in the parking path; and the processing module is further configured to control the third worker thread to end the task of replanning the remaining path in the parking path by the first worker thread in a case where the length of the remaining path is less than the second length threshold.

[0034] According to a third aspect provided in the present application, an electronic device is provided, including a processor and a memory; the memory is configured to store one or more programs including computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, and the electronic device executes the method of the first aspect and any possible implementation thereof.

[0035] According to a fourth aspect provided in the present application, a computer readable storage medium is provided, when computer instructions stored in the computer readable storage medium are executed by a processor of an electronic device, the electronic device executes the method of the first aspect and any possible implementation thereof.

[0036] According to a fifth aspect provided in the present application, a computer program product is provided, the computer program product includes computer instructions, when the computer instructions are running on an electronic device, the electronic device executes the method of the first aspect and any possible implementation thereof.

[0037] According to a sixth aspect provided in the present application, a vehicle is provided, the vehicle includes the parking path planning device of the second aspect, and the vehicle is configured to implement the method of the first aspect and any possible implementation thereof.

[0038] It should be noted that the technical effects brought by any implementation of the second aspect to the sixth aspect can refer to the technical effects brought by the corresponding implementation of the first aspect, which will not be repeated here.

[0039] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application and, do not limit its scope.

[0041] Figure 1 is a structural schematic diagram of a parking path planning system according to an exemplary embodiment;

[0042] Figure 2 is a flow of a parking path planning method according to an exemplary embodiment Figure 1 ;

[0043] Figure 3 is a flow of a parking path planning method according to an exemplary embodiment Figure 2 ;

[0044] Figure 4 is a flow of a parking path planning method according to an exemplary embodiment Figure 3 ;

[0045] Figure 4 is a flow of a parking path planning method according to an exemplary embodiment Figure 5 ;

[0046] Figure 6 is a schematic diagram of node expansion according to an exemplary embodiment;

[0047] Figure 7 is a flow of a parking path planning method according to an exemplary embodiment Figure 5 ;

[0048] Figure 8 is a flow of a parking path planning method according to an exemplary embodiment Figure 6 ;

[0049] Figure 9 is a flow of a parking path planning method according to an exemplary embodiment Figure 7 ;

[0050] Figure 10 is a block diagram of a parking path planning device according to an exemplary embodiment;

[0051] Figure 11 is a block diagram of an electronic device according to an exemplary embodiment;

[0052] Figure 12 is a structural schematic diagram of a computer system of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] In order for the ordinary person skilled 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 drawings.

[0054] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0055] The parking path planning method provided by the embodiments of the present application can be applied to a parking path planning system. Figure 1 A structural schematic diagram of a parking path planning system is shown. As shown in Figure 1 The parking path planning system includes a sensor 11 and a processor 12.

[0056] The sensor 11 is used to collect environmental data of the position where the vehicle is located, and the processor 12 can include a plurality of working threads, which can process different tasks in parallel.

[0057] The parking path planning system can further include a memory, which is used to store an open set, and the open set is used to store expansion nodes.

[0058] In some embodiments, the processor 12 is configured to perform a reachability judgment task using a first working thread, and the reachability judgment task includes: taking out a current node from the open set, and judging whether the current node is reachable to a termination node.

[0059] The processor 12 is further configured to determine an expansion node of the current node using a second working thread in the process of executing the reachability judgment task by the first working thread.

[0060] The processor 12 is further configured to add the expansion node to the open set using the first working thread in the case that it is determined that the current node is not reachable to the termination node.

[0061] The processor 12 is further configured to perform a backtracking task using the first working thread in the case that it is determined that the current node is reachable to the termination node, and the backtracking task includes: starting from the termination node and sequentially backtracking parent nodes until a start node to obtain a parking path.

[0062] For ease of understanding, the parking path planning method provided by the present application will be specifically introduced below with reference to the drawings.

[0063] Figure 2is a flow chart of a parking path planning method according to an exemplary embodiment, applied to an electronic device, such as Figure 2 As shown in the figure, the parking path planning method includes the following S201-S205:

[0064] S201, using a first worker thread to execute a reachability judgment task.

[0065] The reachability judgment task includes: taking out the current node from the open set, and judging whether the current node is reachable to the termination node.

[0066] In the embodiments of the present application, the Hybrid A Star algorithm can be used to plan the parking path. The traditional Hybrid A Star algorithm uses an open set management mechanism based on a priority queue, and always expands the node with the lowest cost to ensure the progressive optimality of the solution. The core task is to judge whether the end point is reachable, and to expand the node. When it is determined that the end point is reachable, there is no need to expand the node. However, in actual situation, it takes tens of thousands of search iterations to find the node that the end point is reachable, so as to plan the parking path.

[0067] Therefore, it is considered whether the task of expanding the node can be decoupled, and another thread is used to calculate, so as to calculate the expanded node in advance, and when the end point is not reachable, the expanded node can be directly added to the open set.

[0068] Based on this, based on the Hybrid A Star algorithm, the parking path planning is decoupled into two tasks of end point reachability judgment and node expansion. That is, through the task decoupling parallel architecture, the key tasks are split, and the node processing flow is decoupled into two independent sub-tasks. The end point is judged whether it is reachable (for example, executed by the main thread, that is, the first worker thread) through the Reeds-Shepp curve analysis planning, and the node is expanded (executed by the worker thread, that is, the second worker thread). In this way, by using the parallel architecture of pre-execution and conditional submission, the first worker thread continuously performs the task of Reeds-Shepp analysis planning, and the second worker thread always asynchronously executes the task of node expansion.

[0069] In the embodiments of the present application, the logical flow of the hybrid A-star algorithm mainly includes the following steps. Step 1: a parking coordinate system is established with the selected target parking space, a grid map is divided into 360x360 grids, each grid has a size of 0.1m x 0.1m, and an initial grid map is obtained. Step 2: the obstacle coordinate information (also referred to as cluster, represented by many line segments) sensed by the sensor is converted into the grid map of the parking coordinate system, and any grid point with obstacle information projection can be marked as an occupied grid. Step 3: the current position of the vehicle is set as a start point, and the final attitude position of parking (i.e., the target parking space) is set as a termination point of the parking path planning. Step 4: the start point is put into an open set. Step 5: it is determined whether the open set is empty, and if the open set is empty, the entire path planning program ends, and if the open set is not empty, the subsequent process is continued. Step 6: the node with the minimum cost is selected from the open set as a current node. Step 7: it is determined whether the current node can be directly planned through a Reeds-Shepp curve to be directly connected to the termination point, and if the current node can be directly connected to the termination point, the path planning is successful; if the connection fails, the subsequent process is continued. Step 8: based on the current node, the current node corresponding to the extended node is expanded according to the kinematics of the vehicle, using different steering angles, driving directions (forward or reverse), and driving distances. Step 9: the cost of each extended node is determined, and the extended node is added to the open set.

[0070] In a possible implementation, the path of the Reeds-Shepp curve planning is composed of a straight line segment (S) and a circular arc segment (L / R, left turn / right turn), and collision detection must be performed in this process, and the nodes that fail to pass the collision detection are discarded, and the vehicle is allowed to switch between forward and reverse gears in the path planning.

[0071] In the embodiments of the present application, when the parking path planning is needed, the current position of the vehicle is first put into the open set as a start node, and then the current node is taken out from the open set, and it is determined whether the current node is reachable to the termination node. Since the initial open set is empty, after the current position of the vehicle is put into the open set as a start node, the open set only includes one start node, and at this time, the current node taken out from the open set is the current position of the vehicle (i.e., the start node).

[0072] In this way, based on the current position of the vehicle (i.e., the start node) and the selected target parking space (i.e., the termination node), the reachability between the current position of the vehicle (i.e., the start node) and the target parking space (i.e., the termination node) can be determined through the first work thread (for example, the main thread).

[0073] S202, in the process that the first working thread executes the reachability judgment task, using the second working thread to determine the extended node of the current node.

[0074] In the embodiment of the application, the first working thread and the second working thread can execute different tasks in parallel, so that in the process that the first working thread executes the reachability judgment task, the extended node of the current node can be determined in parallel by the second working thread.

[0075] In a possible implementation, after the extended node of the current node is determined, the cost of each extended node needs to be further determined. The cost of the extended node can be determined by the cost function f(n) shown in Formula One.

[0076]

[0077] wherein, represents the cost from the planning start point (i.e. the starting node) of the parking path to the current node, represents the estimated cost from the current node to the termination node, i.e. the dynamic distance from the current node to the termination node.

[0078] Specifically, the cost from the planning start point (i.e. the starting node) of the parking path to the current node can be calculated by Formula Two, and the estimated cost from the current node to the termination node can be calculated by Formula Three.

[0079]

[0080] wherein, represents the path length cost item weight; represents the distance from the planning start point (i.e. the starting node) of the parking path to the current node, which can be the Euclidean distance or the Manhattan distance; represents the gear shifting cost weight; represents the gear shifting cost; represents the search turning angle cost weight; represents the heading angle of the current vehicle body posture, represents the heading angle of the previous node vehicle body posture.

[0081] In some embodiments, 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 judgment task, selecting an idle thread from a thread resource pool as the second working thread; the thread resource pool includes a preset number of threads created in advance.

[0082] In a possible implementation, a certain number of threads can be created in advance in the thread resource pool, so as to avoid resource overhead caused by frequent creation and destruction of threads. This is because the creation and destruction of threads are relatively resource-consuming operations, which consume a large amount of system resources and time. Therefore, a certain number of threads are created in advance, and the threads included in the thread resource pool are reused, so as to reduce resource waste and improve system stability.

[0083] Therefore, when the current node needs to be expanded in parallel by the second worker thread to obtain an expanded node, an idle thread can be selected from the thread resource pool as the second worker thread to execute the node expansion task, so as to execute the task in parallel with the first worker thread.

[0084] In the embodiment of the application, a preset number of threads can be created in advance in the thread resource pool, so that when the reachability judgment task is executed by the first worker thread, an idle thread can be selected as the second worker thread to expand the current node in parallel by the second worker thread to obtain an expanded node. In this way, by creating a preset number of threads, it can be ensured that there is an idle thread to execute the node expansion task in parallel when the reachability judgment task is performed, so as to ensure the efficiency of path planning.

[0085] In some embodiments, after the first worker thread completes the reachability judgment task, if the second worker thread does not determine the expanded node, the first worker thread is blocked.

[0086] In a possible implementation, because the first worker thread and the second worker thread need to execute different tasks in parallel, when one worker thread (for example, the first worker thread) completes the corresponding task, the worker thread needs to be blocked to wait for the other worker thread (for example, the second worker thread) to complete the corresponding task.

[0087] For example, when the second worker thread completes the node expansion task, and the first worker thread does not complete the reachability judgment task on the current node, the second worker thread needs to be blocked to wait for the first worker thread to complete the reachability judgment task on the current node. In this way, when the next current node needs to be judged in the next stage, the reachability judgment task of the next current node can be continued to be executed by the first worker thread, and the node expansion task of the next current node can be executed in parallel by the second worker thread.

[0088] In the embodiments of the present application, after the first work thread determines the reachability of the current node, if the second work thread has not determined the extended node, the first work thread can be temporarily blocked. In this way, the first work thread and the second work thread can execute different tasks in parallel. Therefore, after the second work thread executes the task of node expansion and adds the extended node to the open set, the first work thread continues to take another current node from the open set and executes the reachability judgment task, so that the first work thread and the second work thread can still execute tasks in parallel, thereby improving the efficiency of task execution.

[0089] S203, determining whether the current node is reachable to the termination node.

[0090] S204, in the case of determining that the current node is not reachable to the termination node, using the first work thread to add the extended node to the open set.

[0091] In a possible implementation, when it is determined that the current node is reachable to the termination node, it means that the current node and the termination node can be connected by a path, so there is no need to add the extended node of the current node to the open set.

[0092] That is, the extended node generated by the second work thread can be added to the open set only when the path analysis planning of the first work thread fails (i.e., the current node is not reachable to the termination node), so as to be selected as the current node from the open set in the next stage.

[0093] In a possible implementation, before the extended node is added to the open set, collision detection can be performed on each extended node to determine whether the position corresponding to each extended node exists an obstacle, or whether there is an obstacle on the path of the vehicle driving to the extended node, so as to ensure that the vehicle will not collide with the obstacle when driving to the extended node. Therefore, the extended node that fails the collision detection needs to be discarded. That is, the extended node whose corresponding position exists an obstacle, or the extended node whose path to the extended node exists an obstacle.

[0094] In this way, after the extended node that fails the collision detection is discarded, the remaining extended node can be added to the open set.

[0095] Further, after the extended node of the current node is added to the open set, the next current node needs to be selected from the open set (at this time, the open set includes the newly added extended node, but does not include the selected node), and the reachability judgment task of the selected next current node is executed by using the first work thread, and the extended node of the next current node is determined by using the second work thread.

[0096] In a possible implementation, after selecting a node from the open set as the current node, the selected node needs to be removed from the open set.

[0097] In a possible implementation, for the extended node of the determined next current node, collision detection can still be performed, and the remaining extended nodes after collision detection can be added to the open set. In this way, the above process is repeatedly performed until the selected node (as the current node) from the open set is reachable from the termination node, and the path planning task can be ended to obtain the parking path.

[0098] S205, in a case where it is determined that the current node is reachable to the termination node, the first worker thread is used to backtrack the parent nodes from the termination node to the start node in sequence to obtain the parking path.

[0099] In this way, when it is finally determined that the current node is reachable to the termination node, the entire extended node between the start node and the termination node can be determined by backtracking the parent nodes from the termination node to the start node in sequence, so as to obtain the planned parking path.

[0100] In a complete embodiment, as shown in Figure 3 In the serial algorithm, based on the initialized grid map, the optimized grid map (for example, Grid A heuristic map or quadtree map) is obtained by converting the obstacles into a set of line segments, and then the start node is added to the open set. Based on this, firstly, it is judged whether the open set is empty. If the open set is empty, the path planning fails, and the path planning algorithm is exited. If the open set is not empty, the node with the lowest cost is taken out from the open set as the current node, and then the Reeds-Shepp connection termination node is called to determine whether the current node is reachable to the termination node. If it is determined that the current node is reachable to the termination node, the path planning is successful, and the path planning algorithm is exited. If the current node is not reachable to the termination node, the current node is extended to obtain a plurality of extended nodes, and the plurality of extended nodes are added to the open set. In this way, when the current node is not reachable to the termination node, the current node is reacquired from the open set to perform the path planning process again.

[0101] In another complete embodiment, as shown in Figure 4As shown, in the parallel algorithm, based on the initialized grid map, the optimized grid map (for example, Grid A heuristic map or quadtree map) is obtained by converting the obstacles into a line segment set, and then the starting node is added to the open set. Based on this, first, it is judged whether the open set is empty. If the open set is empty, the path planning fails, and the path planning algorithm is exited. If the open set is not empty, the node with the lowest cost is taken out from the open set as the current node, and then the Reeds-Shepp connection terminal node is called. Moreover, the current node is expanded to obtain a plurality of expansion nodes by another working thread in parallel, and the other working thread is blocked when the other working thread completes the task. Further, it is determined whether the current node is reachable to the terminal point. If it is determined that the current node is reachable to the terminal point, the path planning is successful, and the path planning algorithm is exited. If the current node is not reachable to the terminal point, the path planning fails, and the plurality of expansion nodes obtained need to be added to the open set. In this way, when the current node is not reachable to the terminal point, the current node is reacquired from the open set to perform the path planning process again.

[0102] In the embodiments of the present application, when the parking path is planned, the first working thread can be used to perform the reachability judgment task to take out the current node from the open set and judge whether the current node is reachable to the terminal node. Meanwhile, in the process of executing the reachability judgment task by the first working thread, the second working thread can be used to determine the expansion node of the current node in parallel. Thus, in the case of determining that the current node is not reachable to the terminal node, the expansion node can be added to the open set to further select the current node from the open set and judge whether the node is reachable to the terminal node. Thus, in the case of determining that the current node is reachable to the terminal node, the parent node is backtracked from the terminal node in turn until the starting node, that is, the parking path can be obtained. In this way, the first working thread and the second working thread are used to execute different tasks in parallel without sequentially executing a plurality of tasks, so that the efficiency of path planning in the parking path planning can be improved. Moreover, when it is determined that the current node is not reachable to the terminal node, the expansion node is added to the open set to select other nodes as the current node from the expansion node again, so as to further determine whether the current node is reachable to the terminal node, thereby accurately planning the parking path.

[0103] In some embodiments, the second working thread is a plurality, and each second working thread corresponds to one movement direction. Figure 5 As shown, the parking path planning method provided by the embodiments of the present application can specifically include S501-S502 in the step S202.

[0104] S501, in the process of executing the reachability judgment task by the first working thread, the second working thread is used to determine the candidate expansion node of the current node in the corresponding movement direction.

[0105] In a possible implementation, when the second worker thread is a plurality of threads, and each second worker thread corresponds to a movement direction, the candidate expansion node of the current node in the corresponding movement direction can be determined by one second worker thread, so that a plurality of candidate expansion nodes of the current node in a plurality of movement directions are obtained by a plurality of second worker threads.

[0106] In a possible implementation, when the second worker thread is one thread, the node expansion in a plurality of movement directions of the current node can be sequentially performed based on the one second worker thread, so that a plurality of candidate expansion nodes of the current node in a plurality of movement directions are obtained.

[0107] For example, as shown in FIG. 5, Figure 6 FIG. 5 is a schematic diagram of expanding nodes in a plurality of movement directions of the current node to obtain a plurality of candidate expansion nodes.

[0108] S502, performing validity detection on the candidate expansion node by using the second worker thread, and determining the candidate expansion node as an expansion node in a case where the candidate expansion node passes the validity detection.

[0109] In a possible implementation, the validity detection on the candidate expansion node can be collision detection on the candidate expansion node, to determine whether an obstacle exists at a position corresponding to each candidate expansion node, or whether an obstacle exists on a path of the vehicle to the candidate expansion node, so as to ensure that the vehicle does not collide with the obstacle when the vehicle travels to the candidate expansion node. Thus, the candidate expansion node that passes the validity detection is selected as the expansion node from the plurality of candidate expansion nodes.

[0110] In the embodiments of the present application, the current node can be expanded in a plurality of different movement directions by using a plurality of second worker threads, so as to obtain a plurality of candidate expansion nodes corresponding to different directions. Moreover, the validity detection can be performed on the candidate expansion node, so as to take the candidate expansion node that passes the validity detection as the expansion node. In this way, the node expansion is performed in parallel by using a plurality of second worker threads, so as to improve the efficiency of the node expansion. Moreover, the validity detection is performed on the expansion candidate expansion node, so as to remove the invalid node, and avoid adding the invalid node as the expansion node to the open set. Thus, the workload of selecting the current node from the open set for the reachability judgment in the subsequent process is avoided.

[0111] In some embodiments, as shown in FIG. 6, Figure 7As shown, the parking path planning method provided in the embodiments of the present application specifically can further include S701-S702, and the "validity detection of the candidate expansion node using the second working thread" in the above step S602 specifically can include S703:

[0112] S701, using a first working thread to read the grid data of a plurality of grids in the grid map from the memory using a vector loading instruction.

[0113] The grid data includes grid occupancy data and grid type data. The grid occupancy data is used to indicate whether the grid is occupied by an obstacle, and the grid type data indicates the type of the grid, such as an obstacle, a parking space, a road edge, etc.

[0114] Since the traditional grid map processing usually adopts a serial access mode for each grid, when processing a high-resolution grid map (such as a large-scale grid map in an autonomous driving scenario), there is a problem of low computational efficiency. Especially in application scenarios that need to detect multiple grid types (such as obstacles, parking spaces, road edges, etc.) at the same time, the serial processing mode is difficult to meet the real-time requirement.

[0115] Therefore, the embodiments of the present application propose a grid map parallel processing mode based on the ARM NEON instruction set, which realizes parallel access and processing of multiple grid data through the single instruction, multiple data (SIMD) technology.

[0116] Specifically, since the traditional method needs to access the occupancy value (i.e. grid occupancy data) and type value (i.e. grid type data) of each grid in the grid map one by one, it needs to perform multiple memory accesses and instruction executions. The optimization scheme using the NEON instruction set uses a special vector loading instruction to read the data of multiple grids (such as 4 grids, 6 grids, etc.) from continuous memory addresses at a time, so as to load multiple 32-bit integer values into a 128-bit vector register at the same time. This parallel loading mode fully utilizes the memory bandwidth of the processor, reduces the number of memory accesses, and significantly improves the data throughput efficiency.

[0117] S702, using a first working thread to update the grid data of a plurality of grids based on the environment data collected by the vehicle sensor using a vector comparison instruction, to obtain an updated grid map.

[0118] Further, since the traditional way needs to make multiple conditional judgments for each grid individually, a large number of repeated instructions and inefficient memory access are needed, which cannot meet the real-time processing requirements of high-resolution grid maps. However, through the vectorized comparison instruction provided by the NEON instruction set, the judgment results of multiple conditions are generated synchronously, and the comparison operation can be performed on multiple grid data at the same time.

[0119] Specifically, the comparison operation includes two key comparison operations: one is to perform the comparison between the grid occupancy data of multiple grids and the threshold in parallel to generate a mask vector representing the comparison result; the other is to perform the matching comparison between the grid type data of multiple grids and the target type in parallel to also generate a corresponding mask vector. These comparison operations are executed by a dedicated parallel arithmetic logic unit inside the processor, and multiple comparators work simultaneously in the same clock cycle. The operation of each channel is independent and accurate.

[0120] In one possible implementation, when performing the parallel occupancy threshold comparison, the vcgtq_s32 instruction can be used to compare the grid occupancy data of multiple grids with the corresponding threshold at one time to generate an obstacle detection mask. Each mask channel stores the comparison result of the corresponding grid (for example, 0xFFFFFFFF represents true (i.e., no obstacle), and 0x00000000 represents false (i.e., there is an obstacle)). Then, the parallel type matching is performed using the vceqq_s32 instruction to synchronously perform the matching of the grid type data of multiple grids and the target type to generate a mask corresponding to the type and occupancy.

[0121] Among them, the above operations can be completed in a single clock cycle and are synchronously executed by the parallel arithmetic logic unit (ALU) of the NEON architecture. Multiple comparators work independently and do not interfere with each other.

[0122] Further, mask fusion is needed. Since the target grid may satisfy multiple conditions at the same time (for example, a certain grid is both an occupancy obstacle and a road edge), multiple condition masks need to be merged into a unified valid grid identifier. If any condition is true, the mask bit of the corresponding grid channel is 1, marking the valid grid that needs to be further processed. The final output combined_mask mask value identifies all grid positions that satisfy any target condition.

[0123] In the embodiment of the present application, through an efficient result processing process, mask validity detection is performed, and whether the combined_mask contains valid grids is quickly judged through the vmaxvq_u32 instruction. If the mask is all zeros (indicating that there is an obstacle), subsequent processing can be skipped to avoid invalid calculation. If there is a valid bit, it indicates that the grid is not occupied by an obstacle, and the grid data extraction process can be entered. Thus, only the subsequent operations (such as coordinate calculation, type classification, etc.) on the valid grids marked by the mask are performed. When performing grid geographic coordinate calculation, the grid coordinates can be calculated according to the coordinate origin of the odometer coordinate system (ODOM) of the grid map and the grid row and column index. When performing multi-target classification processing, the specific condition type of the grid that meets the condition can be distinguished according to the original mask and classified. When performing high-confidence grid screening, the grid with high occupancy confidence is screened for collision detection in planning.

[0124] S703, using the second working thread, performing validity detection on the candidate expansion node based on the grid data of each grid in the updated grid map.

[0125] In a possible implementation, when performing path validity detection, whether the candidate expansion node is valid can be determined by judging whether the candidate expansion node will collide with obstacle information.

[0126] Specifically, parallel processing of node validity checking can be implemented through a thread pool. First, task decomposition is performed, the path validity checking of each candidate expansion node is encapsulated as an independent task, all possible next nodes of the current node are processed in parallel, the path generated by this node is tasked, the task is added to the task queue of the thread pool, and the std::future object of the checking result of each node is stored. Wait for all tasks to complete, and process the nodes with valid checking results. If the node is not in the open set, calculate its cost and add it to the open set and the priority queue.

[0127] Alternatively, an asynchronous processing flow is performed. After submitting the tasks of all the expansion nodes corresponding to the orientation, the future.get() blocking thread pool inside the task is used for each task, all checking tasks are synchronized, and only the valid nodes are retained.

[0128] In the embodiments of the present application, the present application can also use the first working thread to read the grid data of multiple grids in the grid map from the memory by using a vector load instruction, and update the grid data of the multiple grids in parallel based on the environment data collected by the vehicle sensor by using a vector comparison instruction, to obtain an updated grid map. In this way, by updating the grid data of the grids in the grid map based on the real-time collected environment data, the accuracy of the grid map can be ensured. Therefore, when detecting the effectiveness of the candidate expansion node based on the grid data of each grid in the updated grid map, the effectiveness of the candidate expansion node can be more accurately determined, and then based on the accurate expansion node, the accuracy of the planned path can be improved when planning the path.

[0129] In some embodiments, as shown in FIG. 8, Figure 8 The parking path planning method provided by the embodiments of the present application can further include S801-S802.

[0130] S801, during the driving of the vehicle based on the parking path, a third working thread is used to perform the task of replanning the remaining path of the parking path.

[0131] In the embodiments of the present application, an asynchronous dynamic planning mechanism can also be performed, so that the remaining path can be further replanned during parking based on the planned parking path. This is because in the assisted driving parking scenario, due to the measurement accuracy limitation and detection blind area of the sensor (radar and camera), the obstacle information can appear in the following situations: some obstacle information cannot be detected during initial planning; the obstacle position deviation is large, which means that as the vehicle moves, when the sensor obtains a better observation angle and distance, the obstacle can be detected again or the position information is corrected. Therefore, under the traditional synchronous planning mechanism, the previously planned parking path is easily affected by the real-time updated obstacle information and cannot complete parking. Therefore, it is necessary to reinitiate the planning of the parking path to obtain a better parking path to replace the original path.

[0132] In a possible implementation, when replanning the remaining path of the parking path, the following requirements (i.e., path replanning triggering conditions) need to be met: real-time requirement, timeout management requirement, and resource constraint requirement. The real-time requirement is used to indicate that the planning thread must avoid blocking the main control cycle (for example, 20ms, 40ms), the timeout management requirement is used to indicate that when the vehicle has completed the current path segment, the unfinished planning thread needs to be terminated in time, and the resource constraint requirement is used to indicate that it is necessary to prevent resource overload of a low-computing-power domain controller caused by frequent planning requests.

[0133] In some embodiments, the task of re-planning the remaining path in the parking path is performed using a third worker thread, including: in the case that the path re-planning trigger condition is met, the task of re-planning the remaining path in the parking path is performed using the third worker thread.

[0134] The path re-planning trigger condition includes at least one of: a total length of the current path segment traveled by the vehicle is greater than a preset length; and a remaining distance of the current path segment is greater than a first length threshold.

[0135] In a possible implementation, path screening is further needed to initiate planning for the forward gear path with a length exceeding a certain length (i.e., the total length of the current path segment is greater than the preset length). This is because if the current path segment is too short (less than the preset length), re-planning the path is meaningless, and instead increases resource consumption. In addition, the one-time principle needs to be met, and each path segment is only allowed to initiate a dynamic planning request once, and the remaining path is re-planned.

[0136] In some embodiments, the parking path planning method provided by the embodiments of the present application can further include: creating a first object and a second object using a first worker 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; and after the third worker thread plans a new remaining path, the second object is updated to a ready state using the third worker thread.

[0137] In a possible implementation, when re-planning the remaining path in the parking path, a Promise / Future model can be used to achieve non-blocking planning. First, the current path segment represents the path point of the vehicle traveling to the next gear shift point at the current gear. When the vehicle travels to the midpoint of the current path segment (half of the current path segment), a dynamic planning request can be initiated to another thread (i.e., a dynamic planning thread), and a promise object (i.e., a first object) is created, and a future object (i.e., a second object) is obtained from the promise object. The dynamic planning thread is required to assign a value to the future object after completing the planning.

[0138] Further, state monitoring is needed, and the first worker thread periodically checks the state of the future object (whether it is ready or not ready).

[0139] In a possible implementation, resources can also be released based on a forced exit condition and timeout management. Based on a termination condition (e.g., the remaining distance of the current path segment is less than the first length threshold), it is determined that the dynamic planning path is not ready, and the remaining path cannot be re-planned.

[0140] Specifically, the first working thread checks the planning return state of the dynamic planning thread in real time in each task cycle, and processes according to the following rules: remaining path checking, checking the length of the remaining path in each task cycle, if the length of the remaining path is less than the first length threshold, regardless of whether the dynamic planning is completed, the dynamic planning process is forcibly ended. In this way, even in the extreme case that the dynamic planning is not successful, it will not cause blockage to normal tracking and subsequent path shifting and switching operations.

[0141] In the embodiments of the present application, the first working thread can be used to create an associated first object and a second object, and the state of the first object is synchronized with the state of the second object. In this way, after the third working thread plans a new remaining path, the second object is updated to a preparation state using the third working thread. Thus, based on the first object and the second object, the newly planned remaining path and the originally planned remaining path can be compared to determine whether the remaining path needs to be adjusted.

[0142] In the embodiments of the present application, the third working thread is used to perform the task of re-planning the remaining path in the parking path only when the path re-planning trigger condition is met. This is because the planned parking path includes multiple path segments. For the current path segment currently traveled by the vehicle, only when the total length of the current path segment is greater than the preset length and / or the remaining distance of the current path segment traveled by the vehicle is greater than the first length threshold, the vehicle has enough time to re-plan the remaining path in the parking path during the process of traveling the current path segment. In this way, by setting the path re-planning trigger condition, invalid planning of the remaining path can be avoided, and the calculation resources can be saved.

[0143] S802, after planning a new remaining path, using the first working thread to select the optimal remaining path from the new remaining path and the original remaining path.

[0144] In a possible implementation, when the dynamic planning state is ready, a new remaining path obtained by re-planning the remaining path is obtained, and the new remaining path is compared with the original remaining path. Considering factors such as the hop distance from the termination node, the number of gear shifts, and the length of the path, the new remaining path and the original remaining path are selected. In this way, if the new remaining path is better, the path is trimmed and spliced, thereby realizing the function of dynamically planning a new path for the vehicle during travel.

[0145] In the embodiments of the present application, the third work thread can be used again to perform the task of re-planning the remaining path of the parking path during the process that the vehicle travels based on the planned parking path. After the new remaining path is planned, the new remaining path and the original remaining path are compared to select the optimal remaining path for continuing to travel. In this way, by re-planning the remaining path, it can be determined whether there is a more optimal parking path, so that parking can be performed based on the more optimal parking path.

[0146] In some embodiments, the method for planning a parking path provided by the embodiments of the present application can further include: during the process that the third work thread performs the task of re-planning the remaining path of the parking path, using the first work thread to determine the length of the remaining path and compare the length of the remaining path with the second length threshold; and in the case that the length of the remaining path is less than the second length threshold, using the first work thread to control the third work thread to end the task of re-planning the remaining path of the parking path.

[0147] In the embodiments of the present application, the third work thread can be used again to perform the task of re-planning the remaining path of the parking path during the process that the vehicle travels based on the planned parking path. After the new remaining path is planned, the new remaining path and the original remaining path are compared to select the optimal remaining path for continuing to travel. In this way, by re-planning the remaining path, it can be determined whether there is a more optimal parking path, so that parking can be performed based on the more optimal parking path.

[0148] For example, Figure 9In the process of dynamically planning a new path, the first worker thread controls the vehicle to park based on the planned parking path. When the vehicle travels to the current path segment, the first worker thread determines whether the length of the current path segment is greater than a preset length. If the length of the current path segment is not greater than the preset length, it is determined that a new path does not need to be dynamically planned (i.e., the remaining path does not need to be re-planned). If the length of the current path segment is greater than the preset length, it is further determined whether the remaining distance of the vehicle in the current path 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 path does not need to be dynamically planned. If the remaining distance is greater than the first length threshold, it is determined whether the first worker thread has initiated a task of dynamically planning a new path. If the first worker thread has initiated the task of dynamically planning a new path, it is determined that a new path does not need to be dynamically planned. If the first worker thread has not initiated the task of dynamically planning a new path, the first worker thread initiates the task of dynamically planning a new path. The first worker thread creates a promise object and a future object, and starts a dynamic planning thread to re-plan the remaining path. Then, it is determined whether the remaining path is re-planned. When the remaining path is re-planned, the future object is assigned a value and returns a ready state, thereby completing the re-planning of the remaining path. When the remaining path is not re-planned, the dynamic planning thread needs to be continuously waited for to plan the remaining path, and a not ready state is returned. In this process, it is further determined whether the remaining distance of the current path segment is less than the first length threshold. If the remaining distance of the current path segment is less than the first length threshold, the task of dynamically planning a new path needs to be terminated, and the state of whether the task of dynamically planning a new path has been initiated is adjusted to true. Then, it is further determined whether the first worker thread has 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 state of the future object is a ready state. When it is determined that the state of the future object is not a ready state (i.e., a not ready state), the first worker thread continues to control the vehicle to travel based on the original remaining path. When it is determined that the state of the future object is a ready state, the first worker thread evaluates the new remaining path and the original remaining path based on parameters such as the distance from the termination node and the number of gear shifts. It is determined which of the new remaining path and the original remaining path is the optimal remaining path. If the new remaining path is optimal, the first worker 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 worker thread continues to control the vehicle to travel based on the original remaining path.

[0149] The above describes the solutions provided by the embodiments of the present application from the method aspect. To implement the above functions, the parking path planning apparatus or the electronic device comprises hardware structures and / or software modules corresponding to the functions. Those skilled in the art should easily realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0150] The embodiments of the present application can divide the parking path planning apparatus or the electronic device into functional modules according to the above method. For example, the parking path planning apparatus or the electronic device can comprise functional modules corresponding to each function division, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. Actual implementation can have another division manner.

[0151] Figure 10 is a block diagram of a parking path planning apparatus according to an exemplary embodiment. Referring to Figure 10 The parking path planning apparatus 1000 comprises a processing module 1001. The processing module 1001 is configured to execute an accessibility judgment task using a first work thread. The accessibility judgment task comprises: taking out a current node from an open set, and judging whether the current node is accessible to a termination node. The processing module 1001 is further configured to determine an expansion node of the current node using a second work thread in the process that the first work thread executes the accessibility judgment task. The processing module 1001 is further configured to add the expansion node to the open set using the first work thread in the case that it is determined that the current node is not accessible to the termination node. The processing module 1001 is further configured to obtain a parking path by backtracking parent nodes from the termination node to a start node in sequence using the first work thread in the case that it is determined that the current node is accessible to the termination node.

[0152] In a possible implementation, the processing module 1001 is further configured to block the first work thread if the second work thread does not determine the expansion node after the first work thread completes the accessibility judgment task.

[0153] In a possible implementation, the second work thread is multiple, and each second work thread corresponds to a movement direction; the processing module 1001 is specifically configured to determine, using the second work thread, a candidate expansion node of the current node in the corresponding movement direction; and the processing module 1001 is specifically configured to perform validity detection on the candidate expansion node using the second work thread, and determine the candidate expansion node as an expansion node in a case where the candidate expansion node passes the validity detection.

[0154] In a possible implementation, the processing module 1001 is further configured to read, using the first work thread, raster data of multiple grids in the raster map from the memory by using a vector loading instruction, the raster data including raster occupancy data and raster type data; and the processing module 1001 is further configured to update, using the first work thread, the raster data of the multiple grids based on the environment data collected by the vehicle sensor by using a vector comparison instruction, to obtain an updated raster map.

[0155] In a possible implementation, the processing module 1001 is specifically configured to perform validity detection on the candidate expansion node based on the raster data of each grid in the updated raster map using the second work thread.

[0156] In a possible implementation, the processing module 1001 is further configured to select, in response to performing the reachability judgment task using the first work thread, an idle thread from a thread resource pool as the second work thread; and the thread resource pool includes a preset number of threads created in advance.

[0157] In a possible implementation, the processing module 1001 is further configured to perform, using a third work thread, a task of replanning a remaining path in the parking path during driving of the vehicle based on the parking path; and the processing module 1001 is further configured to select, using the first work thread, an optimal remaining path from the new remaining path and the original remaining path after planning the new remaining path.

[0158] In a possible implementation, the processing module 1001 is specifically configured to perform, using the third work thread, the task of replanning the remaining path in the parking path in a case where a path replanning trigger condition is met; and the parking path includes multiple path segments; and the path replanning trigger condition includes at least one of the following: a total length of a current path segment in which the vehicle is driving is greater than a preset length; and a remaining distance of the current path segment is greater than a first length threshold.

[0159] In a possible implementation, the processing module 1001 is further configured to create a first object and a second object using the first worker thread; 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; and the processing module 1001 is further configured to update the second object to a preparation state using the third worker thread after the third worker thread plans a new remaining path.

[0160] In a possible implementation, the processing module 1001 is further configured to determine a length of the remaining path using the first worker thread, and compare the length of the remaining path with a second length threshold during a process in which the third worker thread performs a task of replanning the remaining path in the parking path; and the processing module 1001 is further configured to control the third worker thread to end the task of replanning the remaining path in the parking path by the first worker thread in a case where the length of the remaining path is less than the second length threshold.

[0161] As to the apparatus in the above-mentioned embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0162] Figure 11 is a block diagram of an electronic device according to an example embodiment. As shown in Figure 11 the 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 of the processor 1101. It can be understood that the processor 1101 is configured to execute the instructions to implement the parking path planning method in the above-mentioned embodiments.

[0163] It should be noted that those skilled in the art can understand, Figure 11 the electronic device structure shown in the above-mentioned embodiments does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than Figure 11 shown, or combine certain components, or have a different arrangement of components.

[0164] The processor 1101 is the control center of the electronic device, connects all parts of the electronic device through various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 1102 and calling data stored in the memory 1102, thereby overall monitoring the electronic device. The processor 1101 can include one or more processing units. Optionally, the processor 1101 can 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 processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1101.

[0165] The memory 1102 can be used to store software programs and various data. The memory 1102 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function module (such as a processing module, a storage module, etc.), and the like. In addition, the memory 1102 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0166] In an example embodiment, a computer readable storage medium including instructions, for example, the memory 1102 including instructions, is also provided, and 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.

[0167] In actual implementation, Figure 10 The functions of the processing module 1001 in the above embodiment can be implemented by Figure 11 The processor 1101 in the above embodiment can call the computer program stored in the memory 1102 to implement. The specific execution process can refer to the description of the parking path planning method in the above embodiment, and will not be described here.

[0168] Alternatively, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0169] In an example embodiment, the embodiment of the present application also provides a computer program product including one or more instructions, which can be executed by the processor 1101 of the electronic device 1100 to complete the parking path planning method in the above embodiment. It should be noted that the instructions in the above computer readable storage medium or the one or more instructions in the computer program product are executed by the processor of the electronic device to realize each process of the above parking path planning method embodiment, and can achieve the same technical effect as the above parking path planning method. To avoid repetition, it will not be described here.

[0170] Figure 12 A structural schematic diagram of a computer system of an electronic device is shown. It should be noted that Figure 12 The computer system of the electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0171] As Figure 12As shown, the computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) or loaded from a storage section into a random access memory (RAM), such as performing the methods in the above-described embodiments. In the RAM, various programs and data required for the operation of the system are also stored. The CPU, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus. The I / O interface is used to implement functions of input, output, communication, storage, and the like of data, and the storage function can be implemented by a detachable medium, for example.

[0172] Connected to the I / O interface are an input section including a keyboard, a mouse, and the like; an output section including a display device such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage section including a hard disk, and the like; and a communication section including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as necessary. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive as necessary, so that a computer program read therefrom is installed into the storage section as necessary.

[0173] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), various functions defined in the system of the present application are performed.

[0174] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disk read-only memory (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, the computer-readable signal medium can include a data signal propagating in a baseband or as a carrier wave in a propagated data signal, in which the computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit programs for use by or in connection with an instruction execution system, device or component. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.

[0175] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete the full classification part or part of the functions described above.

[0176] In several embodiments provided in the present 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 only illustrative, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.

[0177] The units described as separate components may or may not be physically separate, and the components displayed as units may be a physical unit or multiple physical units, that is, may be located in one place, or also can be distributed to multiple different places. Part or all of the classified units can be selected according to actual needs to achieve the purpose of the embodiment scheme. In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0178] If the integrated unit is realized 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 solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole classification or part of the technical solutions 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 making a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk and various program code storage media.

[0179] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A parking path planning method, characterized in that, The parking route planning method includes: The first worker thread is used to perform the reachability determination task, which includes: retrieving the current node from the open set and determining whether the current node is reachable from the terminal node. The open set is the set of nodes corresponding to the hybrid A* algorithm. During the process of the first worker thread performing the reachability determination task, the second worker thread is used to determine the extended nodes of the current node; If it is determined that the current node is unreachable from the termination node, the first worker thread is used to add the extended node to the open set; If it is determined that the current node is reachable from the termination node, the first worker thread is used to backtrack from the termination node back to the starting node to obtain the parking path. During the vehicle's journey based on the parking path, a third worker thread is used to execute the task of replanning the remaining paths in the parking path; After the new remaining path is planned, the first worker thread is used to select the optimal remaining path from the new remaining path and the original remaining path.

2. The parking path planning method according to claim 1, characterized in that, The parking path planning method also includes: If the second working thread fails to identify the extended node after the first working thread completes the reachability determination task, the first working thread will be blocked.

3. The parking path planning method according to claim 1, characterized in that, There are multiple second worker threads, each corresponding to a movement direction; the step of using the second worker threads to determine the extended node of the current node includes: The second worker thread is used to determine the candidate expansion nodes of the current node in the corresponding motion direction; The second worker thread is used to perform a validity check on the candidate expansion node, and if the candidate expansion node passes the validity check, the candidate expansion node is determined to be the expansion node.

4. The parking path planning method according to claim 3, characterized in that, The parking path planning method also includes: The first worker thread uses vector loading instructions to read raster data of multiple rasters in the raster map from memory. The raster data includes: raster occupancy data and raster type data. Using the first working thread and employing vector comparison instructions, the raster data of the multiple grids are updated in parallel based on the environmental data collected by the vehicle sensors to obtain the updated raster map.

5. The parking path planning method according to claim 4, characterized in that, The step of using the second worker thread to perform validity checks on the candidate expansion nodes includes: The second worker thread performs validity checks on the candidate expansion nodes based on the raster data of each raster in the updated raster map.

6. The parking path planning method according to any one of claims 1-5, characterized in that, Before using the second worker thread to determine the extended node of the current node, the parking path planning method further includes: In response to using the first worker thread to perform the reachability determination task, an idle thread is selected from the thread resource pool as the second worker 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 task of using the third worker thread to execute the replanning of the remaining paths in the parking path includes: If the route replanning trigger condition is met, the third worker thread is used to execute the task of replanning the remaining routes in the parking route; 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 traveled by the vehicle is greater than the preset length; The remaining distance of the current path segment is greater than the first length threshold.

8. The parking path planning method according to claim 1, characterized in that, The parking path planning method also includes: The first worker thread is used 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 worker thread plans out a new remaining path, the second object is updated to a ready state using the third worker thread.

9. The parking path planning method according to claim 1, characterized in that, The parking path planning method also includes: During the process of the third worker thread executing the task of replanning the remaining path in the parking path, the first worker thread is used to determine the length of the remaining path and compare the length of the remaining path with the size of a second length threshold. If the length of the remaining path is less than the second length threshold, the first working thread controls the third working thread to terminate the task of replanning the remaining path in the parking path.

10. A parking path planning device, characterized in that, The parking path planning device includes: a processing module; The processing module is used to execute a reachability determination task using a first worker thread. The reachability determination task includes: retrieving the current node from the open set and determining whether the current node is reachable from the termination node. The processing module is further configured to use a second working thread to determine the extended node of the current node during the process of the first working thread performing the reachability determination task; The processing module is further configured to add the extended node to the open set using the first worker thread if it is determined that the current node is unreachable from the termination node. The processing module is further configured to, when it is determined that the current node to the termination node is reachable, use the first working thread to backtrack the parent nodes sequentially from the termination node to the starting node to obtain the parking path; The processing module is also used to use a third working thread to perform the task of replanning the remaining path in the parking path during the process of the vehicle driving based on the parking path. The processing module is further configured to, after planning a new remaining path, use the first worker thread to select the optimal remaining path from the new remaining path and the original remaining path.

11. An electronic device, characterized in that, include: A processor and a memory; wherein the memory is used to store one or more programs, the one or more programs including computer-executable instructions, and 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-9.

12. A vehicle, characterized in that, The vehicle includes the parking path planning device as described in claim 10, and the vehicle is used to implement the parking path planning method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Parking path planning method and device, vehicle and storage medium

    CN111301409A