Unmanned aerial vehicle path planning method based on multi-distance constraint
By introducing multi-distance constraint methods and weighted heuristic functions that combine different distances in the A-star algorithm, and introducing neighborhood occupation penalty terms, the problems of low efficiency and insufficient security of drone path planning in the existing technology are solved, and efficient and secure drone path planning is achieved.
Patent Information
- Application Number
- CN202411913199.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-16
AI Technical Summary
The existing A-star algorithms have problems such as low efficiency, slow convergence speed, high calculation time and many path turning points in drone path planning in urban environments, which are difficult to meet the safety needs of drone flight in complex environments.
The path planning method based on multi-distance constraints is adopted, and the total cost function is calculated by introducing a multi-distance constraint method and a heuristic function that weighted fusion of Manhattan distance and Euclidean distance, and a neighborhood occupancy penalty term is introduced to improve path search efficiency and security.
It improves the calculation speed and efficiency of path planning, reduces path turning points, and ensures the safety and endurance of drone flight.
Smart Images

Figure CN120010501A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a UAV path planning method based on multiple distance constraints, belonging to an automatic path planning technology for low-altitude flight of UAV in an urban environment. Background Art
[0002] The A-star algorithm is a typical heuristic path planning method. The evaluation function of the standard A-star algorithm can be expressed as f(n)=g(n)+h(n), where f(n) represents the total cost from the starting node to the current node and to the target node, g(n) is the cost function, which represents the cost from the starting node to the current node, and h(n) is the heuristic function, which represents the cost from the current node to the target node. The path search process of the A-star algorithm is as follows: Figure 1 As shown in the figure, each node of the A-star algorithm corresponds to a total cost value. The smaller the total cost value of the node, the more priority the node is given. The A-star algorithm obtains a path with the minimum total cost value by continuously detecting the minimum f(n).
[0003] The traditional A-star algorithm calculates g(n) through the actual path length cost and uses a single distance expression to calculate h(n), such as the Manhattan distance in formula (1), the Euclidean distance in formula (2), and the Chebyshev distance in formula (3).
[0004] h(n)=|x E -x n |+|y E -y n | (1)
[0005]
[0006] h(n)=max(x E -x n |,|y E -y n |) (3)
[0007] Where: (x n ,y n ) represents the coordinate position of the current node, (x E ,y E ) represents the coordinate position of the target node.
[0008] The Chinese patent application with application number CN202210684359X and name "A UAV path planning method suitable for cluttered environments based on an improved A* algorithm" improves the heuristic function on the basis of the traditional A* algorithm. By calculating the distance between the current node and the nearest obstacle, the total value of the current node is comprehensively evaluated, so that the planned path is away from obstacles to ensure that the UAV is safer during flight.
[0009] In addition, the Chinese patent application with application number CN202211534316X and name "A cross-sea logistics drone path planning method based on the Astar algorithm" not only calculates the flight distance cost of the current node, but also fully considers the population danger cost and altitude change cost of different map areas, and calculates the total value by weighted fusion of different costs to solve the flight safety problem during drone transportation.
[0010] There are also some methods that dynamically adjust the weights of the cost function and heuristic function according to the distance between the current node and the target node to accelerate convergence and reduce unnecessary round-trip searches.
[0011] It can be seen that the existing A-star algorithms only use a single distance formula to calculate the heuristic function, which leads to low efficiency in searching nodes, slow convergence speed of the entire path planning process, and high computation time. In addition, different distances have different characteristics and functions. For example, Manhattan distance can accelerate the convergence speed in the vertical and horizontal directions, Euclidean distance can obtain the shortest straight-line flight distance, and Chebyshev distance is friendly to path planning in the diagonal direction. However, the operation scenarios of drones are changeable and complex, and using a single distance formula to calculate the heuristic function is difficult to meet the needs of path planning.
[0012] In addition, although the path obtained by the existing A-star algorithm is the shortest path in terms of physical distance, the path has many turning points, which does not conform to the kinematic characteristics of UAV flight. Too many turning points greatly increase the energy consumption of UAV flight and have a great impact on the endurance of UAV. At the same time, based on the environmental modeling of the two-dimensional grid map, the A-star algorithm only considers the heuristic function based on distance calculation, resulting in the path being close to obstacles and the path passing through the corners of obstacles. This is a great challenge to the flight safety of UAVs, mainly manifested in two aspects: first, the physical size of the UAV itself is not considered, and the UAV is regarded as a sizeless particle; second, the positioning error problem is not considered. UAVs operating in an open environment are susceptible to electromagnetic interference, and a certain amount of positioning error redundancy must be reserved. Summary of the invention
[0013] Purpose of the invention: In order to overcome the deficiencies in the prior art, the present invention provides a UAV path planning method based on multi-distance constraints to solve the problem of UAV flight path planning in a complex urban environment. The method is based on the three-dimensional geographic information data of the city and can quickly plan the optimal flight path. At the same time, it can effectively avoid obstacles such as high-rise buildings in the city to achieve safe flight of the UAV.
[0014] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:
[0015] A UAV path planning method based on multi-distance constraints is introduced on the basis of the A-star algorithm to perform UAV path planning; the multi-distance constraint method is used to calculate the total cost function of the current node and the neighboring nodes, and the neighboring node with the smallest total cost function is used as the planning path. The total cost function used by the multi-distance constraint method is:
[0016] f(n)=g(n)+h(n)+d(n)
[0017] Where: The coordinates of the starting node are (x S ,y S ), the current node coordinate is (x n ,y n ), the target node coordinates are (x E ,y E ); f(n) is the total cost function, which represents the total cost of reaching the target node from the starting node through the current node; g(n) is the cost function, which represents the cost of reaching the current node from the starting node; h(n) is the heuristic function, which represents the cost of reaching the target node from the current node; d(n) is the penalty term, which represents the neighborhood occupancy penalty of the current node;
[0018] The cost function g(n) is calculated using the shortest moving step from the starting node to the current node. Moving one grid means the distance increases or decreases by 1, without considering the impact of different directions.
[0019] The heuristic function h(n) is calculated by fusing the weighted Manhattan distance dist1 and the Euclidean distance dist2:
[0020] h(n)=ω1×dist1+ω2×dist2
[0021] dist1=|x E -x n |+|y E -y n |
[0022]
[0023] Where: ω1 and ω2 are the weight coefficients of Manhattan distance and Euclidean distance respectively. In this case, ω1=4 and ω2=1 are set;
[0024] The penalty term d(n) is calculated as follows:
[0025]
[0026] Among them: INF represents the maximum value of the value; r represents the neighborhood range of the current node. If the range is selected as 1 step, the value of r is -1 and 1. You can also set a larger step size as needed; Indicates the current node (x n ,y n ) in the neighborhood of a certain neighboring node (x n +i,y n +j) occupancy status, if it is occupied, then If it is idle,
[0027] In summary, the multi-distance constraint evaluation function in this case can be expressed as:
[0028]
[0029] The present invention introduces a multi-distance constraint method based on the A-star algorithm, which can improve the path search efficiency and reduce the number of turning points in the path. At the same time, it solves the problem of increased flight risk when the UAV flies close to obstacles, and realizes efficient and safe UAV path planning.
[0030] Specifically, the three-dimensional physical space of the UAV mission area is divided into tightly arranged three-dimensional grids, each grid is a node, and the side length of each grid is 1 step.
[0031] Specifically, at the beginning of the UAV path planning, the starting node of the UAV is first raised to the height of the target node, and the grid layer at this height is selected as the two-dimensional grid map for the UAV path planning. The UAV uses a multi-distance constraint method to select the next reference node until it reaches the target node; finally, the first and last reference nodes on the same straight line are retained as key nodes, and the redundant nodes in the middle are removed; in the process of adjusting the starting node height, the default UAV path is a straight line.
[0032] Specifically, redundant nodes are removed by the slope between adjacent reference nodes. Among all the reference nodes selected by the drone, the three adjacent reference nodes are traversed backwards from the starting node, and the three adjacent reference nodes are recorded as node A, node B, and node C respectively. The coordinates of the three reference nodes are (x a ,y a )、(x b ,y b ) and (x c ,y c ), calculate the slopes between adjacent benchmark nodes and If k ab =k bc , then node B is a redundant node, node B is discarded, node C is used as the new node B, and then a reference node is traversed backward as the new node C, and the slope calculation and judgment are repeated until the target node; if k ab ≠k bc, then take node B as the new node A, and then traverse the two reference nodes backward as the new node B and the new node C, repeat the slope calculation and judgment until the target node.
[0033] Specifically, first, set the open list OpenList and the closed list ClosedList, and add the starting node as the current node to the OpenList; then, determine one by one whether the 8 neighboring nodes of the current node with a step size of 1 are in the ClosedList. If not, determine whether the neighboring nodes are in the OpenList. If not, calculate the total cost of the neighboring nodes and add the neighboring nodes to the OpenList; then, remove the current node from the OpenList, and add it to the ClosedList as a new reference node to determine whether the new reference node coincides with the target node; then, select the node with the smallest total cost from the OpenList as the new current node; repeat until the new new reference node coincides with the target node.
[0034] Specifically, the urban scene is constructed as a three-dimensional grid map using lidar point cloud data; the three-dimensional physical space of the drone mission area is divided into tightly arranged three-dimensional grids, and each grid is used as a node; if a laser point falls in a grid, the grid is marked as occupied, indicating that there is an obstacle and the drone cannot fly; otherwise, the grid is marked as idle, indicating that there is no obstacle and the drone can fly safely.
[0035] Specifically, the method comprises the following steps:
[0036] Step 1. Use the laser radar point cloud data to construct the urban scene into a three-dimensional grid map; divide the three-dimensional physical space of the drone mission area into closely arranged three-dimensional grids, and use each grid as a node; if a laser point falls in a grid, the grid is marked as occupied, indicating that there is an obstacle and the flight cannot be carried out; otherwise, the grid is marked as idle, indicating that there is no obstacle and the flight can be carried out safely;
[0037] Step 2: Simplify the UAV path planning problem in the three-dimensional physical space to a two-dimensional plane. When the starting node and the target node are at different heights, first adjust the height of the starting node to be consistent with the height of the target node, and then perform UAV path planning on the two-dimensional grid map corresponding to the height, reducing the 27 search directions of each node in the three-dimensional physical space to 8 search directions, thereby reducing the computational complexity of path planning.
[0038] Step 3, initialize the open list OpenList and the closed list ClosedList;
[0039] Step 4. Add the starting node as the current node to OpenList;
[0040] Step 5. Determine one by one whether the 8 neighboring nodes of the current node with a step size of 1 are in the ClosedList. If not, determine whether the neighboring node is in the OpenList. If not, calculate the total cost of the neighboring node and add the neighboring node to the OpenList.
[0041] Step 6, remove the current node from the OpenList and add it to the ClosedList as a new reference node, and determine whether the new reference node coincides with the target node: if so, proceed to Step 8, otherwise, proceed to Step 7;
[0042] Step 7. Select the node with the smallest total cost value from OpenList as the new current node and return to Step 5.
[0043] Step 8. Remove redundant nodes in ClosedList through the slope between adjacent reference nodes, retain the first and last reference nodes on the same straight line as key nodes, and obtain the final UAV path planning result.
[0044] Beneficial effects: The UAV path planning method based on multi-distance constraints provided by the present invention has the following advantages over the prior art: 1. The present invention designs a heuristic function that improves the A-star path planning method by weighted fusion of different distances, fully utilizing the convergence speed of Manhattan distance in the horizontal and vertical directions and the advantages of Euclidean distance in the shortest path constraint, thereby ensuring the shortest planned path while improving the calculation speed of path planning and simultaneously reducing the turning points of the path; 2. The present invention introduces a neighborhood occupancy penalty term into the evaluation function, so that the total cost of nodes with obstacles in a certain neighborhood range becomes very large. The A-star path planning method selects the node with the smallest total cost in each pathfinding iteration, which effectively suppresses the possibility of the path passing through the area near the obstacle, further ensuring the flight safety of the UAV; 3. The present invention is a heuristic function of multi-distance weighted fusion proposed on the basis of the A-star path planning method. The present invention selects Manhattan distance and Euclidean distance. If Chebyshev distance and Euclidean distance are selected, there is also a similar improvement effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is the flow chart of the path search process of the traditional A-star algorithm;
[0046] Figure 2 Flowchart of the UAV path planning method based on multiple distance constraints
[0047] Figure 3This is a schematic diagram of the node search process of the UAV path planning method based on multiple distance constraints;
[0048] Figure 4 This is a schematic diagram of the benchmark node search results for the UAV path planning method based on multiple distance constraints;
[0049] Figure 5 Schematic diagram of key node extraction results for UAV path planning method based on multiple distance constraints;
[0050] Figure 6 Schematic diagram of the node search process of the A-star path planning method based on a single distance calculation heuristic function. DETAILED DESCRIPTION
[0051] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] like Figure 2 As shown in the figure, it is a flow chart of a UAV path planning method based on multiple distance constraints. This method is based on the A-star path planning method, improves the heuristic function, calculates the heuristic function value by weighted fusion of different distance formulas, and fully explores the convergence contribution of different distance formulas to the path planning problem in different scenarios. It can accelerate the path planning convergence process, reduce unnecessary round-trip searches, improve the calculation speed of path planning, and reduce unnecessary turning points in the path, making the flight path smoother. At the same time, a neighborhood occupancy penalty term is introduced into the entire evaluation function to solve the problem of the path being close to obstacles, so as to suppress the path from passing through the area near the obstacle, thereby reducing the flight risk. In addition, key point extraction is used to remove redundant waypoints and reduce unnecessary kinematic adjustments of the UAV.
[0053] The present invention is further described below in conjunction with specific implementation steps.
[0054] Step 1: Build a 3D grid map
[0055] Using lidar point cloud data, the urban scene is constructed as a three-dimensional grid map; the three-dimensional physical space of the drone mission area is divided into tightly arranged three-dimensional grids, and each grid is regarded as a node; if a laser point falls in a grid, the grid is marked as occupied, indicating that there is an obstacle and flight is not allowed; otherwise, the grid is marked as idle, indicating that there is no obstacle and it is safe to fly.
[0056] Step 2: Simplify the UAV path planning problem in three-dimensional physical space to a two-dimensional plane
[0057] When the starting node and the target node are at different heights, the height of the starting node is first adjusted to be consistent with the height of the target node, and then the UAV path planning is performed on the two-dimensional grid map corresponding to the height, reducing the 27 search directions of each node in the three-dimensional physical space to 8 search directions, thereby reducing the computational complexity of path planning.
[0058] Step 3. Initialize the open list OpenList and the closed list ClosedList
[0059] Step 4. Add the starting node as the current node to OpenList
[0060] Step 5. Calculate the total cost of neighboring nodes
[0061] Before calculating the neighboring nodes of the current node, first determine one by one whether the 8 neighboring nodes of the current node with a step size of 1 are in the ClosedList. If not, determine whether the neighboring nodes are in the OpenList. If not, calculate the total cost of the neighboring nodes.
[0062] The total cost function of the current node and the neighboring nodes is calculated using the multi-distance constraint method, and the neighboring node with the smallest total cost function is used as the planning path. The total cost function used by the multi-distance constraint method is:
[0063] f(n)=g(n)+h(n)+d(n)
[0064] Where: The coordinates of the starting node are (x S ,y S ), the current node coordinate is (x n ,y n ), the target node coordinates are (x E ,y E ); f(n) is the total cost function, which represents the total cost from the starting node to the current node and to the target node; g(n) is the cost function, which represents the cost from the starting node to the current node; h(n) is the heuristic function, which represents the cost from the current node to the target node; d(n) is the penalty term, which represents the neighborhood occupancy penalty of the current node.
[0065] The cost function g(n) is calculated using the shortest moving step from the starting node to the current node. Moving one grid means the distance increases or decreases by 1, without considering the impact of different directions.
[0066] The heuristic function h(n) is calculated by fusing the weighted Manhattan distance dist1 and the Euclidean distance dist2:
[0067] h(n)=ω1×dist1+ω2×dist2
[0068] dist1=|x E -x n |+|y E -y n |
[0069]
[0070] Where: ω1 and ω2 are the weight coefficients of Manhattan distance and Euclidean distance respectively. In this case, ω1=4 and ω2=1 are set.
[0071] The penalty term d(n) is calculated as follows:
[0072]
[0073] Among them: INF represents the maximum value of the value; r represents the neighborhood range of the current node. If the range is selected as 1 step, the value of r is -1 and 1. You can also set a larger step size as needed; Indicates the current node (x n ,y n ) in the neighborhood of a certain neighboring node (x n +i,y n +j) occupancy status, if it is occupied, then If it is idle,
[0074] In summary, the multi-distance constraint evaluation function in this case can be expressed as:
[0075]
[0076] Add the neighborhood nodes for which the total cost function has been calculated to the OpenList.
[0077] like Figure 3 As shown, the path planning is performed by taking the starting node (263, 285) and the target node (256, 350) as an example. Figure 3 The medium gray rectangular area is the building obstacle, and the area formed by the star points is all the nodes that have been searched during the search process. Figure 6 The figure shows the experimental results of the A-star path planning method based on a single distance calculation heuristic function. The area formed by the star points is all the nodes that have been searched during the search process. It can be found that there are a large number of invalid round-trip search nodes in this method. Figure 3 and Figure 6 It can be found that the number of nodes searched in this case is very small, and the multi-distance constraint path planning method used in this case quickly converges to the target node; in addition, all searched nodes in this case maintain a considerable safety distance from obstacles, which reflects the role of introducing the neighborhood occupancy penalty term in the evaluation function in this case.
[0078] Step 6. Add a new reference point to ClosedList
[0079] Remove the current node from the OpenList and add it to the ClosedList as a new reference node, and determine whether the new reference node coincides with the target node: if so, proceed to Step 8; otherwise, proceed to Step 7.
[0080] Step 7. Update the current node
[0081] Select the node with the smallest total cost value from OpenList as the new current node and return to Step 5.
[0082] Step 8. Remove redundant nodes and keep key nodes
[0083] like Figure 4 As shown, it is a schematic diagram of the final benchmark node search result of this case, and the position of the star point is stored in ClosedList.
[0084] The adjacent reference nodes stored in ClosedList are one by one. For the drone path, only the first and last two nodes on the same straight line need to be marked, and the multiple reference nodes in the middle are redundant. The redundant nodes in ClosedList are removed by the slope between adjacent reference nodes, and the first and last two reference nodes on the same straight line are retained as key nodes to obtain the final drone path planning result.
[0085] Redundant nodes are removed by the slope between adjacent reference nodes. Among all the reference nodes in ClosedList, the three adjacent reference nodes are traversed backwards from the starting node, and the three adjacent reference nodes are recorded as node A, node B and node C respectively. The coordinates of the three reference nodes are (x a ,y a )、(x b ,y b ) and (x c ,y c ), calculate the slopes between adjacent benchmark nodes and If k ab =k bc , then node B is a redundant node, node B is discarded, node C is used as the new node B, and then a reference node is traversed backward as the new node C, and the slope calculation and judgment are repeated until the target node; if k ab ≠k bc , then take node B as the new node A, and then traverse the two reference nodes backward as the new node B and the new node C, repeat the slope calculation and judgment until the target node.
[0086] like Figure 5 As shown, this is a schematic diagram of the key node extraction results in this case. Only the key turning point information of the path is retained to reduce invalid actions in the UAV flight path and ensure the flight endurance of the UAV.
[0087] The UAV path planning method based on multiple distance constraints proposed in this case fully integrates the characteristics and advantages of different distance formulas when calculating the heuristic function value from the current node to the target node. Through the weighted fusion of Manhattan distance and Euclidean distance, this case can quickly converge towards the target node, while reducing unnecessary round-trip searches and reducing the probability of path turning points. In addition, since the neighborhood occupancy penalty term is introduced when calculating the total generation value, if there are obstacles within a certain neighborhood range of the current node, its total generation value will become very large; the neighborhood occupancy penalty term enables this case to fully suppress the possibility of the path passing through the area near the obstacle, thereby ensuring the safety of path planning.
[0088] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A UAV path planning method based on multiple distance constraints, characterized by: Based on the A-star algorithm, a multi-distance constraint method is introduced to plan the path of the UAV. The multi-distance constraint method is used to calculate the total cost function of the current node and the neighboring nodes, and the neighboring node with the smallest total cost function is used as the planning path. The total cost function used by the multi-distance constraint method is: f(n)=g(n)+h(n)+d(n) Where: The coordinates of the starting node are (x S ,y S ), the current node coordinate is (x n ,y n ), the target node coordinates are (x E ,y E ); f(n) is the total cost function, which represents the total cost of reaching the target node from the starting node through the current node; g(n) is the cost function, which represents the cost of reaching the current node from the starting node; h(n) is the heuristic function, which represents the cost of reaching the target node from the current node; d(n) is the penalty term, which represents the neighborhood occupancy penalty of the current node; Use the shortest moving step from the starting node to the current node to calculate the cost function g(n); The heuristic function h(n) is calculated by fusing the weighted Manhattan distance dist1 and the Euclidean distance dist2: h(n)=ω1×dist1+ω2×dist2 dist1=|x E -x n |+|and E -and n | Where: ω1 and ω2 are the weight coefficients of Manhattan distance and Euclidean distance respectively; The penalty term d(n) is calculated as follows: Among them: INF represents the maximum value of the value; r represents the neighborhood range of the current node; Indicates the current node (x n ,y n ) in the neighborhood of a certain neighboring node (x n +i,y n +j) occupancy status, if it is occupied, then If it is idle, 2. The UAV path planning method based on multiple distance constraints according to claim 1 is characterized in that: The three-dimensional physical space of the UAV mission area is divided into tightly arranged three-dimensional grids, each grid is a node, and the side length of each grid is 1 step.
3. The UAV path planning method based on multiple distance constraints according to claim 2 is characterized in that: At the beginning of the UAV path planning, the starting node of the UAV is first raised to the height of the target node, and the grid layer at this height is selected as the two-dimensional grid map for the UAV path planning. The UAV uses a multi-distance constraint method to select the next reference node until it reaches the target node; finally, the first and last reference nodes on the same straight line are retained as key nodes, and the redundant nodes in the middle are removed.
4. The method for UAV path planning based on multiple distance constraints according to claim 2, characterized in that: Redundant nodes are removed by the slope between adjacent reference nodes. Among all the reference nodes selected by the drone, the three adjacent reference nodes are traversed backwards from the starting node, and the coordinates of the three reference nodes are (x a ,y a )、(x b ,y b ) and (x c ,y c ), calculate the slopes between adjacent benchmark nodes respectively and If k ab =k bc , then node B is a redundant node, node B is discarded, node C is used as the new node B, and then a reference node is traversed backward as the new node C, and the slope calculation and judgment are repeated until the target node; if k ab ≠k bc , then take node B as the new node A, and then traverse the two reference nodes backward as the new node B and the new node C, repeat the slope calculation and judgment until the target node.
5. The method for UAV path planning based on multiple distance constraints according to claim 2, characterized in that: First, set the open list OpenList and the closed list ClosedList, and add the starting node as the current node to the OpenList; then, determine one by one whether the 8 neighboring nodes of the current node with a step size of 1 are in the ClosedList. If not, determine whether the neighboring node is in the OpenList. If not, calculate the total cost of the neighboring node and add the neighboring node to the OpenList; then, remove the current node from the OpenList and add it to the ClosedList as a new reference node to determine whether the new reference node coincides with the target node; then, select the node with the smallest total cost from the OpenList as the new current node; repeat until the new new reference node coincides with the target node.
6. The UAV path planning method based on multiple distance constraints according to claim 2 is characterized in that: Using lidar point cloud data, the urban scene is constructed as a three-dimensional grid map; the three-dimensional physical space of the drone mission area is divided into tightly arranged three-dimensional grids, and each grid is regarded as a node; if a laser point falls in a grid, the grid is marked as occupied, indicating that there is an obstacle and flight is not allowed; otherwise, the grid is marked as idle, indicating that there is no obstacle and it is safe to fly.
7. The UAV path planning method based on multiple distance constraints according to claim 1 is characterized in that: The method comprises the following steps: Step 1: Use the laser radar point cloud data to construct the urban scene into a three-dimensional grid map; divide the three-dimensional physical space of the drone mission area into closely arranged three-dimensional grids, and use each grid as a node; if a laser point falls in a grid, the grid is marked as occupied, indicating that there is an obstacle and the drone cannot fly; Otherwise, the grid is marked as idle, indicating that there are no obstacles and it is safe to fly; Step 2: Simplify the UAV path planning problem in the three-dimensional physical space to a two-dimensional plane. When the starting node and the target node are at different heights, first adjust the height of the starting node to be consistent with the height of the target node, and then perform UAV path planning on the two-dimensional grid map corresponding to the height, reducing the 27 search directions of each node in the three-dimensional physical space to 8 search directions. Step 3, initialize the open list OpenList and the closed list ClosedList; Step 4. Add the starting node as the current node to OpenList; Step 5. Determine one by one whether the 8 neighboring nodes of the current node with a step size of 1 are in the ClosedList. If not, determine whether the neighboring node is in the OpenList. If not, calculate the total cost of the neighboring node and add the neighboring node to the OpenList. Step 6, remove the current node from the OpenList and add it to the ClosedList as a new reference node, and determine whether the new reference node coincides with the target node: if so, proceed to Step 8, otherwise, proceed to Step 7; Step 7. Select the node with the smallest total cost value from OpenList as the new current node and return to Step 5. Step 8. Remove redundant nodes in ClosedList through the slope between adjacent reference nodes, retain the first and last reference nodes on the same straight line as key nodes, and obtain the final UAV path planning result.