A parking control method and device, vehicle and medium

By using a grid map for global path planning when the vehicle is static and a quadtree map for real-time collision detection when the vehicle is moving, the real-time performance and accuracy issues of path planning on low-computing-power chips are solved, and efficient parking control is achieved.

CN120942296BActive Publication Date: 2025-12-23CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511477964.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2025-12-23
Estimated Expiration
2045-10-16

AI Technical Summary

Technical Problem

Existing search-based path planning algorithms struggle to achieve real-time performance and accuracy on low-computing-power chips, resulting in poor parking safety and path planning effectiveness, and thus cannot be effectively ported to low-computing-power chips such as embedded MCUs.

Method used

A grid map is used for global path planning, and a quadtree map is used for real-time collision detection. By alternating between the two types of maps, the path planning algorithm can be efficiently utilized on low-computing-power chips, ensuring that the path matches the environment and reducing resource consumption.

Benefits of technology

It improves the accuracy and feasibility of path planning, avoids collisions, significantly enhances parking safety and user experience, and optimizes parking control efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120942296B_ABST
    Figure CN120942296B_ABST
Patent Text Reader

Abstract

The application relates to the parking technical field and discloses a parking control method, a parking control device, a vehicle and a medium, the method comprising the following steps: in response to a parking operation of a user, determining a target parking space of a vehicle, obtaining current environment information of the vehicle, and updating the current environment information to a grid map; based on a searched path planning algorithm, performing path planning on the updated grid map, and generating a parking path from an initial position of the vehicle to the target parking space; in response to the parking path being released, controlling the vehicle to track the parking path; in the movement process of the vehicle, updating the obtained current environment information to a quadtree map, and performing collision detection on the parking path based on the updated quadtree map; based on a collision detection result, controlling the vehicle to park into the target parking space; through the alternative use of the grid map and the quadtree map, not only is the environment adaptability of the parking path ensured, resource consumption is reduced, collision accidents are avoided, and the safety and effectiveness of the parking control are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of parking technology, specifically to a parking control method, device, vehicle, and medium. Background Technology

[0002] With the increasing number of vehicles, automatic parking can effectively solve the parking problem, and path planning is a crucial step in automatic parking. Currently, there are many path planning methods, such as the commonly used traditional hybrid A* algorithm based on search. This type of search-based path planning algorithm can search for the required parking path for various parking scenarios.

[0003] However, such algorithms require online solution of vehicle dynamics models, resulting in high computational complexity and reliance on GPU (Graphics Processing Unit) acceleration. Furthermore, when expanding nodes for path planning, high-precision grid discretization can easily lead to node explosion, significantly increasing the number of nodes that need to be stored in the map and thus resulting in large memory consumption. In addition, floating-point operations rely on FPU (Floating-Point Unit) hardware, making it impossible for low-computing-power MCU (Microcontroller Unit) to meet the requirements for fast real-time response.

[0004] Therefore, for low-computing-power chips, such as embedded MCUs and entry-level SoCs (System on Chip), it is difficult to ensure the real-time performance, path feasibility, and obstacle avoidance capabilities of parking strategies based on search-based path planning algorithms under strict computing resource constraints such as CPU (Central Processing Unit) and memory limitations. This seriously affects the safety of parking and the effectiveness of path planning, making such algorithms unportable to these chips. Summary of the Invention

[0005] This invention provides a parking control method, device, vehicle, and medium to address the problem that existing technologies using search-based path planning algorithms are limited by computation time and resources, making it difficult to effectively utilize low-computing-power chips, resulting in poor real-time performance and accuracy of path planning, which in turn seriously affects parking safety.

[0006] In a first aspect, the present invention provides a parking control method, the method comprising:

[0007] In response to the user's parking operation, determine the target parking space for the vehicle, obtain the vehicle's current environmental information, and update the current environmental information to the grid map;

[0008] Search-based path planning algorithms use an updated grid map to plan paths and generate parking paths from the vehicle's initial position to the target parking space.

[0009] In response to the release of the parking path, control the vehicle to follow the parking path;

[0010] During the vehicle's movement, the acquired current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map;

[0011] Based on the collision detection results, control the vehicle to park in the target parking space;

[0012] Specifically, when the collision detection result indicates a collision risk along the parking path, the system controls the vehicle to park in the target parking space based on the collision detection result, including:

[0013] Determine the instantaneous position of the vehicle and the instantaneous path point corresponding to the instantaneous position on the parking path;

[0014] The starting point of the path is determined based on the instantaneous waypoint and the parking path, and the path from the starting point to the target parking space is planned to generate the planned path;

[0015] By combining the planned path with the original path, a new parking path is obtained; the original path includes the path from the vehicle's initial position to the instantaneous path point in the parking path.

[0016] The system controls the vehicle to track the new parking path and, during the vehicle's movement, performs steps to update the acquired current environmental information to the quadtree map and conduct collision detection on the parking path based on the updated quadtree map.

[0017] This invention utilizes a grid map for global path planning when the vehicle is static and a quadtree map for real-time collision detection when the vehicle is in motion. By alternating between these two map types, the search-based path planning algorithm can be efficiently utilized on low-computing-power chips. This ensures a high degree of matching between the parking path and the current environment, thereby reducing resource consumption and significantly improving the accuracy and feasibility of path planning. It also avoids collisions, significantly enhancing parking safety and further optimizing user experience and parking control efficiency. Furthermore, when the collision detection result indicates a collision risk to the parking path, a dynamic path planning method is designed to address low-risk collision scenarios where the risk index value does not exceed a preset risk threshold. This method proactively optimizes potentially risky road segments from the instantaneous point to the target parking space, avoiding the risk accumulation that might result from direct passage through low-risk areas. It also specifically plans to bypass low-risk areas in the original path, ensuring that the vehicle always travels on a safe and controllable path, further solidifying the foundation of parking safety.

[0018] In one optional implementation, controlling the vehicle to park in the target parking space based on the collision detection result includes:

[0019] When the collision detection result indicates that there is a collision risk in the parking path, the path after the target collision point in the parking path is cut off, and the vehicle is stopped when it moves close to the target collision point. And / or, the process returns to the step of obtaining the current environmental information of the vehicle and updating the current environmental information to the grid map until the vehicle is parked in the target parking space.

[0020] When a potential collision point is identified in the parking path by collision detection, the present invention immediately cuts off the path after that point, thus avoiding collision damage caused by the vehicle continuing to travel along that path. When the vehicle moves to the collision point or within a safe distance before the collision point, it is forced to stop or does not stop but requires path replanning, further eliminating the possibility of vehicle collision. At the same time, after stopping, corresponding operations can be performed according to user needs, or environmental information can be reacquired and updated to the grid map, ensuring that subsequent path planning is based on the latest environmental data, thereby improving the safety, effectiveness and robustness of parking control in complex dynamic environments.

[0021] In one alternative implementation, collision detection of the parking path is performed based on the updated quadtree map, including:

[0022] Obtain the vehicle model and determine the current path matching point of the vehicle on the parking path;

[0023] Starting from the current path matching point, select a preset number of path points forward on the parking path as the points to be detected;

[0024] The vehicle model is projected sequentially onto each detection point, and the vehicle profile at the corresponding detection point is calculated.

[0025] Recursively query the updated quadtree map, sequentially obtain the node corresponding to each point to be detected in the quadtree map, and determine whether each node intersects with the corresponding vehicle outline.

[0026] If the current node intersects with the corresponding vehicle outline, and the area represented by the current node is marked as occupied, then the collision detection result is determined to be a collision risk in the parking path, and the detection point corresponding to the current node is taken as the target collision point.

[0027] This invention employs a forward path pre-detection mechanism that selects a preset number of path points from the current path matching point for detection. This mechanism can identify potential collision risks in advance, allowing sufficient time for the vehicle to adjust its path. By projecting the vehicle model onto each detection point, the system calculates the vehicle's contour in different postures in real time, queries the corresponding node in the quadtree map for each detection point, and determines whether each node intersects with the corresponding vehicle contour. If the vehicle contour intersects with the current node and the node's area is marked as occupied, the node is confirmed as a risk collision point, thus improving collision detection accuracy to a certain extent.

[0028] In one optional implementation, the parking control method further includes:

[0029] If the current node does not intersect with the corresponding vehicle outline, or the area represented by the current node is marked as free, then the detection point corresponding to the current node is determined to have no collision risk; and when it is determined that all detection points have no collision risk, the collision detection result is determined to be that there is no collision risk in the parking path.

[0030] When the vehicle outline does not intersect with the current node and the node area is marked as free, the present invention confirms that there is no collision risk for the corresponding detection point, which helps to reduce the risk of misjudgment and omission, minimizes the risk of misjudgment, and further improves parking safety.

[0031] In one alternative implementation, the parking control method further includes, before determining the instantaneous position of the vehicle:

[0032] Determine whether the risk indicator value corresponding to the collision risk is greater than the preset risk threshold;

[0033] If the risk index value corresponding to the collision risk is greater than the preset risk threshold, then the step of trunculating the path after the target collision point in the parking path will be executed.

[0034] If the risk index value corresponding to the collision risk is not greater than the preset risk threshold, then the step of determining the instantaneous position of the vehicle is executed.

[0035] This invention designs a risk index threshold determination mechanism to further assess the degree of collision risk. It triggers path truncation only for high-risk collision scenarios where the risk index value exceeds the preset risk threshold, which can realize risk classification and control, thereby helping to avoid excessive intervention affecting parking efficiency. At the same time, considering low-risk collision scenarios where the risk index value does not exceed the preset risk threshold, it actively optimizes the potentially risky road segments from the instantaneous path point to the target parking space by replanning the path from the instantaneous path point. This can avoid the risk accumulation that may be caused by direct passage of low-risk vehicles, and by specifically planning to bypass low-risk areas in the original path, it ensures that the vehicle always travels on a safe and controllable path, further consolidating the foundation of parking safety.

[0036] In one optional implementation, the starting point of the path is determined based on the instantaneous waypoint and the parking path, and the path from the starting point to the target parking space is planned to generate a planned path, including:

[0037] Obtain the instantaneous speed of the vehicle at the instantaneous path point;

[0038] Based on the instantaneous speed, at least one path point is selected forward from the instantaneous path point on the parking path as the path starting point; wherein, the instantaneous speed is inversely proportional to the target distance, and the target distance represents the path distance between any path starting point and the target parking space;

[0039] If there is only one starting point for the path, then plan the path from the starting point to the target parking space.

[0040] If there are multiple starting points for a route, then plan candidate routes from each starting point to the target parking space, and select the optimal candidate route as the planned route.

[0041] This invention dynamically determines the starting point of the path based on the instantaneous speed of the vehicle, and designs corresponding path planning methods for different scenarios where there are one or more starting points. While ensuring that the path planning is adapted to the vehicle's motion state, it also greatly guarantees the planning efficiency and path quality of parking.

[0042] In an optional implementation, when the collision detection result indicates that there is no collision risk along the parking path, the parking control method further includes:

[0043] Control the vehicle to follow the parking path until the vehicle is parked in the target parking space.

[0044] After collision detection confirms that the parking path is risk-free, this invention controls the vehicle to continuously track the path until it is parked in the target parking space, which can ensure the continuity of the parking process and thus improve the overall efficiency of parking control.

[0045] In one optional implementation, the parking control method further includes, during the process of controlling the vehicle to follow the parking path:

[0046] Obtain the current pose of the vehicle;

[0047] Determine if there is a deviation between the current pose and the pose of the corresponding path point in the parking path;

[0048] If there is no deviation between the current pose and the pose of the corresponding path point in the parking path, then continue to execute the step of controlling the vehicle to track the parking path until the vehicle is parked in the target parking space.

[0049] This invention, during the process of a vehicle tracking a parking path, acquires the current pose in real time, determines the deviation between the current pose and the pose of the corresponding path point, and controls the vehicle to continuously track the parking path when there is no pose deviation. This can verify the vehicle's driving safety status in real time, further reduce the risk of collision, and ensure parking safety.

[0050] In an optional implementation, if there is a deviation between the current pose and the pose of the corresponding path point in the parking path, the parking control method further includes:

[0051] Get the vehicle's current location;

[0052] Plan the route from the current location to the target parking space and generate a new planned route;

[0053] The system controls the vehicle to follow the newly planned path, and during the vehicle's movement, it performs steps to update the acquired current environmental information to the quadtree map and conduct collision detection on the parking path based on the updated quadtree map.

[0054] When there is a deviation between the current pose and the pose of the corresponding path point in the parking path, this invention obtains the current position in real time, replans a new planned path from the current position to the target parking space, and dynamically updates the quadtree map and performs collision detection while controlling the vehicle to track the new planned path, which can ensure that the parking trajectory is always accurate, thereby improving the parking success rate.

[0055] In one optional implementation, the search-based path planning algorithm is a hybrid A* algorithm. The search-based path planning algorithm utilizes an updated grid map for path planning, generating a parking path from the vehicle's initial position to the target parking space, including:

[0056] Determine the parking scenario based on the type of the target parking space and environmental information;

[0057] The updated grid map is expanded and a path is searched by calling a cost function that matches the parking scenario to determine the parking path from the vehicle's initial position to the target parking space. The cost function includes an actual cost function and a heuristic cost function. The actual cost function includes at least one of the following: driving distance cost, steering change penalty cost, gear shift penalty cost, obstacle approach penalty cost, and relative distance cost based on the parking coordinate system. The heuristic cost function includes at least one of the following: distance cost to the destination, angle error cost to the destination, node continuity state cost, and distance cost to the preset anchor point.

[0058] This invention determines the parking scenario by considering the type of the target parking space and environmental information. It selects a cost function that is suitable for the parking scenario from the multi-dimensional cost of the design, and performs path planning based on the cost function and the hybrid A* algorithm. This not only accurately matches the parking scenario requirements, but also helps to improve the parking success rate and user experience.

[0059] In one optional implementation, the attribute parameters of each grid cell in the updated grid map include the distance from that grid cell to the obstacle; when expanding the nodes of the updated grid map, the parking control method further includes:

[0060] The collision distance between the vehicle and the obstacle is obtained by looking up the distance from the vehicle's grid cell to the obstacle in the updated grid map using a table lookup method.

[0061] Node collision detection based on collision distance;

[0062] If the current node poses a collision risk, then discard the current node;

[0063] If there is no collision risk for the current node, then the current node is retained.

[0064] This invention uses a lookup table to quickly index the distance from each grid cell to an obstacle. It eliminates the need for real-time calculation of the distance between the vehicle and the obstacle. The collision distance can be quickly obtained by directly querying the distance value based on the grid cell where the vehicle is currently located. This significantly reduces the computational burden and ensures that collision detection and node expansion proceed synchronously and efficiently. It not only greatly improves the efficiency of collision detection but also meets the real-time requirements of in-vehicle applications.

[0065] In one alternative implementation, the parking control method further includes the following steps before the search-based path planning algorithm performs path planning using the updated grid map:

[0066] The search-based path planning algorithm uses the updated grid map to pre-plan the path and generate a pre-planned path from the vehicle's initial position to the target parking space.

[0067] Upon receiving the user's signal to begin parking, if a pre-planned path exists, the pre-planned path is released; the vehicle is controlled to follow the pre-planned path; and during the vehicle's movement, the current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map.

[0068] If no pre-planned path exists, a search-based path planning algorithm is executed to plan the path using the updated grid map, generating a parking path from the vehicle's initial position to the target parking space.

[0069] Before the user triggers the parking start command, the present invention also designs a path pre-planning, which can not only significantly shorten the user's waiting time and improve the parking response experience, but also complete the path planning process in advance. Thus, in the real-time parking stage, only path release, tracking, and lightweight map updates and collision detection need to be performed, which helps to reduce the computational load in the real-time stage and ensure the efficient operation of the vehicle.

[0070] In a second aspect, the present invention provides a parking control device, the device comprising:

[0071] The map update module is used to respond to the user's parking operation, determine the target parking space of the vehicle, obtain the current environmental information of the vehicle, and update the current environmental information to the grid map.

[0072] The path planning module is used by a search-based path planning algorithm to perform path planning using an updated grid map, generating a parking path from the vehicle's initial position to the target parking space.

[0073] The path release module is used to control the vehicle to follow the parking path in response to the parking path being released.

[0074] The path tracking module is used to update the current environmental information acquired during the vehicle's movement to the quadtree map, and to perform collision detection on the parking path based on the updated quadtree map;

[0075] The vehicle control module is used to control the vehicle to park in the target parking space based on the collision detection results;

[0076] Specifically, when the collision detection result indicates a collision risk along the parking path, the system controls the vehicle to park in the target parking space based on the collision detection result, including:

[0077] Determine the instantaneous position of the vehicle and the instantaneous path point corresponding to the instantaneous position on the parking path;

[0078] The starting point of the path is determined based on the instantaneous waypoint and the parking path, and the path from the starting point to the target parking space is planned to generate the planned path;

[0079] By combining the planned path with the original path, a new parking path is obtained; the original path includes the path from the vehicle's initial position to the instantaneous path point in the parking path.

[0080] The system controls the vehicle to track the new parking path and, during the vehicle's movement, performs steps to update the acquired current environmental information to the quadtree map and conduct collision detection on the parking path based on the updated quadtree map.

[0081] The parking control device of this invention aims to optimize the path planning of the hybrid AlphaGo algorithm. Specifically, it designs a static path planning method using a grid map and a real-time collision detection method using a quadtree map during vehicle movement. By alternating the use of these two types of maps, it not only ensures that the parking path is highly matched with the current environment, but also effectively avoids collision accidents and reduces resource consumption. At the same time, it realizes the efficient use of the search-based path planning algorithm on low-computing-power chips, further ensuring the safety of parking control, the effectiveness and availability of the planned path. In addition, when the collision detection result indicates that there is a collision risk in the parking path, it also considers low-risk collision scenarios where the risk index value does not exceed the preset risk threshold. A dynamic path planning method is designed accordingly to proactively optimize the potentially risky road segments from the instantaneous point to the target parking space. This avoids the risk accumulation that may be caused by direct passage through low-risk areas, and by specifically planning to bypass low-risk areas in the original path, it ensures that the vehicle always travels on a safe and controllable path, further consolidating the foundation of parking safety.

[0082] Thirdly, the present invention provides a vehicle, the vehicle including a controller, the controller including a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform a parking control method of the first aspect or any corresponding embodiment described above.

[0083] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute a parking control method according to the first aspect or any corresponding embodiment described above.

[0084] The parking control method and apparatus of this invention utilize a grid map for global path planning when the vehicle is static and a quadtree map for real-time collision detection when the vehicle is in motion. This alternating use of two types of maps enables efficient utilization of search-based path planning algorithms on low-computing-power chips. This not only ensures a high degree of matching between the parking path and the current environment but also significantly improves the accuracy and feasibility of path planning while reducing resource consumption, helping to avoid collisions and thus significantly improving parking safety, user experience, and parking control efficiency. Furthermore, when the collision detection result indicates a collision risk in the parking path, a dynamic path planning method is designed to address low-risk collision scenarios where the risk index value does not exceed a preset risk threshold. This proactively optimizes potentially risky road segments from the instantaneous point to the target parking space, avoiding the risk accumulation that might result from direct passage through low-risk areas. It also specifically plans to bypass low-risk areas in the original path, ensuring that the vehicle always travels on a safe and controllable path, further solidifying the foundation of parking safety. Attached Figure Description

[0085] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0086] Figure 1 This is a schematic flowchart of a parking control method according to an embodiment of the present invention;

[0087] Figure 2 This is a schematic flowchart of another parking control method according to an embodiment of the present invention;

[0088] Figure 3 This is a schematic diagram of the path planning and parking solution using a hybrid AlphaGo algorithm.

[0089] Figure 4 This is a structural block diagram of a parking control device according to an embodiment of the present invention;

[0090] Figure 5 This is a schematic diagram of the structure of the vehicle controller according to an embodiment of the present invention. Detailed Implementation

[0091] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0092] It should be noted that with the rapid development of technology, automatic parking systems have undergone multiple rounds of technological updates, and their technological evolution includes:

[0093] The first-generation (rule-based) technology uses geometric decomposition methods (such as arc and straight line splicing), which only supports simple vertical parking spaces and has shortcomings such as inability to handle unstructured scenes and weak obstacle avoidance capabilities.

[0094] Second-generation (sampling search) technology: uses random sampling algorithms such as Rapidly-exploring RandomTree (RRT) and Probabilistic Roadmap Method (PRM), which have drawbacks such as strong path randomness, need for post-processing smoothing, and large computational fluctuations (200ms~5s).

[0095] The third-generation (optimization solution) technology, based on trajectory optimization of quadratic programming (QP) and sequence quadratic programming (SQP), has drawbacks such as dependence on high-precision initial values ​​and easy trapping in local optima by low-computing-power chips.

[0096] In addition, existing search-based path planning algorithms, such as RRT (Rapidly-exploring Random Tree; it is a tree data structure and algorithm based on random sampling, which achieves rapid coverage of the search space by gradually connecting random sampling points and tree structure nodes. Its core process includes generating free region sampling points, traversing to find the nearest node, adjusting step size limits, and collision detection, etc.), D-Star (… Dynamic A* is an incremental dynamic path planning algorithm suitable for situations where the environment is unknown or dynamically changing. Its core idea is to iteratively update the path from the target point to the starting point through reverse search, while utilizing heuristic functions and priority queues to optimize search efficiency. Hybrid A* (…) This is a graph search algorithm that combines the features of the A* algorithm and vehicle kinematics models. The core of the algorithm lies in heuristic search. Taking the hybrid A* algorithm as an example, its application in the parking field faces three major bottlenecks. The engineering challenges of the hybrid A* algorithm are detailed in the table below.

[0097] Table 1

[0098]

[0099] Furthermore, there are hard constraints on low-computing-power chips, the relevant details of which are shown in the table below.

[0100] Table 2

[0101]

[0102] In summary, traditional hybrid AlphaGo algorithms require online solution of vehicle dynamics models, resulting in high computational complexity (>1GHz CPU requirement), high-precision mesh discretization (<0.1m, heading angle >32 degrees), susceptibility to node explosion, memory consumption exceeding 100MB, and reliance on FPU hardware for floating-point operations, making it impossible for low-performance MCUs to meet real-time requirements (>2s response time). Therefore, this embodiment proposes a parking control method that alternates between grid maps and quadtree maps, ensuring environmental adaptability of the parking path and avoiding collisions. This reduces resource consumption while balancing parking safety and control efficiency.

[0103] This invention provides a parking control method embodiment. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0104] This embodiment provides a parking control method. Figure 1 This is a flowchart illustrating a parking control method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the process includes the following steps:

[0105] In step S101, in response to the user's parking operation, the target parking space of the vehicle is determined, and the current environmental information of the vehicle is obtained and updated to the grid map.

[0106] It should be noted that in this embodiment, the user's parking operation is initiated by the user, requesting the parking system to execute the automatic parking command. The specific operation method can be adapted to actual needs, such as the user clicking the "automatic parking" button on the in-vehicle screen or operating the parking shortcut key on the steering wheel; or the user saying voice commands such as "park for me" or "park in that parking space".

[0107] In this embodiment, the target parking space may include various types, such as perpendicular parking spaces (i.e., the front or rear of the vehicle enters the parking space), parallel parking spaces (side parking), and angled parking spaces (at an angle of 45° / 60° to the road). In addition, the specific method of determining the target parking space is not limited. For example, it can be specified by the user (i.e., the user selects "a certain empty parking space recognized by the system" on the screen, such as "park in the second parking space on the right"), or recommended by the system (i.e., the parking system automatically scans the surroundings through cameras and ultrasonic radars, and selects the empty parking space that is "most suitable for the current vehicle size and easiest to park in", which is then confirmed by the user as the target). This is only an example for illustration.

[0108] It should be noted that the current environmental information of the vehicle and its corresponding acquisition method in this embodiment can be adaptively determined according to actual needs. For example, the vehicle's current position and real-time environmental data around the target parking space (such as parking space information, obstacle information, etc.) can be obtained through the sensors on the vehicle to provide material for grid map updates. Among them, the sensor types include at least one of ultrasonic radar, camera, and lidar; parking space information includes the edge coordinates of the parking space line, ground slope, lighting conditions, etc.; obstacle information includes walls, pillars, fixed ground locks, parked vehicles, moving pedestrians, other vehicles, etc.

[0109] It's important to explain that a grid map divides the physical environment into countless uniform small squares (i.e., grids). Each grid is labeled with a numerical value to indicate its "state," for example: 0 indicates free (no obstacles, passable); 1 indicates occupied or blocked (obstacles present, impassable). Note that both the grid map and the quadtree map in this embodiment are initialization maps, created "from scratch" based on the current environmental information. Furthermore, the attribute parameters of each grid cell in the grid map record the distance from that cell to obstacles, used for subsequent collision detection.

[0110] In practical applications, when using the hybrid AlphaGo algorithm for path planning, it typically relies on a single, fixed-resolution grid map. If high precision is pursued (e.g., 0.1m grid, 32 heading angles), the number of grids and node states will increase explosively, making the algorithm's path search time longer, especially in complex parking lot environments, which can easily exceed the real-time computing power limit of the vehicle system. If precision is reduced to save resources (e.g., 0.5m grid, 4 heading angles), the path planning error may be too large due to the grid being too coarse. For example, an actual obstacle may be at the edge of the grid, but the algorithm may misjudge it as an empty space, thus causing a collision risk.

[0111] Based on this, the resolution of the normal raster map is reduced in this embodiment to decrease resource consumption. It should be explained that the specific resolution of the raster map can be adaptively adjusted based on parking accuracy requirements (which typically require the vehicle to ultimately park within the parking space with an error of no more than 10cm, or 0.1m). For example, a raster map resolution of 0.3m (which can maintain accuracy while also increasing the raster size; since a larger raster results in fewer raster units in the entire environment, fewer nodes need to be traversed during path planning, thus significantly reducing computational load) is only used as an example.

[0112] Furthermore, considering the accuracy loss caused by the reduction in resolution of the grid map in this embodiment, a process of alternating use of two types of maps is designed accordingly. That is, in the key area corresponding to the obstacle, the quadtree map maintains high accuracy through adaptive resolution to make up for the accuracy loss of the grid map, while also ensuring the accuracy of real-time collision detection.

[0113] Step S102: The search-based path planning algorithm uses the updated grid map to perform path planning and generate a parking path from the vehicle's initial position to the target parking space.

[0114] It should be noted that the search-based path planning algorithm in this embodiment, such as the process of using the hybrid A* algorithm to realize automatic parking path planning, essentially explores all possible movement trajectories of the vehicle in the grid map through heuristic search, and selects the collision-free and cost-optimal path from the vehicle's initial position to the target parking space. The specific planning steps can be adapted to the relevant content in this field and will not be elaborated in detail here.

[0115] In step S103, in response to the parking path being released, the vehicle is controlled to follow the parking path.

[0116] In this embodiment, after the parking path is released, the vehicle enters the dynamic tracking path stage. At this time, the grid map is no longer updated, only the quadtree map is updated.

[0117] It should be noted that a quadtree map is a spatial partitioning map built on a quadtree data structure. Its core logic is to achieve a hierarchical and adaptive description of the physical environment through "recursive quadrating of space". Essentially, it uses "on-demand resolution allocation" to establish a dynamic balance between "environment modeling accuracy" and "resource consumption". It is widely used in fields that require real-time processing of spatial data, such as autonomous driving, robot navigation, and geographic information systems.

[0118] Furthermore, the core principle of quadtree maps follows a "top-down recursive partitioning" approach. First, the entire space to be modeled (e.g., a parking lot, an indoor room) is considered a "root node" (initial large area). Then, the space is split based on its "information density" (e.g., the presence of obstacles, environmental complexity). If the area is free of obstacles and has simple information (e.g., an empty parking lot aisle), it is retained as a "leaf node" (not further partitioned, represented by a low resolution). If the area contains obstacles or has complex information (e.g., around parking spaces, areas with walls / pillars), it is evenly divided into four equal-sized "child nodes." Each child node repeats this logic until it reaches a preset minimum resolution (e.g., 1cm, 10cm, set according to scene accuracy requirements) or the information within the area is sufficiently simple, ultimately forming a hierarchical structure of "root node - child node - leaf node." The leaf node corresponds to the smallest descriptive unit of the map and can be marked with states such as "free," "occupied," or "unknown."

[0119] Furthermore, quadtree maps possess key characteristics that distinguish them from traditional fixed-resolution raster maps, including: First, adaptive resolution: areas around obstacles and areas with high information density are subdivided into small-sized leaf nodes (high resolution, ensuring accurate details), while open, obstacle-free areas are represented by large-sized leaf nodes (low resolution, reducing redundancy). For example, in autonomous parking scenarios, leaf nodes around parking lines and curbs may be only 10cm in size, while leaf nodes in the central aisle of a parking lot can reach 1m, significantly reducing resource consumption in non-critical areas; Second, high space and computational efficiency: only "valid nodes" (nodes representing obstacle areas and complex areas that need to be described) are stored. Unlike fixed-resolution raster maps, quadtree maps do not require storing grids of equal size for the entire area. For example, in a 10m x 10m space, a fixed-resolution 0.1m raster map would require 10,000 grids, while a quadtree map would only require a few hundred nodes, reducing storage by more than 80%. Thirdly, dynamic updates are highly efficient. When the environment changes locally (such as adding or moving obstacles), only the subtree nodes corresponding to the changed area need to be updated, without refreshing the entire map. For example, if a robot discovers a cardboard box suddenly appearing in front of it, it only needs to split the parent nodes around the cardboard box and mark them as occupied, without reprocessing the entire map. The update time can usually be controlled in milliseconds, meeting the needs of real-time scenarios.

[0120] In practical applications, quadtree maps, by abandoning the coarse-grained approach of "uniform resolution across the entire area" in traditional maps and using a "precisely allocated resolution" method, maximize the reduction of storage and computing resource consumption while ensuring the modeling accuracy of key areas. This makes them particularly suitable for embedded scenarios with limited hardware resources (such as vehicle controllers and small robots). Note that other aspects of quadtree maps can be found in relevant literature for an adaptive understanding, and will not be elaborated upon here. Step S104: During vehicle movement, the acquired current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map.

[0121] In this embodiment, the relevant content and acquisition method of the current environmental information are as described above and will not be repeated here. It should be noted that since the parking path is planned before the vehicle starts, the environment may change dynamically during the vehicle's movement. Therefore, this embodiment uses a quadtree map (which has adaptive spatial partitioning characteristics, i.e., large nodes for sparse areas and small nodes for dense areas) for dynamic collision detection. Compared with a fixed-precision grid map, it can reduce the amount of computation in non-critical areas while ensuring the accuracy of critical areas (such as near obstacles), and more efficiently handle dynamic changes in the environment (such as suddenly appearing pedestrians or temporary obstacles), improving environmental adaptability and real-time performance, thereby ensuring the safety of parking control.

[0122] Step S105: Based on the collision detection results, control the vehicle to park in the target parking space.

[0123] In this embodiment, the collision detection results include whether the parking path has a collision risk or not; corresponding control methods are adopted according to different collision detection results to control the vehicle to park in the target parking space.

[0124] It should be noted that the alternating use of raster maps and quadtree maps in this embodiment aims to ensure that each type of map only plays a role in the most suitable stage through "functional division of labor and stage adaptation," avoiding resource redundancy caused by running a single map throughout the entire process. Simultaneously, it precisely reduces unnecessary computational and storage consumption. Specifically, this resource reduction is achieved through:

[0125] 1. During the path planning phase, only the raster map is used (e.g., the resolution of the normal raster map is reduced, with a fixed resolution of 0.1m~0.3m). By providing globally consistent environmental quantization (e.g., obstacle distribution and parking space coordinates across the entire area), the algorithm's global path search needs are met. Furthermore, this phase does not require continuous high-frequency updates to the raster map; an environmental information update is only needed once before planning. This avoids the waste of computational power that occurs when running a high-resolution raster map throughout the entire process, where "all rasters must be traversed regardless of whether there are obstacles in the area."

[0126] 2. During vehicle movement, the system seamlessly switches to a quadtree map, utilizing its "adaptive resolution" feature for resource optimization. This means that during vehicle movement, only the local environment surrounding the vehicle needs to be considered (rather than the global environment). The quadtree map automatically refines the grid in obstacle areas (collision risk zones) to ensure detection accuracy, while merging and coarsening the grid in open areas (risk-free areas). Compared to the "fixed resolution update of the entire area" of the raster map (which requires processing the same number of grids even in open areas), the quadtree map can reduce unnecessary grid calculations by at least half, and also significantly reduce storage requirements (no need to store high-resolution data for the entire area, only retaining local fine grids).

[0127] In summary, compared to using a single map for the entire process, either the fixed resolution of the raster map overloads computing power during the motion phase, or the insufficient global consistency of the quadtree map leads to a decrease in path accuracy during the planning phase; the alternating use of the two types of maps in this embodiment allows resources to be precisely allocated only to the key stages where "planning requires global accuracy" and "motion requires local efficiency," completely avoiding the computation and storage consumption in unnecessary areas, and ultimately achieving efficient utilization of the computing power and storage resources of the vehicle system.

[0128] The parking control method provided in this embodiment of the invention utilizes a grid map for global path planning when the vehicle is static and a quadtree map for real-time collision detection when the vehicle is moving. By alternating between these two types of maps, the search-based path planning algorithm can be efficiently utilized on low-computing-power chips. This ensures that the parking path is highly matched with the current environment, thereby reducing resource consumption and greatly improving the accuracy and feasibility of path planning. At the same time, it can avoid collision accidents, significantly improve parking safety, and further optimize the user experience and parking control efficiency.

[0129] This embodiment provides a parking control method. Figure 2 This is a flowchart illustrating another parking control method according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:

[0130] Step S201: In response to the user's parking operation, determine the target parking space for the vehicle, obtain the vehicle's current environmental information, and update the current environmental information to the grid map. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0131] Step S202: The search-based path planning algorithm uses the updated grid map to perform path planning and generate a parking path from the vehicle's initial position to the target parking space.

[0132] In this embodiment, the search-based path planning algorithm is a hybrid A* algorithm. Specifically, step S202 includes:

[0133] Step A1: Determine the parking scenario based on the type of the target parking space and environmental information.

[0134] In this embodiment, the parking scenario represents different parking space types, such as narrow aisle perpendicular parking spaces (the width of the aisle in front of the parking space is less than a set width), end perpendicular parking spaces (one of the left or right sides of the parking space is adjacent to a wall), perpendicular parking spaces with vehicles on both sides (i.e., there are obstacles on both the left and right sides of the parking space), and perpendicular parking spaces with vehicles on one side (i.e., there are obstacles on the left or right side of the parking space), etc. It should be noted that the parking space type can be adaptively adjusted according to actual needs.

[0135] Step A2: Invoke the cost function that matches the parking scenario to expand nodes and search paths on the updated grid map to determine the parking path from the vehicle's initial position to the target parking space. The cost function includes an actual cost function and a heuristic cost function. The actual cost function includes at least one of the following: driving distance cost, steering change penalty cost, gear shift penalty cost, obstacle approach penalty cost, and relative distance cost based on the parking coordinate system. The heuristic cost function includes at least one of the following: distance cost to the destination, angle error cost to the destination, node continuity state cost, and distance cost to the preset anchor point.

[0136] It should be noted that different parking space types address different parking needs. For example, perpendicular parking requires careful control of the angle alignment between the vehicle and the parking space, which can be optimized by strengthening the "steering change penalty cost" and "angle error cost." Parallel parking on narrow roads requires prioritizing obstacle avoidance, which can increase the weight of the "obstacle approach penalty cost." By calling a cost function that matches the parking scenario to expand nodes and search paths on the updated grid map, scenario adaptability can be enhanced, further achieving precise matching of different parking needs and helping to achieve accurate planning of parking paths.

[0137] In this embodiment, the actual cost function is used to calculate the actual cumulative cost from the starting point to the current node; the heuristic cost function is used to calculate the estimated cost from the current node to the target parking space; the travel distance cost is used to calculate the travel distance cost from the starting point to the current node; the steering change penalty cost is used to calculate the steering angle change cost from the starting point to the current node; the gear shift penalty cost is used to calculate the gear change cost from the starting point to the current node; the obstacle approach penalty cost is used to calculate the distance penalty cost from the current node to the nearest obstacle; the relative distance cost based on the parking coordinate system is used to calculate the relative distance cost from the current node to the target parking space; the distance cost to the destination is used to estimate the distance cost from the current node to the destination; the angle error cost to the destination is used to estimate the steering angle change cost between the heading angle of the current node and the heading angle of the destination target; the node continuous state cost is used to estimate the state continuity cost between the current node and the destination; and the distance cost to the preset anchor point is used to estimate the distance cost of preset key anchor points in the path from the current node to the destination.

[0138] It should be noted that the driving distance cost in this embodiment is calculated by quantifying the path length and prioritizing shorter paths; the longer the distance, the greater the cost, which can be calculated using Euclidean distance (applicable to straight segments) or Manhattan distance (applicable to gridded right-angled paths). The steering change penalty cost is calculated by suppressing frequent steering to ensure a smooth path; the more frequent the steering changes and the greater the angle difference, the higher the penalty cost, which can be calculated using the vehicle's heading angle at different nodes. The gear shifting penalty cost is calculated by reducing gear shifts to lower the risk of power interruption; the higher the shifting frequency, the greater the cost, which can be determined based on the "jerkiness" experienced by the vehicle. The obstacle approach penalty cost is calculated by moving away from obstacles to provide a safety margin; the closer to the obstacle, the higher the penalty cost (even if no collision occurs), essentially "actively avoiding potential risks," and the corresponding penalty cost formula can be set based on the distance from the current node to the nearest obstacle in the grid map. The relative distance cost based on the parking coordinate system reduces parking deviation by accurately aligning the parking space. A local coordinate system (rather than a global coordinate system) is established with the target parking space as the reference, and the relative distance between the current node and key benchmarks of the parking space, such as the center line and front and rear edges of the parking space, is quantified. The larger the relative distance, the higher the cost, which can be calculated based on the parking coordinate system.

[0139] Furthermore, in this embodiment, the distance cost to the destination is used to quickly guide the search toward the parking space. This is achieved by estimating the physical distance from the current node to the destination (e.g., the center of the target parking space plus the target heading angle). The greater the distance, the higher the cost. Essentially, this provides the search with a clear 'directional anchor point.' Its specific calculation method is similar to the driving distance cost and will not be elaborated upon here. The angle error cost to the destination is used to align with the parking space direction and avoid misalignment. This is achieved by estimating the deviation between the heading angle of the current node and the target heading angle of the destination. The greater the deviation, the higher the cost. Essentially, this ensures that the vehicle's orientation at the path's endpoint matches the parking space, and can be calculated based on the vehicle's heading angle at different nodes. The node continuity state cost is used to guarantee the path... Continuity, conforming to vehicle kinematics, is estimated by assessing the continuity of the state between the current node and the destination, meaning the vehicle's motion is continuous (position and heading angle cannot change abruptly). If the state difference between the current node and the destination is too large, subsequent paths need to "jump" to reach the destination, resulting in a higher cost. This cost can be calculated comprehensively based on the positional and angular differences between different nodes. The distance cost to the preset anchor point is used to optimize the path structure. It first passes through key intermediate points by pre-setting key anchor points (such as the "turning preparation point" for perpendicular parking and the "entry point" for parallel parking) along the path from the start to the destination. Then, it estimates the distance from the current node to the anchor point. The greater the distance, the greater the cost. Essentially, it guides the path to "pass through the anchor point first, and then to the destination."

[0140] It should be noted that in this embodiment, the anchor point represents the "critical transition state" in the parking process, and its specific setting is not limited. For example, the anchor point for perpendicular parking can be set as "1.5m away from the parking space and the heading angle is parallel to the parking space" (to facilitate the subsequent turning into the parking space); the anchor point for parallel parking can be set as "the vehicle body forms a 30° angle with the parking space line and is 2m away from the rear of the parking space" (to facilitate cutting into the parking space). This is only an example.

[0141] It should be noted that the cost function in this embodiment, through its matching design with the parking scenario, aims to ensure that the cost function "focuses on the core needs of the scenario and filters out invalid search directions," thereby effectively reducing the expansion of invalid nodes (meaning less cost calculation, collision detection, and state storage), further reducing redundant calculations, and greatly saving resources and computing power (such as directly reducing the CPU computing power and memory consumption of the vehicle system). This resource reduction is specifically reflected in the following four aspects:

[0142] 1. Heuristic cost-based scenario matching aims to guide the search to accurately focus on the target, thereby reducing the expansion of invalid nodes. Since the core function of heuristic cost is to "guide the search towards the endpoint," designing corresponding matching scenarios can effectively prevent the algorithm from expanding nodes in directions unrelated to the scenario. For example, in a perpendicular parking scenario, the parking goal is "the car body is perpendicular to the parking space line and precisely aligned with the center of the parking space." Therefore, the weight of "angle error cost to the endpoint" is increased (e.g., the cost of a 10° deviation in heading angle is much higher than the cost of a 10cm deviation in lateral distance). In this case, the algorithm will prioritize expanding nodes with "heading angles close to the target (e.g., 90°)" rather than nodes that are "close to the endpoint but have large angle deviations" (e.g., nodes 1m from the parking space but with a 60° deviation in heading angle). It should be noted that even if such nodes with large angle deviations are expanded, significant adjustments are required to get them into position, constituting an "invalid search." The heuristic cost of scenario matching directly reduces the expansion of such nodes, lowering computational cost.

[0143] 2. Scenario matching based on actual costs aims to filter out nodes that do not conform to scenario constraints, thereby avoiding redundant calculations. Since the core function of actual costs is to quantify the real consumption from the starting point to the current node, scenario matching design can filter out nodes that conform to physical constraints but do not meet scenario requirements in advance, thus avoiding subsequent cost calculations and collision detection for such nodes. For example, in a slanted parking scenario (i.e., the parking space is at a 45° angle to the aisle), vehicles can usually complete parking by "backing in at a slant" without frequent gear shifting, thus reducing the weight of "gear shifting penalty cost" (triggering the penalty only when necessary). The algorithm will not over-filter nodes with "single gear shifts," but it will filter nodes with "multiple gear shifts" (such as more than 3 gear shifts, which do not meet the scenario's efficient parking requirements), avoiding subsequent path feasibility verification for such nodes, thereby effectively saving computational power.

[0144] 3. Cost items are selected based on the scenario, avoiding "full cost calculation" and helping to reduce computational load. Since the core requirements of different parking scenarios vary, the scenario-matched cost design "enables / disables cost items as needed," avoiding the calculation of full costs for all scenarios (unnecessary cost items are excluded from calculation), directly reducing the computational complexity of single-node costs. For example, in a static parking scenario (i.e., without pedestrians, vehicles, or other dynamic obstacles), the "obstacle approach penalty cost" only needs to calculate static obstacles (such as curbs and fixed posts), without needing to calculate the approach cost of dynamic obstacles in real time. If the scenario is not matched, the algorithm will default to calculating the "dynamic superimposed static" two-dimensional obstacle approach cost, leading to additional computational consumption (such as real-time acquisition of dynamic obstacle positions and cost updates). Scenario-matched costs, however, will disable calculations related to dynamic obstacles, effectively reducing computational load.

[0145] 4. Reducing "path backtracking and replanning" aims to optimize the initial path and avoid secondary calculations. If the cost does not match the scenario, the generated initial path may not meet the scenario requirements (e.g., large angle deviation in perpendicular parking paths, large lateral offset in parallel parking paths), leading to the need for "path backtracking" (abandoning the current path and re-expanding nodes) or "secondary replanning" (recalculating the entire path), resulting in a large amount of additional node expansion and computing power consumption. Conversely, the cost of scenario matching can make the initial path more closely fit the scenario requirements, greatly reducing path backtracking and replanning.

[0146] In summary, the cost-scenario matching design in this embodiment guides the search direction through heuristic cost, reducing the expansion of invalid nodes; the actual cost filters out nodes that do not fit the scenario, avoiding redundant calculations; the scenario-based trade-off of cost items can reduce the complexity of a single calculation, ultimately reducing path backtracking and replanning to avoid secondary consumption; this series of actions directly reduces the number of node expansions and computationally intensive steps (such as collision detection, cost accumulation, etc.), while reducing the storage requirements of node states (saving memory), which can perfectly adapt to hardware environments with "limited computing power and scarce resources", ensuring the efficient and stable operation of the automatic parking function.

[0147] In this embodiment of the invention, the parking scenario is determined by the type of the target parking space and environmental information. A cost function suitable for the parking scenario is selected from the multi-dimensional cost of the design, and path planning is performed based on the cost function and the hybrid A* algorithm. This not only accurately matches the parking scenario requirements, but also helps to improve the parking success rate and user experience.

[0148] In practical applications, traditional grid map collision detection often requires real-time calculation of the distance between the vehicle and obstacles. For parking scenarios with a large number of grids and complex parking environments, this computational load increases significantly, easily leading to path planning delays and failing to meet the real-time requirements of parking. In this embodiment, since the attribute parameters of each grid in the updated grid map include the distance from the grid to the obstacle, the distance from each grid to the obstacle can be quickly indexed by simply looking up a table, eliminating the need for real-time calculation of the distance between the vehicle and the obstacle, thus significantly reducing the computational burden. Specifically, in step A2 above, when expanding the nodes of the updated grid map, the parking control method of this embodiment further includes:

[0149] Step A21: Use a lookup table to query the distance from the vehicle's grid cell to the obstacle in the updated grid map to obtain the collision distance from the vehicle to the obstacle.

[0150] Step A22: Perform node collision detection based on collision distance.

[0151] In this embodiment, collision detection is used to perform collision detection on newly expanded nodes. It should be noted that this embodiment can also perform collision detection on new continuous states generated by applying the motion model, and discard this state generated by specific control inputs when a collision occurs.

[0152] Step A23: If there is a collision risk in the current node, then discard the current node.

[0153] Step A24: If there is no collision risk for the current node, then retain the current node.

[0154] In this embodiment of the invention, the distance from each grid cell to the obstacle is quickly indexed by a lookup table. There is no need to calculate the distance between the vehicle and the obstacle in real time. The collision distance can be obtained quickly by directly querying the distance value based on the grid cell where the vehicle is currently located. This can significantly reduce the computational burden and ensure that collision detection and node expansion are carried out in a synchronized and efficient manner. This not only greatly improves the efficiency of collision detection, but also meets the real-time requirements of vehicle-mounted applications.

[0155] In autonomous parking scenarios, one of the core user demands is "rapid response after operation" (e.g., after finding a target parking space, the user wants to start parking immediately, rather than waiting for the algorithm to calculate the path). Therefore, the design of "pre-planning the path" in this embodiment transfers the core work of path calculation (such as node expansion, cost function calculation, and path search in the hybrid A* algorithm) to before the user sends the "start parking signal" (e.g., the system has already completed pre-planning while the user is driving the vehicle close to the target parking space and confirming the parking space). When the user triggers the "start parking" command, if a valid pre-planned path exists, the path can be released and tracked directly without waiting for the algorithm to calculate the path in real time. This completely avoids the problem of delayed response due to real-time planning after the user issues the command, significantly shortening the user's waiting time and making the parking process smoother and more timely. Therefore, before the search-based path planning algorithm uses the updated grid map for path planning, the parking control method in this embodiment also includes:

[0156] Step B1: The search-based path planning algorithm uses the updated grid map to perform path pre-planning, generating a pre-planned path from the vehicle's initial position to the target parking space.

[0157] Step B2: In response to receiving the user's start parking signal, if a pre-planned path exists, the pre-planned path is released; the vehicle is controlled to follow the pre-planned path, and during the vehicle's movement, the current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map.

[0158] Step B3: If no pre-planned path exists, execute a search-based path planning algorithm to generate a parking path from the vehicle's initial position to the target parking space using the updated grid map.

[0159] In this embodiment of the invention, by designing pre-planning paths, the user's waiting time can be significantly shortened, thereby improving the parking response experience and greatly ensuring the parking control efficiency of the vehicle.

[0160] Step S203: In response to the parking path being released, control the vehicle to follow the parking path. See details below. Figure 1 Step S103 of the illustrated embodiment will not be described again here.

[0161] In step S204, during the movement of the vehicle, the acquired current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map.

[0162] Specifically, step S204 above involves performing collision detection on the parking path based on the updated quadtree map, including:

[0163] Step S2041: Obtain the vehicle model and determine the current path matching point of the vehicle on the parking path.

[0164] In this embodiment, the vehicle model is used to represent the vehicle outline in different postures, including the body, wheels, rearview mirrors, etc.

[0165] Step S2042: Starting from the current path matching point, select a preset number of path points forward on the parking path as the points to be detected.

[0166] In this embodiment, the specific value of the preset number can be adaptively adjusted according to actual needs, such as a preset number of 5. Specifically, by selecting a preset number of path points from the current path matching point for detection, potential collision risks can be identified in advance. For example, if the vehicle is traveling at a speed of 0.5m / s and the preset detection distance is 3m, the system can detect obstacles 6 seconds in advance, allowing the vehicle enough time to adjust its path.

[0167] Step S2043: Project the vehicle model onto each detection point in sequence, and calculate the vehicle contour at the corresponding detection point.

[0168] In this embodiment, the specific calculation method for the vehicle profile can be found in conventional techniques in the art. For example, the vehicle pose is estimated in real time based on nonlinear model predictive control, and the vehicle profile is generated by combining kinematic constraints. For instance, during parking, the system dynamically adjusts the ellipse parameters of the vehicle profile according to parameters such as steering wheel angle and vehicle speed to ensure that the detection covers the actual motion trajectory, thereby determining the corresponding vehicle profile.

[0169] Step S2044: Recursively query the updated quadtree map, sequentially obtain the node corresponding to each point to be detected in the quadtree map, and determine whether each node intersects with the corresponding vehicle outline.

[0170] It should be noted that the recursive query of the quadtree map decomposes the space recursively, so that the system only needs to query the local node where the point to be detected is located, rather than traversing the entire map. For example, in a 10m×10m parking area, if the quadtree depth is 3 and each leaf node covers an area of ​​1.25m×1.25m, the collision detection computation can be reduced to 1 / 64 of that of a traditional grid map.

[0171] Step S2045: If the current node intersects with the corresponding vehicle outline and the area represented by the current node is marked as occupied, then the collision detection result is determined to be that there is a collision risk in the parking path, and the detection point corresponding to the current node is taken as the target collision point.

[0172] In this embodiment, if the vehicle outline intersects with the current node and the node area is marked as occupied, the node is confirmed as a risk collision point, which improves the collision detection accuracy to some extent.

[0173] Step S2046: If the current node does not intersect with the corresponding vehicle outline, or the area represented by the current node is marked as free, then it is determined that the detection point corresponding to the current node has no collision risk; and when it is determined that all detection points have no collision risk, the collision detection result is determined that there is no collision risk in the parking path.

[0174] In this embodiment, when the vehicle outline does not intersect with the current node and the node area is marked as free, it is confirmed that there is no collision risk for the corresponding detection point. This helps to reduce the risk of misjudgment and omission, minimizes the risk of misjudgment, and further improves parking safety.

[0175] Step S205: Based on the collision detection results, control the vehicle to park in the target parking space.

[0176] It should be noted that the collision detection result in this embodiment includes both a collision risk and no collision risk along the parking path. Therefore, when the collision detection result indicates a collision risk along the parking path, step S205 includes:

[0177] Step C1: Cut off the path in the parking path that is after the target collision point, and control the vehicle to stop when the vehicle moves close to the target collision point, and / or return to the step of obtaining the current environmental information of the vehicle and updating the current environmental information to the grid map, until the vehicle is parked in the target parking space.

[0178] It should be noted that when there is a collision risk in the parking path, this embodiment can control the vehicle to stop when it reaches the target collision point, or control the vehicle to drive to a safe distance from the collision point without stopping, while simultaneously performing subsequent parking path replanning. The specific vehicle control method adopted in this embodiment to avoid collision risks can also be adaptively adjusted according to actual needs. Furthermore, after controlling the vehicle to stop, subsequent parking operations can be performed according to the user's needs, or parking path replanning can be performed based on the latest environmental information. In this embodiment, when a potential collision point in the parking path is identified by collision detection, the path after that point is immediately cut off, preventing collision damage caused by the vehicle continuing along that path. When the vehicle moves to the collision point or a safe distance before the collision point, it is forced to stop or not stop but path replanning is required, further eliminating the possibility of vehicle collision. Simultaneously, after stopping, corresponding operations can be performed according to user needs, or environmental information can be reacquired and updated to the grid map, ensuring that subsequent path planning is based on the latest environmental data, thereby improving the safety, effectiveness, and robustness of parking control in complex dynamic environments.

[0179] In practical applications, directly cutting off all collision risk paths after detecting a collision risk may lead to frequent stops due to sensor noise or temporary false detections, affecting the user experience. Therefore, in this embodiment, not all identified collision risks require immediate path cutting off; instead, action is taken based on the severity of the risk. Specifically, risk indicators and risk thresholds are introduced to differentiate risk levels. For example, only high-risk situations trigger path cutting off, while low-risk situations may not require immediate processing, thereby reducing unnecessary path adjustments, filtering out some transient or low-risk false alarms, and improving parking efficiency. Therefore, when the collision detection result indicates a collision risk in the parking path, the parking control method in this embodiment further includes:

[0180] Step D1: Determine whether the risk index value corresponding to the collision risk is greater than the preset risk threshold.

[0181] It should be noted that the risk index values ​​in this embodiment are used to quantify the severity of the risk or the collision risk level. Their specific content can be adaptively determined according to actual needs, such as collision time, distance, and obstacle speed. Furthermore, the preset risk threshold can be adjusted according to the parking mode (e.g., perpendicular parking, angled parking) and environmental complexity (e.g., parking space width, obstacle type). For example, in a multi-level parking garage, due to space constraints, the threshold can be set to a collision distance of 0.5 meters; while in an open parking lot, the threshold can be relaxed to 1 meter. This is only an example.

[0182] Step D2: If the risk index value corresponding to the collision risk is greater than the preset risk threshold, then when the collision detection result indicates that there is a collision risk in the parking path, the step of controlling the vehicle to park in the target parking space is executed.

[0183] It should be noted that in this embodiment, path truncation is only triggered for high-risk scenarios that exceed the threshold. For example, when an obstacle is 3 meters in front of the vehicle and stationary, the system can determine that it is low-risk based on risk indicators, thus allowing the vehicle to continue driving and dynamically adjust its path; however, when the obstacle approaches at a speed of 2 m / s, the risk indicator value exceeds the threshold, and path truncation is triggered immediately.

[0184] The risk indicator threshold determination mechanism designed in this embodiment of the invention can realize risk classification and control, which helps to avoid excessive intervention affecting parking efficiency.

[0185] It should be noted that for low-risk scenarios where the risk index value is no greater than the preset risk threshold, this embodiment does not directly ignore the risk. Instead, it proactively optimizes the potentially risky road segments from the instantaneous waypoint to the target parking space by replanning the route from the instantaneous waypoint. This accurately avoids low-risk scenarios, preventing risk accumulation while strengthening the safety baseline. Therefore, if the risk index value corresponding to the collision risk is no greater than the preset risk threshold, the parking control method in this embodiment also includes:

[0186] Step E1: Determine the instantaneous position of the vehicle and determine the instantaneous path point corresponding to the instantaneous position on the parking path.

[0187] In this embodiment, the instantaneous position reflects the vehicle's current actual driving state (such as slight deviations that may be caused by minor road bumps or control errors). Using this as a starting point to plan the path can more accurately match the vehicle's actual position, thereby avoiding potential risks caused by the deviation between the original path and the actual position.

[0188] Step E2: Determine the starting point of the path based on the instantaneous waypoint and the parking path, and plan the path from the starting point to the target parking space to generate the planned path.

[0189] In this embodiment, the newly planned path generated based on instantaneous path points and combined with the updated quadtree map (which incorporates the latest environmental information) can adapt to minor changes in the environment in real time (such as temporary low obstacles or slight offsets in parking lines), ensuring that the path always matches the current environment and improving the parking system's adaptability to dynamic scenarios.

[0190] Specifically, step E2 above includes:

[0191] Step E21: Obtain the instantaneous speed of the vehicle at the instantaneous path point.

[0192] It should be noted that since the instantaneous speed of a vehicle directly determines its inertia, steering response delay, and braking distance (for example, the faster the speed, the greater the inertia, requiring a longer distance to complete steering or deceleration; the slower the speed, the higher the control precision requirements, requiring a more compact path adjustment space), selecting the starting point based on instantaneous speed can avoid the problem of the path starting point being out of sync with the speed. For example, when a vehicle is traveling at a relatively high instantaneous speed (such as 5 km / h, which is faster than moving at low speeds), if the starting point is too close (close to the instantaneous path point), the planned path will be too short, and the vehicle will not have enough time to smoothly turn or decelerate before reaching the parking space, making the vehicle prone to sharp turns and jerking. In this embodiment, speed matching of the starting point ensures that the length and curvature of the planned path are adapted to the vehicle's current speed, thereby improving the control stability of path tracking.

[0193] Step E22: Select at least one path point forward from the instantaneous path point on the parking path as the path starting point based on the instantaneous speed; wherein, the instantaneous speed is inversely proportional to the target distance, and the target distance represents the path distance between any path starting point and the target parking space.

[0194] In this embodiment, when the vehicle's instantaneous speed is high, the distance between the vehicle's instantaneous position and the path start point is greater, resulting in a smaller target distance. To ensure the safety of the target distance, the path start point is chosen "forward" from the instantaneous path point, implying a "longer adjustment redundancy" in the planned path. For example, when a vehicle rapidly approaches a parking space, a forward start point allows for sufficient path length to accommodate potential minor obstacles (such as the curb at the edge of the parking space) or directional deviations, avoiding collision risks due to high speed and insufficient adjustment space. Conversely, when the vehicle's instantaneous speed is low, the distance between the vehicle's instantaneous position and the path start point is smaller (the start point is closer to the instantaneous path point), and the planned path only covers the short distance "from the current position to the parking space." In this case, the vehicle control precision is high, eliminating the need for excessively long adjustment paths, reducing resource waste, and significantly improving planning efficiency.

[0195] Step E23: If there is only one starting point for the path, then plan the path from the starting point to the target parking space.

[0196] In this embodiment, when there is only one optimal starting point after speed calculation, the path from that starting point to the parking space is directly planned, which can minimize the calculation steps, shorten the path generation time, and ensure that the vehicle can respond quickly to the current driving state.

[0197] Step E24: If there are multiple starting points for the path, then plan the candidate paths from each starting point to the target parking space, and select the optimal candidate path as the planned path.

[0198] In this embodiment, when there are multiple potential starting points, the optimal path is selected by comparing multiple paths, thus maximizing the quality of the path.

[0199] In this embodiment of the invention, the starting point of the path is dynamically determined based on the instantaneous speed of the vehicle, and corresponding path planning methods are designed for different scenarios where there are one or more starting points. While ensuring that the path planning is adapted to the vehicle's motion state, it also greatly guarantees the planning efficiency and path quality of parking.

[0200] Step E3: Combine the planned path with the original path to obtain the new parking path; wherein, the original path includes the path from the vehicle's initial position to the instantaneous path point in the parking path.

[0201] Step E4: Control the vehicle to track the new parking path, and during the vehicle's movement, perform the steps of updating the acquired current environmental information to the quadtree map, and performing collision detection on the parking path based on the updated quadtree map.

[0202] In this embodiment of the invention, low-risk collision scenarios where the risk index value does not exceed the preset risk threshold are also considered. By replanning the route from the instantaneous waypoint as the starting point, the potential risk sections from the instantaneous waypoint to the target parking space are actively optimized. This avoids the risk accumulation that may be caused by direct passage through low-risk areas. Furthermore, by specifically planning to bypass low-risk areas in the original route, the low-risk areas are avoided, ensuring that the vehicle always travels on a safe and controllable path, further consolidating the foundation of parking safety.

[0203] It should be noted that when the collision detection result indicates that there is no collision risk in the parking path, the parking control method in this embodiment further includes: step F1, controlling the vehicle to follow the parking path until the vehicle is parked in the target parking space. Specifically, after the collision detection confirms that the parking path is risk-free, this embodiment ensures the continuity of the parking process by controlling the vehicle to continuously follow the path until it is parked in the target parking space, thereby improving the overall efficiency of parking control.

[0204] In practical applications, during the process of a vehicle tracking a parking path, the actual trajectory may deviate due to ground slippage, sensor errors, or slight external interference, such as crosswinds. This means that the vehicle's actual position may deviate from the preset path point during movement. Therefore, in controlling the vehicle's tracking of the parking path, the parking control method in this embodiment further includes:

[0205] Step G1: Obtain the current pose of the vehicle.

[0206] In this embodiment, the pose includes key parameters such as vehicle position and angle, and the specific acquisition method can be determined by referring to conventional acquisition methods in the field.

[0207] Step G2: Determine whether there is a deviation between the current pose and the pose of the corresponding path point in the parking path.

[0208] In step G3, if there is no deviation between the current pose and the pose of the corresponding path point in the parking path, continue to execute the step of controlling the vehicle to track the parking path until the vehicle is parked in the target parking space.

[0209] In this embodiment of the invention, during the process of a vehicle tracking a parking path, the current pose is acquired in real time, the deviation between the current pose and the pose of the corresponding path point is determined, and the vehicle is controlled to continue tracking the parking path when there is no pose deviation. This can verify the vehicle's driving safety status in real time, further reduce the risk of collision, and ensure parking safety.

[0210] In this embodiment, if there is a deviation between the current pose and the pose of the corresponding path point in the parking path, the parking control method in this embodiment further includes:

[0211] Step H1: Obtain the current location of the vehicle.

[0212] Step H2: Plan the path from the current location to the target parking space and generate a new planned path.

[0213] Step H3 involves controlling the vehicle to follow the newly planned path, and during the vehicle's movement, updating the acquired current environmental information to the quadtree map, and performing collision detection on the parking path based on the updated quadtree map.

[0214] In this embodiment, by acquiring the current location in real time and replanning the path, a new trajectory from the current location to the target parking space can be quickly generated, avoiding parking failures caused by the accumulation of continuous deviations (such as the vehicle body crossing the line or scraping with adjacent vehicles). For example, assuming the vehicle deviates 0.3 meters to the left due to slippery ground, the system can immediately plan a new path starting from the current location, ensuring that the lateral error is controlled within centimeters when finally parking in the space. The above dynamic correction method can significantly improve the fault tolerance of parking, especially in complex environments such as sloping parking lots and narrow parking spaces.

[0215] In one specific embodiment, a resource optimization and algorithm acceleration strategy is provided for each step and module of a conventional parking solution based on the hybrid A / A algorithm. The aim is to better utilize the hybrid A / A path planning algorithm in the autonomous driving parking function of low-computing-power chips, ultimately achieving mass production in an engineered manner. Specifically, by alternating between grid maps and quadtree maps, only the grid map is updated when the vehicle is static, for initial path planning and path replanning when the vehicle stops due to abnormal reasons; when the vehicle is dynamic, only the quadtree map is updated, for real-time dynamic collision detection, dynamic path truncation, and dynamic path planning. Simultaneously, for the hybrid A / A planning algorithm, a multi-scenario hybrid heuristic cost strategy is adopted. Different parking scenarios are determined based on environmental information, and different cost types and weights are used for different scenarios to accelerate path search convergence. Finally, several strategies are proposed for the entire parking function steps, such as path pre-planning and lightweighting of the collision detection function, to reduce resource consumption while ensuring parking safety, path effectiveness, and availability. Figure 3 This is a schematic diagram of the path planning and parking solution process combining the hybrid AlphaGo algorithm, such as... Figure 3 As shown, the process includes the following steps:

[0216] Step 1: Initialize the raster map and the quadtree map.

[0217] In this embodiment, this step aims to initialize the map, where the grid map is used for path planning and the quadtree map is used for real-time dynamic collision detection; at the same time, the resolution of the grid map is reduced, such as setting the position (x, y) grid resolution to 0.1m~0.3m (note: parking accuracy requirements are usually at the 10cm level), and the heading angle (θ) is discretized into 8~16 directions (such as 0°, 45°, 90°, etc.) to avoid increasing the number of nodes due to excessively high precision.

[0218] It should be noted that, compared with the path planning of the ordinary A* algorithm, this embodiment reduces the accuracy of the normal grid map and reduces resource consumption; at the same time, it adds the use of quadtree map (since the grid resolution of the quadtree map is determined based on the presence or absence of obstacles, updating the quadtree map will save more resources than the grid map with a fixed resolution), and uses the quadtree map to compensate for the accuracy loss caused by the reduction of the resolution of the grid map.

[0219] Step 2: Establish a parking coordinate system, and generate parking spaces and parking endpoints within the parking coordinate system.

[0220] In this embodiment, this step calculates the available parking space and the final parking endpoint (TargetPoint, hereinafter referred to as Tp) based on the target parking space selected by the user or the default recommended highlighted parking space. Simultaneously, a parking coordinate system is established based on the target parking space, and all calculated coordinates are based on this system. Finally, the parking scenario (ParkCase) is determined based on the parking space type, environmental information, and obstacle information. Examples include normal perpendicular parking spaces, normal horizontal parking spaces, and narrow-aisle perpendicular parking spaces. It should be noted that the parking scenario is used to subsequently call different cost functions for different scenarios.

[0221] Step 3: Trigger pre-planning and update the grid map.

[0222] In this embodiment, this step triggers pre-planning when the user selects a parking space or a default recommended parking space (note: not when clicking "Start Parking"); environmental information and obstacles are updated in the grid map only at the moment a parking space is selected or when the selected parking space changes. The number of times the A* algorithm expands nodes and the overall planning time are limited (e.g., within 0.5 seconds). If a path is not planned within the specified limits, the planning process exits; if successful, the path is saved. It should be noted that the specific planning process of the hybrid A* algorithm is detailed below.

[0223] Step 4: Determine if the pre-planning was successful.

[0224] In this embodiment, after receiving the start parking signal from the user, this step triggers decision planning. If a pre-planned path already exists, it is released directly; otherwise, the environmental information and obstacle information are updated to the grid map, and planning officially begins.

[0225] It should be noted that in this embodiment, the raster map is not updated in real time, but only in the frame where the decision triggers planning, in order to reduce the resource consumption caused by real-time raster map updates.

[0226] Step 5: Trigger formal planning and update the grid map.

[0227] In this embodiment, this step uses the vehicle's current position as the planning starting point and Tp point as the planning ending point to begin expanding nodes on the grid map. The general process involves selecting nodes, generating candidate control inputs, applying a kinematic model to generate new states, collision detection, state discretization, checking / creating / updating nodes, and adding / updating the open list. The specific planning process includes:

[0228] Step 5.1: Selecting the current node.

[0229] In this embodiment, the algorithm selects the node with the smallest cost estimate from the open list, i.e., f(n) = g(n) + h(n); where g(n) is the actual cost from the starting point to node n, and h(n) is the heuristic cost estimate from node n to the destination.

[0230] Step 5.2, Target Inspection.

[0231] In this embodiment, it is checked whether the current node meets the target conditions (e.g., its position is close to the endpoint, and its orientation angle is within a certain error range). The hybrid A* algorithm attempts to connect the current node to the endpoint using an RS (Reed-Sheep) curve; if the condition is met, the path is backtracked, and the search ends. If the condition is not met, the nodes are expanded.

[0232] Step 5.3: Generate candidate control inputs, i.e., discretize the action space.

[0233] In this embodiment, instead of directly moving to predefined discrete neighbor grid points, the hybrid A-star determines a new state based on the vehicle kinematics model. Specifically, this step includes the following:

[0234] (1) Vehicle kinematics model: The precise vehicle kinematics model used by the algorithm is usually a bicycle model. This model defines how the vehicle moves from the current state to a new state based on the steering angle and travel distance / time (or equivalent speed and time step).

[0235] (2) Discretization of the control set: In order to perform the search in the continuous space, it is necessary to discretize the possible control inputs, including:

[0236] (I) Steering Angle Discretization: Discretize the possible steering angle range (e.g., -δ_max to +δ_max) into a finite number of values. A common choice is 3-7 values. For example: full left rudder, straight ahead, full right rudder, sometimes with slight left rudder and slight right rudder added. Note that more refined discretization will increase the computational cost, but may find a better path.

[0237] (II) Discretization of driving direction: Usually supports two modes: forward and reverse.

[0238] (III) Distance / Time Step Discretization: Set a fixed arc length step or a fixed time step. For example, the vehicle attempts to move 0.5 meters or 1 meter each time, or simulates a motion of 0.1 seconds.

[0239] (IV) Input Combination: The discretized steering angle, driving direction, and step size are combined to form a finite set of candidate control inputs. For example: {(full left steering, forward, step size L), (straight, forward, step size L), (full right steering, forward, step size L), (full left steering, reverse, step size L), (straight, reverse, step size L), (full right steering, reverse, step size L)}, which is only an example.

[0240] Step 5.4: Apply the motion model to generate a new state.

[0241] In this embodiment, for each candidate control input combination, the current node's state (position (x, y) and orientation angle θ) is used as the initial state, and a vehicle kinematics model (such as integral dynamics equations) is applied. Based on the selected control input (steering angle δ, driving direction d (forward +1 / reverse -1), step size L or time Δt), the new continuous state (x_new, y_new, θ_new) that the vehicle will reach after applying this control input is precisely calculated. It should be noted that the new state is a continuous floating-point number and is not forcibly aligned to the grid. This is a key manifestation of the "hybrid" characteristic, i.e., the search is performed in continuous space, but the control input is discrete.

[0242] Step 5.5: State discretization and meshing.

[0243] In this embodiment, the collision-free continuous states (x_new, y_new, θ_new) are mapped / aggregated into a coarse discrete state grid cell (i, j, k).

[0244] Step 5.6: Expand nodes.

[0245] In this embodiment, an existence check is performed, that is, the search tree is searched to see if a node representing a discrete grid cell (i,j,k) exists. If a new node (if it does not exist) is found, the node is created; only then is a new search node Node_new formally created. This new node contains the following key information: state_continuous (used to record the continuous state (x_new, y_new, θ_new) that generated it; a very important parameter, requiring precise location during path backtracking), state_discrete (the discrete grid cell (i, j, k) to which it belongs, used for state deduplication and fast lookup), g_cost (the actual cost of reaching this node from the starting point, calculated based on g_current + cost_motion, where cost_motion depends on the distance / action type of movement), h_cost (heuristic cost, calculated based on (x_new, y_new, θ_new) or (i, j, k), f_cost = g_cost + h_cost (i.e., the cost function), parent (pointing to the current node Node_current, i.e., the node that generated it), and control (optional parameter, recording the control input (δ, d, L) that led to this state, used for path backtracking and generating smooth trajectories).

[0246] In this embodiment, the search node Node_new is added to the open list, waiting to be selected for expansion in the future; this step is what truly "expands" the search tree, adding a new branch point to be explored.

[0247] In this embodiment, the node is updated (when it exists and is better), that is, if a node Node_old already exists representing (i, j, k), but the actual cost g_new of the newly calculated path to this discrete unit is less than g_old of Node_old. Updating the node means updating the information of Node_old. The updated information of Node_old includes: state_continuous (updated to the currently calculated better continuous state (x_new, y_new, θ_new). Note: for the same discrete unit, the continuous states may be different), g_cost = g_new, f_cost = g_new + h_cost (note: h_cost is usually unchanged), parent (updated to the current node Node_current), and control (optional, updated to the current control input (δ, d, L)).

[0248] This embodiment also includes adjusting the open list; if Node_old is in the closed list, it needs to be moved back to the open list; if it is in the open list, its f_cost priority is updated. This operation "expands" or optimizes the path to the node. Although no new node is added, the node information is updated, allowing subsequent searches to continue exploring based on a better path.

[0249] Step 5.7, Collision Detection.

[0250] In this embodiment, collision detection is performed on the new continuous states (x_new, y_new, θ_new) generated by the motion model and the expanded new nodes. Alternatively, collision detection can be performed only on the new continuous states generated by the motion model; if a collision is found, the state generated by the specific control input is discarded, and no further steps are performed.

[0251] Step 5.8, Cost Calculation.

[0252] In this embodiment, the cost is mainly divided into two parts: the actual cost g(n) (i.e., the actual cumulative cost from the starting point to the current node n) and the heuristic cost h(n) (i.e., the estimated cost from the current node n to the target state). Therefore, the total cost f(n) is expressed as: f(n) = g(n) + h(n). Note: The algorithm always prioritizes expanding the node with the smallest f(n).

[0253] It should be noted that the calculation of the actual cost g(n) is as follows: g(n) represents the actual cost of reaching node n from the starting point. In the hybrid A* algorithm, it is not a simple Euclidean distance or grid steps, but rather the cumulative cost along the kinematically feasible path of the vehicle's actual travel. When expanding from parent node p to the new node n, the formula for calculating g(n) is usually: g(n) = g(p) + cost_motion(p, n), where cost_motion(p, n) is the cost of a single step performed to move from parent node p to the new node n. This cost_motion is the key and distinctive feature of the calculation of g(n). In this embodiment, cost_motion specifically includes:

[0254] (I) Cost of travel distance: This is the most important component, and it is usually proportional to the physical arc length L of the vehicle's movement, i.e., cost_distance = w_distance L, where w_distance is the weighting coefficient for distance cost (usually set to 1). Note: Total path length is the most basic metric for measuring efficiency.

[0255] (II) Steering change penalty cost_steering_change: If the steering angle δ_current of the current action is different from the steering angle δ_prev of the previous action recorded by the parent node p (or the change exceeds the threshold), a penalty is required, i.e., cost_steering_change = w_steering_change |δ_current-δ_prev|or cost_steering_change=w_steering_change 1 (fixed penalty if changes occur), where w_steering_change is the steering change penalty weight (positive value). Frequent or abrupt steering wheel turns increase driving difficulty, reduce comfort, and accelerate mechanical wear; encourage the generation of smoother steering paths.

[0256] (III) Gear shift penalty cost_gear_change: If the current driving direction d_current (forward +1 / reverse -1) is different from the driving direction d_prev of the previous driving direction recorded by the parent node p, a larger penalty needs to be applied, i.e., cost_gear_change = w_gear_change 1 (fixed penalty if changing direction), where w_gear_change is the penalty weight for changing direction (usually set relatively large). Frequent forward / reverse switching significantly reduces driving efficiency, increases operational complexity, and affects comfort and safety (especially in confined spaces). The algorithm should prioritize generating paths with as few changes as possible (ideally none).

[0257] (IV) Obstacle proximity penalty cost_obstacle: Use the grid map to query the Euclidean distance d_obs from the continuous state (x_n, y_n) of a new node n to the nearest obstacle. When d_obs is less than a certain safety threshold d_safe, a proximity penalty is applied, and the closer to the obstacle, the greater the penalty, i.e., cost_obstacle = w_obstacle The function `max(0,(d_safe-d_obs) / d_safe)` is used, where `w_obstacle` is the obstacle proximity penalty weight (positive value); or `cost_obstacle=w_obstacle / (d_obs+ε)` (ε is a minimum value to prevent division by zero). This encourages generated paths to stay as far away from obstacles as possible, increasing the safety margin and allowing room for subsequent trajectory optimization and control; it also avoids paths running along obstacle edges to reduce collision risk (considering localization and control errors).

[0258] (V) Relative distance cost based on the parking coordinate system: This refers to mapping the vehicle's movement distance to the relative x and y axes in the parking coordinate system, determining the lateral distance weight w_x_distance, the lateral distance x_distance relative to the x-axis, the longitudinal distance weight w_y_distance, and the longitudinal distance y_distance relative to the y-axis, and determining the relative distance cost cost_relative_distance based on the above weights and the lateral and longitudinal distances. This cost is specifically expressed as:

[0259] cost_relative_distance=w_x_distance x_distance+w_y_distance y_distance.

[0260] Note: For open spaces, the search is more likely to go above the parking space and then enter the parking space. For narrow passages, the search is more likely to go in front of the parking space to avoid ineffective node expansion and increase node expansion speed; thus generating a more reasonable and human-like path.

[0261] In summary, the typical form of cost_motion(p, n) in this embodiment is:

[0262]

[0263] It should be noted that in the typical form of cost_motion(p, n) in this embodiment, L in the driving distance cost cost_distance is a normalized value (e.g., L is the ratio of the actual physical arc length of the vehicle movement to the set maximum arc length of the vehicle movement, aiming to eliminate the influence of dimensions and make L a dimensionless value. Note that the normalization method of L is only for illustrative purposes, and its specific normalization method can be adaptively adjusted according to actual needs). In the steering change penalty cost cost_steering_change, |δ_current-δ_prev| is the normalized steering angle change (e.g., the steering angle change can be divided by the set maximum steering angle to obtain a dimensionless value). The lateral and longitudinal distances in the relative distance cost cost_relative_distance based on the parking coordinate system, i.e., x_distance and y_distance, are also normalized values. Their specific normalization methods can be determined by referring to conventional methods in this field, and will not be elaborated on here.

[0264] In this embodiment, different weight ratios are configured according to different park_cases (parking scenarios), namely the weights mentioned above: w_distance, w_steering_change, w_gear_change, w_obstacle, w_x_distance, and w_y_distance, and corresponding configuration file tables for each weight are generated. It should be noted that the configuration file tables for each weight in the actual cost can be determined based on offline calibration experiments, that is, by using extensive offline testing to help determine the weight values ​​of different parking space types and their corresponding costs. Note: if d_c != d_p indicates that the number of gear changes is not equal each time; the relevant content below can be understood adaptively; for the same parking space type, the specific values ​​of at least one type of cost weight can be adaptively adjusted.

[0265] It should be noted that the weighting of `cost_distance` varies depending on the parking scenario. For example, in an open parking space where `L` < 1m, `w_distance` is increased to prevent the generation of too many short paths that could negatively impact the parking experience. Regarding `cost_gear_change`, for end-point parking scenarios, `w_steering_change` is increased to tend to plan paths with larger turning angles, facilitating vehicle U-turns. Therefore, for an open perpendicular parking space, the actual cost calculation formula is:

[0266] 1 L+1 |δ_current-δ_prev|+1 x_distance+1 y_distance+1 (if d_c != d_p) + 1 max(0,(d_safe-d_obs) / d_safe).

[0267] In this embodiment, the actual cost calculation formula for a vertical parking space at the end is as follows:

[0268] cost_motion=0.5 L+0.5 |δ_current-δ_prev|+0.5 x_distance+1 y_distance.

[0269] In this embodiment, the actual cost calculation formula for narrow-aisle perpendicular parking spaces is as follows:

[0270] 1 L+1 |δ_current-δ_prev|+0.5 x_distance+1.5 y_distance+1 (if d_c != d_p) + 0.5 max(0,(d_safe-d_obs) / d_safe).

[0271] In this embodiment, for perpendicular parking spaces with cars on both sides, the actual cost calculation formula is as follows:

[0272] 1 L+1 |δ_current-δ_prev|+1.5 x_distance+0.5 y_distance+0.5 (if d_c != d_p) + 1 max(0,(d_safe-d_obs) / d_safe).

[0273] In this embodiment, the heuristic cost h(n) is calculated, i.e., h(n) is used to estimate the minimum cost to reach the target state (x_goal, y_goal, θ_goal) from the state (x_n, y_n, θ_n) of node n. h(n) specifically includes:

[0274] (I) Distance cost to the destination: where the distance to the destination includes the Euclidean distance and the Manhattan distance, then the corresponding h(n) is:

[0275] Euclidean distance h(n) = w_distance sqrt((x_n-x_goal)^2+(y_n-y_goal)^2);

[0276] Manhattan distance h(n) = w_x_distance (x_n-x_goal)+w_y_distance (y_n-y_goal).

[0277] (II) The cost of the angle error to the endpoint, and the corresponding h(n) is: h(n) = w_steering_change |δ_n-δ_goal|. Note: This is used to encourage vehicles to drive straight into parking spaces.

[0278] (III) Node Continuous State Cost: This refers to the shortest path length of the Reeds-Shepp curve from the continuous states (x_n, y_n, θ_n) of node n to the target state (x_goal, y_goal, θ_goal). Note: Strictly satisfying acceptability (under the constraints of no obstacles and minimum turning radius of the vehicle, this is the theoretical shortest path length); for highly efficient search guidance, the corresponding h(n) is: h(n) = w_rs_distance rs_distance; where w_rs_distance is the weight of the shortest path length cost, and rs_distance is the length of the Reeds-Shepp curve.

[0279] (IV) Distance cost to the anchor point: In this embodiment, different anchor points are set according to the parking space type and park_case (their function is to serve as intermediate points on the path, making the path planning more inclined to search towards the anchor point). Note: When the distance to the anchor point is far, the weight of the distance cost to the anchor point is reduced; when the distance to the anchor point is close, the weight of the distance cost to the anchor point is increased. This also helps to efficiently guide the search. The corresponding h(n) is:

[0280] h(n) = w_anchor_distance sqrt((x_n-x_anchor)^2+(y_n-y_anchor)^2);

[0281] Where x_anchor represents the distance from the anchor point along the x-axis, y_anchor represents the distance from the anchor point along the y-axis, and w_anchor_distance represents the weight of the distance cost to the anchor point.

[0282] Finally, h(n) equals the sum of the different heuristic cost types mentioned above. Different weight ratios are configured according to different park_cases (parking scenarios). In some scenarios, only the distance to the destination is considered as the heuristic cost, while in others, a mixture of the four heuristic costs is used. A weight configuration table is generated similarly to g(n) to increase search efficiency and improve path quality. It should be noted that the specific values ​​of each parameter in the four heuristic costs mentioned above are all normalized data. For example, the distance cost to the destination, when using Euclidean distance, is the corresponding dimensionless data sqrt((x_n-x_goal)^2+(y_n-y_goal)^2) after normalization. Similarly, rs_distance in the node continuous state cost is the length of the Reeds-Shepp curve after normalization. The normalization methods for different parameters can be determined according to the adaptability of relevant operations in this field, and will not be elaborated further here. Furthermore, the weight configuration table for the four heuristic costs in this embodiment can also be determined based on offline calibration experiments. It should be noted that this embodiment can adaptively determine the corresponding parking scenario and corresponding cost weight configuration table based on the addition or deletion of actual parking space types; for the same parking space type, the specific values ​​of at least one type of cost weight can be adaptively adjusted. In this embodiment, for open vertical parking spaces, the distance of the anchor point and the shortest path length of the Reeds-Shepp curve from the continuous state (x_n, y_n, θ_n) of node n to the target state (x_goal, y_goal, θ_goal) are mainly considered, and the corresponding h(n) is:

[0283] h(n)=1 sqrt((x_n-x_anchor)^2+(y_n-y_anchor)^2)+0.5 rs_distance.

[0284] In this embodiment, for a vertical parking space at the end, the corresponding h(n) is:

[0285] h(n)=1 sqrt((x_n-x_anchor)^2+0.5 (x_n-x_goal)+1 (y_n-y_goal).

[0286] In this embodiment, for narrow-aisle vertical parking spaces, the corresponding h(n) is:

[0287] h(n)=1 sqrt((x_n-x_anchor)^2+0.5 (x_n - x_goal) + 0.5 (y_n-y_goal).

[0288] In summary, the cost of sorting open lists is f(n) = g(n) + h(n).

[0289] It should be noted that this step first determines different park_cases (parking scenarios) based on different environmental information, and then configures different cost types and cost weights for different actual costs and heuristic costs for different parking scenarios. With the assistance of a large number of test results, the weights and values ​​of different types of costs are obtained, which can lead to faster convergence when expanding nodes, while improving the quality of the planned path and making it more in line with human parking habits. At the same time, collision detection is the most resource-intensive part when expanding nodes. In this embodiment, a lookup table is used to query the distance to obstacles, and the lightweight implementation of collision detection can greatly reduce the resource consumption of the hybrid A* algorithm. Among them, a three-circle coverage model can be used, using three circles with fixed radii to approximate the vehicle outline (front / middle / rear circle centers). At the same time, when updating the grid map, the distance to obstacles is directly updated to the attribute of each grid, realizing fast obstacle distance query.

[0290] Step 6: Determine if the planning was successful.

[0291] In this embodiment, if the planning is successful in this step, step 7 is executed; otherwise, step 5 is repeated.

[0292] Step 7: Release the path and begin parking.

[0293] It should be noted that in this embodiment, after the path is released, the dynamic path tracking stage begins. At this time, the raster map is no longer updated, only the quadtree map is updated.

[0294] It's important to explain that a quadtree map is a tree-like data structure where each non-leaf node has four nodes, recursively dividing the two-dimensional space into four quadrants. Each node represents a region (box) and stores whether that region is occupied by an obstacle. During dynamic path tracking, this embodiment updates the environmental information to the quadtree map in real time, initiating real-time dynamic collision detection and dynamic truncation. For the 20 points following the current path matching point, collision detection is performed using the quadtree map. Each matching point is expanded into a vehicle model, and the quadtree recursively checks, starting from the root node, whether the region intersects with the vehicle model generated from the matching point. If they intersect, a collision occurs; if a collision occurs, the path after the collision point is truncated.

[0295] It should be noted that updating the grid map requires more resources than updating the quadtree map. Therefore, this embodiment only tends to update the grid map when path planning needs to be triggered. After planning is triggered and the vehicle tracks the path, only the quadtree map is updated. Real-time path collision detection is used to compensate for the real-time updates of environmental and obstacle information and reduce the actual error caused by grid resolution. At the same time, it can predict future collisions and cut off the path in advance to reduce parking risks.

[0296] It is important to note that when a collision occurs, it is necessary to wait until the vehicle reaches the cutoff point before replanning, updating the environmental and obstacle information to the grid map, and repeating steps 5 and 6 above.

[0297] In this embodiment, real-time dynamic path planning using a quadtree map is designed during vehicle movement. Specifically, dynamic planning has two modes: one is to plan the path with the vehicle's current position as the origin and tp as the destination; the other is to calculate the starting point of the planning path based on the points after the current path matching point, initiate planning towards tp, and then merge it with the original path up to the planning starting point, while adaptively adjusting the position of the planning starting point according to the current speed. In practical applications, the dynamic planning mode used will be determined based on the specific situation. If there is a control error, the first mode of dynamic planning will be used; if the tp point jumps due to the appearance of new obstacles in real time, the second mode of dynamic planning will be used. In this embodiment, the planning is not a conventional hybrid A-star search, but rather directly attempts to connect the planning starting point and tp point with an RS curve, and then performs collision detection based on the quadtree map (the same scheme as the dynamic collision detection in step 7). Furthermore, in the case of mode two, multiple planning starting points can be determined for simultaneous planning. If the planning is successful, the new paths are compared, and the better new path is selected for replacement.

[0298] It should be noted that this embodiment focuses on the fact that most parking products on the market use a hybrid AlphaGo algorithm to plan the real-time vehicle position and Tp point, and replace the new path after comparing the paths; however, this requires strong computing power. Therefore, while minimizing resources, this embodiment adopts a method of directly connecting to the RS curve, placing the path in a quadtree and using a quadtree map for collision detection, avoiding the resource overhead of expanding nodes and updating the grid map. At the same time, dynamic planning is triggered every 5 seconds, which further reduces the resource overhead of dynamic planning to a certain extent. Finally, the two dynamic planning modes are distinguished, which also ensures the timeliness and availability of the path.

[0299] In summary, the embodiments of the present invention, by alternating the use of grid maps and quadtree maps, can achieve efficient utilization of the hybrid A* algorithm on low-computing-power chips. This not only ensures the environmental adaptability of the parking path, thereby reducing resource consumption, but also avoids collision accidents, while taking into account both parking safety and control efficiency.

[0300] This embodiment also provides a parking control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, a "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0301] This invention provides a parking control device, such as... Figure 4 As shown, the device includes:

[0302] The map update module 401 is used to respond to the user's parking operation, determine the target parking space of the vehicle, obtain the current environmental information of the vehicle, and update the current environmental information to the grid map.

[0303] The path planning module 402 is used for a search-based path planning algorithm to perform path planning using an updated grid map, generating a parking path from the vehicle's initial position to the target parking space.

[0304] The path release module 403 is used to control the vehicle to follow the parking path in response to the parking path being released.

[0305] The path tracking module 404 is used to update the current environmental information acquired during the vehicle's movement to the quadtree map, and to perform collision detection on the parking path based on the updated quadtree map.

[0306] The vehicle control module 405 is used to control the vehicle to park in the target parking space based on the collision detection results.

[0307] In some optional implementations, the path planning module 402 includes: a first planning submodule and a second planning submodule; wherein, the first planning submodule is used to determine the parking scenario based on the type of the target parking space and environmental information; the second planning submodule is used to call a cost function matching the parking scenario to perform node expansion and path search on the updated grid map, and determine the parking path from the initial position of the vehicle to the target parking space; wherein, the cost function includes an actual cost function and a heuristic cost function; the actual cost function includes at least one of the following: driving distance cost, steering change penalty cost, gear shift penalty cost, obstacle approach penalty cost, and relative distance cost based on the parking coordinate system; the heuristic cost function includes at least one of the following: distance cost to the destination, angle error cost to the destination, node continuity state cost, and distance cost to a preset anchor point.

[0308] In some optional implementations, the second planning submodule includes: a first planning unit, a second planning unit, a third planning unit, and a fourth planning unit; wherein, the first planning unit is used to query the distance from the vehicle's grid to the obstacle in the updated grid map using a lookup table method to obtain the collision distance from the vehicle to the obstacle; the second planning unit is used to perform node collision detection based on the collision distance; the third planning unit is used to discard the current node if there is a collision risk; and the fourth planning unit is used to retain the current node if there is no collision risk.

[0309] In some optional embodiments, the apparatus further includes: a path pre-planning module, configured to perform path pre-planning using an updated grid map based on a search-based path planning algorithm to generate a pre-planned path from the vehicle's initial position to the target parking space; in response to receiving a user's start parking signal, if a pre-planned path exists, release the pre-planned path; control the vehicle to follow the pre-planned path, and perform the steps of updating the current environmental information acquired during the vehicle's movement to a quadtree map, and performing collision detection on the parking path based on the updated quadtree map; if no pre-planned path exists, execute the step of performing path planning using an updated grid map based on a search-based path planning algorithm to generate a parking path from the vehicle's initial position to the target parking space.

[0310] In some optional implementations, the path tracking module 404 includes: a first collision submodule, a second collision submodule, a third collision submodule, a fourth collision submodule, a fifth collision submodule, and a sixth collision submodule; wherein, the first collision submodule is used to acquire the vehicle model of the vehicle and determine the current path matching point of the vehicle on the parking path; the second collision submodule is used to select a preset number of forward path points on the parking path as detection points starting from the current path matching point; the third collision submodule is used to project the vehicle model sequentially onto each detection point and calculate the vehicle contour of the vehicle at the corresponding detection point; the fourth collision submodule is used to recursively query the updated quadtree map. The system sequentially obtains the corresponding node in the quadtree map for each point to be detected and determines whether each node intersects with the corresponding vehicle contour. The fifth collision submodule is used to determine that if the current node intersects with the corresponding vehicle contour and the area represented by the current node is marked as occupied, the collision detection result is that there is a collision risk in the parking path, and the point to be detected corresponding to the current node is taken as the target collision point. The sixth collision submodule is used to determine that if the current node does not intersect with the corresponding vehicle contour or the area represented by the current node is marked as free, the point to be detected corresponding to the current node has no collision risk. When it is determined that there is no collision risk in all points to be detected, the collision detection result is that there is no collision risk in the parking path.

[0311] In some optional implementations, the vehicle control module 405 includes: a first control submodule and a second control submodule; wherein, the first control submodule is used to, when it is determined that the collision detection result indicates that there is a collision risk in the parking path, truncate the path after the target collision point in the parking path, and control the vehicle to stop when the vehicle moves close to the target collision point, and / or, return to the step of obtaining the current environmental information of the vehicle and updating the current environmental information to the grid map, until the vehicle is parked in the target parking space; the second control submodule is used to, when it is determined that the collision detection result indicates that there is no collision risk in the parking path, control the vehicle to follow the parking path until the vehicle is parked in the target parking space.

[0312] In some optional implementations, the first control submodule includes: a first determination unit, a second determination unit, and a third determination unit; wherein, the first determination unit is used to determine whether the risk index value corresponding to the collision risk is greater than a preset risk threshold; the second determination unit is used to execute the step of controlling the vehicle to park in the target parking space when the collision detection result indicates that there is a collision risk in the parking path if the risk index value corresponding to the collision risk is greater than the preset risk threshold; the third determination unit is used to determine the instantaneous position of the vehicle if the risk index value corresponding to the collision risk is not greater than the preset risk threshold, and determine the instantaneous path point corresponding to the instantaneous position on the parking path; determine the path starting point based on the instantaneous path point and the parking path, and plan the path from the path starting point to the target parking space to generate a planned path; splice the planned path and the original path to obtain a new parking path; wherein, the original path includes the path from the initial position of the vehicle to the instantaneous path point in the parking path; control the vehicle to track the new parking path, and during the movement of the vehicle, execute the step of updating the current environmental information to the quadtree map and performing collision detection on the parking path based on the updated quadtree map.

[0313] In some optional implementations, the third determination unit includes: a first determination subunit, a second determination subunit, a third determination subunit, and a fourth determination subunit; wherein, the first determination subunit is used to obtain the instantaneous speed of the vehicle corresponding to the instantaneous path point; the second determination subunit is used to select at least one path point forward from the instantaneous path point on the parking path as the path starting point based on the instantaneous speed; wherein, the instantaneous speed is inversely proportional to the target distance, and the target distance represents the path distance between any path starting point and the target parking space; the third determination subunit is used to plan a planned path from the path starting point to the target parking space if there is only one path starting point; the fourth determination subunit is used to plan candidate paths from each path starting point to the target parking space if there are multiple path starting points, and select the optimal candidate path as the planned path.

[0314] In some optional implementations, the second control submodule includes: a first detection unit, a second detection unit, a third detection unit, and a fourth detection unit; wherein, the first detection unit is used to acquire the current pose of the vehicle during the process of controlling the vehicle to follow the parking path; the second detection unit is used to determine whether there is a deviation between the current pose and the pose of the corresponding path point in the parking path; the third detection unit is used to continue to execute the step of controlling the vehicle to follow the parking path until the vehicle is parked in the target parking space if there is no deviation between the current pose and the pose of the corresponding path point in the parking path; the fourth detection unit is used to acquire the current position of the vehicle if there is a deviation between the current pose and the pose of the corresponding path point in the parking path; plan the path from the current position to the target parking space and generate a new planned path; control the vehicle to follow the new planned path, and during the movement of the vehicle, execute the steps of updating the acquired current environment information to the quadtree map and performing collision detection on the parking path based on the updated quadtree map.

[0315] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0316] In this embodiment, the parking control device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0317] The parking control device of this invention utilizes a grid map for global path planning when the vehicle is static and a quadtree map for real-time collision detection when the vehicle is moving. By alternating between these two types of maps, the design enables efficient use of search-based path planning algorithms on low-computing-power chips. This not only ensures a high degree of matching between the parking path and the current environment but also significantly improves the accuracy and feasibility of path planning while reducing resource consumption. This helps avoid collisions, thereby significantly improving parking safety and optimizing user experience and parking control efficiency.

[0318] This invention also provides a vehicle, which includes a controller. In this embodiment, the controller is a vehicle controller, used for powering on / off and waking up its subordinate sub-controllers and network nodes, and each of its power supply interfaces can collect the real-time output current. Other controllers with the above functions are also applicable.

[0319] Figure 5 This is a schematic diagram of the structure of the controller provided in an optional embodiment of the present invention, as shown below. Figure 5As shown, the controller includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the controller, including instructions stored in or on memory to display graphical information of a GUI on an external input / output system (such as a display device coupled to the interface). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple controllers can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.

[0320] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0321] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0322] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the controller. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0323] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0324] The controller also includes a communication interface 30 for the main control chip to communicate with other devices or communication networks.

[0325] This invention also provides a computer-readable storage medium. The methods described in this embodiment can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor main control chips, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0326] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A parking control method, characterized in that, The method includes: In response to the user's parking operation, the system determines the target parking space for the vehicle, obtains the current environmental information of the vehicle, and updates the current environmental information to the grid map. The search-based path planning algorithm uses the updated grid map to plan the path and generate a parking path from the vehicle's initial position to the target parking space. In response to the parking path being released, control the vehicle to follow the parking path; During the movement of the vehicle, the acquired current environmental information is updated to the quadtree map, and collision detection is performed on the parking path based on the updated quadtree map; Based on the collision detection results, the vehicle is controlled to park in the target parking space; Wherein, when the collision detection result indicates that there is a collision risk in the parking path, the step of controlling the vehicle to park in the target parking space based on the collision detection result includes: Determine the instantaneous position of the vehicle, and determine the instantaneous path point corresponding to the instantaneous position on the parking path; The starting point of the path is determined based on the instantaneous waypoint and the parking path, and the path from the starting point of the path to the target parking space is planned to generate a planned path; By combining the planned path with the original path, a new parking path is obtained; wherein, the original path includes the path from the initial position of the vehicle to the instantaneous path point in the parking path; The vehicle is controlled to track the new parking path, and during the movement of the vehicle, the steps of updating the current environmental information to the quadtree map and performing collision detection on the parking path based on the updated quadtree map are executed. The step of determining the starting point of the path based on the instantaneous waypoint and the parking path, and planning the path from the starting point to the target parking space to generate a planned path, includes: Obtain the instantaneous speed of the vehicle at the instantaneous path point; Based on the instantaneous speed, at least one path point is selected forward from the instantaneous path point on the parking path as the path starting point; wherein, the instantaneous speed is inversely proportional to the target distance, and the target distance represents the path distance between any path starting point and the target parking space; If there is only one starting point for the path, then plan the path from the starting point to the target parking space. If there are multiple starting points for a path, then candidate paths from each starting point to the target parking space are planned, and the optimal candidate path is selected as the planned path.

2. The parking control method according to claim 1, characterized in that, The step of controlling the vehicle to park in the target parking space based on the collision detection results includes: When the collision detection result indicates that there is a collision risk in the parking path, the path after the target collision point in the parking path is cut off, and when the vehicle moves close to the target collision point, the vehicle is controlled to stop, and / or, the steps of obtaining the current environmental information of the vehicle and updating the current environmental information to the grid map are returned to be executed again until the vehicle is parked in the target parking space.

3. The parking control method according to claim 1, characterized in that, The collision detection of the parking path based on the updated quadtree map includes: Obtain the vehicle model of the vehicle and determine the current path matching point of the vehicle on the parking path; Starting from the current path matching point, a preset number of path points forward on the parking path are selected as points to be detected; The vehicle model is projected sequentially onto each detection point, and the vehicle profile at the corresponding detection point is calculated. The updated quadtree map is recursively queried to obtain the node corresponding to each point to be detected in the quadtree map in turn, and it is determined whether each node intersects with the corresponding vehicle outline. If the current node intersects with the corresponding vehicle outline, and the area represented by the current node is marked as occupied, then the collision detection result is determined to be that there is a collision risk in the parking path, and the detection point corresponding to the current node is taken as the target collision point.

4. The parking control method according to claim 3, characterized in that, The method further includes: If the current node does not intersect with the corresponding vehicle outline, or the area represented by the current node is marked as free, then it is determined that the detection point corresponding to the current node has no collision risk; and when it is determined that all detection points have no collision risk, the collision detection result is determined that the parking path has no collision risk.

5. The parking control method according to claim 2, characterized in that, Before determining the instantaneous position of the vehicle, the method further includes: Determine whether the risk index value corresponding to the collision risk is greater than a preset risk threshold; If the risk index value corresponding to the collision risk is greater than the preset risk threshold, then the step of truncating the path after the target collision point in the parking path is executed. If the risk index value corresponding to the collision risk is not greater than the preset risk threshold, then the step of determining the instantaneous position of the vehicle is executed.

6. The parking control method according to claim 1, characterized in that, When the collision detection result indicates that there is no collision risk in the parking path, the method further includes: Control the vehicle to follow the parking path until the vehicle is parked in the target parking space.

7. The parking control method according to claim 6, characterized in that, In the process of controlling the vehicle to track the parking path, the method further includes: Obtain the current pose of the vehicle; Determine whether there is a deviation between the current pose and the pose of the corresponding path point in the parking path; If there is no deviation between the current pose and the pose of the corresponding path point in the parking path, then the step of controlling the vehicle to track the parking path continues until the vehicle is parked in the target parking space.

8. The parking control method according to claim 7, characterized in that, If there is a deviation between the current pose and the pose of the corresponding path point in the parking path, the method further includes: Obtain the current location of the vehicle; Plan the path from the current location to the target parking space and generate a new planned path; The vehicle is controlled to track the newly planned path, and during the movement of the vehicle, the steps of updating the current environmental information to the quadtree map and performing collision detection on the parking path based on the updated quadtree map are executed.

9. The parking control method according to claim 1, characterized in that, The search-based path planning algorithm is a hybrid A* algorithm. This algorithm utilizes an updated grid map for path planning, generating a parking path from the vehicle's initial position to the target parking space, including: The parking scenario is determined based on the type of the target parking space and the environmental information. The updated grid map is expanded and a path is searched by invoking a cost function that matches the parking scenario to determine the parking path from the vehicle's initial position to the target parking space. The cost function includes an actual cost function and a heuristic cost function. The actual cost function includes at least one of the following: driving distance cost, steering change penalty cost, gear shift penalty cost, obstacle approach penalty cost, and relative distance cost based on the parking coordinate system. The heuristic cost function includes at least one of the following: distance cost to the destination, angle error cost to the destination, node continuity state cost, and distance cost to a preset anchor point.

10. The parking control method according to claim 9, characterized in that, The updated raster map includes the distance from the raster to the obstacle in its attribute parameters; when expanding the nodes of the updated raster map, the method further includes: The collision distance from the vehicle to the obstacle is obtained by looking up the distance from the vehicle's grid cell to the obstacle in the updated grid map using a table lookup method. Node collision detection is performed based on the aforementioned collision distance; If the current node poses a collision risk, then discard the current node; If there is no collision risk at the current node, then the current node is retained.

11. The parking control method according to any one of claims 1 to 10, characterized in that, Before the search-based path planning algorithm performs path planning using the updated raster map, the method further includes: The search-based path planning algorithm uses the updated grid map to pre-plan the path and generate a pre-planned path from the vehicle's initial position to the target parking space. In response to receiving the user's parking start signal, if the pre-planned path exists, the pre-planned path is released; the vehicle is controlled to follow the pre-planned path, and the steps of updating the current environment information acquired during the movement of the vehicle to the quadtree map and performing collision detection on the parking path based on the updated quadtree map are executed. If the pre-planned path does not exist, the search-based path planning algorithm is executed to perform path planning using the updated grid map, generating a parking path from the vehicle's initial position to the target parking space.

12. A parking control device, characterized in that, The device includes: The map update module is used to respond to the user's parking operation, determine the target parking space of the vehicle, obtain the current environmental information of the vehicle, and update the current environmental information to the grid map. The path planning module is used by a search-based path planning algorithm to perform path planning using an updated grid map, generating a parking path from the vehicle's initial position to the target parking space. A path release module is used to control the vehicle to follow the parking path in response to the parking path being released. The path tracking module is used to update the current environmental information acquired during the movement of the vehicle to the quadtree map, and to perform collision detection on the parking path based on the updated quadtree map. The vehicle control module is used to control the vehicle to park in the target parking space based on the collision detection results; Wherein, when the collision detection result indicates that there is a collision risk in the parking path, the step of controlling the vehicle to park in the target parking space based on the collision detection result includes: Determine the instantaneous position of the vehicle, and determine the instantaneous path point corresponding to the instantaneous position on the parking path; The starting point of the path is determined based on the instantaneous waypoint and the parking path, and the path from the starting point of the path to the target parking space is planned to generate a planned path; By combining the planned path with the original path, a new parking path is obtained; wherein, the original path includes the path from the initial position of the vehicle to the instantaneous path point in the parking path; The vehicle is controlled to track the new parking path, and during the movement of the vehicle, the steps of updating the current environmental information to the quadtree map and performing collision detection on the parking path based on the updated quadtree map are executed. The step of determining the starting point of the path based on the instantaneous waypoint and the parking path, and planning the path from the starting point to the target parking space to generate a planned path, includes: Obtain the instantaneous speed of the vehicle at the instantaneous path point; Based on the instantaneous speed, at least one path point is selected forward from the instantaneous path point on the parking path as the path starting point; wherein, the instantaneous speed is inversely proportional to the target distance, and the target distance represents the path distance between any path starting point and the target parking space; If there is only one starting point for the path, then plan the path from the starting point to the target parking space. If there are multiple starting points for a path, then candidate paths from each starting point to the target parking space are planned, and the optimal candidate path is selected as the planned path.

13. A vehicle, characterized in that, The vehicle includes a controller, the controller comprising: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the parking control method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the parking control method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Path re-planning method, device, equipment and vehicle

    CN119618250A

  • Autonomous parking path collision detection method based on quadtree map

    CN119821381A