A parking path determination method, device and equipment
By using path templates and kinematic heuristics to determine parking path points, the problems of long parking path planning time and low safety are solved, and fast and safe parking path planning is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, parking path planning is time-consuming and has low safety, especially due to insufficient distance from obstacles, which makes automatic parking paths unsafe.
By obtaining the start and end path points, candidate path points are determined using path template files and kinematic heuristic files. The target path point is selected based on the kinematic heuristic cost, and the target parking path is generated. The path planning process is accelerated by combining offline processing and online planning.
It achieves fast and safe parking path planning, significantly improves the distance between the parking path and obstacles, reduces the algorithm planning time, and ensures the high safety and efficiency of the parking path.
Smart Images

Figure CN120817065B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent driving, and in particular to a parking path determination method, device and equipment. BACKGROUND
[0002] With the continuous development of vehicle assisted driving technology and vehicle automatic driving technology, many vehicles have an automatic parking (automatic parking) function. Automatic parking refers to automatic parking of a vehicle into a parking space without manual control by a user, which can help the user to automatically park the vehicle and avoid manual parking into a parking space, thereby improving the user experience.
[0003] In order to realize the automatic parking function, a parking path needs to be determined, and the vehicle is automatically parked into a parking space based on the parking path. However, how to determine the parking path has not been effectively realized. For example, the planning time of the parking path is relatively long, and the distance between the parking path and an obstacle is small, which results in low safety of the parking path. SUMMARY
[0004] The present application provides a parking path determination method, which comprises:
[0005] obtaining a starting path point and an ending path point corresponding to a parking path;
[0006] determining the starting path point as a current path point, determining K candidate path points corresponding to the current path point based on a stored path template file, K being greater than 1; wherein the path template file comprises K path templates, and a path template represents a basic action between the current path point and a candidate path point;
[0007] for each candidate path point, determining a kinematic heuristic value of the candidate path point based on a stored kinematic heuristic file, determining a target value of the candidate path point based on the kinematic heuristic value; selecting a candidate path point from the K candidate path points as a target path point based on the target value of each candidate path point, and adding the target path point to a path point set;
[0008] determining whether the target path point and the ending path point satisfy a configured constraint condition;
[0009] if not, determining the target path point as the current path point, and returning to perform the operation of determining the K candidate path points corresponding to the current path point based on the stored path template file;
[0010] if yes, determining a target parking path based on all target path points in the path point set.
[0011] The present application provides a parking path determination device, which comprises:
[0012] An acquisition module is configured to acquire a starting path point and an ending path point corresponding to a parking path;
[0013] A determination module is configured to determine the starting path point as a current path point, determine K candidate path points corresponding to the current path point based on a stored path template file, where K is greater than 1; the path template file includes K path templates, and each path template represents a basic action between the current path point and a candidate path point; for each candidate path point, determine a kinematic heuristic value of the candidate path point based on a stored kinematic heuristic file, determine a target value of the candidate path point based on the kinematic heuristic value; select one candidate path point from the K candidate path points as a target path point based on the target value of each candidate path point, and add the target path point to a path point set.
[0014] A processing module is configured to determine whether the target path point and the ending path point satisfy a configured constraint condition; if not, determine the target path point as the current path point, and determine K candidate path points corresponding to the current path point based on the stored path template file by the determination module; if yes, determine a target parking path based on all target path points in the path point set.
[0015] The present application provides an electronic device, comprising: a processor and a machine readable storage medium, the machine readable storage medium stores machine executable instructions capable of being executed by the processor; the processor is configured to execute the machine executable instructions to implement the parking path determination method of the above examples of the present application.
[0016] The present application provides a computer program product, the computer program product comprises a computer program, the computer program is executed by the processor to realize the parking path determination method of the above examples of the present application.
[0017] The present application provides a machine readable storage medium, the machine readable storage medium stores machine executable instructions capable of being executed by the processor; wherein the processor is configured to execute the machine executable instructions to implement the parking path determination method of the above examples of the present application.
[0018] It can be seen from the above technical solutions that in the embodiments of the present application, the K candidate path points corresponding to the current path point can be determined based on a path template file, the path template file includes K path templates, the K candidate path points correspond to the K path templates one by one, and the path template represents the basic action between the current path point and the candidate path point. In this way, only the K candidate path points corresponding to the K path templates need to be selected, the K candidate path points can be quickly found, the range of the candidate path points can be constrained according to the designed path template, and the candidate path points meet the design requirements. For each candidate path point, the kinematic heuristic value of the candidate path point can be determined based on a kinematic heuristic file, the target value is determined based on the kinematic heuristic value, and then the target path point is selected based on the target value of each candidate path point, and the target path point is used to generate a target parking path. In this way, the candidate path point with the minimum cost can be selected as the target path point based on the kinematic heuristic value, and then the target parking path is the path with the minimum cost, so that the distance between the target parking path and the obstacle can be significantly improved, the high safety of the target parking path is realized, and the driving time of the target parking path is relatively small.
[0019] An implementation manner of offline processing and online planning is proposed. For the offline processing process, the general, high-computational, and high-time-consuming processing work is preferentially calculated and stored in the form of an offline file, that is, the path template file and the kinematic heuristic file are pre-stored. For the online planning process, the result of the offline processing is directly called, that is, the target parking path is determined based on the path template file and the kinematic heuristic file, so that the parking path planning process can be effectively accelerated, the planning time of the parking path is relatively short, the algorithm planning time-consuming is significantly reduced, and the target parking path is efficiently, safely, and quickly planned for the vehicle. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 FIG. 1 is a flow diagram of a parking path determination method in an embodiment of the present application;
[0021] Figure 2 FIG. 2 is a framework diagram of a parking path determination method in an embodiment of the present application;
[0022] Figure 3 FIG. 3 is a schematic diagram of eight path templates in an embodiment of the present application;
[0023] Figure 4 FIG. 4 is a schematic diagram of collision detection acceleration in an embodiment of the present application;
[0024] Figure 5 FIG. 5 is a schematic diagram of a kinematic heuristic file in an embodiment of the present application;
[0025] Figure 6Ais a schematic diagram of a parking scene containing a curb in an embodiment of the present application;
[0026] Figure 6B is a schematic diagram of an occupancy grid map in an embodiment of the present application;
[0027] Figure 6C is a schematic diagram of an obstacle distance grid map in an embodiment of the present application;
[0028] Figure 7A is a schematic diagram of obstacle risk level division in an embodiment of the present application;
[0029] Figure 7B is a schematic diagram of a comparison between a shortest path and a safe path in an embodiment of the present application;
[0030] Figure 8 is a schematic diagram of a path search process in an embodiment of the present application;
[0031] Figure 9A is a schematic diagram of a structure of a parking path determination apparatus in an embodiment of the present application;
[0032] Figure 9B is a hardware structure diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0033] A parking path determination method is provided in an embodiment of the present application, which can be applied to an electronic device, as shown in Figure 1 The method can include the following steps.
[0034] In step 101, a starting path point and an ending path point corresponding to a parking path are obtained.
[0035] In step 102, the starting path point is determined as a current path point, K candidate path points corresponding to the current path point are determined based on a stored path template file, K is greater than 1; the path template file includes K path templates, and each path template represents a basic action between the current path point and a candidate path point.
[0036] In step 103, for each candidate path point, a kinematic heuristic value of the candidate path point is determined based on a stored kinematic heuristic file, a target value of the candidate path point is determined based on the kinematic heuristic value, and one candidate path point is selected from the K candidate path points as a target path point based on the target value of each candidate path point, and the target path point is added to a path point set.
[0037] In step 104, it is determined whether the target path point and the ending path point satisfy a configured constraint condition.
[0038] If no, step 105 can be performed, and if yes, step 106 can be performed.
[0039] Step 105, the target path point is determined as the current path point, and the operation of determining the K candidate path points corresponding to the current path point based on the stored path template file is returned to perform step 103.
[0040] Step 106, the target parking path is determined based on all target path points in the path point set.
[0041] For example, the path template file can include, but is not limited to, the following path templates: a long straight line forward path template, the candidate path point corresponding to the long straight line forward path template can be located in the forward direction of the current path point, and the candidate path point and the current path point are long straight lines. A short straight line forward path template, the candidate path point corresponding to the short straight line forward path template can be located in the forward direction of the current path point, and the candidate path point and the current path point are short straight lines. A long straight line backward path template, the candidate path point corresponding to the long straight line backward path template can be located in the backward direction of the current path point, and the candidate path point and the current path point are long straight lines. A short straight line backward path template, the candidate path point corresponding to the short straight line backward path template can be located in the backward direction of the current path point, and the candidate path point and the current path point are short straight lines. A left turn forward path template, the candidate path point corresponding to the left turn forward path template can be located in the forward direction of the current path point, and the candidate path point and the current path point are left turning curves increasing from 0 to a specified turning curvature, circular arcs of a specified turning curvature, and left turning curves decreasing from a specified turning curvature to 0. A right turn forward path template, the candidate path point corresponding to the right turn forward path template can be located in the forward direction of the current path point, and the candidate path point and the current path point are right turning curves increasing from 0 to a specified turning curvature, circular arcs of a specified turning curvature, and right turning curves decreasing from a specified turning curvature to 0. A left turn backward path template, the candidate path point corresponding to the left turn backward path template can be located in the backward direction of the current path point, and the candidate path point and the current path point are left turning curves increasing from 0 to a specified turning curvature, circular arcs of a specified turning curvature, and left turning curves decreasing from a specified turning curvature to 0. A right turn backward path template, the candidate path point corresponding to the right turn backward path template can be located in the backward direction of the current path point, and the candidate path point and the current path point are right turning curves increasing from 0 to a specified turning curvature, circular arcs of a specified turning curvature, and right turning curves decreasing from a specified turning curvature to 0.
[0042] The kinematic heuristic file includes a correspondence between a sample pose and a kinematic cost value, and the kinematic cost value represents a kinematic cost value between the sample pose and a fixed pose. Determining the kinematic heuristic cost value of the candidate path point based on the stored kinematic heuristic file can include, but is not limited to: determining a first pose of the candidate path point and a second pose of the end path point; converting the first pose into a fixed pose, determining a conversion relationship between the first pose and the fixed pose, and converting the second pose into a third pose based on the conversion relationship; querying the kinematic heuristic file through the third pose to obtain a sample pose corresponding to the third pose, and determining the kinematic cost value corresponding to the sample pose as the kinematic heuristic cost value.
[0043] The target cost value of the candidate path point is determined based on the kinematic heuristic cost value. The determination can include, but is not limited to: determining a real cost value of the candidate path point; wherein each path template in the path template file corresponds to a path cost value, and the real cost value of the candidate path point is determined based on a summation of the path cost values corresponding to all path templates from the start path point to the candidate path point; determining a distance heuristic cost value of the candidate path point, and determining an initial heuristic cost value based on the kinematic heuristic cost value and the distance heuristic cost value; wherein the distance heuristic cost value is determined based on a distance between the candidate path point and the end path point; determining the initial heuristic cost value as the target heuristic cost value; or, optimizing the initial heuristic cost value based on the obtained gear shifting cost coefficient and the obtained obstacle potential energy coefficient to obtain the target heuristic cost value; wherein the gear shifting cost coefficient represents whether there is gear shifting when moving to the candidate path point, and the obstacle potential energy coefficient represents a degree of influence of the candidate path point by surrounding obstacles; and determining the target cost value of the candidate path point based on the real cost value and the target heuristic cost value.
[0044] The gear shifting cost coefficient is obtained through a process, which can include, but is not limited to: if no gear shifting occurs when moving from the current path point to the candidate path point, the gear shifting cost coefficient can be a first value; if gear shifting occurs when moving from the current path point to the candidate path point, the gear shifting cost coefficient can be a second value, and the second value can be greater than the first value. The first value can be a value greater than or equal to 1.
[0045] For example, the process of obtaining the obstacle potential energy coefficient can include, but is not limited to: determining the obstacle occupation area, the sum of obstacle perimeter, the overall area of the map, and the overall perimeter of the map based on the obtained occupancy grid map; wherein the occupancy grid map can include the obstacle grid corresponding to the parking space and the obstacles around the vehicle; determining the unfeasibility based on the obstacle occupation area and the overall area of the map, and determining the concentration based on the unfeasibility, the sum of obstacle perimeter, and the overall perimeter of the map; wherein the greater the obstacle occupation area, the greater the unfeasibility; the greater the unfeasibility, the greater the concentration; and the smaller the sum of obstacle perimeter, the greater the concentration. On this basis, the potential energy decay coefficient can be determined based on the concentration, and the potential energy decay coefficient is inversely proportional to the concentration. The obstacle potential energy coefficient is determined based on the potential energy decay coefficient.
[0046] In one possible implementation, determining the obstacle potential energy coefficient based on the potential energy decay coefficient can include, but is not limited to: the obstacle potential energy coefficient can be determined using the following formula:
[0047]
[0048] Wherein τ(n) can represent the obstacle potential energy coefficient, E(γ) can represent the potential energy decay coefficient; d h may represent the distance between the candidate path point and the high-risk obstacle, d h0 may represent the potential field range of the high-risk obstacle, d l may represent the distance between the candidate path point and the low-risk obstacle, d l0 may represent the potential field range of the low-risk obstacle; wherein for each obstacle, if the distance between the obstacle and the vehicle is greater than a threshold value, the obstacle is a low-risk obstacle; or if the obstacle is inconsistent with the direction of the parking end point, the obstacle is a low-risk obstacle; or if the distance between the obstacle and the vehicle is not greater than a threshold value, and the obstacle is consistent with the direction of the parking end point, the obstacle is a high-risk obstacle.
[0049] For example, determining the target parking path based on all target path points in the path point set can include: generating an initial parking path based on all target path points in the path point set. The initial parking path is sparsely processed to obtain a first parking path. A curvature term gradient and a first smoothing term gradient are determined based on a plurality of path points in the first parking path. A target gradient of the first parking path is determined based on the curvature term gradient and the first smoothing term gradient. The first parking path is optimized based on the target gradient to obtain a second parking path. The target gradient of the second parking path is less than the target gradient of the first parking path. It is determined whether the second parking path meets a first constraint condition. If not, the second parking path is updated to the first parking path, and the operation of determining the curvature term gradient and the first smoothing term gradient based on the plurality of path points in the first parking path is performed again. If yes, an interpolation operation is performed on the second parking path to obtain a third parking path. A second smoothing term gradient is determined based on a plurality of path points in the third parking path. The third parking path is optimized based on the second smoothing term gradient to obtain a fourth parking path. The second smoothing term gradient of the fourth parking path is less than the second smoothing term gradient of the third parking path. It is determined whether the fourth parking path meets a second constraint condition. If not, the fourth parking path is updated to the third parking path, and the operation of determining the second smoothing term gradient based on the plurality of path points in the third parking path is performed again. If yes, the target parking path is determined based on the fourth parking path.
[0050] For example, when the curvature term gradient and the first smoothing term gradient are determined based on the plurality of path points in the first parking path, the curvature term gradient is a gradient of a curvature term, and the first smoothing term gradient is a gradient of a smoothing term. The curvature term is: The smoothing term is
[0051] wherein k cur ,k smooth represents a configured proportionality coefficient, and N represents a total number of path points in the first parking path, ΔX i =X i -X i-1 , X i represents a coordinate of an i-th path point in the first parking path, κ max represents a configured maximum curvature value.
[0052] It can be seen from the above technical solutions that in the embodiments of the present application, the K candidate path points corresponding to the current path point can be determined based on the path template file, the path template file includes K path templates, the K candidate path points correspond to the K path templates one by one, and the path template represents the basic action between the current path point and the candidate path point. In this way, only the K candidate path points corresponding to the K path templates need to be selected, the K candidate path points can be quickly found, and the range of the candidate path points can be constrained only by selecting the candidate path points according to the designed path templates, and the candidate path points meet the design requirements. For each candidate path point, the kinematic heuristic value of the candidate path point can be determined based on the kinematic heuristic file, the target value is determined based on the kinematic heuristic value, and then the target path point is selected based on the target value of each candidate path point, and the target path point is used to generate the target parking path. In this way, the candidate path point with the minimum cost can be selected as the target path point by the kinematic heuristic value, and then the target parking path is the path with the minimum cost, so that the distance between the target parking path and the obstacle can be significantly improved, the high safety of the target parking path is realized, and the driving time of the target parking path is relatively small.
[0053] An implementation manner of offline processing and online planning is proposed. For the offline processing process, the general, high-computational, and high-time-consuming processing work is calculated first, and is stored in the form of an offline file, that is, the path template file and the kinematic heuristic file are stored in advance. For the online planning process, the result of the offline processing is directly called, that is, the target parking path is determined based on the path template file and the kinematic heuristic file, so that the parking path planning process can be effectively accelerated, the planning time of the parking path is relatively short, the algorithm planning time-consuming is significantly reduced, and the target parking path is efficiently, safely, and quickly planned for the vehicle.
[0054] The parking path determination method of the embodiment is described below in combination with a specific application scenario.
[0055] The embodiment of the present application provides a parking path determination method, which can be applied to an automatic driving device or an auxiliary driving device, and the automatic driving device or the auxiliary driving device is arranged on a target vehicle. The automatic driving device or the auxiliary driving device has an automatic parking function, such as an AVP (Automated Valet Parking) function or a PAVP (Public Automated Valet Parking) function. Through the automatic parking function, the vehicle is automatically parked in a position, and manual control of a user is not needed. The target vehicle is an intelligent vehicle capable of realizing an auxiliary driving function or an automatic driving function. For example, if the target vehicle is arranged with the automatic driving device, the target vehicle is an intelligent vehicle capable of realizing the automatic driving function, and the parking path determination method is realized through the automatic driving device. Alternatively, if the target vehicle is arranged with the auxiliary driving device, the target vehicle is an intelligent vehicle capable of realizing the auxiliary driving function, and the parking path determination method is realized through the auxiliary driving device. The target vehicle can be arranged with a camera and an ultrasonic radar, and of course, in addition to the camera and the ultrasonic radar, the target vehicle can be arranged with a millimeter wave radar and / or a laser radar, and no limitation is made in this regard. Through the camera and the ultrasonic radar, an obstacle around the target vehicle can be detected, and no limitation is made in this regard, and the obstacle can be detected through the camera and the ultrasonic radar.
[0056] The embodiment of the present application provides a safe and fast parking path determination (i.e., parking path planning) method, which can effectively accelerate the parking path planning process, and the planning time of the parking path is relatively short. Referring to FIG. 1, which is a schematic diagram of a framework of a parking path determination method, the parking path determination method involves two stages of offline processing and online planning. For the offline processing stage, two processes of path template design and offline file generation can be included. For the online planning stage, four processes of environment map calculation, heuristic design and calculation, path search and path optimization can be included, and the processes are described below. Figure 2
[0057] First, the path template design process is described.
[0058] For example, K path templates can be designed, K can be greater than 1, and the path template represents a basic action between a current path point and a candidate path point (i.e., an adjacent path point of the current path point, which is referred to as a candidate path point of the current path point). For example, according to parameters such as direction sampling, a basic action from the current path point to the adjacent path point is designed, and the basic action is referred to as a path template.
[0059] To reduce path planning time, this embodiment designs a fixed path template for the vehicle. During the node search process, only the designed path template is expanded. For example, only the K path points corresponding to the K path templates are used as candidate path points for the current path point. In this way, by concatenating the path templates corresponding to each path point obtained from the search, the parking path can be obtained.
[0060] In one possible implementation, since the path template is rotationally and translationally invariant, the starting point of the path template is fixed at (0, 0, 0) during design, and then transformed into the corresponding starting point through rotation and translation. To ensure the vehicle can perform forward and backward movements, the path template can include a long straight forward path template, a short straight forward path template, a long straight backward path template, a short straight backward path template, a left-turn forward path template, a right-turn forward path template, a left-turn backward path template, and a right-turn backward path template. See also Figure 3 The diagram shown illustrates eight path templates. Of course, this example uses eight path templates; in practical applications, only some of these eight templates can be designed. Besides these eight, other types of path templates can also be designed without restriction.
[0061] exist Figure 3 In this context, the center point between path point 4 and path point 5 is taken as the current path point, and the rightward direction is taken as the vehicle's forward direction. Based on this, the eight path templates can be as follows:
[0062] For the long straight-line forward path template, the basic action is a long straight-line forward movement. Path point 7 represents the candidate path point corresponding to the long straight-line forward path template. The candidate path point is located in the forward direction of the current path point, and there is a long straight line between the candidate path point and the current path point. The length of the long straight-line forward path template can be designed. This length can be configured according to actual needs, and it only needs to be greater than the length of the short straight-line forward path template. For example, the length can be approximately equal to the length of the left-turn forward path template, which facilitates quick connection to the destination in long-distance searches.
[0063] For the short straight-line forward path template, the basic action is a short straight-line forward movement. Path point 5 represents the candidate path point corresponding to the short straight-line forward path template. The candidate path point is located in the forward direction of the current path point, and there is a short straight line between the candidate path point and the current path point. The length of the short straight-line forward path template can be designed. This length can be configured according to actual needs, such as approximately equal to twice the raster resolution (raster resolution is the resolution of the subsequent raster map, which can be the length of a single pixel in the raster map or the width of a single pixel in the raster map), facilitating the planning of flexible local actions.
[0064] For the long straight line backward path template, the basic action is long straight line backward action, and the path point 2 represents the candidate path point corresponding to the long straight line backward path template. The candidate path point is located in the backward direction of the current path point, and the candidate path point and the current path point are long straight lines. The length of the long straight line backward path template can be designed, and this length can be configured according to actual needs. The length of the long straight line backward path template can be the same as or different from the length of the long straight line forward path template. Taking the case where they are the same as an example.
[0065] For the short straight line backward path template, the basic action is short straight line backward action, and the path point 4 represents the candidate path point corresponding to the short straight line backward path template. The candidate path point is located in the backward direction of the current path point, and the candidate path point and the current path point are short straight lines. The length of the short straight line backward path template can be designed, and this length can be configured according to actual needs. The length of the short straight line backward path template can be the same as or different from the length of the short straight line forward path template. Taking the case where they are the same as an example.
[0066] For the left turn forward path template, the basic action is left turn forward action, and the path point 6 represents the candidate path point corresponding to the left turn forward path template. The candidate path point is located in the forward direction of the current path point, and the left turn forward path template is generated based on a left spiral curve-arc-left spiral curve connection, that is, the candidate path point and the current path point are generated based on a left spiral curve-arc-left spiral curve connection. The curvature of the first segment of the left spiral curve gradually increases from 0 to a specified turning curvature (such as the maximum turning curvature of the vehicle), and the length of this segment of the left spiral curve is configured according to actual needs. The second segment of the arc corresponds to the specified turning curvature, and the length of this segment of the arc is configured according to actual needs. The curvature of the third segment of the left spiral curve gradually decreases from the specified turning curvature to 0, and the length of this segment of the left spiral curve is configured according to actual needs. Through the above design, the curvature continuity of the left turn forward path template can be ensured, and the shortest left turn forward path template can be realized.
[0067] For the right turn forward path template, the basic action is right turn forward action, and the path point 8 represents the candidate path point corresponding to the right turn forward path template. The candidate path point is located in the forward direction of the current path point, and the right turn forward path template is generated based on a right spiral curve-arc-right spiral curve connection, that is, the candidate path point and the current path point are generated based on a right spiral curve-arc-right spiral curve connection. The curvature of the first segment of the right spiral curve gradually increases from 0 to a specified turning curvature, the second segment of the arc corresponds to the specified turning curvature, and the curvature of the third segment of the right spiral curve gradually decreases from the specified turning curvature to 0. The length of the right turn forward path template can be the same as or different from the length of the left turn forward path template. Taking the case where they are the same as an example.
[0068] For the left-turn backward path template, the basic action is left-turn backward action, the path point 1 represents the candidate path point corresponding to the left-turn backward path template, the candidate path point is located in the backward direction of the current path point, and the left-turn backward path template is generated based on left-circular curve-arc-left-circular curve connection, that is, the candidate path point and the current path point are connected based on left-circular curve-arc-left-circular curve. The curvature of the first segment of the left-circular curve gradually increases from 0 to a specified turning curvature, the arc of the second segment corresponds to the specified turning curvature, and the curvature of the third segment of the left-circular curve gradually decreases from the specified turning curvature to 0. The length of the left-turn backward path template can be the same as or different from the length of the left-turn forward path template, and the length of the left-turn backward path template is taken as an example.
[0069] For the right-turn backward path template, the basic action is right-turn backward action, the path point 3 represents the candidate path point corresponding to the right-turn backward path template, the candidate path point is located in the backward direction of the current path point, and the right-turn backward path template is generated based on right-circular curve-arc-right-circular curve connection, that is, the candidate path point and the current path point are connected based on right-circular curve-arc-right-circular curve. The curvature of the first segment of the right-circular curve gradually increases from 0 to a specified turning curvature, the arc of the second segment corresponds to the specified turning curvature, and the curvature of the third segment of the right-circular curve gradually decreases from the specified turning curvature to 0. The length of the right-turn backward path template can be the same as or different from the length of the right-turn forward path template, and the length of the right-turn backward path template is taken as an example.
[0070] Second, for the offline file generation process.
[0071] Illustratively, in order to reduce the time consumption of the path planning process, high-computational and high-time-consuming processing work can be calculated first, and stored in the form of an offline file. In the path planning process, the corresponding results stored in the offline file can be directly used to accelerate the path planning.
[0072] 1. A path template file, which can include K path templates.
[0073] Illustratively, a path template file can be generated, which includes a long straight line forward path template, a short straight line forward path template, a long straight line backward path template, a short straight line backward path template, a left-turn forward path template, a right-turn forward path template, a left-turn backward path template, and a right-turn backward path template.
[0074] For example, the path templates discretized according to a certain resolution (such as 0.1 m) are stored. After the path search (see the subsequent embodiment) is completed, the corresponding path templates in the path template file are queried according to the connection relationship between the path points, and a parking path meeting the corresponding resolution can be quickly generated.
[0075] 2. A path template occupies a grid file.
[0076] For example, based on the vehicle's original size parameters and the path template, the path can be divided into grids at a certain resolution (e.g., 0.1m). The occupied grids after the vehicle travels along each path template can be calculated, and these occupied grids can be stored as offline files, i.e., path template occupied grid files. For instance, the occupied grid after the vehicle travels along a long straight path template is grid A, the occupied grid after the vehicle travels along a short straight path template is grid B, and so on. The path template occupied grid file includes this occupied grid information.
[0077] Based on the path template occupying the raster file, the raster index corresponding to the path template can be queried (such as raster A corresponding to the long straight forward path template), thereby quickly determining whether the corresponding raster in the occupied raster map is an obstacle, thus accelerating the collision detection work of the path template and reducing the planning time.
[0078] 3. Pose occupies the grid file.
[0079] For example, after dividing the sampled area into grids according to a certain resolution (e.g., 0.1m), the occupied grids for each vehicle pose are calculated and stored as an offline file, i.e., a pose occupancy grid file. This file includes the occupied grids for each vehicle pose. Based on the pose occupancy grid file, the grid index corresponding to the vehicle pose can be queried, thereby quickly determining whether the corresponding grid in the occupancy grid map is an obstacle. This accelerates collision detection at the planning start / end point and reduces planning time.
[0080] For example, see Figure 4 The diagram illustrates collision detection acceleration based on path template occupancy grid files and pose occupancy grid files. The lower left image shows the occupancy grid of the path template occupancy grid file, i.e., the occupancy grid after the vehicle travels according to the path template. The lower right image shows the occupancy grid of the pose occupancy grid file, i.e., the occupancy grid for each pose of the vehicle. Figure 4 The top image illustrates obstacle detection. First, the four vertices of the vehicle are located (i.e., the gray area in the first image). Then, the edge area of the vehicle is located (i.e., the gray area in the second image). Next, the entire area of the vehicle is located (i.e., the gray area in the third image). Based on the entire area of the vehicle, obstacle detection is performed on the vehicle.
[0081] 4. Kinematic heuristics.
[0082] For example, taking the hybrid A* algorithm as an example, the hybrid A* algorithm is an algorithm for searching a path based on a grid map considering vehicle kinematic constraints (turning ability, etc.), and each time the path point expansion process needs to recalculate the heuristic of the path point to the end point, which will take a lot of time. The accuracy of the heuristic will affect the efficiency of the path point expansion in the hybrid A* algorithm, and an inappropriate heuristic will result in a higher number of path points that need to be explored by the algorithm, further increasing the planning time consumption.
[0083] In view of the above finding, in order to reduce the planning time consumption, based on the path template, in the obstacle-free environment, the kinematic cost value of all sample poses corresponding to the fixed pose can be calculated and stored as an offline file, that is, a kinematic heuristic file, the kinematic heuristic file includes the correspondence between the sample pose and the kinematic cost value, and the kinematic cost value represents the kinematic cost value between the sample pose and the fixed pose. For example, the fixed pose can be pre-configured, such as the (0, 0, 0) pose.
[0084] For example, in a specified map range (such as a 30m*30m map range), the (0, 0, 0) pose (such as the center point of the specified map range) is taken as the fixed pose, and each pose in the specified map range except the fixed pose is taken as the sample pose, that is, there are a large number of sample poses in the specified map range.
[0085] For each sample pose, A path templates corresponding to the sample pose are determined, which represent that from the fixed pose to the sample pose, A path templates can be spliced, such as the fixed pose reaches pose x1 through path template a1, pose x1 reaches pose x2 through path template a2, and pose x2 reaches the sample pose through path template a3, so that the A path templates include path templates a1, a2 and a3.
[0086] On this basis, the kinematic cost value corresponding to the sample pose can be determined based on the lengths of the A path templates. For example, the sum of the length of path template a1, the length of path template a2 and the length of path template a3 can be taken as the kinematic cost value corresponding to the sample pose. Of course, the above is only an example of determining the kinematic cost value, and the kinematic cost value can be determined based on the fixed pose and the sample pose, such as using dijkstra algorithm to calculate the kinematic cost value.
[0087] For each sample pose, the kinematic cost value corresponding to the sample pose can be determined, and the kinematic heuristic file is stored, the kinematic heuristic file includes the kinematic cost value corresponding to each sample pose.
[0088] Reference Figure 5Fig. 1 shows a schematic diagram of a kinematic heuristic file, the kinematic cost value is calculated by using path template in a 30m*30m map range. See Fig. 2. Figure 5 Fig. 3 shows a schematic diagram of a kinematic heuristic file. The red area represents the area where the vehicle collides with the map boundary, which is not feasible, and the kinematic cost value corresponding to the sampled pose in this area cannot be determined. The green area represents the feasible area, and the kinematic cost value corresponding to the sampled pose in this area can be determined. In Fig. 3, the darker the green color, the greater the kinematic cost value corresponding to the sampled pose. Figure 5
[0089] Third, the environmental map calculation process.
[0090] For example, the occupancy grid map and the obstacle distance grid map can be referred to as the environmental map, and the occupancy grid map and the obstacle distance grid map can be calculated in the environmental map calculation process.
[0091] For example, the occupancy grid map is a rectangular pattern composed of a series of pixels, each pixel has a corresponding category (such as 0 is an obstacle, 255 is not an obstacle). The obstacle distance grid map is a rectangular pattern composed of a series of pixels, each pixel records the distance from the nearest obstacle around it.
[0092] For example, the occupancy grid map is used to complete the collision detection process. After the surrounding environment is divided into grids according to a certain resolution (such as 0.1m), the parking space and the obstacles around the vehicle can be projected into the grid, thereby forming the occupancy grid map, which can include the obstacle grid corresponding to the parking space and the obstacles around the vehicle. See Fig. 4. Figure 6A Fig. 5 shows a schematic diagram of a parking scene containing a curb. See Fig. 6. Figure 6B Fig. 7 shows a schematic diagram of an occupancy grid map. In Fig. 7, the black grid with a pixel value of 0 represents an obstacle, and the white grid with a pixel value of 255 represents a drivable area (non-obstacle). Figure 6B
[0093] Based on the original size parameters of the vehicle and the inflated vehicle size after reserving a safety distance, the grid that the vehicle needs to pass through can be obtained after projecting all the path points passed by the vehicle. By comparing the grid passed by the vehicle with the occupancy grid map, if all the grids passed by the vehicle do not contain black obstacle grids, it can be considered that the planned path is collision-free and drivable.
[0094] When the collision detection is completed based on the occupancy grid map, the corresponding occupancy grid of the vehicle is inconsistent under different safety distances, and the collision detection after the calculation of the vehicle occupancy grid will lead to a large calculation time. Due to the existence of sensor accuracy and detection accuracy of the perception algorithm, the actual obstacle size may be larger and the position may be deviated, and the vehicle may be too close to the obstacle, resulting in scratching between the vehicle and the obstacle.
[0095] In view of the above finding, on the basis of the occupancy grid map, the obstacle distance grid map can be obtained, and the obstacle distance grid map is introduced into the parking path planning process. Referring to Figure 6C The schematic diagram of the obstacle distance grid map is shown in FIG. 8, and each pixel value represents the distance between the grid and the nearest obstacle. Based on the obstacle distance grid map, only the vehicle occupancy grid corresponding to the original size of the vehicle calculated offline is needed, and the collision detection can be completed by comparing the vehicle occupancy grid with the obstacle distance online. If the obstacle distance corresponding to the vehicle occupancy grid is greater than the set safety distance, it is proved that the vehicle does not collide with the obstacle. This operation can significantly reduce the planning time of the algorithm, and can dynamically adjust the safety distance. Based on the obstacle distance grid map, the planned path and the obstacle distance can be used as one of the design factors of the heuristic function, and a safe parking path away from the obstacle can be planned, and the humanization degree of the planned path is improved.
[0096] Fourth, for the heuristic design and calculation process.
[0097] For example, in the heuristic calculation process, the target generation value of the candidate path point (i.e., the candidate path point corresponding to the current path point) can be determined, and the heuristic calculation process can include:
[0098] Step S11, determining the real generation value of the candidate path point.
[0099] For example, for each path template in the path template file, the path template corresponds to a path generation value, and the path generation value is related to the length of the path template, for example, the longer the path template, the greater the path generation value. For example, the path generation value can be the length of the path template, or the length of the path template can be multiplied by a proportionality coefficient, and the path generation value is not limited.
[0100] For example, all the path templates from the start path point to the candidate path point can be determined, which means that the candidate path point can be reached by concatenating these path templates. For example, the start path point reaches path point y1 through path template b1, path point y1 reaches path point y2 through path template b2, and path point y2 reaches the candidate path point through path template b3. Thus, all the path templates from the start path point to the candidate path point include path templates b1, b2 and b3.
[0101] For example, the real cost value of the candidate path point, denoted as g(n), can be determined based on the sum of the path cost values corresponding to all the path templates from the start path point to the candidate path point. For example, the real cost value of the candidate path point can be the sum of the path cost value corresponding to path template b1, the path cost value corresponding to path template b2 and the path cost value corresponding to path template b3.
[0102] In step S12, the kinematic heuristic cost value of the candidate path point is determined. For example, the kinematic heuristic cost value of the candidate path point can be determined based on the stored kinematic heuristic file.
[0103] For example, the first pose of the candidate path point and the second pose of the end path point can be determined, and the first pose can be denoted as (x0, y0, θ0) and the second pose can be denoted as (x1, y1, θ1). Then, the first pose is converted into a fixed pose, such as (0, 0, 0) pose, by rotation and translation, and the conversion relationship between the first pose and the fixed pose is determined, which represents the rotation matrix and the translation matrix from the first pose to the fixed pose. Then, the second pose is converted into a third pose, denoted as (x2, y2, θ2), based on the conversion relationship, i.e. by the rotation matrix and the translation matrix.
[0104] After obtaining the third pose, since the kinematic heuristic file includes the kinematic cost value corresponding to each sample pose, the kinematic heuristic file can be queried by the third pose to obtain the sample pose corresponding to the third pose, i.e. the sample pose is the same as or close to the third pose. On this basis, the kinematic cost value corresponding to the sample pose, i.e. the kinematic cost value corresponding to the sample pose in the kinematic heuristic file, can be determined as the kinematic heuristic cost value of the candidate path point. Obviously, the kinematic heuristic cost value obtained by querying the kinematic heuristic file can accelerate the planning process.
[0105] In step S13, the distance heuristic cost value of the candidate path point is determined, which is determined based on the distance between the candidate path point and the end path point, i.e. the end point of the path planning.
[0106] For example, the Euclidean distance between the candidate path point and the end path point can be calculated, and the Euclidean distance can be taken as the distance heuristic value of the candidate path point, or the Euclidean distance can be operated in some way, and the operation result can be taken as the distance heuristic value of the candidate path point, without limitation.
[0107] In step S14, the initial heuristic value of the candidate path point is determined based on the kinematic heuristic value and the distance heuristic value. For example, the maximum value in the kinematic heuristic value and the distance heuristic value can be taken as the initial heuristic value. For example, the initial heuristic value can be determined by using the following formula: h(n)=max(h eu , h kine ), where h(n) can represent the initial heuristic value, h eu may represent the distance heuristic value, and h kine may represent the kinematic heuristic value.
[0108] For example, the initial heuristic value can be determined based on the kinematic heuristic value and the distance heuristic value, and the two values can be complementary. If the kinematic heuristic value of the candidate path point can be queried in the kinematic heuristic file, the kinematic heuristic value or the distance heuristic value can be taken as the initial heuristic value. If the kinematic heuristic value of the candidate path point cannot be queried in the kinematic heuristic file, the distance heuristic value can be taken as the initial heuristic value.
[0109] For example, after the initial heuristic value is obtained, the initial heuristic value can be determined as the target heuristic value, or the initial heuristic value can be optimized to obtain the target heuristic value, and the optimization process of the initial heuristic value is described below. For example, the above heuristic design can only guarantee that the planned path meets the safety distance, and the driver may think that the distance to the obstacle is too close. From the perspective of the driver, the shortest parking path is not forced to be guaranteed during parking, but it is necessary to guarantee that the path is safe enough and far enough from the obstacle, so as to improve the humanization degree of the parking path. Therefore, during the heuristic design process, the distance between the path point and the obstacle needs to be further considered, and the initial heuristic value can be optimized based on the distance between the path point and the obstacle to obtain the target heuristic value.
[0110] In step S15, a gear shifting cost coefficient is obtained, and the gear shifting cost coefficient can represent whether there is gear shifting when moving to the candidate path point, i.e., whether there is gear shifting when moving from the current path point to the candidate path point.
[0111] For example, if no gear shift occurs when moving from the current path point to the candidate path point, the gear shift cost coefficient can be the first value, indicating that no gear shift occurred. If a gear shift occurs when moving from the current path point to the candidate path point, the gear shift cost coefficient can be the second value, indicating that a gear shift occurred. For instance, the second value can be greater than the first value.
[0112] For example, if the movement from the previous path point to the current path point is in the forward direction, and the movement from the current path point to the candidate path point is also in the forward direction, then no gear shift occurs. If the movement from the current path point to the candidate path point is in the backward direction, then a gear shift occurs. Similarly, if the movement from the previous path point to the current path point is in the backward direction, and the movement from the current path point to the candidate path point is also in the backward direction, then no gear shift occurs. If the movement from the current path point to the candidate path point is in the forward direction, then a gear shift occurs.
[0113] For example, the shift cost coefficient k(n-1, n) can be represented by the following expression:
[0114]
[0115] In the above formula, o(n-2, n-1) equals o(n-1, n) to indicate that no gear shift has occurred, "1" represents the first value, o(n-2, n-1) is not equal to o(n-1, n) to indicate that a gear shift has occurred, and "1.5" represents the second value.
[0116] Step S16: Determine the obstacle-occupied area, the sum of obstacle perimeters, the overall map area, and the overall map perimeter based on the occupied grid map. For example, the obstacle-occupied area represents the sum of the areas of all the occupied grid cells of all obstacles within the occupied grid map, and the sum of obstacle perimeters represents the sum of the perimeters of all the occupied grid cells of all obstacles within the occupied grid map. See [link to relevant documentation]. Figure 6B As shown, all grid cells with a pixel value of 0 are obstacle-occupied grid cells. The sum of the areas of these obstacle-occupied grid cells is the obstacle-occupied area, and the sum of the perimeters of these obstacle-occupied grid cells is the obstacle perimeter. The overall map area represents the sum of the areas of all grid cells within the map, and the overall map perimeter represents the sum of the perimeters of all grid cells within the map.
[0117] Step S17: Determine the infeasibility degree based on the area occupied by the obstacle and the overall area of the map, and determine the concentration degree based on the infeasibility degree, the sum of the perimeters of the obstacle and the overall perimeter of the map.
[0118] For example, the number, area, distribution, and the like of the obstacles affect the complexity of the parking scene, and different complexity of the parking scene can be processed differently for the heuristic. In this embodiment, the infeasibility and concentration are used to describe the complexity of the parking scene.
[0119] For example, the infeasibility can be determined by the following formula: ρ can represent the infeasibility, A obs represents the area occupied by the obstacle, A w represents the overall area of the map. Obviously, the larger the area occupied by the obstacle, the larger the infeasibility; the larger the overall area of the map, the smaller the infeasibility.
[0120] For example, the concentration can be determined by the following formula: γ can represent the concentration, C obs can represent the sum of the perimeters of the obstacles (i.e., the sum of the perimeters of all obstacles), C w can represent the overall perimeter of the map. Obviously, the larger the infeasibility, the larger the concentration, the smaller the sum of the perimeters of the obstacles, the larger the concentration, and the larger the overall perimeter of the map, the larger the concentration. In the case of fixed infeasibility, the smaller the sum of the perimeters of the obstacles, the more concentrated the obstacles, and the higher the concentration.
[0121] According to the above analysis, the larger the infeasibility in the parking scene, the larger the concentration, indicating that the parking environment is more complex, and the above environmental factors need to be considered in the design of the heuristic.
[0122] Step S18, determine the potential energy attenuation coefficient based on the concentration. For example, the potential energy attenuation coefficient is related to the environmental complexity, and the potential energy attenuation coefficient can be calculated according to the concentration of the obstacles, such as the following formula is used to determine the potential energy attenuation coefficient E(γ):
[0123] Step S19, determine the obstacle potential energy coefficient based on the potential energy attenuation coefficient. For example, the obstacle potential energy coefficient can represent the degree of influence of the surrounding obstacles on the candidate path point.
[0124] The obstacle potential energy coefficient can be determined based on the potential energy attenuation coefficient, the distance d h of the candidate path point from the high-risk obstacle, the potential field range d h0 of the high-risk obstacle, the distance d l of the candidate path point from the low-risk obstacle, and the potential field range d l0 of the low-risk obstacle. For example, if d h is greater than d h0 , and d l is greater than d l0If d h Not greater than d h0 , and d l Greater than d l0 Then, based on the potential energy decay coefficient and the distance d between the candidate path point and the high-risk obstacle, h The potential field range d of high-risk obstacles h0 Determine the potential energy coefficient of the obstacle. If d h Greater than d h0 , and d l Not greater than d l0 Then, based on the potential energy decay coefficient and the distance d between the candidate path point and the low-risk obstacle, l The potential field range d of low-risk obstacles l0 Determine the potential energy coefficient of the obstacle. If d h Not greater than d h0 , and d l Not greater than d l0 Then, based on the potential energy decay coefficient and the distance d between the candidate path point and the high-risk obstacle, h The potential field range d of high-risk obstacles h0 The distance d between the candidate path point and the low-risk obstacle. l The potential field range d of low-risk obstacles l0 Determine the potential energy coefficient of the obstacle.
[0125] In one possible implementation, the obstacle potential energy coefficient can be determined using the following formula:
[0126]
[0127] In the above formula, τ(n) can represent the obstacle potential energy coefficient, and E(γ) can represent the potential energy decay coefficient.
[0128] d h d represents the distance between the candidate path point and the high-risk obstacle. h0 This represents the potential field range of a high-risk obstacle. When multiple high-risk obstacles exist, one can be randomly selected, or the high-risk obstacle with the largest distance (i.e., the candidate path point is furthest from the high-risk obstacle) can be selected, or the high-risk obstacle with the smallest distance can be selected. d h d represents the distance between the candidate path point and the selected high-risk obstacle. h0 This indicates the potential field range of the selected high-risk obstacle, that is, the maximum distance value (maximum range) affected by the high-risk obstacle. This embodiment does not restrict the method of obtaining this potential field range.
[0129] d l d represents the distance between the candidate path point and the low-risk obstacle.l0 This represents the potential field range of a low-risk obstacle. When multiple low-risk obstacles exist, one can be randomly selected, or the low-risk obstacle with the largest distance (i.e., the candidate path point is furthest from the low-risk obstacle), or the low-risk obstacle with the smallest distance. d l d represents the distance between the candidate path point and the selected low-risk obstacle. l0 This indicates the potential field range of the selected low-risk obstacle.
[0130] In one possible implementation, for each obstacle, if the distance between the obstacle and the vehicle is greater than a threshold, then the obstacle is a low-risk obstacle; or, if the obstacle is not in the direction of the parking endpoint, then the obstacle is a low-risk obstacle; or, if the distance between the obstacle and the vehicle is not greater than the threshold and the obstacle is in the direction of the parking endpoint, then the obstacle is a high-risk obstacle.
[0131] For example, during parking, different obstacles have different risk levels, see... Figure 7A The diagram illustrates the risk level classification of obstacles, categorizing them into high-risk and low-risk obstacles. Obstacles closer to the vehicle or located on the same side as the parking direction are more likely to cause collisions and are thus classified as high-risk obstacles. Conversely, obstacles farther from the vehicle or located on a different side of the parking direction are considered low-risk obstacles. Considering obstacle risk levels in heuristic design can help parking paths significantly avoid high-risk obstacles and slightly avoid low-risk obstacles.
[0132] For example, the obstacle risk level can be described as: R i =δ i ·D i , R i Indicates the obstacle risk level, when R i A value of 1 indicates a high-risk obstacle; when R... i A value of 0 indicates a low-risk obstacle. δ i This is a binary variable; it is 1 when obstacle i is in the same direction as the parking endpoint, and 0 when obstacle i is not in the same direction as the parking endpoint. D i Let d be a binary variable, where d is the distance between obstacle i and vehicle i. i Greater than the threshold (d) thres When the distance between obstacle i and the vehicle is d, the value is 0. i The value is 1 if the distance between obstacle i and the vehicle is not greater than the threshold. In summary, if the distance between obstacle i and the vehicle is not greater than the threshold, and obstacle i is aligned with the parking endpoint direction, then δ... i =1 and D i R is 1. iis 1, and the obstacle i is a high-risk obstacle. If the distance between the obstacle i and the vehicle is greater than a threshold, i.e., D i is 0, and R i is 0, and the obstacle i is a low-risk obstacle. If the obstacle i is not consistent with the direction of the parking end, i.e., δ i is 0, and R i is 0, and the obstacle i is a low-risk obstacle.
[0133] In step S20, the initial heuristic cost value of the candidate path point is optimized based on the gear shifting cost coefficient and the obstacle potential energy coefficient, to obtain a target heuristic cost value of the candidate path point.
[0134] For example, the target heuristic cost value of the candidate path point (i.e., the candidate path point n) can be determined by the following formula: h(n) = k(n-1, n) max(h eu , h kine ) (1 + τ(n)). Of course, the above formula is only an example of determining the target heuristic cost value, and the target heuristic cost value is related to the gear shifting cost coefficient, the obstacle potential energy coefficient, and the initial heuristic cost value. For example, the greater the gear shifting cost coefficient, the greater the target heuristic cost value. The greater the obstacle potential energy coefficient, the greater the target heuristic cost value. The greater the initial heuristic cost value, the greater the target heuristic cost value.
[0135] In the above formula, h(n) represents the target heuristic cost value scaled according to the obstacle potential energy coefficient, k(n-1, n) represents the gear shifting cost coefficient, τ(n) represents the obstacle potential energy coefficient, max(h eu , h kine ) represents the initial heuristic cost value, h eu represents the distance heuristic cost value, and h kine represents the kinematic heuristic cost value.
[0136] Through the above design, i.e., the initial heuristic cost value is optimized based on the gear shifting cost coefficient and the obstacle potential energy coefficient to obtain the target heuristic cost value, the closer the vehicle is to the obstacle at the candidate path point, the less safe the vehicle is, and the greater the target heuristic cost value. The farther the vehicle is from the obstacle at the candidate path point, the safer the vehicle is, and the smaller the target heuristic cost value. Using the above target heuristic cost value can significantly improve the safety and humanization of the planned path. For example, as shown in FIG. 5, it is a comparison diagram of the shortest path and the safe path, and the safe path is determined based on the target heuristic cost value. Figure 7B
[0137] Step S21, determining the target cost value of the candidate path point based on the real cost value and the target heuristic cost value, such as the target cost value being the summation value between the real cost value and the target heuristic cost value.
[0138] For example, for each candidate path point, the target cost value of the candidate path point is composed of two parts, one part being the real cost value of the candidate path point, and the other part being the target heuristic cost value of the candidate path point. Based on this, the target cost value is determined by using the following formula: f(n) = g(n) + h(n). In the above formula, f(n) represents the target cost value of the candidate path point n, also known as the overall cost value, g(n) represents the real cost value of the candidate path point n, and h(n) represents the target heuristic cost value of the candidate path point n.
[0139] So far, the heuristic design and calculation process is completed, and the target cost value of the candidate path point can be obtained.
[0140] Fifth, for the path search process.
[0141] For example, in the path search process, the initial parking path can be determined, so that the initial parking path can be used as the target parking path, or the initial parking path can be optimized to obtain the target parking path. The optimization process is described in the path optimization process. The path search process can include:
[0142] Step S31, obtaining the starting path point and the ending path point corresponding to the parking path, and adding the starting path point and the ending path point to the path point set, the initial state of the path point set being empty.
[0143] For example, the starting path point is the starting point of path planning, such as the current position of the vehicle as the starting path point, and the ending path point is the ending point of path planning, such as the final parking position of the vehicle as the ending path point.
[0144] Step S32, determining the starting path point as the current path point, and determining K candidate path points corresponding to the current path point based on the stored path template file (i.e. the path template file stored in the offline process).
[0145] For example, the path template file includes K path templates, for the first path template, the starting point of the path template corresponds to the current path point, and the ending point of the path template is the first candidate path point, for the second path template, the starting point of the path template corresponds to the current path point, and the ending point of the path template is the second candidate path point, and so on, K path templates correspond to K candidate path points.
[0146] Step S33, for each candidate path point in the K candidate path points, determine a kinematic heuristic cost value of the candidate path point based on the stored kinematic heuristic file (i.e. the kinematic heuristic file stored in the offline process), and determine a target cost value of the candidate path point based on the kinematic heuristic cost value.
[0147] For example, step S33 can refer to the heuristic design and calculation process, which is not repeated here.
[0148] Step S34, select a candidate path point from the K candidate path points as a target path point based on the target cost value of each candidate path point, and add the target path point to the path point set.
[0149] For example, the candidate path point corresponding to the minimum target cost value is selected as the target path point.
[0150] Step S35, determine whether the target path point and the end path point meet the configured constraint condition.
[0151] If not, step S36 can be performed, and if yes, step S37 can be performed.
[0152] For example, if the lateral position deviation of the target path point and the end path point is less than a set first threshold value, the longitudinal position deviation of the target path point and the end path point is less than a set second threshold value, and the orientation angle deviation of the target path point and the end path point is less than a set third threshold value, the configured constraint condition is met. If the lateral position deviation of the target path point and the end path point is not less than the set first threshold value, or the longitudinal position deviation of the target path point and the end path point is not less than the set second threshold value, or the orientation angle deviation of the target path point and the end path point is not less than the set third threshold value, the configured constraint condition is not met.
[0153] Step S36, determine the target path point as the current path point, and return to step S32 to perform the operation of determining the K candidate path points corresponding to the current path point based on the stored path template file, and so on, until the target path point and the end path point meet the configured constraint condition, and step S37 is performed.
[0154] Step S37, determine the initial parking path based on all target path points in the path point set.
[0155] For example, the start path point can be taken as the first path point of the initial parking path, and the end path point can be taken as the last path point of the initial parking path. The target path point selected when the first path point is taken as the current path point can be taken as the second path point of the initial parking path, the target path point selected when the second path point is taken as the current path point can be taken as the third path point of the initial parking path, and so on.
[0156] For example, after the initial parking path is obtained, the initial parking path can be taken as the target parking path, or the initial parking path can be optimized to obtain the target parking path.
[0157] In a possible implementation, the path searching process can refer to Figure 8 As shown in the figure, the path searching process can include the following steps.
[0158] Step 801, initialize the OPEN list and the CLOSE list, add the start path point corresponding to the parking path to the OPEN list, and clear the CLOSE list. Then, the following process is performed in a loop.
[0159] Step 802, determine whether the number of loops exceeds an upper limit. If yes, it can be reported that the planning fails (i.e., the initial parking path cannot be searched), and if no, step 803 can be performed.
[0160] Step 803, determine whether the OPEN list is empty. If yes, it can be reported that the planning fails (i.e., the initial parking path cannot be searched), and if no, step 804 can be performed.
[0161] Step 804, query the path point N with the minimum target value in the OPEN list, and add the path point N to the CLOSE list, which is the path point set in the above embodiment.
[0162] Step 805, determine whether the lateral position deviation, the longitudinal position deviation, and the orientation angle deviation between the path point N and the end path point of the planning path are all less than a set threshold. If yes, it can be reported that the planning succeeds (i.e., the initial parking path can be searched), and if no, step 806 can be performed.
[0163] Step 806, based on the eight path templates of the path template file, the path point N is expanded to obtain eight candidate path points. The following operations are performed for each candidate path point (for example, the candidate path point M):
[0164] Step 807, combine the occupancy grid map and the obstacle distance grid map to determine whether the candidate path point M satisfies the safety distance, i.e., whether the distance between the candidate path point M and the nearest obstacle is greater than the safety distance. If not, the candidate path point M can be ignored. If yes, step 808 can be performed.
[0165] Step 808, determine whether the candidate path point M has been located in the CLOSE list. If yes, the candidate path point M can be ignored. If no, step 809 can be performed.
[0166] Step 809, calculate the true cost value of the candidate path point M, and determine whether the candidate path point M has been located in the OPEN list. If no, i.e., the candidate path point M is not in the OPEN list, step 810 is performed. If yes, i.e., the candidate path point M is in the OPEN list, step 811 is performed.
[0167] Step 810, calculate the target heuristic cost value and the target cost value of the candidate path point M, add the candidate path point M to the OPEN list, and take the path point N as the parent node of the candidate path point M (i.e., in the initial parking path, the path point N is the last node of the candidate path point M). Then, step 802 is performed.
[0168] Step 811, determine whether the true cost value of the candidate path point M is less than the true cost value of the candidate path point M recorded in the OPEN list. If not, the candidate path point M can be ignored, and the OPEN list is not updated, and then step 802 is performed. If yes, step 812 is performed.
[0169] Step 812, calculate the target heuristic cost value and the target cost value of the candidate path point M, and update the true cost value, the target heuristic cost value and the target cost value of the candidate path point M recorded in the OPEN list, and take the path point N as the parent node of the candidate path point M. Then, step 802 is performed.
[0170] After reporting the planning success, the parent nodes of the last path point are sequentially queried, and the corresponding path templates are used to connect the path points to obtain the final initial parking path.
[0171] The data structure of the OPEN list and the CLOSED list is exemplary and is a key to search efficiency. The basic operations of the CLOSED list can include putting a specified path point into the CLOSED list, searching whether the specified path point exists in the CLOSED list, and are suitable for storage using an index array. The basic operations of the OPEN list can include searching the optimal path point in the OPEN list, removing the optimal path point in the OPEN list, putting a specified path point into the OPEN list, searching whether the specified path point exists in the OPEN list, and adjusting the value of the specified path point, and are suitable for storage using a priority queue. After the path search is completed, a parking path can be quickly generated according to the connection relationship of the path points and the path template file.
[0172] Sixth, the path optimization process.
[0173] Exemplarily, in order to further improve the smoothness of the path and the distance between the path and the obstacles, after the path search process is completed and the initial parking path is generated, the initial parking path can be optimized. The optimization process consists of two steps of coarse path optimization and path point encryption. In the path optimization process, the initial parking path can be optimized to obtain a target parking path, and the path optimization process can include:
[0174] Step S41, generating an initial parking path based on all target path points in the path point set.
[0175] Step S42, performing sparse processing on the initial parking path to obtain a first parking path.
[0176] Exemplarily, the initial parking path obtained by searching can be sparsely processed (such as taking an interval of 0.5 m) to obtain a first parking path, thereby facilitating macroscopic optimization. For example, in the initial parking path, the first path point is selected first, the interval between the second path point and the first path point is 0.5 m, the interval between the third path point and the second path point is 0.5 m, and so on, and a plurality of path points can be selected from the first parking path. Then, the selected plurality of path points can be combined to form the first parking path.
[0177] Step S43, optimizing the first parking path to obtain a second parking path after optimization.
[0178] For example, when optimizing the first parking path, the path smoothness and curvature of the first parking path can be considered, the gradient direction is calculated to obtain an optimized path point, and all the optimized path points form the second parking path. For example, the first parking path includes 100 path points, and the second parking path includes 100 optimized path points corresponding to the 100 path points. For each optimized path point, collision detection can also be performed on the optimized path point. If the optimized path point does not exist collision, the optimized path point is retained, and if the optimized path point exists collision, the optimized path point is rolled back to the original path point (i.e., the path point in the first parking path). In this way, all the optimized path points can form the second parking path.
[0179] For example, when optimizing the first parking path, the curvature term gradient and the first smoothness term gradient are determined based on the plurality of path points in the first parking path, the target gradient of the first parking path is determined based on the curvature term gradient and the first smoothness term gradient, and the first parking path is optimized based on the target gradient to obtain the second parking path. The target gradient of the second parking path is smaller than the target gradient of the first parking path.
[0180] For example, when optimizing the first parking path, the optimization target can be represented as:
[0181]
[0182] J can represent the optimization target, may represent the curvature term, may represent the smoothness term. k cur ,k smooth may represent the configured proportionality coefficient, which can be configured according to actual needs, such as both of the proportionality coefficients being 0.5. N represents the total number of path points in the first parking path. ΔX i =X i -X i-1 , X i may represent the coordinates of the i-th path point in the first parking path, κ max represents the configured maximum curvature value. When , the first curvature term is valid.
[0183] In the optimization of the first parking path, the first parking path needs to be optimized based on a curvature term gradient and a first smoothing term gradient, the curvature term gradient being a gradient of a curvature term in the optimization target, and the first smoothing term gradient being a gradient of a smoothing term in the optimization target. Based on this, the gradient of the curvature term in the optimization target and the gradient of the smoothing term in the optimization target need to be calculated. On this basis, the target gradient of the first parking path can be determined based on the curvature term gradient and the first smoothing term gradient (for example, the target gradient is the sum value between the curvature term gradient and the first smoothing term gradient), and based on the target gradient, the gradient descent method or the like can be used to optimize the first parking path to obtain the second parking path, that is, the optimization target is to make the target gradient smaller and smaller, that is, the target gradient of the second parking path is smaller than the target gradient of the first parking path.
[0184] Obviously, after the curvature term gradient and the first smoothing term gradient are obtained, the second path point to the (N-2)th path point of the first parking path can be optimized based on the target gradient to obtain the optimized path points of these path points, and the first path point, the (N-1)th path point and the Nth path point of the first parking path are directly used as the optimized path points, and these optimized path points constitute the second parking path. When optimizing the path points based on the target gradient, the gradient descent method or the like can be used, and the optimization target is to make the target gradient smaller and smaller, so that the target gradient of the second parking path is smaller than the target gradient of the first parking path.
[0185] In order to calculate the gradient of the curvature term in the optimization target, the gradient of the curvature on the three points before and after can be considered, and the gradient of the curvature term can be determined by the following formula, of course, which is only an example.
[0186]
[0187] In the above formula, represents the curvature term gradient, k1, k2, k3 are proportional coefficients, which can be configured according to actual requirements, for example, k1, k2, k3 are respectively 0.25, 0.5, 0.25. In the above formula, for other three terms, represents the gradient of the curvature on each point, and the gradient of the curvature on each point can be determined by the following formula:
[0188]
[0189] For the related parameters in the gradient of the curvature on each point, the following formula can be used to determine them:
[0190]
[0191] In the above formula, i represents the i-th path point, x represents the horizontal coordinate of the path point, y represents the vertical coordinate of the path point, X can represent the horizontal coordinate of the path point or the vertical coordinate of the path point, that is, the above formula is executed for the horizontal coordinate of the path point and the above formula is executed for the vertical coordinate of the path point.
[0192] In order to calculate the gradient of the first smoothing term in the optimization target, the gradient of the current point can be considered, and the first smoothing term gradient can adopt the following formula, which is only an example here.
[0193]
[0194] In the above formula, represents the first smoothing term gradient, k4 represents a proportional coefficient, which can be configured according to actual requirements, such as k4 taking 1.0. i represents the i-th path point, and X represents the horizontal coordinate of the path point or the vertical coordinate of the path point, that is, the above formula is executed for the horizontal coordinate of the path point and the vertical coordinate of the path point.
[0195] Step S44, determine whether the second parking path satisfies the first constraint condition; if not, the second parking path can be updated to the first parking path, return to step S43, and re-optimize the first parking path to obtain the optimized second parking path. If yes, step S45 can be executed.
[0196] For example, steps S41-S44 can be a coarse path optimization process.
[0197] For example, if the target gradient is less than a preset threshold, the second parking path satisfies the first constraint condition, and if the target gradient is not less than the preset threshold, the second parking path does not satisfy the first constraint condition. Alternatively, if the iteration number of the first parking path (i.e., the number of repetitions of step S43) is greater than a number threshold, the second parking path satisfies the first constraint condition, and if the iteration number of the first parking path is not greater than the number threshold, the second parking path does not satisfy the first constraint condition. Alternatively, if the iteration length of the first parking path (i.e., the repetition length of step S43) is greater than a length threshold, the second parking path satisfies the first constraint condition, and if the iteration length of the first parking path is not greater than the length threshold, the second parking path does not satisfy the first constraint condition.
[0198] Step S45, performing interpolation operation on the second parking path to obtain a third parking path.
[0199] For example, after completing the coarse optimization process, the second parking path (i.e., the second parking path of the last iteration process) can be obtained, and a straight line (or curve) interpolation operation is performed on the path points in the second parking path, so that the interval of the path points meets the requirements (such as 0.1 m), and the third parking path is obtained.
[0200] Step S46, the third parking path is optimized to obtain a fourth parking path.
[0201] For example, when the third parking path is optimized, only the smooth term of the third parking path can be considered as the optimization target, and the gradient is calculated for optimization, and all the optimized path points form the fourth parking path.
[0202] For example, when the third parking path is optimized, the second smooth term gradient is determined based on the plurality of path points in the third parking path, the third parking path is optimized based on the second smooth term gradient to obtain the fourth parking path, and the second smooth term gradient of the fourth parking path can be smaller than the second smooth term gradient of the third parking path. For example, the optimization target can be expressed as:
[0203] When the third parking path is optimized, the third parking path needs to be optimized based on the second smooth term gradient, and the third smooth term gradient is the gradient of the smooth term in the optimization target. Therefore, the gradient of the smooth term in the optimization target needs to be calculated. On this basis, based on the second smooth term gradient, the gradient descent method or other methods can be used to optimize the third parking path to obtain the fourth parking path, that is, the optimization target is to make the second smooth term gradient smaller and smaller, that is, the second smooth term gradient of the fourth parking path is smaller than the second smooth term gradient of the third parking path. Obviously, after the second smooth term gradient is obtained, the second path point to the (N-2)th path point of the third parking path can be optimized to obtain the optimized path points of these path points, and the first path point, the (N-1)th path point and the Nth path point of the third parking path are directly used as the optimized path points, and these optimized path points form the fourth parking path.
[0204] Step S47, it is determined whether the fourth parking path satisfies the second constraint condition; if not, the fourth parking path can be updated to the third parking path, and step S46 is returned to re-optimize the third parking path to obtain the optimized fourth parking path. If yes, step S48 can be executed.
[0205] For example, if the gradient of the second smooth term is less than a preset threshold, the fourth parking path can satisfy the second constraint condition, and if the gradient of the second smooth term is not less than the preset threshold, the fourth parking path can not satisfy the second constraint condition. Alternatively, if the iteration number of the third parking path is greater than the number threshold, the fourth parking path can satisfy the second constraint condition, and if the iteration number of the third parking path is not greater than the number threshold, the fourth parking path can not satisfy the second constraint condition. Alternatively, if the iteration time length of the third parking path is greater than the time length threshold, the fourth parking path can satisfy the second constraint condition, and if the iteration time length of the third parking path is not greater than the time length threshold, the fourth parking path can not satisfy the second constraint condition.
[0206] In step S48, the target parking path is determined based on the fourth parking path, for example, the fourth parking path is taken as the target parking path. Thus, the target parking path is successfully obtained, and the target parking path is finally output.
[0207] For example, steps S45-S48 can be a path point encryption process. After the path point encryption process ends, that is, after the fourth parking path is obtained, it can be determined whether the fourth parking path satisfies the obstacle avoidance constraint. If not, the optimization fails, and the initial parking path is taken as the target parking path or the second parking path is taken as the target parking path. If yes, the fourth parking path is taken as the target parking path.
[0208] In a possible implementation, all data (such as various offline files) involved in the embodiments are acquired and used on the premise that relevant users are informed and authorized.
[0209] As can be seen from the above technical solutions, in the embodiments of the present application, a safe and fast parking path planning method is provided, and a framework of offline processing and online planning is proposed. The general, high-computational, and high-time-consuming processing work is preferentially calculated and then stored in the form of an offline file. In the online planning process, the result of offline processing is directly called, which can effectively speed up the parking path planning process. Based on the distance grid map, only the occupancy grid corresponding to the original size of the vehicle calculated offline needs to be compared with the distance between the vehicle occupancy grid and the obstacle to complete the collision detection. This operation can significantly reduce the planning time of the algorithm and dynamically adjust the safety distance. At the same time, based on the distance grid map, the distance between the planned path and the obstacle can be used as one of the design factors of the heuristic function. On the basis of using the infeasibility and concentration degree to describe the complexity of the parking scene, and dividing the obstacles around the vehicle and the parking space into high-risk obstacles and low-risk obstacles, a safety heuristic function is designed, which can significantly improve the distance between the parking path and the obstacle, thereby realizing high safety and high humanization of the parking path.
[0210] Based on the same concept as the above method, this application proposes a parking path determination device, see [link to relevant documentation]. Figure 9A The diagram shown is a structural schematic of the device, which may include:
[0211] The acquisition module 911 is used to acquire the starting path point and the ending path point corresponding to the parking path;
[0212] The determination module 912 is used to determine the starting path point as the current path point, and to determine K candidate path points corresponding to the current path point based on a stored path template file, where K is greater than 1; wherein, the path template file includes K path templates, and the path templates represent the basic actions between the current path point and the candidate path points; for each candidate path point, the kinematic heuristic value of the candidate path point is determined based on a stored kinematic heuristic file, and the target value of the candidate path point is determined based on the kinematic heuristic value; based on the target value of each candidate path point, one candidate path point is selected from the K candidate path points as the target path point, and the target path point is added to the path point set;
[0213] The processing module 913 is used to determine whether the target path point and the end path point satisfy the configured constraints; if not, the target path point is determined as the current path point, and the determining module determines K candidate path points corresponding to the current path point based on the stored path template file; if yes, the target parking path is determined based on all target path points in the path point set.
[0214] For example, the path template file includes at least several of the following path templates:
[0215] A long straight-line forward path template, where the candidate path point corresponding to the long straight-line forward path template is located in the forward direction of the current path point, and the candidate path point and the current path point are connected by a long straight line;
[0216] A short straight-line forward path template. The candidate path point corresponding to the short straight-line forward path template is located in the forward direction of the current path point, and there is a short straight line between the candidate path point and the current path point.
[0217] A long straight line backward path template, the candidate path point corresponding to the long straight line backward path template is located in the backward direction of the current path point, and the candidate path point and the current path point are connected by a long straight line;
[0218] A short straight backward path template, the candidate path point corresponding to the short straight backward path template is located in the backward direction of the current path point, and the candidate path point and the current path point are connected by a short straight line;
[0219] a left-turn forward path template, the candidate path point corresponding to the left-turn forward path template being located in the forward direction of the current path point, and a left-circular curve increasing from 0 to a specified turning curvature, a circular arc of the specified turning curvature, a left-circular curve decreasing from the specified turning curvature to 0 being between the candidate path point and the current path point;
[0220] a right-turn forward path template, the candidate path point corresponding to the right-turn forward path template being located in the forward direction of the current path point, and a right-circular curve increasing from 0 to a specified turning curvature, a circular arc of the specified turning curvature, a right-circular curve decreasing from the specified turning curvature to 0 being between the candidate path point and the current path point;
[0221] a left-turn backward path template, the candidate path point corresponding to the left-turn backward path template being located in the backward direction of the current path point, and a left-circular curve increasing from 0 to a specified turning curvature, a circular arc of the specified turning curvature, a left-circular curve decreasing from the specified turning curvature to 0 being between the candidate path point and the current path point;
[0222] a right-turn backward path template, the candidate path point corresponding to the right-turn backward path template being located in the backward direction of the current path point, and a right-circular curve increasing from 0 to a specified turning curvature, a circular arc of the specified turning curvature, a right-circular curve decreasing from the specified turning curvature to 0 being between the candidate path point and the current path point.
[0223] For example, the kinematic heuristic file includes a correspondence between a sample pose and a kinematic value, the kinematic value representing a kinematic value between the sample pose and a fixed pose; the determination module 912 is specifically configured to determine a kinematic heuristic value of the candidate path point based on the stored kinematic heuristic file by: determining a first pose of the candidate path point and a second pose of the end path point; converting the first pose into the fixed pose, determining a conversion relationship between the first pose and the fixed pose, and converting the second pose into a third pose based on the conversion relationship; querying the kinematic heuristic file through the third pose to obtain a sample pose corresponding to the third pose, and determining a kinematic value corresponding to the sample pose as the kinematic heuristic value.
[0224] For example, the determining module 912 determines the target heuristic value of the candidate path point based on the kinematic heuristic value of the candidate path point, specifically: determining a real value of the candidate path point; wherein each path template in the path template file corresponds to a path value, and the real value of the candidate path point is determined based on a sum of the path values corresponding to all path templates from the starting path point to the candidate path point; determining a distance heuristic value of the candidate path point, and determining an initial heuristic value based on the kinematic heuristic value and the distance heuristic value; wherein the distance heuristic value is determined based on a distance between the candidate path point and the ending path point; determining the initial heuristic value as the target heuristic value; or, optimizing the initial heuristic value based on an obtained gear shifting cost coefficient and an obtained obstacle potential energy coefficient to obtain the target heuristic value; wherein the gear shifting cost coefficient indicates whether gear shifting occurs when moving to the candidate path point, and the obstacle potential energy coefficient indicates a degree to which the candidate path point is affected by surrounding obstacles; and determining the target value of the candidate path point based on the real value and the target heuristic value.
[0225] For example, the determining module 912 obtains the gear shifting cost coefficient, specifically: determining the gear shifting cost coefficient as a first value if no gear shifting occurs when moving from the current path point to the candidate path point, and determining the gear shifting cost coefficient as a second value if gear shifting occurs when moving from the current path point to the candidate path point, the second value being greater than the first value; and obtaining the obstacle potential energy coefficient, specifically: determining an obstacle occupied area, a sum of obstacle perimeters, a total area of the map, and a total perimeter of the map based on an obtained occupancy grid map; wherein the occupancy grid map includes obstacle grids corresponding to parking spaces and obstacles surrounding the vehicle; determining an infeasibility based on the obstacle occupied area and the total area of the map, and determining a concentration degree based on the infeasibility, the sum of obstacle perimeters, and the total perimeter of the map; wherein the infeasibility is greater if the obstacle occupied area is greater, the concentration degree is greater if the infeasibility is greater, and the concentration degree is greater if the sum of obstacle perimeters is smaller; determining a potential energy decay coefficient based on the concentration degree, the potential energy decay coefficient being inversely proportional to the concentration degree; and determining the obstacle potential energy coefficient based on the potential energy decay coefficient.
[0226] For example, the determining module 912 determines the obstacle potential energy coefficient based on the potential energy decay coefficient, specifically: determining the obstacle potential energy coefficient using the following formula:
[0227]
[0228] wherein τ(n) represents the obstacle potential coefficient, E(γ) represents the potential decay coefficient; d h represents the distance between the candidate path point and the high-risk obstacle, d h0 represents the potential field range of the high-risk obstacle, d l represents the distance between the candidate path point and the low-risk obstacle, d l0 represents the potential field range of the low-risk obstacle;
[0229] wherein for each obstacle, if the distance between the obstacle and the vehicle is greater than a threshold, the obstacle is a low-risk obstacle; or, if the obstacle is not consistent with the direction of the parking end point, the obstacle is a low-risk obstacle; or, if the distance between the obstacle and the vehicle is not greater than the threshold and the obstacle is consistent with the direction of the parking end point, the obstacle is a high-risk obstacle.
[0230] For example, the processing module 913 is specifically configured to determine the target parking path based on all target path points in the path point set by: generating an initial parking path based on all target path points in the path point set; performing sparse processing on the initial parking path to obtain a first parking path; determining a curvature term gradient and a first smoothing term gradient based on a plurality of path points in the first parking path, determining a target gradient of the first parking path based on the curvature term gradient and the first smoothing term gradient, and optimizing the first parking path based on the target gradient to obtain a second parking path; determining whether the second parking path meets a first constraint condition; if not, updating the second parking path to the first parking path and returning to perform the operation of determining the curvature term gradient and the first smoothing term gradient based on a plurality of path points in the first parking path; if yes, performing an interpolation operation on the second parking path to obtain a third parking path; determining a second smoothing term gradient based on a plurality of path points in the third parking path, and optimizing the third parking path based on the second smoothing term gradient to obtain a fourth parking path; determining whether the fourth parking path meets a second constraint condition; if not, updating the fourth parking path to the third parking path and returning to perform the operation of determining the second smoothing term gradient based on a plurality of path points in the third parking path; and if yes, determining the target parking path based on the fourth parking path.
[0231] For example, in the operation of determining the curvature term gradient and the first smoothing term gradient based on a plurality of path points in the first parking path, the curvature term gradient is the gradient of the curvature term, and the first smoothing term gradient is the gradient of the smoothing term; wherein the curvature term can be: the smoothing term can be wherein k cur ,k smoothrepresents a configured proportional coefficient, N represents a total number of path points in the first parking path, ΔX i = X i -X i-1 , X i represents a coordinate of an i-th path point in the first parking path, κ max represents a configured maximum curvature value.
[0232] Based on the same application concept as the above method, an electronic device (such as a smart driving device or an auxiliary driving device) is provided in the embodiments of the present application, as shown in Figure 9B The electronic device can include a processor 921 and a machine readable storage medium 922, the machine readable storage medium 922 stores machine executable instructions that can be executed by the processor 921; wherein the processor 921 is configured to execute the machine executable instructions to implement the parking path determination method disclosed in the above examples of the present application.
[0233] Based on the same application concept as the above method, the embodiments of the present application further provide a machine readable storage medium, the machine readable storage medium stores a plurality of computer instructions, and the computer instructions can implement the parking path determination method disclosed in the above examples of the present application when executed by a processor.
[0234] The machine readable storage medium can be any electronic, magnetic, optical, or other physical storage device, and can contain or store information such as executable instructions, data, and the like. For example, the machine readable storage medium can be a RAM (Random Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard disk drive), a solid state drive, any type of storage disk (such as an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
[0235] Based on the same application concept as the above method, the embodiments of the present application further provide a computer program product, which can include a computer program. The computer program is executed by a processor to implement the parking path determination method disclosed in the above examples of the present application.
[0236] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0237] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A method for determining a parking path, characterized in that, The method includes: Obtain the start and end points of the parking path; The starting path point is determined as the current path point, and K candidate path points corresponding to the current path point are determined based on the stored path template file, where K is greater than 1; wherein, the path template file includes K path templates, and the path templates represent the basic actions between the current path point and the candidate path points; For each candidate path point, the kinematic heuristic value of the candidate path point is determined based on the stored kinematic heuristic file, and the target value of the candidate path point is determined based on the kinematic heuristic value. Based on the target value of each candidate path point, one candidate path point is selected from the K candidate path points as the target path point and added to the path point set. Determine whether the target path point and the end path point satisfy the configured constraints; If not, the target path point is determined as the current path point, and the operation of determining the K candidate path points corresponding to the current path point based on the stored path template file is returned. If so, the target parking path is determined based on all target path points within the set of path points; The step of determining the target cost of the candidate path point based on the kinematic heuristic cost value includes: The true cost of the candidate path point is determined; wherein, the path cost of each path template in the path template file is determined based on the sum of the path cost values of all path templates from the starting path point to the candidate path point. The distance heuristic value of the candidate path point is determined, and an initial heuristic value is determined based on the kinematic heuristic value and the distance heuristic value; wherein the distance heuristic value is determined based on the distance between the candidate path point and the end path point; The target heuristic cost is obtained by optimizing the initial heuristic cost based on the acquired shift cost coefficient and the acquired obstacle potential energy coefficient; wherein, the shift cost coefficient indicates whether a shift occurs when moving to the candidate path point, and the obstacle potential energy coefficient indicates the degree to which the candidate path point is affected by surrounding obstacles. The target cost of the candidate path point is determined based on the actual cost and the target heuristic cost.
2. The method according to claim 1, characterized in that, The path template file includes at least several of the following path templates: A long straight-line forward path template, where the candidate path point corresponding to the long straight-line forward path template is located in the forward direction of the current path point, and the candidate path point and the current path point are connected by a long straight line; A short straight-line forward path template. The candidate path point corresponding to the short straight-line forward path template is located in the forward direction of the current path point, and there is a short straight line between the candidate path point and the current path point. A long straight line backward path template, the candidate path point corresponding to the long straight line backward path template is located in the backward direction of the current path point, and the candidate path point and the current path point are connected by a long straight line; A short straight backward path template, the candidate path point corresponding to the short straight backward path template is located in the backward direction of the current path point, and the candidate path point and the current path point are connected by a short straight line; The left-turn forward path template has candidate path points located in the forward direction of the current path point. The candidate path points and the current path point are connected by a left spiral curve that increases from 0 to a specified turning radius, an arc with a specified turning radius, and a left spiral curve that decreases from a specified turning radius to 0. The template for a right-turn forward path is provided. The candidate path point corresponding to the template is located in the forward direction of the current path point. The candidate path point and the current path point are connected by a right spiral curve that increases from 0 to a specified turning radius, an arc with a specified turning radius, or a right spiral curve that decreases from a specified turning radius to 0. The left turn and back path template has candidate path points located in the back direction of the current path point. The candidate path points and the current path point are connected by a left spiral curve that increases from 0 to a specified turning radius, an arc with a specified turning radius, and a left spiral curve that decreases from a specified turning radius to 0. The right turn and back path template has candidate path points located in the back direction of the current path point. The candidate path point and the current path point are connected by a right spiral curve that increases from 0 to a specified turning radius, an arc with a specified turning radius, and a right spiral curve that decreases from a specified turning radius to 0.
3. The method according to claim 1, characterized in that, The kinematic heuristic file includes the correspondence between sampled poses and kinematic cost values, whereby the kinematic cost value represents the kinematic cost between the sampled pose and the fixed pose. Determining the kinematic heuristic cost value of the candidate path point based on the stored kinematic heuristic file includes: Determine the first pose of the candidate path point and the second pose of the end path point; The first pose is converted into the fixed pose, the conversion relationship between the first pose and the fixed pose is determined, and the second pose is converted into the third pose based on the conversion relationship. By querying the kinematic heuristic file using the third pose, the sampled pose corresponding to the third pose is obtained, and the kinematic value corresponding to the sampled pose is determined as the kinematic heuristic value.
4. The method according to claim 1, characterized in that, The process of obtaining the shift cost coefficient includes: if no shift occurs when moving from the current path point to the candidate path point, the shift cost coefficient is a first value; if a shift occurs when moving from the current path point to the candidate path point, the shift cost coefficient is a second value, and the second value is greater than the first value. The process of obtaining the obstacle potential energy coefficient includes: determining the obstacle-occupied area, the sum of the obstacle perimeters, the overall map area, and the overall map perimeter based on the obtained occupied grid map; wherein, the occupied grid map includes obstacle grids corresponding to parking spaces and obstacles around vehicles. The degree of infeasibility is determined based on the area occupied by the obstacles and the overall area of the map. The degree of concentration is determined based on the degree of infeasibility, the sum of the perimeters of the obstacles, and the overall perimeter of the map. The larger the area occupied by the obstacles, the greater the degree of infeasibility. The greater the degree of infeasibility, the greater the degree of concentration. The smaller the sum of the perimeters of the obstacles, the greater the degree of concentration. The potential energy attenuation coefficient is determined based on the concentration, and the potential energy attenuation coefficient is inversely proportional to the concentration. The potential energy coefficient of the obstacle is then determined based on the potential energy attenuation coefficient.
5. The method according to claim 4, characterized in that, Determining the obstacle potential energy coefficient based on the potential energy attenuation coefficient includes: determining the obstacle potential energy coefficient using the following formula: in, τ(n) This represents the potential energy coefficient of the obstacle. This represents the potential energy decay coefficient; d h This indicates the distance between the candidate path point and the high-risk obstacle. d h0 This indicates the potential field range of a high-risk obstacle. d l This indicates the distance between the candidate path point and the low-risk obstacle. d l0 Indicates the potential field range of a low-risk obstacle; Specifically, for each obstacle, if the distance between the obstacle and the vehicle is greater than a threshold, the obstacle is considered a low-risk obstacle; or, if the obstacle is not aligned with the parking endpoint direction, the obstacle is considered a low-risk obstacle; or, if the distance between the obstacle and the vehicle is not greater than the threshold and the obstacle is aligned with the parking endpoint direction, the obstacle is considered a high-risk obstacle.
6. The method according to claim 1, characterized in that, Determining the target parking path based on all target path points within the path point set includes: An initial parking path is generated based on all target path points within the set of path points. The initial parking path is processed by sparse processing to obtain the first parking path; The curvature gradient and the first smoothing gradient are determined based on multiple path points within the first parking path. The target gradient of the first parking path is determined based on the curvature gradient and the first smoothing gradient. The first parking path is then optimized based on the target gradient to obtain a second parking path. Determine whether the second parking path satisfies the first constraint condition; If not, update the second parking path to the first parking path and return to perform the operation of determining the gradient of the curvature term and the gradient of the first smoothing term based on multiple path points within the first parking path; If so, then interpolate the second parking path to obtain the third parking path; The gradient of the second smoothing term is determined based on multiple path points within the third parking path, and the third parking path is optimized based on the gradient of the second smoothing term to obtain the fourth parking path. Determine whether the fourth parking path satisfies the second constraint condition; If not, update the fourth parking path to the third parking path and return to perform the operation of determining the gradient of the second smoothing term based on multiple path points within the third parking path; If so, the target parking path is determined based on the fourth parking path.
7. The method according to claim 6, characterized in that, When determining the curvature term gradient and the first smoothing term gradient based on multiple path points within the first parking path, the curvature term gradient is the gradient of the curvature term, and the first smoothing term gradient is the gradient of the smoothing term; wherein, the curvature term is: The smoothing term is ; in, This indicates the configured scaling factor. N This represents the total number of path points within the first parking path. , , , X i Indicates the first parking path within the first parking path i The coordinates of the path points This indicates the maximum curvature value that has been configured.
8. A parking path determination device, characterized in that, The device includes: The acquisition module is used to obtain the start and end path points corresponding to the parking path; The determination module is used to determine the starting path point as the current path point, and to determine K candidate path points corresponding to the current path point based on a stored path template file, where K is greater than 1; wherein, the path template file includes K path templates, and the path templates represent the basic actions between the current path point and the candidate path points; for each candidate path point, the kinematic heuristic value of the candidate path point is determined based on a stored kinematic heuristic file, and the target value of the candidate path point is determined based on the kinematic heuristic value; based on the target value of each candidate path point, one candidate path point is selected from the K candidate path points as the target path point, and the target path point is added to the path point set. The processing module is used to determine whether the target path point and the end path point satisfy the configured constraints; if not, the target path point is determined as the current path point, and the determining module determines K candidate path points corresponding to the current path point based on the stored path template file; if yes, the target parking path is determined based on all target path points in the path point set. Specifically, when the determining module determines the target cost of the candidate path point based on the kinematic heuristic cost value, it is used to: determine the true cost value of the candidate path point; wherein, the path cost value corresponding to each path template in the path template file is determined based on the sum of the path cost values corresponding to all path templates from the starting path point to the candidate path point. The distance heuristic value of the candidate path point is determined, and an initial heuristic value is determined based on the kinematic heuristic value and the distance heuristic value; wherein the distance heuristic value is determined based on the distance between the candidate path point and the end path point; The target heuristic cost is obtained by optimizing the initial heuristic cost based on the acquired shift cost coefficient and the acquired obstacle potential energy coefficient; wherein, the shift cost coefficient indicates whether a shift occurs when moving to the candidate path point, and the obstacle potential energy coefficient indicates the degree to which the candidate path point is affected by surrounding obstacles. The target cost of the candidate path point is determined based on the actual cost and the target heuristic cost.
9. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Online planning method and system for continuous curvature parking path of any starting pose
CN113830079A
Method and device for determining target path, electronic equipment, storage medium and vehicle
CN117664170A