An unmanned aerial vehicle path planning method, device, equipment and medium
By constructing a three-dimensional trajectory planning environment, combining the A* algorithm and the line-of-sight determination method, and using cubic B-spline curves to process the trajectory, the problem of UAV trajectory intersecting with the terrain was solved, enabling safe flight of UAVs in mountainous low-altitude environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
- Filing Date
- 2023-05-24
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies for drone trajectory planning in low-altitude mountainous environments can easily lead to the trajectory intersecting with the terrain, causing the drone to collide with the mountain and fail to complete the mission.
A three-dimensional flight path planning environment is constructed based on a pre-defined terrain model and a meteorological environmental threat model. The flight path is determined using the A* algorithm and the line-of-sight determination method, and then smoothed using cubic B-spline curves to avoid interference between the flight path and terrain and meteorological threats.
This effectively avoids the drone's flight path intersecting with the terrain, ensuring the safe flight of the drone in the low-altitude mountainous environment and planning a smooth flight path that meets actual needs.
Smart Images

Figure CN116772846B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) trajectory planning technology, and in particular to a UAV trajectory planning method, apparatus, equipment and medium. Background Technology
[0002] Unmanned Aerial Vehicles (UAVs) have been widely used in military and civilian fields due to their high mobility, high survivability, low risk, and low cost. UAV trajectory planning is a hot research topic in UAV technology. Trajectory planning technology aims to plan a safe flight path from the starting point to the ending point that avoids threat areas and meets various performance constraints, taking into account the UAV's own performance constraints and various threat factors. Given the application of UAVs in mountainous areas, low-altitude flight is required to better utilize the performance of their detection equipment. However, the complex terrain and adverse weather conditions faced by UAVs in low-altitude mountainous areas are the main threats affecting their trajectory planning. Current domestic and international research on UAV trajectory planning methods mainly focuses on optimizing the shortest possible route, and the trajectory planning environment often uses function generation, without considering the actual requirements. There is an urgent need to consider the complex terrain and adverse weather conditions in mountainous areas.
[0003] Commonly used trajectory planning algorithms include artificial potential field method, fast expanding random tree algorithm, ant colony algorithm, artificial bee colony algorithm, and A* algorithm. Among them, trajectory planning algorithms based on A* algorithm have received widespread attention due to their ease of implementation and ability to find the globally optimal trajectory. However, because the terrain in mountainous low-altitude areas is complex, using the traditional A* algorithm for trajectory planning can lead to the trajectory intersecting with the terrain, causing the UAV to collide with the mountain and fail to complete the mission.
[0004] In summary, how to prevent the flight path of drones from intersecting with the terrain to ensure safe drone flight is a problem that needs to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for planning the flight path of an unmanned aerial vehicle (UAV), which can prevent the UAV's flight path from intersecting with the terrain to ensure the safe flight of the UAV. The specific solution is as follows:
[0006] Firstly, this application discloses a method for planning the trajectory of an unmanned aerial vehicle (UAV), including:
[0007] A three-dimensional flight path planning environment is constructed based on a preset terrain model and a preset meteorological environment threat model.
[0008] The flight path of the UAV is determined from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method;
[0009] The flight path is smoothed using a cubic B-spline curve to obtain a smoothed flight path.
[0010] Optionally, the UAV trajectory planning method further includes:
[0011] The preset terrain model is constructed based on the digital elevation model data of the area where the task to be performed.
[0012] Optionally, determining the UAV's flight path from the three-dimensional trajectory planning environment using a preset search algorithm and a line-of-sight determination method includes:
[0013] The starting node, ending node, and preset search step size of the UAV task to be performed in the three-dimensional trajectory planning environment are determined, and a number of target extension nodes between the starting node and the ending node are determined based on the preset search step size using a preset search algorithm and a line-of-sight determination method.
[0014] A flight path is constructed based on the starting node, a number of target extension nodes, and the ending node.
[0015] Optionally, the process of determining a number of target expansion nodes between the starting node and the ending node using a preset search algorithm and a line-of-sight determination method based on the preset search step size further includes:
[0016] A first extended node corresponding to the current starting node is determined using a preset search algorithm based on the preset search step size, and a second extended node is determined from the first extended node using a line-of-sight determination method;
[0017] The total estimated cost of each expansion node in the second expansion node is calculated using a preset heuristic function, and the expansion node corresponding to the minimum total estimated cost is taken as the target expansion node.
[0018] The current starting node is updated using the target expansion node, and the process jumps back to the step of determining the first expansion node corresponding to the current starting node using a preset search algorithm, until the distance between the current starting node and the termination node is less than a preset threshold, so as to obtain a number of target expansion nodes.
[0019] Optionally, the UAV trajectory planning method further includes:
[0020] The preset heuristic function is constructed based on a first cost function and a second cost function; wherein, the first cost function is a cost function constructed based on a first target distance between the starting node and the current starting node; and the second cost function is a cost function constructed based on a second target distance between the second extended node corresponding to the current starting node and the ending node.
[0021] Optionally, the UAV trajectory planning method further includes:
[0022] Create an Open table and a Close table, and add the start node and the end node to the Open table;
[0023] Accordingly, the process of determining a number of target expansion nodes between the starting node and the ending node using a preset search algorithm and a line-of-sight determination method also includes:
[0024] Add the first extended node to the Open table, and then delete the extended nodes in the first extended node other than the second extended node from the Open table;
[0025] After the target extension node is determined, it is moved from the Open table to the Close table.
[0026] Optionally, determining the second extended node from the first extended node using the line-of-sight determination method includes:
[0027] Connect the current starting node with each of the first extended nodes to obtain the track segment corresponding to each extended node.
[0028] The flight path segments are divided into equal intervals according to a preset spacing to obtain a corresponding first set of equal division points, and the preset terrain model is projected based on the first set of equal division points to obtain a corresponding second set of equal division points.
[0029] Calculate the height difference between the first set of equally divided points and the second set of equally divided points;
[0030] If all the height differences are greater than zero, then the extended node is determined as the second extended node.
[0031] Secondly, this application discloses a drone trajectory planning device, comprising:
[0032] The environment construction module is used to build a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological and environmental threat model.
[0033] The flight path determination module is used to determine the flight path of the UAV from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method;
[0034] The smoothing module is used to smooth the flight track using a cubic B-spline curve to obtain a smoothed flight track.
[0035] Thirdly, this application discloses an electronic device, including:
[0036] Memory, used to store computer programs;
[0037] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed UAV trajectory planning method.
[0038] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed UAV trajectory planning method.
[0039] As can be seen, this application constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model; it determines the UAV's flight path from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method; and it smooths the flight path using a cubic B-spline curve to obtain a smoothed flight path. Therefore, this application first constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model. Then, within the constructed three-dimensional flight path planning environment, it plans a flight path for the UAV that can avoid various threat areas by using a preset search algorithm and a line-of-sight determination method. This ensures that the planned flight path avoids terrain and meteorological environment threats, and the flight path is smoothed using a cubic B-spline curve, thus meeting the actual flight requirements of the UAV. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0041] Figure 1 This is a flowchart of a UAV trajectory planning method disclosed in this application;
[0042] Figure 2 This is a schematic diagram of a severe weather threat model disclosed in this application;
[0043] Figure 3 This application discloses a specific three-dimensional flight path planning environment for low-altitude mountainous areas.
[0044] Figure 4 This is a schematic diagram illustrating the node search extension of the A* algorithm disclosed in this application in a three-dimensional environment.
[0045] Figure 5This is a schematic diagram of a trajectory planning method using a traditional A* algorithm in a two-dimensional plane, as disclosed in this application.
[0046] Figure 6 This application discloses a specific method for unmanned aerial vehicle (UAV) trajectory planning.
[0047] Figure 7 This is a schematic diagram illustrating the principle of a visibility determination method disclosed in this application;
[0048] Figure 8 This is a comparison diagram of planned flight paths before and after improvement in a mountainous low-altitude area, as disclosed in this application.
[0049] Figure 9 This is a diagram showing the smoothing result of a flight trajectory disclosed in this application;
[0050] Figure 10 This is a schematic diagram of the structure of a UAV trajectory planning device disclosed in this application;
[0051] Figure 11 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0053] Commonly used trajectory planning algorithms include artificial potential field method, fast expanding random tree algorithm, ant colony algorithm, artificial bee colony algorithm, and A* algorithm. Among them, trajectory planning algorithms based on A* algorithm have received widespread attention due to their ease of implementation and ability to produce globally optimal trajectories. However, because the terrain in mountainous low-altitude areas is complex, traditional A* algorithms often result in trajectory intersections with the terrain, causing UAVs to collide with mountains and fail to complete their missions. Therefore, this application discloses a UAV trajectory planning method, apparatus, device, and medium that can prevent UAV flight paths from intersecting with terrain, thus ensuring safe UAV flight.
[0054] See Figure 1 As shown in the figure, this application discloses a method for planning the trajectory of an unmanned aerial vehicle (UAV), the method comprising:
[0055] Step S11: Construct a three-dimensional flight path planning environment based on the preset terrain model and the preset meteorological environment threat model.
[0056] In this embodiment, the three-dimensional trajectory planning environment is constructed based on a preset terrain model and a preset meteorological environment threat model. The UAV trajectory planning method further includes: constructing the preset terrain model based on the digital elevation model data of the area to be executed. Taking a mountainous area as an example, the digital elevation model (DEM) data of the mountainous area is first acquired. A mountainous terrain model is formed based on the DEM data. Combined with the preset meteorological environment threat model, a three-dimensional trajectory planning environment for the low-altitude mountainous area is constructed. The digital elevation model achieves a digital simulation of the ground terrain through limited terrain elevation data. It is understood that UAVs flying at low altitudes in mountainous environments mainly face terrain threats and severe weather threats. When constructing the three-dimensional trajectory planning environment for the low-altitude mountainous area, the DEM data of the mountainous task area is first acquired to accurately describe the trajectory planning environment and obtain a realistic and effective mountainous terrain model. For example, the area to be executed by the UAV is determined to be between 88.3503°E and 89.2118°E, and between 28.3175°N and 29.076°N. This area is a mountainous environment with complex terrain undulations. DEM data for the region was acquired with a resolution of 100 meters. Using the latitude, longitude, and elevation information of the data, a mountain terrain model was constructed in a grid format.
[0057] Furthermore, due to factors such as altitude and mountain terrain, mountainous environments are prone to severe weather conditions such as thunderstorms, low-level wind shear, and localized heavy rainfall. Under these adverse weather conditions, drones may struggle to maintain normal flight and could even crash. Because severe weather in mountainous areas is localized, a cylinder is used to describe the area threatened by severe weather, such as... Figure 2 As shown in the diagram. The threat altitude h is determined by the maximum flight altitude of the UAV, the coordinates (x, y) represent the center of the threat, and the threat radius r represents the effective range of the severe weather threat. If the UAV enters the threat range, it will be damaged and out of control; therefore, this area is a no-fly zone. The above-mentioned preset meteorological environment threat model is obtained by setting the parameters of the severe weather threat model. For example, in this embodiment, two abnormal weather threat models are set, with the relevant parameters set as follows: the location coordinates of the severe weather threat are (28.5867°, 88.7177°) and (28.7498°, 88.9956°), and the threat radius is 5.7 km for both. The specific three-dimensional flight path planning environment for low-altitude mountainous areas can be as follows: Figure 3 As shown.
[0058] Step S12: Determine the UAV's flight path from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method.
[0059] In this embodiment, the aforementioned preset search algorithm can specifically be the A* algorithm. The A* algorithm is a heuristic search algorithm that adds a heuristic function F(n) to Dijkstra's algorithm. In the iterative search, this function is used to calculate the cost F of feasible expansion nodes. The node with the smallest F value is used to determine the search direction, thereby reducing the search range and improving search efficiency. When using the traditional A* algorithm for trajectory planning, an Open table and a Close table are first created. Then, in each loop, collision detection is used to remove infeasible expansion nodes from the nodes to be expanded. Feasible expansion nodes are stored in the Open table during the search process. The heuristic function is used to calculate the F value of all nodes in the Open table. The node with the smallest F value in the Open table is found as the starting node for the next loop and stored in the Close table. This process is continuously updated until the termination condition is met. Finally, all nodes in the Close table are sequentially used to obtain the planned trajectory. Figure 4 This diagram illustrates the node search and expansion process of the A* algorithm disclosed in this application in a 3D environment. The circular nodes represent the current starting nodes, and the triangular nodes represent the nodes to be expanded in the next search step. The traditional A* algorithm uses a node expansion strategy to obtain all nodes to be expanded each time, then removes some non-flying nodes by collision detection to determine if these nodes are within the threat range, leaving the remaining nodes as feasible expansion nodes.
[0060] Figure 5 This is a schematic diagram of a traditional A* algorithm for trajectory planning in a two-dimensional plane, as disclosed in this application. Figure 5 As shown, node S is the starting node for trajectory planning, and its nodes to be expanded are nodes A, B, C, D, E, F, G, and H. Node T is the target point. The traditional A* algorithm detects that node E is within the terrain using a collision detection method that determines whether a node is in a terrain threat, so this node is removed, and the flight path SE is not feasible. Since the other nodes to be expanded are not within the terrain, the traditional A* algorithm considers all other nodes reachable and calculates the F value of all points using a heuristic function, selecting node D with the smallest F value as the next starting node. However, as can be seen from the figure, the actual flight path SD intersects with the mountain, preventing the UAV from flying. Therefore, due to the complex terrain in low-altitude mountainous areas, using the traditional A* algorithm for trajectory planning results in the problem of the trajectory intersecting with the terrain, causing the UAV to collide with the mountain and fail to complete the mission. Therefore, to address the shortcomings of the traditional A* algorithm for trajectory planning in low-altitude mountainous areas, this application improves the traditional A* algorithm by adopting a line-of-sight determination method to plan a safe UAV flight path.
[0061] Step S13: Smooth the flight track using a cubic B-spline curve to obtain a smoothed flight track.
[0062] In this embodiment, the smoothing process involves using the flight track obtained in step S12 as input to a cubic B-spline curve. Assuming the number of nodes in the flight track is L, the k-th segment of the cubic B-spline curve is calculated sequentially for all track nodes to obtain a smoothed track. The k-th segment of the cubic B-spline curve is:
[0063]
[0064] Where k = 1, 2, ..., L-4, G i,3 (t) is the basis function of the cubic B-spline curve, and its expression is:
[0065]
[0066] As can be seen, this application constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model; it determines the UAV's flight path from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method; and it smooths the flight path using a cubic B-spline curve to obtain a smoothed flight path. Therefore, this application first constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model. Then, within the constructed three-dimensional flight path planning environment, it plans a flight path for the UAV that can avoid various threat areas by using a preset search algorithm and a line-of-sight determination method. This ensures that the planned flight path avoids terrain and meteorological environment threats, and the flight path is smoothed using a cubic B-spline curve, thus meeting the actual flight requirements of the UAV.
[0067] See Figure 6 As shown, this application discloses a specific method for UAV trajectory planning. Compared to the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:
[0068] Step S21: Construct a three-dimensional flight path planning environment based on the preset terrain model and the preset meteorological environment threat model.
[0069] Step S22: Determine the starting node, ending node, and preset search step size of the UAV task to be performed in the three-dimensional trajectory planning environment, and use a preset search algorithm and line-of-sight determination method to determine a number of target extension nodes between the starting node and the ending node according to the preset search step size.
[0070] In this embodiment, the starting node, ending node, and preset search step size of the UAV mission are set based on the constructed three-dimensional trajectory planning environment of the low-altitude mountainous area. For example, in this embodiment, the latitude of the starting node of the UAV mission can be set to 28.342°, the longitude to 88.4398°, and the elevation to 4550m, and the latitude of the target node can be set to 29.0488°, the longitude to 89.1192°, and the elevation to 4150m, with a preset search step size of 1000 meters.
[0071] The process of determining a number of target extended nodes between the starting node and the ending node using a preset search algorithm and a visibility determination method based on the preset search step size further includes: determining a first extended node corresponding to the current starting node using a preset search algorithm based on the preset search step size, and determining a second extended node from the first extended node using the visibility determination method; calculating the total estimated cost of each extended node in the second extended node using a preset heuristic function, and taking the extended node corresponding to the minimum total estimated cost as the target extended node; updating the current starting node using the target extended node, and jumping back to the step of determining the first extended node corresponding to the current starting node using the preset search algorithm, until the distance between the current starting node and the ending node is less than a preset threshold, so as to obtain a number of target extended nodes.
[0072] Furthermore, the aforementioned UAV trajectory planning method further includes: creating an Open table and a Close table, and adding the starting node and the ending node to the Open table; correspondingly, the process of determining a number of target extended nodes between the starting node and the ending node using a preset search algorithm and a line-of-sight determination method further includes: adding the first extended node to the Open table, and then deleting the extended nodes other than the second extended node from the Open table; after determining the target extended node, the target extended node is moved from the Open table to the Close table.
[0073] That is, firstly, an Open table and a Close table are created, and the position information of the starting node and the ending node is added to the Open table; according to the collision detection of the A* algorithm, all reachable extended nodes within the search neighborhood of the current starting node, excluding points within the range of terrain threats and abnormal weather threats, are found according to the preset search step size, and the first extended nodes are determined, and their position information is added to the Open table. The line-of-sight determination method is used to remove feasible extended nodes that are not line-of-sight from the first extended nodes to obtain the second extended nodes; according to the preset heuristic function, the total estimated cost of all second extended nodes in the Open table is calculated in sequence, and the extended node corresponding to the minimum total estimated cost is taken as the target extended node, and the target extended node is deleted from the Open table, put into the Close table, and updated as the parent node, that is, the current starting node, as the starting node of the next search; the Euclidean distance between the current starting node and the ending node is determined, and it is determined whether the Euclidean distance is less than a preset threshold. If it is less, the search ends; if it is not less, the search jumps back to the step of determining the first extended node corresponding to the current starting node using the preset search algorithm, until the distance between the current starting node and the ending node is less than the preset threshold, so as to obtain a number of target extended nodes.
[0074] For example, suppose the coordinates of the current starting node are (x i ,y i ,z i The coordinates of the termination node are (x, y). g ,y g ,z g If the Euclidean distance between the two is... Then determine whether the Euclidean distance is less than a preset threshold, that is, whether the following formula holds true:
[0075] Where ε is a preset threshold, which can be set to 1400 meters in this embodiment.
[0076] The method further includes: constructing the preset heuristic function based on a first cost function and a second cost function; wherein the first cost function is a cost function constructed based on a first target distance between the starting node and the current starting node; and the second cost function is a cost function constructed based on a second target distance between the second extended node corresponding to the current starting node and the termination node. In this embodiment, the preset heuristic function F(n) = G(n) + H(n), where n represents the nth generation feasible extended node, F(n) is the heuristic function of the extended node, representing the total estimated cost from the current starting node through the nth generation feasible extended node to the termination node, the first cost function G(n) is the actual cost function calculated from the starting node to the current starting node, and the second cost function H(n) is the estimated cost function calculated from the nth generation feasible extended node to the termination node. In one specific implementation, the first cost function G(n) can be determined to be constructed based on the Euclidean distance between the starting node and the current starting node, that is, representing the sum of the Euclidean distances of the track segments of all parent nodes between the starting node and the current starting node; the second cost function H(n) can be determined to be constructed based on the Manhattan distance between the second extended node corresponding to the current starting node and the termination node, that is, the nth generation feasible extended node (x n ,y n ,z n ) to target point (x g ,y g ,z g Manhattan distance.
[0077] The expressions for the first cost function and the second cost function are as follows:
[0078]
[0079] In the formula, d i-1,i This represents the Euclidean distance between the (i-1)th parent node and the ith parent node.
[0080] H(n) = |x n -x g |+|y n -y g |+|z n -z g |
[0081] In another specific embodiment, the first cost function and the second cost function may also be constructed based on Euclidean distance or Manhattan distance, or other distance calculation methods. This application does not impose any limitations on this.
[0082] Furthermore, the above-mentioned method of determining the second extended node from the first extended node using the line-of-sight determination method includes: connecting the current starting node with each extended node in the first extended node to obtain a track segment corresponding to each extended node; dividing the track segment into equal intervals according to a preset spacing to obtain a corresponding first set of equal division points; and projecting the preset terrain model based on the first set of equal division points to obtain a corresponding second set of equal division points; calculating the height difference between the first set of equal division points and the second set of equal division points; if the height difference is greater than zero, then the extended node is determined as the second extended node. It should be noted that the principle of the line-of-sight determination method is as follows: First, connecting the current starting node with each extended node in the first extended node yields a track segment; then, N equal division points, including the current node and the extended node, are obtained at equal intervals on the track segment to obtain the first set of equal division points, denoted as (x...). i ,y i ,z i (x') , i = 1, 2, ..., N. Then, the N points in the first equally divided point set are projected onto the preset terrain model to obtain the corresponding N projection points, forming the second equally divided point set, denoted as (x'). i ,y′ i ,z′ i Finally, calculate the elevation z of these N points. i The elevation z of its corresponding projection point i The height difference between z and z' is z'. i -z′ i Let i = 1, 2, ..., N. If all height differences are greater than zero, then the current starting node and the extended node are considered to be in line of sight, the extended node is added to the Open list, and designated as the second extended node; otherwise, the current starting node and the extended node are considered to be out of line of sight, and the extended node is removed from the Open list. See details. Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the principle of a visibility determination method disclosed in this application. Figure 7 The left side indicates when two points are visible to each other, while the right side indicates when two points are not visible to each other.
[0083] Step S23: Construct a flight path based on the starting node, a number of target extension nodes, and the ending node.
[0084] In this embodiment, a flight path is constructed using the aforementioned number of target expansion nodes, as well as pre-set start and end nodes. That is, by traversing back from the end node to the start node through the parent node and sequentially connecting all the traversed nodes, the flight path with the minimum total cost is planned. See also... Figure 8 As shown, Figure 8This is a comparison diagram of the planned flight paths before and after the improvement of the low-altitude mountain area disclosed in this application.
[0085] Step S24: Smooth the flight track using a cubic B-spline curve to obtain a smoothed flight track.
[0086] In this embodiment, see Figure 9 As shown, Figure 9 A smoothed flight trajectory result image is disclosed.
[0087] For more detailed processing of steps S21 and S24, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0088] As can be seen, in this embodiment, after constructing the 3D trajectory planning environment, the starting node, ending node, and preset search step size of the UAV's task to be performed in the 3D trajectory planning environment are determined. Then, using a preset search algorithm and a line-of-sight determination method, a number of target extension nodes between the starting and ending nodes are determined based on the preset search step size. Finally, a flight trajectory is constructed based on the starting node, the number of target extension nodes, and the ending node. By using a line-of-sight determination method to improve the A* algorithm for UAV low-altitude flight trajectory planning, the problem of the planned trajectory intersecting with the terrain is solved, ensuring safe low-altitude flight of the UAV.
[0089] See Figure 10 As shown in the figure, this application discloses a drone trajectory planning device, which includes:
[0090] Environment construction module 11 is used to construct a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model;
[0091] The flight path determination module 12 is used to determine the flight path of the UAV from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method;
[0092] The smoothing module 13 is used to smooth the flight track using a cubic B-spline curve to obtain a smoothed flight track.
[0093] As can be seen, this application constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model; it determines the UAV's flight path from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method; and it smooths the flight path using a cubic B-spline curve to obtain a smoothed flight path. Therefore, this application first constructs a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological environment threat model. Then, within the constructed three-dimensional flight path planning environment, it plans a flight path for the UAV that can avoid various threat areas by using a preset search algorithm and a line-of-sight determination method. This ensures that the planned flight path avoids terrain and meteorological environment threats, and the flight path is smoothed using a cubic B-spline curve, thus meeting the actual flight requirements of the UAV.
[0094] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the UAV trajectory planning method performed by the electronic device disclosed in any of the foregoing embodiments.
[0095] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0096] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0097] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0098] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the UAV trajectory planning method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0099] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the method steps performed during the UAV trajectory planning process disclosed in any of the foregoing embodiments.
[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0101] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0104] The present invention provides a detailed description of a UAV trajectory planning method, apparatus, device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for planning the trajectory of an unmanned aerial vehicle (UAV), characterized in that, include: A three-dimensional flight path planning environment is constructed based on a preset terrain model and a preset meteorological environment threat model. The flight path of the UAV is determined from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method; The flight path is smoothed using a cubic B-spline curve to obtain a smoothed flight path. The step of determining the UAV's flight path from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method includes: The starting node, ending node, and preset search step size of the UAV's task to be performed in the three-dimensional trajectory planning environment are determined. A preset search algorithm and a line-of-sight determination method are used to determine a number of target extension nodes between the starting node and the ending node based on the preset search step size. A flight trajectory is constructed based on the starting node, the number of target extension nodes, and the ending node. The process of determining a number of target extended nodes between the starting node and the ending node using a preset search algorithm and a visibility determination method based on a preset search step size further includes: determining a first extended node corresponding to the current starting node using a preset search algorithm based on the preset search step size, and determining a second extended node from the first extended node using a visibility determination method; calculating the total estimated cost of each extended node in the second extended node using a preset heuristic function, and taking the extended node corresponding to the minimum total estimated cost as the target extended node; updating the current starting node using the target extended node, and then jumping back to the step of determining the first extended node corresponding to the current starting node using a preset search algorithm based on the preset search step size, until the distance between the current starting node and the ending node is less than a preset threshold, so as to obtain a number of target extended nodes; The step of determining the second extended node from the first extended node using the line-of-sight determination method includes: connecting the current starting node with each extended node in the first extended node to obtain a track segment corresponding to each extended node; dividing the track segment into equal intervals according to a preset spacing to obtain a corresponding first set of equal division points; projecting the preset terrain model based on the first set of equal division points to obtain a corresponding second set of equal division points; calculating the height difference between the first set of equal division points and the second set of equal division points; and if the height difference is greater than zero, then the extended node is determined as the second extended node.
2. The UAV trajectory planning method according to claim 1, characterized in that, Also includes: The preset terrain model is constructed based on the digital elevation model data of the area where the task to be performed.
3. The UAV trajectory planning method according to claim 1, characterized in that, Also includes: The preset heuristic function is constructed based on a first cost function and a second cost function; wherein, the first cost function is a cost function constructed based on a first target distance between the starting node and the current starting node; and the second cost function is a cost function constructed based on a second target distance between the second extended node corresponding to the current starting node and the ending node.
4. The UAV trajectory planning method according to claim 1, characterized in that, Also includes: Create an Open table and a Close table, and add the start node and the end node to the Open table; Accordingly, the process of determining a number of target expansion nodes between the starting node and the ending node using a preset search algorithm and a line-of-sight determination method based on the preset search step size also includes: Add the first extended node to the Open table, and then delete the extended nodes in the first extended node other than the second extended node from the Open table; After the target extension node is determined, it is moved from the Open table to the Close table.
5. A drone trajectory planning device, characterized in that, include: The environment construction module is used to build a three-dimensional flight path planning environment based on a preset terrain model and a preset meteorological and environmental threat model. The flight path determination module is used to determine the flight path of the UAV from the three-dimensional flight path planning environment using a preset search algorithm and a line-of-sight determination method; A smoothing module is used to smooth the flight track using a cubic B-spline curve to obtain a smoothed flight track. The flight path determination module is used to determine the starting node, ending node, and preset search step size of the UAV's task to be performed in the three-dimensional flight path planning environment, and to determine a number of target extension nodes between the starting node and the ending node based on the preset search step size using a preset search algorithm and a line-of-sight determination method; and to construct a flight path based on the starting node, the number of target extension nodes, and the ending node. The flight path determination module is further configured to: determine a first extended node corresponding to the current starting node using a preset search algorithm based on a preset search step size; determine a second extended node from the first extended node using a line-of-sight determination method; calculate the total estimated cost of each extended node in the second extended node using a preset heuristic function; and take the extended node corresponding to the minimum total estimated cost as the target extended node; update the current starting node using the target extended node; and jump back to the step of determining the first extended node corresponding to the current starting node using the preset search algorithm based on the preset search step size, until the distance between the current starting node and the termination node is less than a preset threshold, so as to obtain a number of target extended nodes. The flight path determination module is further configured to connect the current starting node with each of the first extended nodes to obtain a path segment corresponding to each extended node; divide the path segment into equal intervals according to a preset spacing to obtain a corresponding first set of equal division points; and project the preset terrain model based on the first set of equal division points to obtain a corresponding second set of equal division points; calculate the height difference between the first set of equal division points and the second set of equal division points; and if the height difference is greater than zero, determine the extended node as the second extended node.
6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the unmanned aerial vehicle (UAV) trajectory planning method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the UAV trajectory planning method as described in any one of claims 1 to 4.