Unmanned aerial vehicle route planning method and computer equipment
By using the occupied grid on the three-dimensional grid map in the drone route planning for route adjustment, the problem of long route planning time and possible collisions in the existing technology is solved, and safer and more efficient drone flight is achieved.
Patent Information
- Application Number
- CN202411924465.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-24
AI Technical Summary
When handling long-distance route planning, the existing drone route planning method has a long solution time, which cannot meet real-time requirements, and the smooth orbiting path may collide.
By obtaining the occupied grid of user points and obstacles on the three-dimensional grid map, perform initial route planning, and make route adjustments based on the occupied grid, generate target planned routes to ensure that the route points are not within the occupied grid.
It improves the safety of drone flight, reduces calculation time, optimizes route length, and enhances collision detection efficiency.
Smart Images

Figure CN119756374A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned aerial vehicles (UAVs), and more specifically, to a route planning method and computer equipment for UAVs. Background Art
[0002] With the rapid development of science and technology, drone technology has been widely used in my country, involving military, agriculture, aerial photography, logistics and other fields. The automatic flight capability of drones is one of its core technologies, which enables drones to complete flight missions in complex environments without human intervention. However, in actual applications, drones often encounter various obstacles during flight, such as buildings, trees, etc., which limits the flight range and efficiency of drones.
[0003] At present, the multiple obstacles in the flight of the UAV are mainly determined based on the global grid map, the UAV's zigzag obstacle avoidance path is determined by sampling, and then the zigzag obstacle avoidance path of the UAV is smoothed to obtain the smooth obstacle avoidance path of the UAV.
[0004] However, the separate processing of obstacle avoidance and smoothing may cause collisions in the smooth obstacle avoidance path. Global smoothing of all broken line path points requires a large processing scale. For long-distance route planning problems, the solution is too time-consuming and the solution time is too long to meet real-time requirements. Summary of the invention
[0005] The purpose of this application is to provide a route planning method and computer equipment for an unmanned aerial vehicle (UAV) in response to the above-mentioned deficiencies in the prior art, so as to obtain a target planned route based on an obstacle avoidance route in a collision risk area, thereby improving the safety of UAV flight.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a route planning method for a drone, the method comprising:
[0008] Obtaining a user point of the drone on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, wherein the occupied grid is a grid occupied by expanding a position of the obstacle on the three-dimensional grid map according to a preset minimum safety distance;
[0009] According to the user point, in the three-dimensional space where the three-dimensional grid map is located, initial route planning is performed on the drone to generate an initial planned route;
[0010] According to the occupied grids on the three-dimensional grid map, the initial planned route is adjusted to obtain a target planned route for the UAV in the three-dimensional space.
[0011] Optionally, adjusting the initial planned route according to the occupied grid on the three-dimensional grid map to obtain a target planned route for the UAV in the three-dimensional space includes:
[0012] According to the occupied grids on the three-dimensional grid map, collision detection is performed on the initial planned route to obtain a collision detection result;
[0013] According to the collision detection result, the initial planned route is adjusted to obtain the target planned route.
[0014] Optionally, adjusting the initial planned route according to the collision detection result to obtain the target planned route includes:
[0015] If the collision detection result indicates that the target three-dimensional route point on the initial planned route is within the occupancy grid, determining a risk area from the initial planned route;
[0016] Performing local planning on the risk area to obtain an obstacle avoidance route for the risk area;
[0017] According to the obstacle avoidance route in the risk area, the initial planned route is spliced to obtain the target planned route.
[0018] Optionally, performing collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map to obtain a collision detection result includes:
[0019] According to a preset collision detection step length, sparse processing is performed on a plurality of initial three-dimensional route points on the initial planned route to obtain a plurality of sparse three-dimensional route points, so that an interval between two adjacent sparse three-dimensional route points is the preset collision detection step length;
[0020] According to the occupied grid on the three-dimensional grid map, collision detection is performed on each sparse three-dimensional route point to obtain the collision detection result.
[0021] Optionally, the locally planning the risk area to obtain an obstacle avoidance route for the risk area includes:
[0022] Determine a risk starting point, a risk end point, and a plurality of collision route points of the risk area;
[0023] The risk area is locally planned according to the risk starting point, the risk end point and the multiple collision route points to obtain an obstacle avoidance route in the risk area.
[0024] Optionally, the locally planning the risk area according to the risk starting point, the risk end point and the multiple collision route points to obtain an obstacle avoidance route for the risk area includes:
[0025] According to the risk starting point and the risk end point of the risk area, obtaining an obstacle avoidance path from the risk starting point to the risk end point;
[0026] Determine a plurality of positioning points on the obstacle avoidance path according to the plurality of collision route points, the plurality of positioning points respectively corresponding to the plurality of collision route points;
[0027] Expanding the multiple positioning points to obtain multiple expected points, where the multiple expected points correspond to the multiple collision route points respectively;
[0028] The risk area is locally planned according to the multiple expected points to obtain an obstacle avoidance route in the risk area.
[0029] Optionally, the determining of a risk starting point, a risk end point, and a plurality of collision route points of the risk area includes:
[0030] According to the target three-dimensional route point, capturing a collision area on the initial planned route, and determining the plurality of collision route points within the collision area;
[0031] The collision area is expanded to obtain the risk area, and the risk starting point and the risk end point are determined according to the boundary points of the risk area.
[0032] Optionally, determining a plurality of positioning points on the obstacle avoidance path according to the plurality of collision route points comprises:
[0033] According to the position of each collision route point in the risk area, each collision route point is projected onto the obstacle avoidance path to obtain a positioning point corresponding to each collision route point.
[0034] Optionally, the expanding the multiple positioning points to obtain multiple expected points includes:
[0035] Determine the direction from each positioning point corresponding to the collision route point to each positioning point as the extrapolated direction of each positioning point;
[0036] The multiple positioning points are extended by a preset distance along the extrapolation direction of the multiple positioning points to obtain the multiple desired points.
[0037] Optionally, performing initial route planning for the UAV in the three-dimensional space where the three-dimensional grid map is located according to the user point to generate an initial planned route includes:
[0038] According to the plurality of user points, a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of the three-dimensional space are respectively constructed; an endpoint of each first initial three-dimensional polynomial curve is used to represent a user point;
[0039] The first initial cubic polynomial curve is modeled by minimizing the integral of the square of the second-order derivative as the solution target and the state constraint of the user point as the solution constraint to obtain a first route mathematical model, wherein the position constraint of the user point includes: the state constraint of the starting point, the state constraint of the end point, the position constraint of the waypoint, and the continuity constraint between the segmented curves;
[0040] Solving the first route mathematical model to obtain a plurality of first target cubic polynomial curves with known coefficients;
[0041] The multiple initial three-dimensional route points are obtained based on sampling of multiple segments of the first target cubic polynomial curve, and the initial planned route is generated based on the multiple initial three-dimensional route points.
[0042] Optionally, the locally planning the risk area according to the multiple expected points to obtain an obstacle avoidance route in the risk area includes:
[0043] According to the risk starting point, the risk end point and the multiple expected points, a plurality of second initial cubic polynomial curves with unknown coefficients in the three dimensions are constructed in segments, wherein an endpoint of each second initial three-dimensional polynomial curve is used to characterize the risk starting point, the risk end point or any expected point;
[0044] Taking minimizing the integral of the square of the second-order derivative as the first solution objective, minimizing the distance between the endpoint of the polynomial curve and the desired point as the second solution objective, and the state constraint of the risk starting point, the state constraint of the risk end point, and the continuity constraint between the segmented curves as solution constraints, each segment of the second initial cubic polynomial curve is modeled to obtain a second route mathematical model;
[0045] Solving a plurality of mathematical models of the second routes to obtain a plurality of second target cubic polynomial curves;
[0046] An obstacle avoidance route in the risk area is generated according to the multiple segments of the second target cubic polynomial curves.
[0047] In a second aspect, another embodiment of the present application provides a route planning device for a drone, the device comprising:
[0048] An acquisition module is used to acquire a user point of the drone on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, wherein the occupied grid is a grid occupied by expanding the position of the obstacle on the three-dimensional grid map according to a preset minimum safety distance;
[0049] A planning module, used to perform initial route planning for the UAV in the three-dimensional space where the three-dimensional grid map is located according to the user point, and generate an initial planned route;
[0050] A generation module is used to adjust the initial planned route according to the occupied grid on the three-dimensional grid map to obtain a target planned route for the UAV in the three-dimensional space.
[0051] In the third aspect, another embodiment of the present application provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the drone route planning method as described in any of the first aspects above.
[0052] In a fourth aspect, another embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the drone route planning method as described in any one of the first aspects above are executed.
[0053] The beneficial effects of this application are:
[0054] The present application provides a route planning method and computer equipment for a drone. In an embodiment of the present application, the user point of the drone on a three-dimensional grid map and the occupied grid of the obstacle on the three-dimensional grid map are first obtained. The occupied grid is the grid occupied by the position of the obstacle on the three-dimensional grid map after being expanded according to the preset minimum safety distance. According to the user point, the drone is initially route planned in the three-dimensional space where the three-dimensional grid map is located, and the initial planned route is generated. According to the occupied grid on the three-dimensional grid map, the route of the initial planned route is adjusted to obtain the target planned route of the drone in the three-dimensional space. The present application determines the initial planned route through the user point of the drone and the occupied grid of the obstacle on the three-dimensional grid map, and reduces the route length actually involved in the search and collision optimization according to the occupied grid optimization, improves the efficiency of collision detection, reduces the amount of calculation, greatly reduces the calculation time, and obtains the target planned route of the drone in the three-dimensional space at the same time, ensuring that all three-dimensional route points on the target planned route are not in the occupied grid, thereby improving the safety of the drone flight. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a flow chart of a method for planning a route for a drone provided in an embodiment of the present application;
[0057] Figure 2 A schematic diagram of a process for determining a target route in a route planning method for a drone provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of a process for determining a target route planning method in another route planning method for a drone provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of a process for determining a collision detection result in a route planning method for a drone provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a process for determining an obstacle avoidance route in a route planning method for a drone provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of a process for determining an obstacle avoidance route in another route planning method for a drone provided in an embodiment of the present application;
[0062] Figure 7 A schematic diagram of determining an obstacle avoidance route provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of a process for determining risk points in a method for planning a route for a drone provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of a process for determining a desired point in a route planning method for a drone provided in an embodiment of the present application;
[0065] Fig.10 A schematic diagram of a process for determining an initial planned route in a route planning method for a drone provided in an embodiment of the present application;
[0066] Fig.11 A schematic diagram of a process for determining an obstacle avoidance route in another route planning method for a drone provided in an embodiment of the present application;
[0067] Fig.12A schematic diagram of the structure of a route planning device for a drone provided in an embodiment of the present application;
[0068] Fig.13 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0070] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0071] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0072] To clearly describe the method of the embodiment of the present application, the route planning method of the drone provided in the embodiment of the present application is described below with reference to a plurality of drawings. Figure 1 A schematic diagram of a process flow of a method for planning a route for a drone provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0073] Step 101: Obtain the user point of the drone on the three-dimensional grid map and the grid occupied by the obstacle on the three-dimensional grid map.
[0074] Among them, user points include: starting point and end point; the starting point is the starting point of the drone flight, and the end point is the end point of the drone flight. The three-dimensional grid map is used to represent the data structure of the target three-dimensional space environment. The target three-dimensional space is divided into multiple grids, each grid represents a specific area in the space, and the three-dimensional grid map is a grid map of the drone flight range. The occupied grid is the grid occupied by the position of the obstacle on the three-dimensional grid map after it is expanded according to the preset minimum safety distance. The preset minimum safety distance is determined according to the ratio of the obstacle to the drone and the actual usage scenario. The obstacle can be a natural environment obstacle, an artificial environment obstacle, a dynamic environment obstacle, a technical obstacle, etc. The expanded obstacle can occupy multiple grids.
[0075] Optionally, the user point of the drone on the three-dimensional grid map is obtained according to the flight plan of the drone, and the occupancy grid of obstacles on the three-dimensional grid map of the target area is obtained according to the target area. The target area is the area in the flight plan of the drone.
[0076] Step 102: Based on the user point, an initial route planning is performed on the UAV in the three-dimensional space where the three-dimensional grid map is located, and an initial planned route from the starting point to the end point is generated.
[0077] The initial planned route includes: a plurality of initial three-dimensional route points. The initial planned route is a smooth line.
[0078] Optionally, based on the user point, that is, the starting point and the end point of the drone, multiple initial three-dimensional route points between the starting point and the end point are determined in the three-dimensional space where the three-dimensional grid map is located, and an initial planned route from the starting point to the end point is generated based on the multiple initial three-dimensional route points. The multiple initial three-dimensional route points between the starting point and the end point can be determined by a sampling or search algorithm, which is not limited in the embodiments of the present application.
[0079] Step 103: adjust the initial planned route according to the grids occupied on the three-dimensional grid map to obtain the target planned route of the UAV in the three-dimensional space.
[0080] Optionally, based on the occupied grid, the initial route points within the occupied grid on the initial planned route are determined, and the initial route points within the occupied grid on the initial planned route are adjusted so that the initial route points within the occupied grid on the initial planned route are outside the occupied grid, thereby obtaining the target planned route of the UAV in three-dimensional space based on the adjusted initial route points.
[0081] In the embodiment of the present application, the user point of the drone on the three-dimensional grid map and the occupied grid of the obstacle on the three-dimensional grid map are first obtained. The occupied grid is the grid occupied by the position of the obstacle on the three-dimensional grid map after being expanded according to the preset minimum safety distance. According to the user point, the drone is initially routed in the three-dimensional space where the three-dimensional grid map is located, and the initial planned route is generated. According to the occupied grid on the three-dimensional grid map, the route of the initial planned route is adjusted to obtain the target planned route of the drone in the three-dimensional space. The present application determines the initial planned route through the user point of the drone and the occupied grid of the obstacle on the three-dimensional grid map, and reduces the length of the route actually involved in the search and collision optimization according to the occupied grid optimization, improves the efficiency of collision detection, reduces the amount of calculation, greatly reduces the calculation time, and obtains the target planned route of the drone in the three-dimensional space at the same time, ensuring that all three-dimensional route points on the target planned route are not in the occupied grid, thereby improving the safety of the drone flight.
[0082] Based on the above embodiments, the present application also provides a process for determining a target route in a route planning method for a drone. Figure 2 A schematic diagram of a process for determining a target route in a route planning method for a drone provided in an embodiment of the present application, such as Figure 2 As shown, in the above step 103, the initial planned route is adjusted according to the grid occupied on the three-dimensional grid map to obtain the target planned route of the UAV in the three-dimensional space, including:
[0083] Step 201: perform collision detection on the initial planned route according to the grids occupied on the three-dimensional grid map to obtain a collision detection result.
[0084] Optionally, when an initial three-dimensional route point on the initial planned route is on the occupied grid, it means that the initial three-dimensional route point collides. Therefore, according to the occupied grid on the three-dimensional grid map, it is judged whether each initial three-dimensional route point is on the occupied grid, thereby realizing collision detection of each initial three-dimensional route point and obtaining a collision detection result.
[0085] Step 202: According to the collision detection result, the initial planned route is adjusted to obtain a target planned route.
[0086] Optionally, if the collision detection result indicates that there is an initial route point among the initial three-dimensional route points that is within the occupied grid, it means that there is a collision risk for each initial three-dimensional route point, and it is necessary to adjust the initial planned route points according to the occupied grid where each initial three-dimensional route point is located, so that each initial three-dimensional route point is not within the occupied grid, and determine the target planned route based on the adjusted initial three-dimensional route points.
[0087] In the embodiment of the present application, according to the occupied grid on the three-dimensional grid map, the initial planned route is collided with and the collision detection result is obtained, and the route of the initial planned route is adjusted to obtain the target planned route. It can be ensured that the route points in the target planned route are not on the occupied grid, thereby ensuring the safety of the UAV flight.
[0088] Based on the above embodiment, the present application embodiment also provides another process of determining a target planning route in a route planning method for a drone, Figure 3 A schematic diagram of a process for determining a target route planning method in another route planning method for a drone provided in an embodiment of the present application, such as Figure 3 As shown, in the above step 202, the initial planned route is adjusted according to the collision detection result to obtain the target planned route, including:
[0089] Step 301: If the collision detection result indicates that the target three-dimensional route point on the initial planned route is within the occupancy grid, a risk area is determined from the initial planned route.
[0090] Among them, the risk area is the area where the drone may collide during flight, and the risk area may include obstacles.
[0091] Optionally, if the collision detection result indicates that there is a target three-dimensional route point in the initial planned route that is within the occupied grid, it means that the initial planned route has a collision risk, and it is necessary to determine the area of the expanded obstacle based on the obstacle corresponding to the occupied grid where the target three-dimensional route point is located, and determine the risk area based on the area of the expanded obstacle.
[0092] Step 302: Perform local planning on the risk area to obtain an obstacle avoidance route in the risk area.
[0093] Among them, the obstacle avoidance route is a smooth curve, and multiple three-dimensional route points on the obstacle avoidance route are not in the risk area.
[0094] Optionally, based on the multiple collision route points, local planning is performed on the risk area to obtain a smooth obstacle avoidance route in the risk area, so that multiple three-dimensional route points on the obstacle avoidance route are not in the risk area.
[0095] Step 303: According to the obstacle avoidance route in the risk area, the initial planned route is spliced to obtain the target planned route.
[0096] Optionally, based on the starting point and end point of the obstacle avoidance route in the collision risk area, points on the initial planned route corresponding to the starting point and end point of the obstacle avoidance route are determined, and multiple initial three-dimensional route points within the points on the initial planned route corresponding to the starting point and end point of the obstacle avoidance route are replaced with multiple three-dimensional route points on the obstacle avoidance route in the collision risk area, thereby obtaining the target planned route of the UAV in three-dimensional space.
[0097] In the embodiment of the present application, according to the target three-dimensional route point in the occupied grid in the initial route, the risk area is determined from the initial planned route, the risk area is locally planned to obtain the obstacle avoidance route, and the target planned route is determined according to the obstacle avoidance route. The present application can plan the obstacle avoidance route in advance to optimize the flight efficiency of the drone, and maintain the continuity of the route without changing the overall direction of the initial route.
[0098] Based on the above embodiments, the present application also provides a process for determining collision detection results in a route planning method for a drone. Figure 4 A schematic diagram of a process for determining a collision detection result in a route planning method for a drone provided in an embodiment of the present application, such as Figure 4 As shown, in the above step 201, the initial planned route is subjected to collision detection according to the grids occupied on the three-dimensional grid map to obtain a collision detection result, including:
[0099] Step 401: Sparsely process a plurality of initial three-dimensional route points according to a preset collision detection step length to obtain a plurality of sparse three-dimensional route points, so that the interval between two adjacent sparse three-dimensional route points is the preset collision detection step length.
[0100] Among them, the preset collision detection step length is determined according to the preset minimum safety distance. The preset minimum safety distance is a parameter used to ensure that the drone and the obstacle maintain a safe distance. It can be determined according to the size of the drone, or according to the type of obstacle, etc., and the embodiment of the present application does not limit this.
[0101] Optionally, if multiple initial three-dimensional route points are processed simultaneously, the processing efficiency will be low. For this reason, by presetting the collision detection step length, the multiple initial three-dimensional route points between the initial three-dimensional route points at both ends of the preset collision detection step length are no longer occupied by the grid. At this time, the multiple initial three-dimensional route points between the initial three-dimensional route points at both ends of the preset collision detection step length are no longer occupied by the grid. Only the initial three-dimensional route points at both ends of the preset collision detection step length need to be detected to determine the status of the multiple initial three-dimensional route points between the initial three-dimensional route points at both ends of the preset collision detection step length. Therefore, the collision detection does not need to check each initial three-dimensional route point, but only needs to check at intervals of the preset collision detection step length. The multiple initial three-dimensional route points can be sparsely processed by the preset collision detection length to obtain multiple sparse three-dimensional route points, so that the interval between two adjacent sparse three-dimensional route points is the preset collision detection step length. Among them, the preset collision detection step length refers to the step length for checking at a certain distance on the initial planning route to ensure that the drone will not collide with obstacles during movement.
[0102] Step 402: perform collision detection on each sparse three-dimensional route point according to the grids occupied on the three-dimensional grid map to obtain the collision detection result.
[0103] Optionally, when there are sparse three-dimensional route points on the occupied grid, it means that the sparse three-dimensional route points are expanded. Therefore, according to the occupied grid on the three-dimensional grid map, it is judged whether each sparse three-dimensional route point is on the occupied grid, so as to realize collision detection of each sparse three-dimensional route point and obtain the collision detection result.
[0104] In an embodiment of the present application, a plurality of initial three-dimensional route points on the initial planned route are sparsely processed according to a preset collision detection step length to obtain a plurality of sparse three-dimensional route points, and collision detection is performed on each sparse three-dimensional route point according to the grid occupied on the three-dimensional grid map to obtain a collision detection result. The present application can reduce the amount of calculation by sparsely processing the initial three-dimensional route points, thereby increasing the speed of collision detection and quickly obtaining a collision detection result.
[0105] Based on the above embodiments, the present application also provides a process for determining an obstacle avoidance route in a route planning method for a drone. Figure 5 A schematic diagram of a process for determining an obstacle avoidance route in a route planning method for a drone provided in an embodiment of the present application, such as Figure 5 As shown, in the above step 302, the risk area is locally planned to obtain an obstacle avoidance route in the risk area, including:
[0106] Step 501: determine a risk starting point, a risk end point, and a plurality of collision route points in a risk area.
[0107] The collision route points are multiple three-dimensional initial route points on the initial planned route in the area where the expanded obstacle is located. The boundary points of the risk area are respectively used as the risk starting point and the risk end point.
[0108] Optionally, the boundary points of the risk area are respectively used as the risk starting point and the risk end point, and multiple initial three-dimensional route points in the risk area on the initial planned route points are determined according to the risk area as collision route points.
[0109] Step 502: Perform local planning on the risk area according to the risk starting point, the risk end point and multiple collision route points to obtain an obstacle avoidance route in the risk area.
[0110] The risk area includes the area where the expanded obstacle is located. Optionally, according to the risk starting point, the risk end point and multiple collision route points, an obstacle avoidance path from the risk starting point to the risk end point is determined by a search algorithm or a sampling algorithm, and an obstacle avoidance route is generated according to the obstacle avoidance path.
[0111] In an embodiment of the present application, based on the risk starting point, risk end point and collision route point of the risk area, an obstacle avoidance path from the risk starting point to the risk end point is obtained, and an obstacle avoidance route is determined, so that the obtained obstacle avoidance route is more reliable and avoids collision with obstacles, thereby improving the overall flight safety.
[0112] Based on the above embodiments, the present application also provides a process for determining an obstacle avoidance route in a route planning method for a drone. Figure 6 A schematic diagram of a process for determining an obstacle avoidance route in another route planning method for a drone provided in an embodiment of the present application, such as Figure 6 As shown, in the above step 501, the risk starting point, risk end point and multiple collision route points of the risk area are determined, including:
[0113] Step 601: Obtain an obstacle avoidance path from the risk starting point to the risk end point according to the risk starting point and the risk end point of the risk area.
[0114] Optionally, an obstacle circumvention path from the risk starting point to the risk end point is determined by a search algorithm or a sampling algorithm according to the risk starting point and the risk end point of the risk area, wherein the risk area includes the area where the expanded obstacle is located.
[0115] For example, Figure 7 A schematic diagram of determining an obstacle avoidance route provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, line 2 is the obstacle avoidance path, and the obstacle avoidance path is determined by a search algorithm or a sampling algorithm based on the risk starting point and the risk end point.
[0116] Step 602: Determine multiple positioning points on the obstacle avoidance path according to the multiple collision route points.
[0117] The multiple positioning points correspond to the multiple collision route points respectively.
[0118] The collision route points are multiple three-dimensional initial route points on the initial planned route in the area where the expanded obstacle is located. The number of positioning points is the same as the number of collision route points.
[0119] For example, continue to combine Figure 7 For explanation, Line 1 is the initially planned route, and multiple Points 1 are collision route points. According to the positions of multiple Points 1 relative to the risk starting point and the risk end point, the positions of multiple positioning points on the obstacle avoidance route No. 2 are determined, and the positioning point is Point 2.
[0120] Step 603: Expand the multiple positioning points to obtain multiple expected points, and the multiple expected points correspond to multiple collision route points respectively.
[0121] Among them, the number of collision route points, positioning points and expected points are the same, and the expected points are the route points of the expected drone in the risk area.
[0122] Optionally, multiple positioning points are expanded according to multiple collision route points to obtain multiple expected points, and the multiple expected points correspond to the multiple collision route points respectively.
[0123] For example, continue to combine Figure 7 For explanation, point 3 is the expected point.
[0124] Step 604: Perform local planning on the risk area based on the multiple expected points to obtain an obstacle avoidance route in the risk area.
[0125] Optionally, based on multiple expected points, risk starting points and risk end points, the risk area is locally planned to generate connecting lines in the risk area passing through multiple expected points, risk starting points and risk end points. At the same time, the obstacle avoidance route in the risk area is optimized through the connecting lines passing through multiple expected points, risk starting points and risk end points, so that any three-dimensional point in the connecting line is not on the occupied grid, thereby generating an obstacle avoidance route.
[0126] For example, continue to combine Figure 7 For explanation, Line 3 is the obstacle avoidance route, the starting point of the obstacle avoidance route is the risk starting point, and the end point of the obstacle avoidance welding line is the risk end point.
[0127] In an embodiment of the present application, based on the risk starting point and the risk end point of the risk area, an obstacle avoidance path from the risk starting point to the risk end point is obtained, and a positioning point on the obstacle avoidance path is determined to obtain an expected point, and an obstacle avoidance route is determined based on the expected point, so that the obtained obstacle avoidance route is more reliable, avoiding collisions with obstacles, thereby improving the overall flight safety.
[0128] Based on the above embodiments, the present application also provides a process for determining risk points in a route planning method for a drone. Figure 8 A schematic diagram of a process for determining risk points in a route planning method for a drone provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, in the above step 501, the risk starting point, risk end point and multiple collision route points of the risk area are determined, and the method includes:
[0129] Step 801: Capture a collision area on an initial planned route according to a target three-dimensional route point, and determine a plurality of collision route points within the collision area.
[0130] The target three-dimensional route point is the point in the occupied grid. The collision area is the area of the occupied grid of the expanded obstacle.
[0131] Optionally, based on the target three-dimensional route point, the obstacle corresponding to the occupied grid of the target three-dimensional route point is determined, and the area corresponding to the obstacle after expansion is determined as the collision area, and based on the collision area and the initial route planning point, multiple initial three-dimensional route points in the collision area are determined as multiple collision route points.
[0132] Step 802: Expand the collision area to obtain a risk area, and determine the risk start point and risk end point according to the boundary points of the risk area.
[0133] The collision area can be expanded according to predefined rules to ensure that the risk area obtained after expansion does not include the collision area corresponding to another obstacle. By expanding the collision area, it is possible to avoid excessive curvature of sharp turns during the subsequent flight of the drone. The predefined rules can be implemented by an expansion algorithm, a minimum distance algorithm, or a neural network model, which is not limited in the embodiments of the present application.
[0134] Optionally, the collision area is expanded according to a predefined rule to obtain a risk area, and boundary points of the risk area are determined, and the boundary points of the risk area are used as risk starting points and risk end points, respectively.
[0135] In an embodiment of the present application, the collision area is captured on the initial planned route according to the target three-dimensional route point, and multiple collision route points in the collision area are determined; the collision area is expanded to obtain the risk area, and the risk starting point and risk end point are determined. By accurately identifying the collision area and the risk area, the route can be optimized more effectively, avoiding excessive sharp turns and curvatures during the subsequent flight of the drone, thereby improving the safety of the drone's flight.
[0136] Based on the above embodiment, the present application further provides a process for determining positioning points in a route planning method for a drone. In the above step 602, multiple positioning points are determined from an obstacle avoidance path according to multiple collision route points, including:
[0137] According to the position of each collision route point in the risk area, each collision route point is projected onto the obstacle avoidance path to obtain the positioning point corresponding to each collision route point.
[0138] Optionally, based on the position of each collision route point in the risk area, the proportional relationship of the distance between each collision route point in the risk area is determined, and based on the proportional relationship of the distance between each collision route point and the risk starting point in the risk area, the proportional relationship between each positioning point and the risk starting point on the obstacle avoidance path is determined, thereby projecting each collision route point onto the obstacle avoidance path to obtain the positioning point corresponding to each collision route point.
[0139] For example, when the distances between each collision route point and the risk starting point in the risk area are in a proportional relationship of 0.2:0.3:0.5, the corresponding distances between each positioning point and the risk starting point on the obstacle avoidance path are also in a proportional relationship of 0.2:0.3:0.5.
[0140] In the embodiment of the present application, each collision route point is projected onto the obstacle avoidance path according to its position in the risk area, and the positioning point corresponding to each collision route point is obtained. This can ensure that the drone route is clearer, ensure that the drone maintains a safe distance when avoiding obstacles, and reduce the risk of collision.
[0141] Based on the above embodiments, the present application also provides a process for determining a desired point in a route planning method for a drone. Fig. 9 A schematic diagram of a process for determining a desired point in a route planning method for a drone provided in an embodiment of the present application, such as Fig. 9 As shown, in the above step 603, multiple positioning points are expanded to obtain multiple desired points, including:
[0142] Step 901: Determine the direction from each positioning point corresponding to the collision route point to each positioning point as the extrapolated direction of each positioning point.
[0143] Optionally, each positioning point is connected to the collision route point, and the defense line of the collision route point pointing to the positioning point is the extrapolation direction of the corresponding positioning point.
[0144] Step 902: Extend the multiple positioning points by a preset distance along the extrapolation direction of the multiple positioning points to obtain multiple desired points.
[0145] The extended preset distance of each positioning point is the same, and the extended preset distance is determined according to the distance between the expanded obstacles. It is necessary to ensure that the expected point obtained after the positioning point is extrapolated is not within the grid range corresponding to another expanded obstacle.
[0146] For example, continue to combine the attached Figure 7 It can be seen that by connecting the collision route point 1 and the positioning point 2, the direction from the collision route point 1 to the positioning point 2 is the extrapolation direction, and the extended preset distance is the extrapolation distance. By extending the preset distance and the extrapolation direction, the positioning point 2 is extrapolated to obtain the expected point 3.
[0147] On the basis of the above embodiment, the direction from the collision route point corresponding to each positioning point to the said each positioning point is determined as the extrapolated direction of the said each positioning point, and the said multiple expected points are obtained by extrapolating the positioning point according to the extended preset distance, so that the obtained obstacle avoidance route is more suitable for the actual scene, reduces unnecessary twists and turns and detours, and improves flight efficiency.
[0148] Based on the above embodiments, the present application also provides a process for determining an initial planned route in a route planning method for a drone. Fig.10 A schematic diagram of a process for determining an initial planned route in a route planning method for a drone provided in an embodiment of the present application, such as Fig.10 As shown, in the above step 102, according to the user point, in the three-dimensional space where the three-dimensional grid map is located, the initial route planning is performed on the drone to generate the initial planned route from the starting point to the end point, including:
[0149] Step 1001: construct a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of the three-dimensional space according to a plurality of user points.
[0150] Among them, multiple user points include a starting point, an end point and a waypoint. The waypoint can be determined according to the flight mission of the drone or selected manually. The embodiment of the present application does not limit this, and the waypoint is not on the occupied grid.
[0151] Optionally, a plurality of first initial cubic polynomial curves are constructed according to any consecutive user points among the plurality of user points, and an endpoint of each first initial three-dimensional polynomial curve is used to represent a user point.
[0152] For example, the present application describes the first initial cubic polynomial curve in the horizontal dimension, and constructs the first initial cubic polynomial curve with unknown coefficients in the horizontal dimension of the three-dimensional space according to the user point x=at 3 +bt 2 +ct+d.
[0153] Step 1002: Taking minimizing the integral of the square of the second-order derivative as the solution objective and the state constraint of the user point as the solution constraint, a first initial cubic polynomial curve is modeled to obtain a first route mathematical model.
[0154] Among them, the position constraints of the user points include: the state constraints of the starting point, the state constraints of the end point, the position constraints of the waypoints, and the continuity constraints between the segmented curves. The state of the user point refers to the user point related state information constraints such as the position, speed, acceleration and speed limit of the user point, the state constraints of the starting point refer to the user point related state information constraints such as the position, speed, acceleration and speed limit of the starting point, and the state constraints of the end point refer to the user point related state information constraints such as the position, speed, acceleration and speed limit of the end point; the position constraints of the waypoints are used to constrain the position of the first initial cubic polynomial curve connection at both ends of the waypoints, and the continuity constraints between the segmented curves are used to constrain the speed and acceleration at the connection of the first initial cubic polynomial curve at both ends of the waypoints. The solution goal is to minimize the integral of the square of the second-order derivative to ensure the smoothness of the first target cubic polynomial curve. The second-order derivative is related to the curvature of the first target cubic polynomial curve. The larger the second-order derivative, the higher the curvature of the curve, and the smaller the second-order derivative, the lower the curvature of the curve. The integral of the square of the second-order derivative is used to accumulate the square of the second-order derivative over the entire curve length, which is used for the smoothness of the entire first target cubic polynomial curve. Minimizing the integral of the square of the second-order derivative means that the integral of the square of the second-order derivative of the first target cubic polynomial curve over the entire definition domain is as small as possible, ensuring that the first target cubic polynomial curve is smoother.
[0155] Optionally, minimizing the integral of the square of the second-order derivative is used as the solution goal to ensure the smoothness of the multiple segments of the first target cubic polynomial curves, the state constraint of the user point is used as the solution constraint, the first initial cubic polynomial curve is modeled to obtain the first route mathematical model, and the first route data model is used to determine the multiple segments of the first target cubic polynomial curves, so that the multiple segments of the first target cubic polynomial curves are both smooth and satisfy the state of the user point.
[0156] Step 1003: Solve the mathematical model of the first route to obtain a plurality of first target cubic polynomial curves with known coefficients.
[0157] Optionally, a preset optimization algorithm is used to solve the first route mathematical model according to the solution target and the solution constraint to obtain a plurality of first target cubic polynomial curves with known coefficients. The preset optimization algorithm may be an algorithm, an interior point algorithm, a gradient descent algorithm, etc., which is not limited in the embodiment of the present application.
[0158] Step 1004: obtain a plurality of initial three-dimensional route points based on sampling of a plurality of first target cubic polynomial curves, and generate an initial planned route based on the plurality of initial three-dimensional route points.
[0159] Optionally, multiple segments of the first target cubic polynomial curve in three dimensions are sampled multiple times to obtain multiple three-dimensional values respectively, and corresponding multiple initial three-dimensional route points are determined according to the multiple three-dimensional values, and the multiple initial three-dimensional route points are connected to generate an initial planned route.
[0160] In an embodiment of the present application, user points also include waypoints. Based on multiple user points, a first initial cubic polynomial curve with unknown coefficients in three dimensions of the three-dimensional space is constructed respectively, and a first target cubic polynomial curve is generated according to the solution conditions and constraints to obtain the initial planned route, and ensure that they pass through or are close to the predetermined waypoints, which can ensure that the route meets specific path requirements, optimize the performance of the route, reduce unnecessary acceleration and deceleration, and improve energy efficiency.
[0161] Based on the above embodiments, the present application also provides a process for determining an obstacle avoidance route in a route planning method for a drone. Fig.11 A schematic diagram of a process for determining an obstacle avoidance route in another route planning method for a drone provided in an embodiment of the present application, such as Fig.11 As shown, in the above step 604, the risk area is locally planned according to multiple expected points to obtain an obstacle avoidance route in the risk area, including:
[0162] Step 1101: construct multiple second initial cubic polynomial curves with unknown coefficients in three dimensions in segments according to the risk starting point, risk end point and multiple expected points, and one endpoint of each second initial three-dimensional polynomial curve is used to characterize the risk starting point, risk end point or any expected point.
[0163] Among them, the second initial cubic polynomial is the initial cubic polynomial corresponding to the obstacle avoidance route of the UAV in the risk area.
[0164] Optionally, according to the risk starting point, the risk end point and two consecutive points among the multiple expected points, multiple segments of the second initial cubic polynomial curve with unknown coefficients in three dimensions are constructed in segments.
[0165] Step 1102, with minimizing the integral of the square of the second-order derivative as the first solution objective, minimizing the distance between the endpoint of the polynomial curve and the expected point as the second solution objective, the state constraint of the risk starting point, the state constraint of the risk end point and the continuity constraint between the segmented curves as solution constraints, modeling each segment of the second initial cubic polynomial curve to obtain the second route mathematical model.
[0166] Among them, the state constraints of the risk starting point are the user point related state information constraints such as the position, speed, acceleration and speed limit of the starting point; the state constraints of the risk end point are the user point related state information constraints such as the position, speed, acceleration and speed limit of the end point; the continuity constraints between segmented curves are used to constrain the speed and acceleration at the connection of the first initial cubic polynomial curve at both ends of the waypoint.
[0167] Step 1103, solving multiple second route mathematical models to obtain multiple second target cubic polynomial curves.
[0168] Optionally, a preset optimization algorithm is used to solve the second route mathematical model according to the solution target and the solution constraint to obtain multiple second target cubic polynomial curves with known coefficients. The preset optimization algorithm may be an algorithm, an interior point algorithm, a gradient descent algorithm, etc., which is not limited in the present embodiment of the application.
[0169] Step 1104: Generate an obstacle avoidance route in the risk area according to multiple segments of the second target cubic polynomial curve.
[0170] Optionally, multiple segments of the second target cubic polynomial curve in three dimensions are sampled multiple times to obtain multiple three-dimensional values respectively, and corresponding multiple three-dimensional route points are determined according to the multiple three-dimensional values, and the multiple three-dimensional route points are connected to generate an obstacle avoidance route.
[0171] In the embodiment of the present application, according to the risk starting point, the risk end point and multiple expected points, multiple segments of the second initial cubic polynomial curve with unknown coefficients in three dimensions are constructed in segments, and multiple segments of the second target cubic polynomial curve are determined by solving the conditions and constraints. According to the multiple segments of the second target cubic polynomial curve, an obstacle avoidance route in the risk area is generated. The present application can improve the smoothness of the obstacle avoidance route, so that the obstacle avoidance route will not suddenly turn or jump when connecting the expected points, thereby improving the stability of the flight.
[0172] Based on the same inventive concept, the embodiment of the present application also provides a route planning device for a UAV corresponding to the route planning method for a UAV. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the route planning method for the UAV mentioned above in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0173] Fig.12 A schematic diagram of a route planning device for a drone provided in an embodiment of the present application, the device comprising:
[0174] The acquisition module 1201 is used to acquire the user point of the drone on the three-dimensional grid map and the occupied grid of the obstacle on the three-dimensional grid map, where the occupied grid is the grid occupied by the obstacle position on the three-dimensional grid map after being expanded according to a preset minimum safety distance;
[0175] The planning module 1202 is used to perform initial route planning for the UAV in the three-dimensional space where the three-dimensional grid map is located according to the user point, and generate an initial planned route;
[0176] The generation module 1203 is used to adjust the initial planned route according to the occupied grids on the three-dimensional grid map to obtain the target planned route of the UAV in the three-dimensional space.
[0177] Optionally, the generating module 1203 is specifically used to: perform collision detection on the initial planned route according to the occupied grids on the three-dimensional grid map to obtain a collision detection result;
[0178] According to the collision detection results, the initial planned route is adjusted to obtain the target planned route.
[0179] Optionally, the generating module 1203 is specifically configured to: determine a risk area from the initial planned route if the collision detection result indicates that the target three-dimensional route point on the initial planned route is within the occupied grid;
[0180] Carry out local planning for the risk area and obtain the obstacle avoidance route in the risk area;
[0181] According to the obstacle avoidance route in the risk area, the initial planned route is spliced to obtain the target planned route.
[0182] Optionally, the generating module 1203 is specifically used to: perform sparse processing on a plurality of initial three-dimensional route points on the initial planned route according to a preset collision detection step length to obtain a plurality of sparse three-dimensional route points, so that the interval between two adjacent sparse three-dimensional route points is the preset collision detection step length;
[0183] According to the occupied grids on the three-dimensional grid map, collision detection is performed on each sparse three-dimensional route point to obtain the collision detection result.
[0184] Optionally, the generating module 1203 is specifically used to: determine a risk starting point, a risk end point and a plurality of collision route points of the risk area;
[0185] According to the risk starting point, risk end point and multiple collision route points, the risk area is locally planned to obtain the obstacle avoidance route in the risk area.
[0186] Optionally, the generating module 1203 is specifically used to: obtain an obstacle avoidance path from the risk starting point to the risk end point according to the risk starting point and the risk end point of the risk area;
[0187] According to the multiple collision route points, multiple positioning points are determined on the obstacle avoidance path, and the multiple positioning points correspond to the multiple collision route points respectively;
[0188] Expanding multiple positioning points to obtain multiple expected points, the multiple expected points respectively correspond to multiple collision route points;
[0189] According to multiple expected points, local planning is performed on the risk area to obtain the obstacle avoidance route in the risk area.
[0190] Optionally, the generating module 1203 is specifically configured to: capture the collision area on the initial planned route according to the target three-dimensional route point, and determine a plurality of collision route points within the collision area;
[0191] The collision area is expanded to obtain the risk area, and the risk starting point and risk end point are determined according to the boundary points of the risk area.
[0192] Optionally, the generation module 1203 is specifically used to: project each collision route point onto the obstacle avoidance path according to the position of each collision route point in the risk area, and obtain a positioning point corresponding to each collision route point.
[0193] Optionally, the generating module 1203 is specifically used to: determine the direction from each positioning point corresponding to the collision route point to each positioning point as the extrapolated direction of each positioning point;
[0194] The multiple positioning points are extended by a preset distance along the extrapolation direction of the multiple positioning points to obtain multiple desired points.
[0195] Optionally, the planning module 1202 is specifically configured to: construct, according to the plurality of user points, a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of the three-dimensional space; an endpoint of each first initial three-dimensional polynomial curve is used to represent a user point;
[0196] Taking minimizing the integral of the square of the second-order derivative as the solution target and the state constraint of the user point as the solution constraint, the first initial cubic polynomial curve is modeled to obtain the first route mathematical model, wherein the position constraints of the user point include: the state constraint of the starting point, the state constraint of the end point, the position constraint of the waypoint, and the continuity constraint between the segmented curves;
[0197] Solving the mathematical model of the first route to obtain a plurality of first target cubic polynomial curves with known coefficients;
[0198] According to the sampling of multiple segments of the first target cubic polynomial curve, a plurality of initial three-dimensional route points are obtained, and an initial planned route is generated according to the plurality of initial three-dimensional route points.
[0199] Optionally, the generating module 1203 is specifically used to: construct multiple second initial cubic polynomial curves with unknown coefficients in three dimensions in segments according to the risk starting point, the risk end point and multiple expected points, wherein an endpoint of each second initial three-dimensional polynomial curve is used to represent the risk starting point, the risk end point or any expected point;
[0200] Taking minimizing the integral of the square of the second-order derivative as the first solution objective, minimizing the distance between the endpoint of the polynomial curve and the desired point as the second solution objective, and taking the state constraints of the risk starting point, the state constraints of the risk end point, and the continuity constraints between the segmented curves as solution constraints, each segment of the second initial cubic polynomial curve is modeled to obtain the second route mathematical model;
[0201] Solving multiple second route mathematical models to obtain multiple second target cubic polynomial curves;
[0202] According to multiple segments of the second target cubic polynomial curve, an obstacle avoidance route in the risk area is generated.
[0203] The present application also provides a computer device, Fig.13 A schematic diagram of a computer device structure provided in an embodiment of the present application includes: a processor 1301, a memory 1302, and optionally, a bus 1303. The memory 1302 stores machine-readable instructions executable by the processor 1301. When the computer device is running, the processor 1301 communicates with the memory 1302 through the bus 1303. When the machine-readable instructions are executed by the processor 1301, the steps of the above-mentioned UAV route planning method are executed.
[0204] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned route planning method for a drone are executed.
[0205] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0206] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0207] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A route planning method for an unmanned aerial vehicle, characterized in that: The method comprises: Obtaining a user point of the drone on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, wherein the occupied grid is a grid occupied by expanding a position of the obstacle on the three-dimensional grid map according to a preset minimum safety distance; According to the user point, in the three-dimensional space where the three-dimensional grid map is located, initial route planning is performed on the drone to generate an initial planned route; According to the occupied grids on the three-dimensional grid map, the initial planned route is adjusted to obtain a target planned route for the UAV in the three-dimensional space.
2. The method according to claim 1, characterized in that The adjusting the route of the initial planned route according to the occupied grid on the three-dimensional grid map to obtain the target planned route of the UAV in the three-dimensional space includes: According to the occupied grids on the three-dimensional grid map, collision detection is performed on the initial planned route to obtain a collision detection result; According to the collision detection result, the initial planned route is adjusted to obtain the target planned route.
3. The method according to claim 2, characterized in that The step of adjusting the initial planned route according to the collision detection result to obtain the target planned route includes: If the collision detection result indicates that the target three-dimensional route point on the initial planned route is within the occupancy grid, determining a risk area from the initial planned route; Performing local planning on the risk area to obtain an obstacle avoidance route for the risk area; According to the obstacle avoidance route in the risk area, the initial planned route is spliced to obtain the target planned route.
4. The method according to claim 2, characterized in that: The performing collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map to obtain a collision detection result includes: According to a preset collision detection step length, sparse processing is performed on a plurality of initial three-dimensional route points on the initial planned route to obtain a plurality of sparse three-dimensional route points, so that an interval between two adjacent sparse three-dimensional route points is the preset collision detection step length; According to the occupied grid on the three-dimensional grid map, collision detection is performed on each sparse three-dimensional route point to obtain the collision detection result.
5. The method according to claim 3, characterized in that: The locally planning the risk area to obtain an obstacle avoidance route for the risk area includes: Determine a risk starting point, a risk end point, and a plurality of collision route points of the risk area; The risk area is locally planned according to the risk starting point, the risk end point and the multiple collision route points to obtain an obstacle avoidance route in the risk area.
6. The method for planning a route for an unmanned aerial vehicle according to claim 5, characterized in that: The locally planning the risk area according to the risk starting point, the risk end point and the multiple collision route points to obtain the obstacle avoidance route of the risk area includes: According to the risk starting point and the risk end point of the risk area, obtaining an obstacle avoidance path from the risk starting point to the risk end point; Determine a plurality of positioning points on the obstacle avoidance path according to the plurality of collision route points, the plurality of positioning points respectively corresponding to the plurality of collision route points; Expanding the multiple positioning points to obtain multiple expected points, where the multiple expected points correspond to the multiple collision route points respectively; The risk area is locally planned according to the multiple expected points to obtain an obstacle avoidance route in the risk area.
7. The method for planning a route for an unmanned aerial vehicle according to claim 5, characterized in that: Determining the risk starting point, risk end point and multiple collision route points of the risk area includes: According to the target three-dimensional route point, capturing a collision area on the initial planned route, and determining the plurality of collision route points within the collision area; The collision area is expanded to obtain the risk area, and the risk starting point and the risk end point are determined according to the boundary points of the risk area.
8. The method for planning a route for an unmanned aerial vehicle according to claim 6, characterized in that: The step of determining a plurality of positioning points on the obstacle avoidance path according to the plurality of collision route points comprises: According to the position of each collision route point in the risk area, each collision route point is projected onto the obstacle avoidance path to obtain a positioning point corresponding to each collision route point.
9. The method for planning a route for an unmanned aerial vehicle according to claim 6, characterized in that: The step of expanding the plurality of positioning points to obtain a plurality of desired points includes: Determine the direction from each positioning point corresponding to the collision route point to each positioning point as the extrapolated direction of each positioning point; The multiple positioning points are extended by a preset distance along the extrapolation direction of the multiple positioning points to obtain the multiple desired points.
10. The method for planning a route for an unmanned aerial vehicle according to claim 1, characterized in that: The method of performing initial route planning for the UAV in the three-dimensional space where the three-dimensional grid map is located according to the user point to generate an initial planned route includes: According to the plurality of user points, a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of the three-dimensional space are respectively constructed; an endpoint of each first initial three-dimensional polynomial curve is used to represent a user point; The first initial cubic polynomial curve is modeled by minimizing the integral of the square of the second-order derivative as the solution target and the state constraint of the user point as the solution constraint to obtain a first route mathematical model, wherein the position constraint of the user point includes: the state constraint of the starting point, the state constraint of the end point, the position constraint of the waypoint, and the continuity constraint between the segmented curves; Solving the first route mathematical model to obtain a plurality of first target cubic polynomial curves with known coefficients; The multiple initial three-dimensional route points are obtained based on sampling of multiple segments of the first target cubic polynomial curve, and the initial planned route is generated based on the multiple initial three-dimensional route points.
11. The method for planning a route for an unmanned aerial vehicle according to claim 6, characterized in that: The locally planning the risk area according to the multiple expected points to obtain an obstacle avoidance route in the risk area includes: According to the risk starting point, the risk end point and the multiple expected points, a plurality of second initial cubic polynomial curves with unknown coefficients in the three dimensions are constructed in segments, wherein an endpoint of each second initial three-dimensional polynomial curve is used to characterize the risk starting point, the risk end point or any expected point; Taking minimizing the integral of the square of the second-order derivative as the first solution objective, minimizing the distance between the endpoint of the polynomial curve and the desired point as the second solution objective, and the state constraint of the risk starting point, the state constraint of the risk end point, and the continuity constraint between the segmented curves as solution constraints, each segment of the second initial cubic polynomial curve is modeled to obtain a second route mathematical model; Solving a plurality of mathematical models of the second routes to obtain a plurality of second target cubic polynomial curves; An obstacle avoidance route in the risk area is generated according to the multiple segments of the second target cubic polynomial curves.
12. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor executes the machine-readable instructions to perform the steps of the route planning method for a drone as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Method and equipment for avoiding obstacles
CN109990782A
Path planning method and device, unmanned vehicle and storage medium
CN116610118A
Unmanned aerial vehicle path planning method and device, and storage medium
CN117590845A
Route planning method of high-speed unmanned ship
CN118816898A
Unmanned aerial vehicle optimal path planning method based on complete expansion graph
CN119065384A