Path planning method and device, equipment and storage medium
By splitting the steering ability of a moving object into the shortest straight-line driving distance and the maximum steering angle, the path planning search algorithm is optimized, which solves the performance degradation problem caused by the turning radius constraint in the existing technology and achieves efficient path planning.
Patent Information
- Application Number
- CN202310341898.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-09-27
AI Technical Summary
When existing path planning search algorithms deal with the turning radius constraints of moving objects, the search space is greatly increased and the algorithm performance is significantly reduced.
By splitting the steering ability of a moving object into two constraints: the shortest straight-line distance and the maximum steering angle, the path planning search algorithm is optimized, and the heuristic function, adjacent node query step and path smoothing step are optimized to consider the steering ability. constraints without reducing performance.
While considering the steering ability constraints of moving objects, the algorithm performance is maintained, the accuracy and efficiency of path planning are improved, the search space is reduced, and a motion path that is more consistent with real laws is obtained.
Smart Images

Figure CN118706115A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of path planning, and in particular to a path planning method, device, equipment and storage medium. Background Art
[0002] Path planning is to find a motion trajectory between the starting point and the end point to avoid obstacles in the environment while optimizing the path as much as possible. When planning a path between the starting point and the end point in a 2D scene, the commonly used algorithm is a path planning algorithm based on search (i.e., graph search). The path planning algorithm based on search can also be called a path planning search algorithm, which can include but is not limited to the A* algorithm and the Theta* algorithm.
[0003] In actual scenarios, moving objects are subject to certain turning radius constraints when turning. In order to solve this problem, the search space is often greatly increased, resulting in lower algorithm performance.
[0004] Therefore, it is necessary to optimize the path planning search algorithm (such as A* algorithm, Theta* algorithm) so as to solve the problem of turning radius constraint without significantly reducing the algorithm performance. Summary of the invention
[0005] A technical problem to be solved by the present disclosure is how to optimize the path planning search algorithm so as to solve the turning radius constraint problem while not significantly reducing the algorithm performance.
[0006] According to a first aspect of the present disclosure, a path planning method is provided, comprising: setting a minimum straight-line driving distance and a maximum steering angle based on the steering ability of a moving object, the shortest straight-line driving distance being used to characterize the shortest straight-line distance that the moving object needs to travel to achieve steering, and the maximum steering angle being used to characterize the maximum steering angle that the moving object can complete under the shortest straight-line driving distance; optimizing a path planning search algorithm based on the shortest straight-line driving distance and the maximum steering angle; and determining the motion path of the moving object from a starting position to an end position based on the optimized path planning search algorithm.
[0007] Optionally, based on the shortest straight-line driving distance and the maximum turning angle, the path planning search algorithm is optimized, including: based on the shortest straight-line driving distance and the maximum turning angle, the heuristic function used by the path planning search algorithm is optimized, the optimized heuristic function is configured to calculate the estimated cost from the current node to the end position, including a first estimated cost, the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction, the first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance and the maximum turning angle, the first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0008] Optionally, the first estimated cost is positively correlated with the angle between the first moving direction and the second moving direction and the shortest straight-line distance, and is negatively correlated with the maximum steering angle.
[0009] Optionally, the estimated cost also includes a second estimated cost, and the second estimated cost is used to represent the distance cost or travel time cost that the moving object needs to pay when moving from the current node to the terminal position.
[0010] Optionally, the optimized heuristic function is expressed as
[0011] Among them, x represents the current node, e represents the terminal position, A(x,e) represents the estimated cost, rad(x,e) represents the angle between the direction of the moving object entering the current node x and the direction of the moving object at the terminal position e, R represents the maximum steering angle, and D represents the shortest straight-line driving distance.
[0012] Optionally, based on the shortest straight-line driving distance and the maximum turning angle, the path planning search algorithm is optimized, including: based on the shortest straight-line driving distance and the maximum turning angle, the adjacent node query step in the path planning search algorithm is optimized, and the optimized adjacent node query step is configured to, when querying the adjacent nodes of a node, ignore the adjacent nodes whose distance to the node is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle.
[0013] Optionally, based on the shortest straight-line driving distance and the maximum steering angle, the path planning search algorithm is optimized, including: based on the shortest straight-line driving distance and the maximum steering angle, the path smoothing step in the path planning search algorithm is optimized, and the optimized path smoothing step is configured to traverse each node in the motion path, determine whether the node meets the constraint conditions, and if the constraint conditions are met, delete the node from the motion path, and connect the previous node of the node in the motion path with the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the steering angle of the moving object moving from the previous node of the node to the next node of the node is less than or equal to the maximum steering angle.
[0014] Optionally, the method further includes: mapping the entry direction of the moving object at each node to one of a plurality of pre-set directions.
[0015] According to a second aspect of the present disclosure, a path planning method is provided, comprising: searching for adjacent nodes of a starting position, adding the found adjacent nodes to a first list, and moving the starting position from the first list to a second list; judging whether an end condition is satisfied; if the end condition is not satisfied, selecting a node from the first list based on a heuristic function, taking the selected node as a new starting position, and iterating the above process until the end condition is satisfied; and obtaining a motion path from the starting position to the end position based on the second list.
[0016] Optionally, the heuristic function is configured such that the calculated estimated cost from the current node to the end position includes a first estimated cost, the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction, the first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance and the maximum steering angle, the first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0017] Optionally, searching for the adjacent nodes of the starting position includes: ignoring the adjacent nodes whose distance to the starting position is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle.
[0018] Optionally, the method also includes: traversing each node in the motion path to determine whether the node meets the constraint conditions, and if so, deleting the node from the motion path, and connecting the previous node of the node in the motion path with the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the turning angle of the moving object moving from the previous node of the node to the next node of the node is less than or equal to the maximum turning angle.
[0019] Optionally, the method further includes: mapping the entry direction of the moving object at each node to one of a plurality of pre-set directions.
[0020] According to a third aspect of the present disclosure, a path planning device is provided, comprising: a setting module for setting a minimum straight-line driving distance and a maximum steering angle based on the steering ability of a moving object, the shortest straight-line driving distance being used to characterize the shortest straight-line distance that the moving object needs to travel to achieve steering, and the maximum steering angle being used to characterize the maximum steering angle that the moving object can complete under the shortest straight-line driving distance; an optimization module for optimizing a path planning search algorithm based on the shortest straight-line driving distance and the maximum steering angle; and a path planning module for determining the motion path of the moving object from a starting position to an end position based on the optimized path planning search algorithm.
[0021] Optionally, the optimization module optimizes the heuristic function used by the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle, and the optimized heuristic function is configured to calculate the estimated cost from the current node to the end position, including a first estimated cost, and the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction, and the first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance and the maximum turning angle, and the first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0022] Optionally, the first estimated cost is positively correlated with the angle between the first moving direction and the second moving direction and the shortest straight-line distance, and is negatively correlated with the maximum steering angle.
[0023] Optionally, the estimated cost also includes a second estimated cost, and the second estimated cost is used to represent the distance cost or travel time cost that the moving object needs to pay when moving from the current node to the terminal position.
[0024] Optionally, the optimized heuristic function is expressed as
[0025] Among them, x represents the current node, e represents the terminal position, A(x,e) represents the estimated cost, rad(x,e) represents the angle between the direction of the moving object entering the current node x and the direction of the moving object at the terminal position e, R represents the maximum steering angle, and D represents the shortest straight-line driving distance.
[0026] Optionally, the optimization module optimizes the adjacent node query step in the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle, and the optimized adjacent node query step is configured to ignore adjacent nodes whose distance to the node is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle when querying adjacent nodes of a node.
[0027] Optionally, the optimization module optimizes the path smoothing step in the path planning search algorithm based on the shortest straight-line driving distance and the maximum steering angle, and the optimized path smoothing step is configured to traverse each node in the motion path and determine whether the node meets the constraint conditions. If the constraint conditions are met, the node is deleted from the motion path, and the previous node of the node in the motion path is connected to the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the steering angle of the moving object moving from the previous node of the node to the next node of the node is less than or equal to the maximum steering angle.
[0028] Optionally, the method further includes: a discrete module, used to map the entry direction of the moving object at each node to one of a plurality of preset directions.
[0029] According to a fourth aspect of the present disclosure, a path planning device is provided, comprising: a search module, used to search for adjacent nodes of a starting position, add the found adjacent nodes to a first list, and move the starting position from the first list to a second list; a judgment module, used to judge whether an end condition is met; a selection module, used to select a node from the first list based on a heuristic function if the end condition is not met, use the selected node as a new starting position, and iterate the above process until the end condition is met; a determination module, used to obtain a motion path from the starting position to the end position based on the second list.
[0030] Optionally, the heuristic function is configured such that the calculated estimated cost from the current node to the end position includes a first estimated cost, the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction, the first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance and the maximum steering angle, the first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0031] Optionally, the search module ignores adjacent nodes whose distance from the starting position is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle.
[0032] Optionally, the device also includes: a path smoothing module, used to traverse each node in the motion path, determine whether the node meets the constraint conditions, and if so, delete the node from the motion path, and connect the previous node of the node in the motion path with the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the turning angle of the moving object from the previous node of the node to the next node of the node is less than or equal to the maximum turning angle.
[0033] Optionally, the device further comprises: a discrete module, configured to map the entry direction of the moving object at each node to one of a plurality of preset directions.
[0034] According to a fifth aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory on which executable code is stored, and when the executable code is executed by the processor, the processor executes the method described in the first aspect or the second aspect above.
[0035] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising an executable code. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described in the first aspect or the second aspect above.
[0036] According to the seventh aspect of the present disclosure, a non-temporary machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in the first aspect or the second aspect above.
[0037] Therefore, the present invention splits the steering ability constraint of the moving object into two constraints, the shortest straight-line driving distance and the maximum steering angle, and optimizes the path planning search algorithm based on these two constraints, so that the optimized algorithm will not significantly reduce the algorithm performance while considering the steering ability constraint of the moving object to plan the path. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0039] Figure 1 A schematic flowchart of a path planning method according to an embodiment of the present disclosure is shown.
[0040] Figure 2 A schematic diagram of a path planning process according to an embodiment of the present disclosure is shown.
[0041] Figure 3 A basic flow chart of smoothing a motion path is shown.
[0042] Figure 4 A schematic structural diagram of a path planning device according to an embodiment of the present disclosure is shown.
[0043] Figure 5 A schematic structural diagram of a path planning device according to another embodiment of the present disclosure is shown.
[0044] Figure 6 A schematic diagram of the structure of a computing device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0045] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0046] The present disclosure proposes to split the steering capability (such as turning radius) constraint of a moving object (such as a vehicle, a boat, a robot, etc.) into two constraints: the shortest straight-line driving distance and the maximum steering angle, so as to consider the constraint relationship. By optimizing the path planning search algorithm based on these two constraints, the optimized algorithm will not significantly reduce the algorithm performance while considering the steering capability constraint of the moving object to perform path planning.
[0047] The shortest straight-line driving distance is used to characterize the shortest straight-line distance that a moving object needs to travel to achieve a turn. The maximum steering angle is used to characterize the maximum steering angle that a moving object can achieve under the shortest straight-line driving distance.
[0048] Taking a moving object as an example, the turning ability of a vehicle can be expressed by a turning radius (i.e., the minimum turning radius of the vehicle). The turning radius refers to the distance from the steering center to the point where the front outer steering wheel contacts the ground during driving. The turning radius can largely characterize the vehicle's ability to pass through narrow curved areas or bypass insurmountable obstacles. As an example, the minimum turning radius of a vehicle can be calculated by the following formula: R = L / 2 (Sinψ). Among them, R represents the minimum turning radius of the vehicle; L represents the length of the vehicle; Ψ represents the maximum turning angle of the vehicle direction. The path of a vehicle when turning is similar to an arc, and the arc can be represented by several connected line segments within a certain error. The two constraints of the shortest straight-line driving distance and the maximum steering angle correspond to the shortest length of a line segment and the angle between line segments.
[0049] The specific values of the shortest straight-line driving distance and the maximum steering angle can be flexibly set according to the steering ability of the moving object. Since the method of using line segments to simulate curves is lossy, the smaller the shortest straight-line driving distance is set, the smaller the maximum steering angle will be, and the simulation will be closer to the real scene, that is, the loss will be smaller.
[0050] Figure 1 A schematic flowchart of a path planning method according to an embodiment of the present disclosure is shown.
[0051] See also Figure 1 In step S110, the shortest straight-line driving distance and the maximum steering angle are set based on the steering ability of the moving object. The shortest straight-line driving distance and the maximum steering angle are set based on the steering ability of the moving object, that is, the steering ability constraint of the moving object is divided into two constraints, namely, the shortest straight-line driving distance and the maximum steering angle.
[0052] For the shortest straight-line driving distance, maximum steering angle and splitting principle, please refer to the relevant description above.
[0053] In step S120, the path planning search algorithm is optimized based on the shortest straight-line driving distance and the maximum turning angle.
[0054] Conventional path planning search algorithms do not consider the turning ability of a moving object when searching for a path from a starting position to a terminal position, so that the motion path obtained by the search may exceed the turning ability of the moving object.
[0055] The purpose of the present invention to optimize the path planning search algorithm based on the shortest straight-line driving distance and the maximum steering angle is to enable the optimized path planning search algorithm to take into account the steering ability of the moving object in the process of searching for the path from the starting position to the end position, so that the searched motion path will not exceed the steering ability of the moving object.
[0056] The path planning search algorithm, which can also be called a path planning algorithm based on search (graph search), may include but is not limited to the A* algorithm and the Theta* algorithm (an improved algorithm for the A* algorithm). The path planning search algorithm is a discretized algorithm, which means that the entire map area is composed of a finite number of areas (such as a finite number of square areas), and each area can be called a "node". That is, the entire map area is filled with a finite number of nodes, and each node has a finite number of neighboring nodes. Neighbor nodes refer to nodes adjacent to each node, that is, neighboring nodes of each node. In other words, the map data used by the path planning search algorithm is a rasterized map. The higher the resolution of the grid, the better the path searched by the algorithm is generally.
[0057] The following uses the A* algorithm as an example to illustrate the path planning process of the path planning search algorithm. For the path planning process using other algorithms (such as an improved algorithm based on the A* algorithm), reference can be made to the prior art.
[0058] The A* algorithm is an efficient heuristic search algorithm that works well on two-dimensional grid maps. The A* algorithm estimates the cost evaluation function value of the node and uses it as the comprehensive priority of the node. When selecting the next node to be traversed, it selects the node with the highest comprehensive priority and gradually finds the optimal path. The A* algorithm can quickly find the path with the smallest cost and the shortest distance. The cost calculation formula of the A* algorithm can be recorded as F(x)=G(x)+H(x). F(x) represents the total cost from point x to the end point, G(x) represents the actual moving cost from the starting point A to point x, and H(x) represents the estimated cost from point x to the end point. H(x) can be calculated using a heuristic function.
[0059] Based on the path-finding characteristics of the path planning search algorithm, the present disclosure proposes that the heuristic function used by the path planning search algorithm can be optimized, and / or the adjacent node query step of the path planning search algorithm can be optimized, and / or the path smoothing step in the path planning search algorithm can be optimized.
[0060] The optimization process of these three aspects is illustrated below.
[0061] 1. Optimize the heuristic function
[0062] The heuristic function used by the path planning search algorithm is used to calculate the estimated cost from the current node to the end point.
[0063] Existing heuristic functions usually calculate the estimated cost based on the distance from the current node to the end position (such as the Euclidean distance). For example, the existing heuristic function can be expressed as A(x,e)=dist(x,e), where A(x,e) represents the estimated cost from node x to end position e, and dist(x,e) represents the Euclidean distance between node x and end position e.
[0064] When calculating the estimated cost from the current node to the end point, the existing heuristic function only considers the distance cost between the two points, but does not consider the turning cost required for the moving object to move from the current node to the end point. Therefore, it is impossible to accurately evaluate the cost of the moving object between the two points.
[0065] The present invention optimizes the heuristic function used in the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle, so that the optimized heuristic function can take into account the turning cost required for the moving object to move from the current node to the terminal position when calculating the estimated cost from the current node to the terminal position.
[0066] In other words, the optimized heuristic function is configured so that the estimated cost from the current node to the terminal position calculated includes the first estimated cost (i.e., the turning cost). The first estimated cost is used to characterize the turning cost required for the moving object to change from the first moving direction to the second moving direction. The first moving direction is used to characterize the direction in which the moving object enters the current node, and the second moving direction is used to characterize the direction of the moving object at the terminal position.
[0067] The first estimated cost may be determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance, and the maximum steering angle. That is, the first estimated cost may be determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance, and the maximum steering angle. The first estimated cost may be positively correlated with the angle between the first moving direction and the second moving direction, the shortest straight-line distance, and negatively correlated with the maximum steering angle.
[0068] As an example, the first estimated cost can be expressed as Among them, rad(x,e) represents the angle between the direction of the moving object entering the current node x (i.e., the first moving direction) and the direction of the moving object at the terminal position e (i.e., the second moving direction), R represents the maximum steering angle, and D represents the shortest straight-line driving distance. The meaning can be understood as the shortest distance a moving object needs to travel along a straight line to change from the first moving direction at the node x to the second moving direction at the end position e. This distance is equal to the product of the minimum number of turns (i.e. rad(x,e) / ) and the shortest straight-line driving distance each time (i.e. D).
[0069] The estimated cost from the current node to the terminal position calculated using the optimized heuristic function may also include a second estimated cost. The second estimated cost may be used to characterize the distance cost or driving time cost that the moving object needs to pay to move from the current node to the terminal position. The second estimated cost is positively correlated with the distance or driving time between the current node and the terminal position. Among them, the driving time may also be referred to as driving time, which is used to characterize the estimated driving time required for the moving object to move from the current node to the terminal position. Thus, the estimated cost from the current node to the terminal position includes a first estimated cost and a second estimated cost. The estimated cost from the current node to the terminal position is positively correlated with the first estimated cost and the second estimated cost, respectively. For example, the estimated cost from the current node to the terminal position may be equal to the sum of the first estimated cost and the second estimated cost, or may be equal to the weighted sum of the first estimated cost and the second estimated cost.
[0070] Taking the second estimated cost representing the distance cost of the moving object moving from the current node to the end position as an example, the optimized heuristic function can be exemplarily expressed as For the meaning of each symbol in the formula, please refer to the description above.
[0071] 2. Optimize the adjacent node query steps
[0072] The adjacent node query step in the path planning search algorithm is used to query the adjacent nodes of the target node, that is, to query the neighboring nodes of the target node. The adjacent nodes found will be added to the "Open" list (i.e., the first list described below) as nodes to be searched. During the search process, the nodes searched in the "Open" list will be removed from the "Open" list and added to the "Close" list (i.e., the second list described below).
[0073] The existing neighboring node query step usually only considers whether the area represented by the neighboring nodes of the target node has obstacles or other unreachable areas, and selects all reachable neighboring nodes of the target node. This neighboring node query method ignores the steering ability constraints of the moving object.
[0074] To this end, the present disclosure proposes that the adjacent node query step in the path planning search algorithm can be optimized based on the shortest straight-line driving distance and the maximum turning angle, so that the optimized adjacent node query step can ignore the nodes that do not meet the steering ability constraints of the moving object when querying the adjacent nodes of the target node.
[0075] Specifically, the optimized adjacent node query step can be configured to ignore adjacent nodes whose distance to the target node is less than the shortest straight-line driving distance, or ignore adjacent nodes whose steering angle is greater than the maximum steering angle when querying adjacent nodes of the target node. That is, adjacent nodes that meet any of the two conditions of "the distance to the target node is less than the shortest straight-line driving distance" and "the steering angle is greater than the maximum steering angle" can be ignored. The steering angle is used to characterize the angle between the direction of the moving object entering the target node and the direction of entering the adjacent node, that is, the angle that the moving object needs to turn to change from the direction of entering the target node to the direction of entering the adjacent node.
[0076] By optimizing the adjacent node query steps, on the one hand, the searched nodes are nodes that meet the steering ability constraints of the moving object, which improves the accuracy of the search nodes; on the other hand, the number of searched nodes can be reduced, thereby reducing the search space and speeding up the search.
[0077] 3. Optimize the path smoothing step
[0078] In order to make the motion path smoother, a path smoothing step can be added to the path planning search algorithm. After the motion path from the starting position to the end position is obtained by the path planning search algorithm, the path smoothing step can be executed to smooth the motion path, and the smoothed motion path is used as the final motion path.
[0079] The basic processing flow of the path smoothing step can be described as follows.
[0080] Traverse each node in the motion path, such as traversing from the end position to the starting position in the motion path, and determine whether each node in the motion path can be skipped. If it can be skipped, delete the node from the motion path, and directly connect the previous node of the node in the motion path with the next node of the node.
[0081] Whether a node can be skipped can be determined by judging whether the node meets the constraint conditions.
[0082] The constraint conditions may include but are not limited to: the distance between the node before the node and the node after the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the turning angle of the moving object from the node before the node to the node after the node is less than or equal to the maximum turning angle. The turning angle is used to represent the angle required for the moving object to turn from the direction of entering the previous node to the direction of entering the next node.
[0083] In addition, the constraint condition may also include that the moving object will not pass through obstacles when moving from a previous node to a next node.
[0084] For each node, it can be determined that the node can be skipped only when the node satisfies all constraints.
[0085] Therefore, by optimizing the path smoothing step (that is, optimizing the path smoothing algorithm Floyd Smooth) based on the shortest straight-line driving distance and the maximum turning angle, the motion path obtained based on the optimized path smoothing algorithm is more in line with the actual law.
[0086] So far, the process of optimizing the above three aspects in the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle has been described in detail. The present disclosure can optimize any one or a combination of multiple aspects of the above three aspects according to needs.
[0087] The present disclosure can also pre-set (i.e., divide) multiple (predetermined number, such as 4) directions, and map the entry direction of the moving object at each node to one of the pre-set multiple directions. In this way, the direction of the moving object can be discretized into multiple directions. For example, the direction of the moving object can be evenly distributed from 0 to 2π and discretized into four directions of 0, 1 / 2π, π, and 3 / 2π. Therefore, by discretizing the direction of the object into multiple directions, the state space can be reduced and the algorithm solution speed can be accelerated while ensuring the accuracy error. The number of divided directions can be determined by the sensitivity of the map data and the turning angle requirements. Specifically, the more the number of divided directions, the more accurate the simulation of the real scene will be, but the search space will become larger. Therefore, when the sensitivity requirement is low, the number of divided directions can be reduced to reduce the search space.
[0088] In step S130, a moving path of the moving object from the starting position to the ending position is determined based on the optimized path planning search algorithm.
[0089] The starting position can also be called the initial position. The end position can also be called the final position. The direction of the moving object at the starting position can be fixed. The direction of the moving object at the final position can be fixed or not.
[0090] Figure 2 A schematic diagram of a path planning process according to an embodiment of the present disclosure is shown.
[0091] Combine the following Figure 2 The process of determining the motion path based on the optimized path planning search algorithm is exemplified, and the details involved can be referred to the mature technology in the field.
[0092] See also Figure 2 First, step S210 may be executed to search for adjacent nodes of the starting position, add the adjacent nodes found to the first list, and move the starting position from the first list to the second list.
[0093] The first list can also be called an open list (OpenList). The second list can also be called a closed list (CloseList). The first list is used to store all nodes that have been generated but not examined, and the second list is used to store nodes that have been visited.
[0094] The initial position may be pre-added to the first list and the second list may be set to be empty.
[0095] When searching for neighboring nodes of a starting position, neighboring nodes whose distances to the starting position are less than the shortest straight-line driving distance or whose steering angles are greater than the maximum steering angle may be ignored.
[0096] Moving the starting position from the first list to the second list means deleting the starting position from the first list and adding the starting position to the second list.
[0097] After executing step S210, step S220 may be executed to determine whether the end condition is currently met.
[0098] The end condition can be set to: the end position appears in the first list, or the first list is empty. If the end position appears in the first list, it means that the motion path from the start position to the end position has been found. If the first list is empty, it means that there is no suitable path from the start position to the end position.
[0099] If the end condition is not met, step S230 may be executed to select a node from the first list based on the heuristic function and use the selected node as a new starting position.
[0100] Selecting a node from the first list based on the heuristic function means that a node with the minimum total cost can be selected from the first list based on the heuristic function. Wherein, the total cost F(x)=G(x)+H(x), G(x) represents the actual moving cost from the starting point A to the point x, and H(x) represents the estimated cost from the point x to the end point. H(x) can be calculated using the optimized heuristic function. For the optimized heuristic function, please refer to the relevant description above.
[0101] After executing step S230, the process can be returned to step S210, and the above process (i.e., step S210, step S220) can be iterated until the end condition is met. When the end condition is that the end position appears in the first list, the motion path from the starting position to the end position can be obtained based on the second list. The motion path is the path consisting of the nodes passing through from the end position along the parent node to the starting position. In the process of executing the algorithm, each point needs to record the position of the previous point that reaches the point, which can be called the parent node. After doing this, once the end point is reached, it can start from the end point and find the starting point in the order of the parent nodes, thereby forming a path.
[0102] When the end condition is that the end position appears in the first list, step S240 may be further executed to smooth the motion path. Figure 3 A basic flow chart of smoothing a motion path is shown.
[0103] See also Figure 3 , in step S241, the previous state point can be enumerated.
[0104] The nodes in the motion path may be enumerated in the direction from the end position to the start position, that is, the first enumerated state point (i.e., node) may refer to the node connected to the end position.
[0105] In step S242, it is determined whether the point can be skipped.
[0106] The judgment process can refer to the relevant description above.
[0107] If the point can be skipped, step S243 is executed to delete the point and connect the previous state point of the point with the next state point. If the point cannot be skipped, the point is retained and the process jumps to step S244.
[0108] In step S244, it is determined whether all points in the motion path have been enumerated.
[0109] If all points in the motion path have been enumerated, the smoothing process ends; if all points in the motion path have not been enumerated, the process returns to step S241 to continue enumerating the previous state point.
[0110] In summary, the present disclosure considers the steering ability (such as turning radius) constraint of a moving object by splitting it into two constraints: the shortest straight-line driving distance D and the maximum turning angle R, which facilitates the consideration of the constraint relationship; by discretizing the object orientation into multiple directions, the state space can be reduced while ensuring a certain accuracy error, and the algorithm solving speed can be accelerated; by optimizing the heuristic function by obtaining the minimum turning distance according to the current object direction and the target direction, the quality of the heuristic function can be improved; finally, by using the optimized path smoothing method (such as the Floyd Smooth method) to smooth the path, the path can be made to conform to the laws of reality.
[0111] The path planning method disclosed herein may also be implemented as a path planning device. Figure 4 FIG. 1 is a schematic diagram showing the structure of a path planning device according to an embodiment of the present disclosure. The functional units of the path planning device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present disclosure. It can be understood by those skilled in the art that Figure 4 The functional units described can be combined or divided into sub-units to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional units described herein. The following is a brief description of the functional units that the path planning auxiliary device can have and the operations that each functional unit can perform. For the details involved, please refer to the relevant description above, which will not be repeated here.
[0112] See also Figure 4 The path planning device 400 may include a setting module 410 , an optimization module 420 and a path planning module 430 .
[0113] The setting module 410 is used to set the shortest straight-line driving distance and the maximum steering angle based on the steering ability of the moving object. The optimization module 420 is used to optimize the path planning search algorithm based on the shortest straight-line driving distance and the maximum steering angle. The path planning module 430 is used to determine the motion path of the moving object from the starting position to the end position based on the optimized path planning search algorithm.
[0114] The optimization module 420 can optimize the heuristic function used by the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle. The optimized heuristic function is configured to calculate the estimated cost from the current node to the end position, including a first estimated cost. The first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction. The first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance, and the maximum turning angle. The first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0115] The first estimated cost is positively correlated with the angle between the first moving direction and the second moving direction, the shortest straight-line distance, and negatively correlated with the maximum turning angle. The estimated cost may also include a second estimated cost, which is used to characterize the distance cost or travel time cost that the moving object needs to pay to move from the current node to the end position.
[0116] The optimization module 420 can also optimize the adjacent node query step in the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle. The optimized adjacent node query step is configured to ignore adjacent nodes whose distance to the node is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle when querying the adjacent nodes of a node.
[0117] The optimization module 420 can also optimize the path smoothing step in the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle. The optimized path smoothing step is configured to traverse each node in the motion path and determine whether the node meets the constraint conditions. If the constraint conditions are met, the node is deleted from the motion path and the previous node of the node in the motion path is connected to the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the turning angle of the moving object from the previous node of the node to the next node of the node is less than or equal to the maximum turning angle.
[0118] The path planning device 400 may further include a discrete module. The discrete module is used to map the entry direction of the moving object at each node to one of a plurality of preset directions.
[0119] Figure 5 A schematic structural diagram of a path planning device according to another embodiment of the present disclosure is shown.
[0120] See also Figure 5 The path planning device 500 may include a search module 510 , a judgment module 520 , a selection module 530 and a determination module 540 .
[0121] The search module 510 is used to search for adjacent nodes of the starting position, add the adjacent nodes found to the first list, and move the starting position from the first list to the second list. The judgment module 520 is used to judge whether the end condition is met. The selection module 530 is used to select a node from the first list based on the heuristic function if the end condition is not met, and use the selected node as the new starting position, and iterate the above process until the end condition is met. The determination module 540 is used to obtain the motion path from the starting position to the end position based on the second list.
[0122] The path planning algorithm adopted by the path planning device may be a path planning algorithm optimized based on the shortest straight-line driving distance and the maximum steering angle.
[0123] For example, the heuristic function can be configured such that the calculated estimated cost from the current node to the end position includes a first estimated cost, the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction, the first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance, and the maximum turning angle, the first moving direction is used to characterize the direction in which the moving object enters the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
[0124] For another example, the search module may ignore adjacent nodes whose distance from the starting position is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle.
[0125] For another example, the path planning device 500 may include a path smoothing module. The path smoothing module may be used to traverse each node in the motion path, determine whether the node meets the constraint condition, and if the constraint condition is met, delete the node from the motion path, and connect the previous node of the node in the motion path with the next node of the node, wherein the constraint condition may include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the turning angle of the moving object from the previous node of the node to the next node of the node is less than or equal to the maximum turning angle.
[0126] The path planning device may further include a discrete module. The discrete module may be used to map the entry direction of the moving object at each node to one of a plurality of pre-set directions.
[0127] Figure 6 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned path planning method according to an embodiment of the present invention is shown.
[0128] See also Figure 6 , the computing device 600 includes a memory 610 and a processor 620 .
[0129] The processor 620 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 620 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 620 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0130] The memory 610 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 620 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 610 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0131] The memory 610 stores executable codes, and when the executable codes are processed by the processor 620 , the processor 620 can execute the path planning method mentioned above.
[0132] The path planning method, apparatus and computing device according to the present invention have been described in detail above with reference to the accompanying drawings.
[0133] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.
[0134] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.
[0135] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.
[0136] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A path planning method, characterized in that: include: The shortest straight-line driving distance and the maximum steering angle are set based on the steering ability of the moving object, wherein the shortest straight-line driving distance is used to represent the shortest straight-line distance that the moving object needs to travel to achieve steering, and the maximum steering angle is used to represent the maximum steering angle that the moving object can achieve under the shortest straight-line driving distance; Optimizing the path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle; The moving path of the moving object from the starting position to the ending position is determined based on the optimized path planning search algorithm.
2. The method according to claim 1, characterized in that Based on the shortest straight-line driving distance and the maximum turning angle, the path planning search algorithm is optimized, including: Based on the shortest straight-line driving distance and the maximum turning angle, the heuristic function used by the path planning search algorithm is optimized, and the optimized heuristic function is configured to calculate the estimated cost from the current node to the end position, including a first estimated cost, and the first estimated cost is used to characterize the turning cost required for the moving object to change from a first moving direction to a second moving direction. The first estimated cost is determined based on the angle between the first moving direction and the second moving direction, the shortest straight-line driving distance, and the maximum turning angle. The first moving direction is used to characterize the direction of the moving object entering the current node, and the second moving direction is used to characterize the direction of the moving object at the end position.
3. The method according to claim 2, characterized in that The first estimated cost is positively correlated with the angle between the first moving direction and the second moving direction and the shortest straight-line distance, and is negatively correlated with the maximum steering angle.
4. The method according to claim 2, characterized in that: The estimated cost also includes a second estimated cost, which is used to represent the distance cost or travel time cost that the moving object needs to pay to move from the current node to the terminal position.
5. The method according to claim 1, characterized in that Based on the shortest straight-line driving distance and the maximum turning angle, the path planning search algorithm is optimized, including: Based on the shortest straight-line driving distance and the maximum turning angle, the adjacent node query step in the path planning search algorithm is optimized. The optimized adjacent node query step is configured to ignore adjacent nodes whose distance to the node is less than the shortest straight-line driving distance or whose turning angle is greater than the maximum turning angle when querying adjacent nodes of a node.
6. The method according to claim 1, characterized in that Based on the shortest straight-line driving distance and the maximum turning angle, the path planning search algorithm is optimized, including: Based on the shortest straight-line driving distance and the maximum steering angle, the path smoothing step in the path planning search algorithm is optimized, and the optimized path smoothing step is configured to traverse each node in the motion path and determine whether the node meets the constraint conditions. If the constraint conditions are met, the node is deleted from the motion path, and the previous node of the node in the motion path is connected to the next node of the node, wherein the constraint conditions include: the distance between the previous node of the node and the next node of the node in the motion path is greater than or equal to the shortest straight-line driving distance; and / or the steering angle of the moving object moving from the previous node of the node to the next node of the node is less than or equal to the maximum steering angle.
7. A path planning method, characterized in that: include: Find the adjacent nodes of the starting position, add the found adjacent nodes to the first list, and move the starting position from the first list to the second list; Determine whether the end condition is met; If the end condition is not met, a node is selected from the first list based on the heuristic function, the selected node is used as a new starting position, and the above process is iteratively executed until the end condition is met; A motion path from the starting position to the ending position is obtained based on the second list.
8. A path planning device, characterized in that: include: A setting module, used to set a shortest straight-line driving distance and a maximum steering angle based on the steering ability of the moving object, wherein the shortest straight-line driving distance is used to represent the shortest straight-line distance that the moving object needs to travel to achieve steering, and the maximum steering angle is used to represent the maximum steering angle that the moving object can achieve under the shortest straight-line driving distance; An optimization module, used for optimizing a path planning search algorithm based on the shortest straight-line driving distance and the maximum turning angle; The path planning module is used to determine the motion path of the moving object from the starting position to the end position based on the optimized path planning search algorithm.
9. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 7.
10. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 7.
