Methods, apparatus, electronic devices and computer storage media for path planning

By combining an octree structure and a cost function, the search speed for intermediate nodes in path planning is adaptively adjusted, solving the problem of balancing speed and accuracy in existing technologies and achieving efficient path planning in different regions.

CN115170747BActive Publication Date: 2026-04-03CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-15
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing path planning methods struggle to maintain accuracy while improving the speed of searching for intermediate nodes, and they cannot adaptively adjust to the specific conditions of the current area where the flight equipment is located.

Method used

By determining weighting factors based on the 3D map information and octree structure of the geographical region, and combining the cost function, greedy algorithm and Dijkstra algorithm, the search speed of intermediate nodes in path planning is adaptively adjusted. Collision risk is calculated using prior information on vertical height and sensor data to optimize path planning.

Benefits of technology

While ensuring path accuracy, it improves the speed of path planning, saves computing resources and energy consumption, and adapts to the path planning needs of flight equipment in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170747B_ABST
    Figure CN115170747B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and storage medium for path planning. The method includes: obtaining a grid composed of multiple nodes with three-dimensional coordinates based on three-dimensional map information of a geographical region; determining weight factors based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node; determining the cost required from the initial node corresponding to the starting position of the path planning, through the candidate nodes, to the terminal node, based on the three-dimensional coordinates of the nodes, the cost function, and the weight factors; wherein the initial node corresponds to the node where the starting point is located, and the terminal node is the node corresponding to the terminal position of the path planning; and determining whether the candidate node is an intermediate node traversed by the planned path based on the cost. This method can adaptively adjust the search speed for determining intermediate nodes of the planned path while ensuring accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer storage medium for path planning. Background Technology

[0002] With the development of path planning in navigation technology, more and more flight equipment is adopting path planning to achieve automatic flight. In the process of path planning, some existing path planning methods are difficult to balance accuracy if it is necessary to improve the speed of searching for intermediate nodes in the path. They cannot take into account both accuracy and speed of searching for intermediate nodes in the path according to the specific conditions of the current area where the flight equipment is located.

[0003] Therefore, a device is needed that can adaptively change the search speed of intermediate nodes in the search path. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, and computer storage medium for path planning.

[0005] According to a first aspect of this disclosure, a method for path planning is provided, the method comprising:

[0006] Based on the 3D map information of the geographical region, a grid composed of multiple nodes with 3D coordinates is obtained;

[0007] The weighting factor is determined based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node.

[0008] Based on the three-dimensional coordinates of the node, the cost function, and the weight factor, the cost required to proceed from the initial node corresponding to the starting position of the path planning through the candidate nodes and from the candidate nodes to the termination node is determined; wherein, the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning.

[0009] Based on the cost, determine whether the candidate node is an intermediate node traversed by the planned path.

[0010] Optionally, the cost function is a polynomial function, comprising: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part;

[0011] The first part is used to determine the first-generation value between the initial node and the candidate node;

[0012] The second part is used to determine the second-generation value from the candidate node to the termination node.

[0013] Optionally, determining the weighting factor based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node, includes:

[0014] Based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the terminal leaf node of the octree containing the candidate node, the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node is obtained.

[0015] If the three-dimensional distance is less than the first threshold parameter, the weight factor is determined based on the weight coefficient, the cube side length of the last leaf node of the octree where the candidate node is located, and the first threshold parameter.

[0016] If the three-dimensional distance is greater than the first threshold parameter, the weighting factor is determined based on the weighting coefficient, the cube side length of the terminal leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree where the candidate node is located.

[0017] Optionally, the true cost function in the cost function includes: a collision risk calculation formula;

[0018] Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function relationship for the flight equipment is obtained.

[0019] Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

[0020] Optionally, the true cost function in the cost function includes: a three-dimensional distance calculation formula;

[0021] If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1;

[0022] If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1;

[0023] The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

[0024] According to a second aspect of the present disclosure, a path planning apparatus is provided, the apparatus comprising:

[0025] The first determining module is used to obtain a grid composed of multiple nodes with three-dimensional coordinates based on the three-dimensional map information of the geographical area.

[0026] The second determining module is used to determine the weighting factor based on the side length of the grid where the terminal leaf node of the octree of the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree of the candidate node.

[0027] The third determining module is used to determine the cost required from the initial node corresponding to the starting position of the path planning through the candidate nodes and from the candidate nodes to the termination node, based on the three-dimensional coordinates of the node, the cost function, and the weight factor; wherein the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning.

[0028] The fourth determining module is used to determine whether the candidate node is an intermediate node passed through by the planned path based on the cost.

[0029] Optionally, the cost function is a polynomial function, comprising: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part;

[0030] The first part is used to determine the first-generation value between the initial node and the candidate node;

[0031] The second part is used to determine the second-generation value from the candidate node to the termination node.

[0032] Optionally, the second determining module is configured as follows:

[0033] This is used to obtain the three-dimensional distance between the candidate node and the end leaf node of the octree containing the candidate node based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the end leaf node of the octree containing the candidate node.

[0034] If the three-dimensional distance is less than the first threshold parameter, the weight factor is determined based on the weight coefficient, the cube side length of the last leaf node of the octree where the candidate node is located, and the first threshold parameter.

[0035] If the three-dimensional distance is greater than the first threshold parameter, the weighting factor is determined based on the weighting coefficient, the cube side length of the terminal leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree where the candidate node is located.

[0036] Optionally, the true cost function in the cost function includes: a collision risk calculation formula;

[0037] Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function relationship for the flight equipment is obtained.

[0038] Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

[0039] Optionally, the true cost function in the cost function includes: a three-dimensional distance calculation formula;

[0040] If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1;

[0041] If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1;

[0042] The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

[0043] According to a third aspect of this disclosure, an electronic device is provided, the device comprising:

[0044] Memory;

[0045] A processor, connected to the memory, is configured to execute computer instructions stored in the memory, enabling it to implement the steps in the path planning method provided in the first aspect above.

[0046] According to a fourth aspect of this disclosure, a storage medium is provided, the computer storage medium storing computer-executable instructions; the computer-executable instructions, when executed by a processor, are capable of implementing the steps in the path planning method provided in the first aspect above.

[0047] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: The embodiments of this disclosure determine the weighting factor based on the side length of the grid where the terminal leaf node of the octree of the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree of the candidate node; the side length of the grid where the terminal leaf node of the octree of the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree of the candidate node reflect the size of the free volume of the region where the candidate node is located. When the free volume is larger, the value of the weighting factor is larger, and it is more suitable to obtain the optimal path at the fastest speed. Compared with the existing path planning methods, if it is necessary to improve the speed of searching intermediate nodes in the path, it is difficult to take into account the accuracy. This method can adaptively change the search speed of intermediate nodes in the search path while taking into account the accuracy.

[0048] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0049] Figure 1 A flowchart illustrating a path planning method as an exemplary embodiment;

[0050] Figure 2 A flowchart illustrating a path planning method as an exemplary embodiment;

[0051] Figure 3 A flowchart illustrating a path planning method as an exemplary embodiment;

[0052] Figure 4 A flowchart illustrating a path planning method as an exemplary embodiment;

[0053] Figure 5 This is a schematic diagram of a path planning apparatus shown as an exemplary embodiment. Detailed Implementation

[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this disclosure as detailed in the appended claims.

[0055] This disclosure provides a path planning method, combined with Figure 1 As shown, the method includes:

[0056] Step S101: Based on the three-dimensional map information of the geographical area, obtain a grid composed of multiple nodes with three-dimensional coordinates;

[0057] Step S102: Determine the weighting factor based on the side length of the grid where the terminal leaf node of the octree of the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree of the candidate node.

[0058] Step S103: Based on the three-dimensional coordinates of the node, the cost function, and the weight factor, determine the cost required from the initial node corresponding to the starting position of the path planning through the candidate nodes to the termination node; wherein, the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning.

[0059] Step S104: Based on the cost, determine whether the candidate node is an intermediate node passed through by the planned path.

[0060] In this embodiment of the disclosure, obtaining the 3D map information of the geographical area in step S101 can be achieved through a flight device, which may include, but is not limited to, unmanned aerial vehicles (UAVs) or airplanes. By performing oblique photography of the geographical area using the flight device, 3D map information of the geographical area can be obtained. For example, the geographical area includes 3D information about terrain and buildings; these listed items constitute obstacles for the flight device's path planning. The path planning method provided in this embodiment of the disclosure requires obstacle avoidance planning for all the obstacles listed above. In addition to being applicable to 3D path planning for flight devices, the path planning method provided in this disclosure is also applicable to autonomous driving of robots and vehicles, and path planning for the automatic movement of virtual game characters in 3D games.

[0061] In this embodiment of the disclosure, in step S101, the grid composed of multiple nodes with three-dimensional coordinates can be in octree format. The octree refers to the process of storing the obtained three-dimensional map information in multiple cubic grids and dividing each grid into octrees. That is, a cube is divided into eight identical and centrally symmetrical small cubes. The small cubes can continue to be divided in an octree manner. If no obstacle occupies the space of the cube during the division process, the division stops.

[0062] In this embodiment of the disclosure, in step S102, if the side length of the small cube of the last leaf node in an octree occupies a large proportion of the overall side length of the octree, and the three-dimensional distance between the last leaf node and the candidate node is relatively short, it indicates that the octree is divided less frequently because the obstacles occupy less space and the division stops. This indicates that the volume of the free area near the candidate node is large, for example, occupying 3 / 4 of the entire octree. At this time, the weight factor can be greater than 1. When performing path planning, the path between the candidate node and the last leaf node can be directly considered to find the optimal path.

[0063] In this embodiment of the disclosure, in step S103, the position of the node can be determined based on the three-dimensional coordinates of the node, the cost value required to travel from the node to the node can be determined based on the cost function, and the speed of searching for alternative nodes in the path planning can be changed based on the weight factor.

[0064] In this embodiment of the disclosure, step S103 requires determining the initial node corresponding to the starting position of the path planning, the candidate nodes, and the cost required between the candidate nodes and the terminal node. Thus, in step S104, the candidate node with the lowest cost can be selected as an intermediate node along the planned path.

[0065] In this embodiment of the disclosure, in step S104, given that the initial node and the termination node are known, candidate nodes are selected as intermediate nodes to improve the planned path. The number of intermediate nodes can be one or more, and the number and location of intermediate nodes can be determined based on the distance between the initial node and the termination node, and the distribution of obstacles between the initial node and the termination node.

[0066] In this embodiment of the disclosure, in the planned path of the flight equipment, the side lengths of the grids containing the terminal leaf nodes of the octrees of different candidate nodes are different, and the three-dimensional distances between the candidate nodes and the terminal leaf nodes of the octrees are also different. Therefore, when different candidate nodes are selected, since the side lengths of the grids containing the terminal leaf nodes of the octrees of the candidate nodes and the three-dimensional distances between the candidate nodes and the terminal leaf nodes of the octrees of the candidate nodes are constantly changing, the weighting factor will automatically change due to the different candidate nodes selected in the planned path of the flight equipment, so as to provide a suitable path planning search algorithm. For example, a greedy algorithm refers to an algorithm that takes the best or optimal (i.e., most advantageous) choice at each step when solving a problem, hoping to lead to the best or optimal result. However, the result obtained by the greedy algorithm is often not always the optimal result (sometimes it is the optimal solution), but it is always a result that is relatively close to the optimal solution. The greedy algorithm evaluates the cost from the candidate node to the terminal node in the path planning. Greedy algorithms primarily search directly based on the terminal node, guiding the search algorithm towards the endpoint and improving pathfinding speed, but they cannot guarantee finding the optimal path. Because of their speed, greedy algorithms are favored when the available space in the candidate node region is large and obstacles are few or nonexistent, thus improving path planning speed. Weighting factors adjust the weight of the greedy algorithm component in the cost function. Simultaneously, the cost function also includes another more accurate algorithm, such as Dijkstra's algorithm, which is a complete search algorithm that evaluates the cost of each candidate node between the initial and terminal nodes, compares the cost of all candidate nodes, and then selects a candidate node as an intermediate node in the planned path. Its advantages are high accuracy and the ability to find the optimal path, but it is slower. Therefore, combining Dijkstra's algorithm with a greedy algorithm, and adjusting the weighting factor based on the size of the available space in the candidate node region, can improve search speed while maintaining accuracy, adapting to different scenario conditions for different candidate nodes.

[0067] In this embodiment of the disclosure, by providing a weighting factor based on the size of the free volume of the region to which the candidate node belongs, thereby adjusting the speed of path planning, computational resources can be saved, the flight equipment can reach the destination faster, and the accuracy of path planning can be guaranteed.

[0068] In this embodiment of the disclosure, the cost function is a polynomial function, including: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part;

[0069] The first part is used to determine the first-generation value between the initial node and the candidate node;

[0070] The second part is used to determine the second-generation value from the candidate node to the termination node.

[0071] In this embodiment of the disclosure, the first part and the second part are placed in the same cost function and weighted summed. That is, the first generation value between the initial node and the candidate node determined according to the first part and the second generation value between the candidate node and the termination node determined according to the second part are summed to comprehensively determine whether the candidate node to be selected is an intermediate node passed through by the planned path.

[0072] In this embodiment of the disclosure, the cost function having a first part and a second part may be, but is not limited to, the cost function of the A* algorithm:

[0073] f(n)=g(n)+αh(n) 1.1

[0074] In Formula 1.1 above, n represents the candidate node, that is, the node to be expanded, f(n) is the cost function used to evaluate the cost of the candidate node, g(n) is the first part, used to evaluate the first generation value required from the initial node to the candidate node, h(n) is the second part, used to evaluate the second generation value from the candidate node to the termination node, and α is the weighting factor of the second part h(n).

[0075] In this embodiment, the running speed of the A* algorithm can be dynamically changed by adaptively adjusting the size of α. When the weight factor α equals 0, the A* algorithm transforms into the Dijkstra algorithm; when the weight factor α is in the range of greater than 1 to positive infinity, the A* algorithm transforms into a greedy algorithm. The Dijkstra algorithm is a complete search algorithm that evaluates the cost of each candidate node between the initial node and the terminal node, compares the cost of all candidate nodes, and then selects a candidate node as an intermediate node for the planned path. Its advantages are high accuracy and the ability to obtain the optimal path, but it is slow. The greedy algorithm is a goal-oriented search algorithm that evaluates the cost of some candidate nodes between the initial node and the terminal node. It stops as soon as it finds any path that leads to the terminal node; the resulting path is not necessarily the optimal path, but rather a near-optimal path. Its advantages are fast running speed, but lower accuracy and the inability to obtain the optimal path. In the existing A* algorithm's cost function, the weight factor α is always 1, therefore it cannot adaptively adjust the size of the weight factor α to dynamically adjust the running speed of the A* algorithm.

[0076] In this embodiment of the disclosure, during the path planning process, a weight factor that can be adjusted according to the size of the free volume of the octree region where the candidate node is located is added. When the three-dimensional distance between the candidate node and the last leaf node is very close, and the side length of the grid where the last leaf node is located is very large, it indicates that the free volume of the region near the candidate node is large. In this case, the value of the weight factor α is greater than 1, and the A* algorithm is biased towards a greedy algorithm, which can improve the speed of determining the candidate node during path planning.

[0077] In this embodiment of the disclosure, compared to the existing A* algorithm which always returns 1, although it can guarantee finding the optimal path, it involves a large amount of computation and wastes resources in some scenarios. For example, in some scenarios, there are no obstacles between the initial node and the terminal node, and they are on the same plane. In this case, a greedy algorithm (that is, from the initial node at the starting position to the terminal node at the ending position) can quickly obtain the optimal path.

[0078] In this embodiment of the disclosure, since the first generation value is determined according to the first part and the second generation value is determined according to the second part, the weight factor of the second part can be adaptively adjusted, so that the cost function has the function of adjusting the calculation speed of the cost value, thereby improving the speed of determining the candidate node as the intermediate node of the planned path while ensuring the accuracy of the path as the optimal path in the path planning process, thereby reducing the amount of calculation and saving computing resources.

[0079] In this embodiment of the disclosure, combined with Figure 2 As shown, step S102 includes:

[0080] Step S1021: Based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the end leaf node of the octree where the candidate node is located, obtain the three-dimensional distance between the candidate node and the end leaf node of the octree where the candidate node is located.

[0081] Step S1022: If the three-dimensional distance is less than the first threshold parameter, determine the weight factor based on the weight coefficient, the cube side length of the end leaf node of the octree where the candidate node is located, and the first threshold parameter.

[0082] Step S1023: If the three-dimensional distance is greater than the first threshold parameter, determine the weight factor based on the weight coefficient, the cube side length of the end leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the end leaf node of the octree where the candidate node is located.

[0083] In this embodiment of the disclosure, in steps S1022 and S1023, the weight coefficient and the first threshold parameter are preset values ​​by trial and error. The weight coefficient and the first threshold parameter are mainly used to adjust the value of the weight factor within a certain range. The weight factor and the weight coefficient are positively correlated.

[0084] In this embodiment of the disclosure, in step S1022, if the three-dimensional distance is less than the first threshold parameter, the weight factor is negatively correlated with the first threshold parameter, and the weight factor is positively correlated with the cube side length of the end leaf node of the octree where the candidate node is located.

[0085] In this embodiment of the disclosure, in step S1023, if the three-dimensional distance is greater than the first threshold parameter, the weighting factor is negatively correlated with the three-dimensional distance, and the weighting factor is positively correlated with the cube side length of the end leaf node of the octree where the candidate node is located.

[0086] In this embodiment of the disclosure, there is a negative correlation between the three-dimensional distance and the cube side length of the terminal leaf node of the octree where the candidate node is located.

[0087] In this embodiment of the disclosure, the formula for calculating the weighting factor is as follows:

[0088]

[0089] In Formula 1.2, size represents the side length of the cube mesh containing the end leaf node of the octree of the candidate node, dist represents the three-dimensional distance between the candidate node and the end leaf node of the octree of the candidate node, δ is the first threshold parameter, and k is the weight coefficient.

[0090] In this embodiment of the disclosure, in step S1022, formula 1.2 indicates that when dist < δ, that is, when the three-dimensional distance is less than the first threshold parameter, it means that the distance between the candidate node and the terminal leaf node of its octree is relatively short. For example, if the candidate node is located near the terminal leaf node of its octree, it means that there are fewer obstacles occupying nodes when the octree of the candidate node is partitioned, resulting in fewer partitioned nodes. The cube containing the terminal leaf node of the octree of the candidate node is larger, and the weight factor α is equal to the weight coefficient k multiplied by the ratio of the side length size of the cube containing the terminal leaf node of the octree of the candidate node to the first threshold parameter δ.

[0091] In this embodiment of the disclosure, in step S1023, according to formula 1.2, when dist ≥ δ, that is, when the three-dimensional distance is greater than the first threshold parameter, it indicates that the distance between the candidate node and the terminal leaf node of the octree is relatively large. For example, if the candidate node is located far from the terminal leaf node of its octree, it indicates that there are many obstacles occupying nodes when the octree of the candidate node is partitioned, resulting in more partitioned nodes. The cube containing the terminal leaf node of the octree of the candidate node is small, and the weight factor α is equal to the weight coefficient k multiplied by the three-dimensional distance dist between the side length size of the cube containing the terminal leaf node of the octree of the candidate node and the terminal leaf node of the octree of the candidate node.

[0092] In this embodiment of the disclosure, in Formula 1.2, the values ​​of the weight coefficient k and the first threshold parameter δ set by the trial-and-error method can ensure that the value of α is greater than 1 when dist < δ, and the value of α is less than 1 when dist ≥ δ.

[0093] In this embodiment, the octree partitioning mechanism utilizes the characteristic that it continues partitioning when an obstacle is encountered and stops when no obstacle is encountered. The more times the octree is partitioned, the smaller the side length of the leaf node at the end of the octree, indicating more obstacles; conversely, the fewer times the octree is partitioned, the larger the leaf node at the end of the octree, indicating fewer obstacles. This results in a closer 3D distance between the candidate node and the leaf node at the end of its octree. By considering the 3D distance between the candidate node and the leaf node at the end of its octree, as well as the size of the leaf node, the amount of obstacles in the area near the candidate node is determined, i.e., the volume of the free area. This information is then used to adaptively adjust the weight factor α, thereby adaptively adjusting the path planning speed.

[0094] In this embodiment of the disclosure, the true cost function in the cost function includes: a collision risk calculation formula;

[0095] Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function relationship for the flight equipment is obtained.

[0096] Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

[0097] In this embodiment of the disclosure, when the flight device is in flight, the prior information of vertical height suggests that the higher the z-coordinate of the candidate node, the lower the probability that the candidate node is occupied by an obstacle. In other words, the higher the altitude, the lower the risk of colliding with an obstacle.

[0098] In this embodiment of the disclosure, the formula for calculating collision risk is as follows:

[0099] r(n) = value * p(n) * p h (z n 1.3

[0100] In Formula 1.3 above, value is the weighting factor parameter corresponding to the collision risk value, and p(n) is the occupancy probability of obstacles in the octtree where the candidate node is located, as measured by the sensor. h (z n ) represents prior information about the vertical height.

[0101] In this embodiment, the occupancy probability, obtained by multiplying and fusing prior vertical height information with sensor measurement data using a Bayesian probability information formula, can be reduced to mitigate risks caused by sensor errors. When the occupancy probabilities measured by sensors around and above the flight equipment are the same, the prior vertical height information will force the flight equipment to choose an appropriate upward flight path, thereby reducing the risk of collision.

[0102] In this embodiment, the formula for calculating the prior information of vertical height can have many variations, as long as it is a function that reduces the collision probability as the height increases, it falls within the scope of this disclosure. In one embodiment, the formula for calculating the prior information of vertical height is constructed using an exponential function:

[0103]

[0104] In formula 1.4 above, z n The vertical height of the candidate node is given by h0 and h1 as parameters, which must satisfy the smoothness condition of the piecewise function. So that when z n When h1 is equal, the probability value p of the prior information about the vertical height is... h (z n The value of ) can be related to z n When p is greater than h1 h (z n The values ​​of ) are the same, which makes the curve of the piecewise function continuous.

[0105] In this embodiment of the disclosure, it can be seen from the above formula that when the height z of the candidate node... n When the height is less than h0, the probability value of the prior information about the vertical height is 1; when the height z of the candidate node is less than h0, the probability value of the prior information about the vertical height is 1. n When the height z is greater than h0 and less than or equal to h1, n The larger the value, the greater the probability value p of the prior information about the vertical height. h (z n The smaller the value, the better; when the height z of the candidate node is... nWhen the height is greater than h1, the probability value p of the prior information about the vertical height is... h (z n The value is 0.1. In other words, in this embodiment of the present disclosure, within a certain range, the higher the height value of the candidate node, the smaller the value of the risk calculation formula will be, which will make the probability of the candidate node being occupied smaller, thereby promoting the selection of candidate nodes with higher heights to avoid obstacles during path planning.

[0106] In this embodiment, due to the introduction of prior information on vertical altitude, the flying device tends to fly upwards when encountering obstacles, such as dense, stationary obstacles like mountains, forest vegetation, or building complexes. The prior information on vertical altitude is not limited to stationary obstacles; in scenarios involving moving obstacles, such as densely moving crowds, flocks of birds, moving vehicles, or other flying devices, the obstacle avoidance effect of the prior information on vertical altitude is more pronounced. This allows the flying device to prioritize upward flight to avoid these densely moving obstacles, rather than performing complex calculations for obstacle avoidance planning when the flying device is at the same horizontal plane as the obstacles. Whether for path planning of stationary or moving obstacles, adding a formula for calculating collision costs using prior information on vertical altitude can save computational resources and energy.

[0107] In this embodiment, the probability of prior vertical height information is combined with sensor measurement data to obtain a collision risk calculation function relationship, thereby acquiring the collision cost between the initial node and the candidate node. Based on the prior information that higher altitudes have fewer obstacles, combined with sensor measurement data, the risk of colliding with obstacles can be reduced. For example, when there are many obstacles around a certain horizontal plane, the complex and computationally intensive path planning for flight equipment on a horizontal plane with many obstacles can be avoided, thus saving the computational resources and energy required for path planning.

[0108] In this embodiment of the disclosure, the true cost function in the cost function includes: a three-dimensional distance calculation formula;

[0109] If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1;

[0110] If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1;

[0111] The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

[0112] In this embodiment of the disclosure, the formula for calculating the three-dimensional distance between the starting node and the candidate node is as follows:

[0113]

[0114]

[0115] In formulas 1.5 and 1.6 above, (x s ,y s ,z s (x) represents the three-dimensional coordinates of the starting node. n ,y n ,z n ) represents the three-dimensional coordinates of the candidate node, with v1 less than or equal to 1 and v2 greater than 1. The specific values ​​of v1 and v2 are adjusted by the energy consumption of the corresponding flight equipment.

[0116] In this embodiment of the disclosure, during the actual flight of the flight equipment, due to the need to overcome gravity, the power consumption and / or fuel consumption of the flight equipment during climb flight is greater than that during level flight or descent. Therefore, in order to reduce the energy consumption of the flight equipment, when calculating the three-dimensional distance between the starting node and the candidate node, the horizontal distance and vertical height distance between the starting node and the candidate node are set to different values, so that the flight equipment does not move upward as much as possible in terms of energy consumption, thereby reducing the energy consumption of the flight equipment.

[0117] In this embodiment of the disclosure, the collision risk calculation formula and the three-dimensional distance calculation formula are combined to obtain the calculation formula for the true cost g(n) of the first part of the cost function:

[0118] g(n) = d(n) + r(n) 1.7

[0119] Using the above formula, the first-generation value, or true value, between the starting node and the candidate node can be calculated.

[0120] In this embodiment, the first-generation value includes collision cost and energy consumption cost. The collision cost calculation formula incorporates prior altitude information to compensate for the insufficiency of sensor measurement data. The energy consumption cost distinguishes the energy consumption caused by different flight directions. Prior altitude information ensures that, within a certain altitude range, the higher the altitude, the lower the collision cost when selecting candidate nodes as intermediate nodes for the planned path. The energy consumption cost causes the flight equipment to choose lower energy-consuming flight modes, such as level flight or downward flight, when selecting candidate nodes as intermediate nodes for the planned path, especially when energy consumption is high. Calculating the collision cost and selecting a suitable planned path reduces the probability of the flight equipment colliding with obstacles, while calculating the energy consumption cost and selecting a suitable planned path reduces energy consumption.

[0121] In this embodiment of the disclosure, a path planning method is used to plan a path. When determining whether a candidate node is an intermediate node traversed by the planned path based on the cost, multiple candidate nodes are sorted according to their cost values. Among adjacent candidate node values, the candidate node with the lowest cost value is selected as an intermediate node traversed by the planned path. Multiple intermediate nodes are connected to form the planned path.

[0122] In this embodiment of the disclosure, the method for performing the path planning is as follows:

[0123] Step S1041: Create an open table (open list) and a close table (close list), and add the starting node to the open table;

[0124] Step S1042: Traverse the open table, find the candidate node with the smallest value of the cost function f(n), and take the candidate node as the current node to be processed.

[0125] Step S1043: Move this smallest candidate node to close the table;

[0126] The following processing is performed on all neighbor directions of this minimum candidate node:

[0127] If it is unreachable or it is in the close table, ignore it; otherwise, continue with the following steps:

[0128] If it is not in the open list, add it to the open list, set the current smallest node as its parent, and record the F, G, and H values ​​of that neighboring node.

[0129] If it is already in the open table, check if this path is better. If it is better, recalculate its F value and reorder the open tables.

[0130] Repeat steps S1041, S1042, and S1043 until the termination node is moved into the close table. At this point, the path is from the target point, moving along the parent nodes to the starting point.

[0131] In this embodiment of the disclosure, the F value corresponds to the value of f(n), the H value corresponds to the value of h(n), and the G value corresponds to the value of g(n).

[0132] In this embodiment of the disclosure, after the optimal path is planned using path planning, the planned path may contain multiple nodes, which is detrimental to the flight of the flight equipment. Therefore, intermediate nodes in the planned path can be pruned. For example, m consecutive nodes can be pruned into mk nodes. As long as the cost of the pruned mk nodes is not higher than k*1% of the previous cost, the k nodes can be deleted. m is greater than k, and m = 1, 2, 3, 4...m, k = 1, 2, 3, 4...k. For example, in one embodiment, it is assumed that the sequential index of the path nodes is 1, 2, 3..., n. When calculating the cost at node n, the node is skipped, connected to the adjacent node, and the cost function is calculated. If the cost is not higher than 1% of the previous cost, the node is deleted. That is:

[0133] Calculate the cost g(1) from node 1 to node 3, then calculate the cost g(2) from node 1 through node 2 to node 3. If the cost is less than or equal to the cost, delete node 2; otherwise, keep node 2. Repeat this process until the target point is reached.

[0134] In this embodiment, the trajectory obtained after path trimming is not conducive to the movement of the flying device. Therefore, curve smoothing is needed at corners to ensure smooth flight. Methods for curve smoothing include, but are not limited to, the Bezier curve smoothing formula and the cubic B-spline curve smoothing formula. Curve smoothing reduces abrupt trajectory changes caused by large angle variations during device operation. This can prevent the mobile device from adapting to these changes, resulting in insufficient energy supply and acceleration, thus hindering its ability to fly along the planned path, such as making turns smoothly. Curve smoothing makes the planned path smoother for the mobile device's path-flying or movement.

[0135] In this embodiment, by incorporating a weighting factor that adaptively adjusts based on the size of the available space in the candidate node's location, the path planning speed can be adjusted. This allows for adaptive adjustment of the search path speed in suitable scenarios, ensuring accuracy while improving path planning speed. Adding prior vertical height information allows the flying device to fly higher, directly avoiding numerous obstacles and reducing computational load during path planning. Different weights are set to calculate the distance between the starting node and candidate nodes based on the energy consumption of the flying device moving upwards or downwards, further reducing energy consumption. Of course, the method provided in this embodiment is not limited to flying devices. For automatically moving vehicles or robots facing similar problems, such as going uphill or downhill, or when the available space in candidate nodes is large, the ideas in this path planning method can still provide improvement or inspiration.

[0136] In conjunction with the above embodiments, an example is now provided:

[0137] Example 1: Provide a path planning method involving three-dimensional path planning for providing navigation for flight equipment, which may be, but is not limited to, drones.

[0138] In recent years, the research and application of drones in civilian fields have been increasing, such as target tracking, image stitching, power line inspection, island monitoring, coastline patrol, post-disaster monitoring, and river flood season monitoring. However, for drones to accomplish these tasks, they must have autonomous flight capabilities, meaning they can complete tasks independently without external assistance in any complex environment. Navigation is a crucial element of autonomous drone flight, requiring it to perfectly avoid obstacles in complex flight environments, plan a flight path with low range and cost while meeting the drone's constraints, and complete the drone's preset mission.

[0139] Existing UAV navigation methods mainly fall into two categories: global obstacle avoidance algorithms and local obstacle avoidance algorithms. Global obstacle avoidance algorithms require a real-time environmental map. Based on this map, they use a global obstacle avoidance algorithm to find a path from the starting point to the destination. Local obstacle avoidance algorithms do not require a pre-created map; instead, they construct a small-scale map based on data obtained from current sensors and plan the path on this small map. The advantage of this method is its speed, but it is often difficult to find the optimal path.

[0140] In existing technical solutions, the three-dimensional space is first divided based on a 2.5-dimensional grid (each grid point contains longitude, latitude, and elevation information); then, under constraints such as radar, severe weather, and no-fly zones, the A* cost function is improved by comprehensively considering influencing factors such as flight path altitude, probability of being detected, and flight path length, and the initial flight path is determined based on the algorithm search process; finally, in order to meet the performance constraints of the UAV (including minimum step size, turning radius, climb rate, and safe altitude), a series of processes are performed to obtain the final flyable flight path.

[0141] Existing technical solutions employ a modified A* algorithm for 3D path planning. The improvement in the cost function lies in incorporating occupancy probability, flight path altitude, and flight path length information. Like the traditional A* algorithm, this method uses fixed weights in its cost function, failing to dynamically adjust the algorithm's speed to maximize resource efficiency. Furthermore, while separating altitude and length into different weights, altitude maintains the same weight during both ascent and descent, which doesn't reflect actual drone power / fuel consumption. Therefore, it only effectively keeps the drone within low-altitude ranges. This disclosure addresses this by disregarding ascent and descent weights, minimizing unnecessary ascents to conserve power / fuel. Existing solutions, however, directly utilize sensor-based probability information, failing to address scenarios where sensor data is erroneous or the drone's surroundings have not been explored.

[0142] This disclosure provides a path planning method, a UAV navigation method based on an improved A* algorithm. The method includes: first, acquiring 3D map information of the area using oblique photogrammetry and saving it in octree format; then, using the improved A* algorithm to obtain the optimal path from the UAV's starting point to the target point; and finally, optimizing the path. The optimization measures mainly involve two aspects: appropriate pruning and smoothing the pruned path using Bézier curves.

[0143] Combination Figure 3 As shown, the provided path planning method includes:

[0144] Step S301, Build an offline map:

[0145] The area was photographed obliquely using a drone, and point clouds were extracted from the photographic model. A 3D model map of the working environment was then generated using the PCL library, and finally converted into an octree format using the existing Octomap library.

[0146] Step S302, run the improved A* algorithm:

[0147] The A* algorithm is a heuristic search algorithm widely used in path planning. It comprehensively evaluates the value of each node, compares these cost values, selects the node with the lowest cost value as the expansion node, and then continues to expand the path to the next node until the target point is selected as the expansion node. This process generates the path from the starting point to the target point with the lowest cost value. The cost function used in the improved A* algorithm is shown below:

[0148] f(n)=g(n)+αh(n) 1.8

[0149] Where n is the node to be expanded, f(n) is the evaluation function of the node to be expanded, g(n) is the true cost from the starting point to the current node n, h(n) is the heuristic function, representing the estimated cost from the current node n to the target node, and α is the overestimation factor introduced by the improved A* algorithm. The running speed of the A* algorithm is dynamically changed by adaptively adjusting the size of α. When α is 0, the algorithm degenerates to Dijkstra's algorithm, and when α is ∞, the algorithm degenerates to a greedy algorithm.

[0150] To address the risk of drone collisions, existing solutions incorporate a collision risk value into the calculation of g(n), in addition to considering Euclidean distance. However, this solution directly utilizes sensor-detected probability information, which can lead to incorrect risk value calculations if the sensor data is faulty. Furthermore, when the drone is not mapped from all sides or above (i.e., it's uncertain whether obstacles exist around or above it), the probability of these areas being occupied is the minimum threshold set by the octree. In this case, under the Euclidean distance cost function, the drone will choose to fly along the previous direction within the current plane.

[0151] This method incorporates prior altitude information, assuming that the higher the altitude, the lower the probability of the node being occupied, thus reducing the risk of collision with obstacles. The advantages of this innovation are: first, it utilizes a Bayesian probability formula to obtain the occupancy probability after fusing prior information with sensor measurement data, thereby reducing the risk caused by sensor errors; second, when the occupancy probabilities measured by sensors are the same for all four sides and above, this prior information will force the UAV to choose to fly upwards, reducing the collision risk. The risk calculation formula is as follows:

[0152] r(n) = value * p(n) * p h (z n 1.9

[0153] Its a priori formula for height has many variations; here, we construct it using an exponential function, as follows:

[0154]

[0155] z nThe vertical height of the candidate node is given by h0 and h1 as parameters, which must satisfy the smoothness condition of the piecewise function.

[0156] `value` represents the weighting factor parameter corresponding to the risk value, and `p(n)` represents the occupancy probability of the node to be expanded in the octree, calculated by the `octomap serve` library. h (z n ) represents highly prior information.

[0157] In actual drone flight, when a drone climbs, it needs to overcome gravity, resulting in higher power and fuel consumption compared to level flight or descent. To minimize energy consumption, the weights for upward flight distance, horizontal distance, and downward distance are set differently when calculating Euclidean distance, thus preventing the drone from flying upwards as much as possible and reducing power and fuel consumption. The Euclidean distance formula is as follows:

[0158]

[0159]

[0160] In the above formula, (x s ,y s ,z s (x) represents the starting position coordinates of the UAV. n ,y n ,z n ) represents the coordinates of the n nodes to be expanded. v1 is less than or equal to 1, and v2 is greater than 1. The specific values ​​of v1 and v2 are adjusted by the energy consumption of the corresponding flight equipment.

[0161] Combining the above risk value with the Euclidean distance, we can obtain the formula for calculating the true cost g(n):

[0162] g(n) = d(n) + r(n) 2.4

[0163] Traditional A* algorithms, in order to ensure the finding of the optimal path, involve significant computational costs and are often wasteful of resources. For example, in extreme scenarios where there are no obstacles between the drone's starting point and the target point, and they are on the same plane, a greedy algorithm (where the starting point directly points to the target point) can quickly obtain the optimal path. This disclosure introduces an adaptive overestimation factor into the traditional A* algorithm, dynamically adjusting the overestimation factor based on the current size of the free area, thereby accelerating the computation speed of the A* algorithm.

[0164] The formula for calculating the overestimation factor α constructed in this disclosure is as follows:

[0165]

[0166] In the above formula, `size` represents the size of the leaf node of the octagonal tree to which the current node belongs, i.e., the current free space volume; `dist` is the three-dimensional Euclidean distance between the center of the leaf node and the current node's position; `δ` is the threshold parameter; and `k` is its weighting coefficient. This formula indicates that when the free space at the current node's location is large, i.e., when the node's position is near the center of the free space... If α is relatively large (it needs to be greater than 1 when configuring parameters), then the A* algorithm will be appropriately biased towards the greedy algorithm, which means that the A* search algorithm has been speeded up.

[0167] Combination Figure 4 As shown, the following steps are taken using the traditional A* algorithm:

[0168] First, create two tables, open and close, and add the starting point to open;

[0169] a. Iterate through open, find the node with the smallest cost function value, and use it as the current node to be processed.

[0170] b. Move this smallest node to close.

[0171] c. Process all neighbor directions of the current smallest node as follows:

[0172] If it is unreachable or it is in a close state, ignore it; otherwise, continue as follows:

[0173] If it is not in open, add it to open, set the current smallest node as its parent, and record the F, G, and H values ​​of that neighboring node.

[0174] If it is already in open, check if this path is better. If it is better, recalculate its F value and reorder open.

[0175] Repeat steps a, b, and c above until the target node is moved to close.

[0176] The path at this point is to start from the target point, move along the parent node until the starting point.

[0177] Step S303, Path trimming:

[0178] The optimal path generated by A* is appropriately pruned. The path obtained by A* search has the best performance under its constructed cost function, but it may result in too many nodes, which is not conducive to UAV flight. Therefore, the planned path is pruned by appropriately amplifying the cost function.

[0179] Assume the path nodes are sequentially indices 1, 2, 3, ..., n. When calculating node n, skip this node, connect it to the adjacent node, and calculate the cost function. If the cost is no higher than 1% of the previous cost, delete the node. That is:

[0180] Calculate the cost g(1) from node 1 to node 3, then calculate the cost g(2) from node 1 through node 2 to node 3. If the cost is less than or equal to the cost, delete node 2; otherwise, keep node 2. Repeat this process until the target point is reached.

[0181] Step S304, Smoothing the Bézier curve

[0182] The trajectory obtained after path trimming is not ideal for drone navigation. Therefore, a quadratic Bézier curve is used to smooth the corners. Let the coordinates of the inflection point be p1, the node before the corner be p0, and the node after the corner be p2. The line segment from p0 to p2 is replaced by a Bézier curve, and the replacement formula is as follows:

[0183] B(t)=(1-t 2 p0+2t(1-t)p1+t 2 p2,t∈[0,1] 2.6

[0184] t is a parameter in the Bézier curve.

[0185] Step S305, final output path.

[0186] Compared to existing technical solutions, which only introduce obstacle-related occupancy probability risk when calculating the evaluation function g(n) of the true cost, but do not incorporate altitude prior information, this disclosure first introduces altitude prior information, assuming that after the altitude exceeds a certain threshold, the probability of the drone hitting an obstacle decreases as the altitude increases.

[0187] Existing A* algorithms do not incorporate an overestimation factor α to adaptively adjust the search path speed. This disclosure first utilizes the available space at the current node position to adaptively calculate the overestimation factor α, thereby enabling the A* algorithm to dynamically adjust its search speed for the target point.

[0188] This example introduces prior height information, assuming that once the height exceeds a certain threshold, the probability of the drone hitting obstacles decreases as the height increases. This causes the drone to move upwards spontaneously when it detects obstacles all around it.

[0189] This example uses the size of the free volume in the region where the current node is located to adaptively calculate the overestimation factor α, thereby enabling its A* algorithm to dynamically adjust the speed at which it searches for targets.

[0190] This example prunes the path generated by the A* algorithm to reduce the number of nodes, making the planned path more suitable for drone flight.

[0191] In this embodiment of the disclosure, combined with Figure 5 As shown, a path planning apparatus 200 is provided, the apparatus comprising:

[0192] The first determining module 201 is used to obtain a grid composed of multiple nodes with three-dimensional coordinates based on the three-dimensional map information of the geographical area.

[0193] The second determining module 202 is used to determine the weighting factor based on the side length of the grid where the terminal leaf node of the octree of the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree of the candidate node.

[0194] The third determining module 203 is used to determine the cost required from the initial node corresponding to the starting position of the path planning through the candidate nodes and from the candidate nodes to the termination node, based on the three-dimensional coordinates of the node, the cost function, and the weight factor; wherein the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning.

[0195] The fourth determining module 204 is used to determine whether the candidate node is an intermediate node passed through by the planned path based on the cost.

[0196] In this embodiment of the disclosure, the cost function is a polynomial function, including: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part;

[0197] The first part is used to determine the first-generation value between the initial node and the candidate node;

[0198] The second part is used to determine the second-generation value from the candidate node to the termination node.

[0199] In this embodiment of the disclosure, the second determining module is configured as follows:

[0200] This is used to obtain the three-dimensional distance between the candidate node and the end leaf node of the octree containing the candidate node based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the end leaf node of the octree containing the candidate node.

[0201] If the three-dimensional distance is less than the first threshold parameter, the weight factor is determined based on the weight coefficient, the cube side length of the last leaf node of the octree where the candidate node is located, and the first threshold parameter.

[0202] If the three-dimensional distance is greater than the first threshold parameter, the weighting factor is determined based on the weighting coefficient, the cube side length of the terminal leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree where the candidate node is located.

[0203] In this embodiment of the disclosure, the true cost function in the cost function includes: a collision risk calculation formula;

[0204] Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function relationship for the flight equipment is obtained.

[0205] Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

[0206] In this embodiment of the disclosure, the true cost function in the cost function includes: a three-dimensional distance calculation formula;

[0207] If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1;

[0208] If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1;

[0209] The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

[0210] In this embodiment of the disclosure, an electronic device is provided, the electronic device comprising:

[0211] processor;

[0212] Memory used to store processor-executable instructions;

[0213] When the processor is used to run the computer service, it implements the steps in the feedback method described above.

[0214] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0215] In this embodiment of the disclosure, a storage medium is provided, the storage medium having computer-executable instructions, which are executed by a processor to implement the steps in the feedback method described above.

[0216] Alternatively, if the integrated units described above in the embodiments of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0217] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A path planning method, characterized in that, The method includes: Based on the 3D map information of the geographical region, a grid composed of multiple nodes with 3D coordinates is obtained; The weighting factor is determined based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node; wherein, the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node reflect the free volume of the octree region containing the candidate node. Based on the three-dimensional coordinates of the node, the cost function, and the weight factor, the cost required to proceed from the initial node corresponding to the starting position of the path planning through the candidate nodes and from the candidate nodes to the termination node is determined; wherein, the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning. Based on the cost, determine whether the candidate node is an intermediate node traversed by the planned path.

2. The path planning method according to claim 1, characterized in that, The cost function is a polynomial function, comprising: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part; The first part is used to determine the first-generation value between the initial node and the candidate node; The second part is used to determine the second-generation value from the candidate node to the termination node.

3. The path planning method according to claim 1, characterized in that, The step of determining the weighting factor based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node, includes: Based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the terminal leaf node of the octree containing the candidate node, the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node is obtained. If the three-dimensional distance is less than the first threshold parameter, the weight factor is determined based on the weight coefficient, the cube side length of the last leaf node of the octree where the candidate node is located, and the first threshold parameter. If the three-dimensional distance is greater than the first threshold parameter, the weighting factor is determined based on the weighting coefficient, the cube side length of the terminal leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree where the candidate node is located.

4. The path planning method according to claim 1, 2, or 3, characterized in that, The actual cost function in the cost function includes: the collision risk calculation formula; Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function for flight equipment is obtained. Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

5. The path planning method according to claim 1, 2, or 3, characterized in that, The true cost function in the cost function includes: the three-dimensional distance calculation formula; If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1; If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1; The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

6. A path planning device, characterized in that, The device includes: The first determining module is used to obtain a grid composed of multiple nodes with three-dimensional coordinates based on the three-dimensional map information of the geographical area. The second determining module is used to determine a weighting factor based on the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node; wherein, the side length of the grid containing the terminal leaf node of the octree containing the candidate node, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree containing the candidate node reflect the free volume of the octree region containing the candidate node. The third determining module is used to determine the cost required from the initial node corresponding to the starting position of the path planning through the candidate nodes and from the candidate nodes to the termination node, based on the three-dimensional coordinates of the node, the cost function, and the weight factor; wherein the initial node corresponds to the node where the starting point is located, and the termination node is the node corresponding to the termination position of the path planning. The fourth determining module is used to determine whether the candidate node is an intermediate node passed through by the planned path based on the cost.

7. The path planning apparatus according to claim 6, characterized in that, The cost function is a polynomial function, comprising: a weighted sum of a first part and a second part, wherein the weight factor is the weight of the second part; The first part is used to determine the first-generation value between the initial node and the candidate node; The second part is used to determine the second-generation value from the candidate node to the termination node.

8. The path planning apparatus according to claim 6, characterized in that, The second determining module is configured as follows: This is used to obtain the three-dimensional distance between the candidate node and the end leaf node of the octree containing the candidate node based on the three-dimensional coordinates of the candidate node and the three-dimensional coordinates of the end leaf node of the octree containing the candidate node. If the three-dimensional distance is less than the first threshold parameter, the weight factor is determined based on the weight coefficient, the cube side length of the last leaf node of the octree where the candidate node is located, and the first threshold parameter. If the three-dimensional distance is greater than the first threshold parameter, the weighting factor is determined based on the weighting coefficient, the cube side length of the terminal leaf node of the octree where the candidate node is located, and the three-dimensional distance between the candidate node and the terminal leaf node of the octree where the candidate node is located.

9. The path planning apparatus according to claim 6, 7, or 8, characterized in that, The actual cost function in the cost function includes: the collision risk calculation formula; Based on the product of prior information about vertical height, sensor measurement data, and collision risk weighting factors, a collision risk calculation function for flight equipment is obtained. Based on the collision risk calculation function and the vertical height coordinates of the node, the collision cost between the initial node and the candidate node is obtained.

10. The path planning apparatus according to claim 6, 7, or 8, characterized in that, The true cost function in the cost function includes: the three-dimensional distance calculation formula; If the vertical height of the initial node is greater than or equal to the vertical height of the candidate node, a first height weight factor is obtained; wherein, the first height weight factor is less than or equal to 1; If the vertical height of the initial node is less than the vertical height of the candidate node, a second height weighting factor is obtained; wherein, the second height weighting factor is greater than 1; The three-dimensional distance calculation formula is obtained based on the first altitude weighting factor or the second altitude weighting factor; the energy consumption cost of the flight equipment between the initial node and the alternative node is obtained based on the three-dimensional distance calculation formula and the three-dimensional coordinates of the node.

11. An electronic device, characterized in that, The device includes: Memory; A processor, connected to the memory, is configured to execute computer instructions stored in the memory, enabling it to implement the method according to any one of claims 1 to 5.

12. A storage medium, characterized in that, The storage medium stores computer-executable instructions; when executed by a processor, the computer-executable instructions can implement the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Global path planning method based on improved A* algorithm and Bezier curve

    CN112683278A