A route planning method of a drone and a computer device
By planning UAV flight paths on a 3D grid map and combining obstacle occupancy and collision detection, a target planned flight path is generated, which solves the problems of path collision and excessive calculation time in UAV flight path planning and improves flight safety and efficiency.
Patent Information
- Application Number
- CN202411924465.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing UAV route planning methods may cause path collisions when dealing with obstacle avoidance and smooth separation, and the solution time for long-distance route planning is too long, which cannot meet the real-time requirements.
By acquiring user points and obstacle-occupied grids on a 3D grid map, initial route planning is performed, and the route is adjusted based on collision detection results to generate a target planned route, including locally planned obstacle avoidance routes, optimizing route length and collision detection efficiency.
It greatly reduces computation time, improves the safety and efficiency of drone flight, ensures that waypoints do not occupy grid areas, avoids collisions, and enhances flight safety and real-time performance.
Smart Images

Figure CN119756374B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicles, in particular to a flight path planning method of an unmanned aerial vehicle and a computer device. BACKGROUND
[0002] With the rapid development of science and technology, unmanned aerial vehicle technology has been widely used in China, involving military, agriculture, aerial photography, logistics and other fields. The automatic flight capability of unmanned aerial vehicles is one of the core technologies, which enables unmanned aerial vehicles to complete flight tasks in complex environments without human intervention. However, in actual application, unmanned aerial vehicles often encounter various obstacles such as buildings and trees during flight, which limits the flight range and efficiency of unmanned aerial vehicles.
[0003] Currently, based on a global grid map, multiple obstacles in the flight process of an unmanned aerial vehicle are determined, a polyline obstacle-avoiding path of the unmanned aerial vehicle is determined by sampling, and the polyline obstacle-avoiding path of the unmanned aerial vehicle is smoothed to obtain a smooth obstacle-avoiding path of the unmanned aerial vehicle.
[0004] However, separate processing of obstacle avoidance and smoothing may cause the smooth obstacle-avoiding path to collide, and global smoothing of all polyline path points is a large-scale process. For long-distance flight path planning problems, the solution is time-consuming and takes a long time, which cannot meet the real-time requirements. SUMMARY
[0005] The present application aims to overcome the deficiencies in the prior art and provide a flight path planning method of an unmanned aerial vehicle and a computer device. The target planning flight path is obtained according to the obstacle-avoiding flight path of the collision risk area, thereby improving the safety of unmanned aerial vehicle flight.
[0006] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a flight path planning method of an unmanned aerial vehicle, which comprises:
[0008] obtaining a user point of the unmanned aerial vehicle on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, the occupied grid being a grid occupied after the position of the obstacle on the three-dimensional grid map is inflated according to a preset minimum safety distance;
[0009] performing initial flight path planning on the three-dimensional space where the three-dimensional grid map is located according to the user point, and generating an initial planning flight path;
[0010] adjusting the initial planning flight path according to the occupied grid on the three-dimensional grid map to obtain a target planning flight path of the unmanned aerial vehicle in the three-dimensional space.
[0011] Optionally, the route adjustment on the initial planned route according to the occupied grid on the three-dimensional grid map comprises:
[0012] The collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map comprises:
[0013] The route adjustment on the initial planned route according to the collision detection result comprises:
[0014] Optionally, the route adjustment on the initial planned route according to the collision detection result comprises:
[0015] If the collision detection result indicates that a target three-dimensional route point on the initial planned route is in the occupied grid, a risk region is determined from the initial planned route.
[0016] The risk region is locally planned to obtain an obstacle avoidance route of the risk region.
[0017] The route splicing on the initial planned route according to the obstacle avoidance route of the risk region comprises:
[0018] Optionally, the collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map comprises:
[0019] The initial planned route is sparsely processed 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.
[0020] The collision detection on each sparse three-dimensional route point according to the occupied grid on the three-dimensional grid map comprises:
[0021] Optionally, the local planning on the risk region comprises:
[0022] The risk start point, the risk end point and a plurality of collision route points of the risk region are determined.
[0023] The local planning on the risk region according to the risk start point, the risk end point and the plurality of collision route points comprises:
[0024] Optionally, the local planning of the risk region according to the risk start point, the risk end point and the plurality of collision route points comprises:
[0025] According to the risk start point and the risk end point of the risk region, a barrier-avoiding path from the risk start point to the risk end point is obtained;
[0026] According to the plurality of collision route points, a plurality of positioning points on the barrier-avoiding path are determined, and the plurality of positioning points correspond to the plurality of collision route points respectively;
[0027] The plurality of positioning points are expanded to obtain a plurality of expected points, and the plurality of expected points correspond to the plurality of collision route points respectively;
[0028] According to the plurality of expected points, the risk region is locally planned to obtain a barrier-avoiding route of the risk region.
[0029] Optionally, the determination of the risk start point, the risk end point and the plurality of collision route points of the risk region comprises:
[0030] According to the target three-dimensional route point, a collision region on the initial planning route is captured, and the plurality of collision route points in the collision region are determined;
[0031] The collision region is expanded to obtain the risk region, and the risk start point and the risk end point are determined according to the boundary points of the risk region.
[0032] Optionally, the determination of the plurality of positioning points on the barrier-avoiding path according to the plurality of collision route points comprises:
[0033] According to the positions of the collision route points in the risk region, the collision route points are projected onto the barrier-avoiding path to obtain the positioning points corresponding to the collision route points.
[0034] Optionally, the expansion of the plurality of positioning points to obtain a plurality of expected points comprises:
[0035] The direction from the collision route point corresponding to each positioning point to the each positioning point is determined as the extrapolation direction of the each positioning point;
[0036] The plurality of positioning points are expanded by a preset distance along the extrapolation directions of the plurality of positioning points to obtain the plurality of expected points.
[0037] Optionally, the initial route planning of the unmanned aerial vehicle in the three-dimensional space where the three-dimensional grid map is located according to the user point to generate an initial planning route comprises:
[0038] According to the plurality of user points, a plurality of first initial three-dimensional polynomial curves with unknown coefficients in three dimensions of the three-dimensional space are constructed respectively, and one end point of each first initial three-dimensional polynomial curve is used to represent one user point;
[0039] The first initial three-dimensional polynomial curves are modeled to obtain a first route mathematical model, with the objective of minimizing the integral of the square of the second derivative and the constraint of the state of the user points, wherein the position constraint of the user points comprises the state constraint of the start point, the state constraint of the end point, the position constraint of the way points, and the continuity constraint between the segment curves;
[0040] The first route mathematical model is solved to obtain a plurality of first target three-dimensional polynomial curves with known coefficients;
[0041] According to the plurality of first target three-dimensional polynomial curves, a plurality of initial three-dimensional route points are sampled, and the initial planning route is generated according to the plurality of initial three-dimensional route points.
[0042] Optionally, the risk area is locally planned according to the plurality of expected points to obtain an obstacle avoidance route of the risk area, comprising:
[0043] According to the risk start point, the risk end point, and the plurality of expected points, a plurality of second initial three-dimensional polynomial curves with unknown coefficients in three dimensions are constructed segmentally, and one end point of each second initial three-dimensional polynomial curve is used to represent the risk start point, the risk end point, or any expected point;
[0044] The second initial three-dimensional polynomial curves are modeled to obtain a second route mathematical model, with the first objective of minimizing the integral of the square of the second derivative and the second objective of minimizing the distance between the end point of the polynomial curve and the expected point, and the constraint of the state of the risk start point, the state of the risk end point, and the continuity between the segment curves;
[0045] The plurality of second route mathematical models are solved to obtain a plurality of second target three-dimensional polynomial curves;
[0046] According to the plurality of second target three-dimensional polynomial curves, the obstacle avoidance route of the risk area is generated.
[0047] In a second aspect, another embodiment of the present application provides a route planning device of a UAV, comprising:
[0048] The acquisition module is configured to acquire a user point of the UAV on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, the occupied grid being a grid occupied after a position of the obstacle on the three-dimensional grid map is inflated in advance according to a preset minimum safety distance.
[0049] The planning module is configured to perform initial route planning on the UAV in a three-dimensional space in which the three-dimensional grid map is located according to the user point, to generate an initial planned route.
[0050] The generating module is configured to perform route adjustment on the initial planned route according to the occupied grid on the three-dimensional grid map, to obtain a target planned route of the UAV in the three-dimensional space.
[0051] In a third aspect, another embodiment of the present application provides a computer device, including a processor, a storage medium, and a bus, the storage medium storing machine readable instructions executable by the processor, when the computer device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine readable instructions to perform the steps of the UAV route planning method according to any one of the first aspect.
[0052] In a fourth aspect, another embodiment of the present application provides a storage medium, the storage medium storing a computer program, when the computer program is run by a processor, the steps of the UAV route planning method according to any one of the first aspect are performed.
[0053] The present application has the following beneficial effects:
[0054] The present application provides a UAV route planning method and a computer device. In the embodiment of the present application, a user point of a UAV on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map are first acquired, the occupied grid being a grid occupied after a position of the obstacle on the three-dimensional grid map is inflated in advance according to a preset minimum safety distance, an initial route planning is performed on the UAV in a three-dimensional space in which the three-dimensional grid map is located according to the user point, to generate an initial planned route, and route adjustment is performed on the initial planned route according to the occupied grid on the three-dimensional grid map, to obtain a target planned route of the UAV in the three-dimensional space. The present application determines an initial planned route through a user point of a UAV and an occupied grid of an obstacle on a three-dimensional grid map, optimizes and reduces the length of a route actually participating in search and collision optimization according to the occupied grid, improves collision detection efficiency, reduces computation amount, greatly reduces computation time, obtains a target planned route of the UAV in a three-dimensional space, ensures that all three-dimensional route points on the target planned route are not in the occupied grid, and improves the safety of UAV flight. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those of ordinary skill in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0056] Figure 1 A flowchart of a route planning method of a UAV provided by an embodiment of the present application;
[0057] Figure 2 A flowchart of determining a target route in a route planning method of a UAV provided by an embodiment of the present application;
[0058] Figure 3 A flowchart of determining a target planning route in another route planning method of a UAV provided by an embodiment of the present application;
[0059] Figure 4 A flowchart of determining a collision detection result in a route planning method of a UAV provided by an embodiment of the present application;
[0060] Figure 5 A flowchart of determining an obstacle avoidance route in a route planning method of a UAV provided by an embodiment of the present application;
[0061] Figure 6 A flowchart of determining an obstacle avoidance route in another route planning method of a UAV provided by an embodiment of the present application;
[0062] Figure 7 A schematic diagram of determining an obstacle avoidance route provided by an embodiment of the present application;
[0063] Figure 8 A flowchart of determining a risk point in a route planning method of a UAV provided by an embodiment of the present application;
[0064] Figure 9 A flowchart of determining an expected point in a route planning method of a UAV provided by an embodiment of the present application;
[0065] Figure 10 A flowchart of determining an initial planning route in a route planning method of a UAV provided by an embodiment of the present application;
[0066] Figure 11 A flowchart of determining an obstacle avoidance route in still another route planning method of a UAV provided by an embodiment of the present application;
[0067] Figure 12A structural schematic diagram of a route planning device of a UAV provided by an embodiment of the present application is shown in the figure;
[0068] Figure 13 A structural schematic diagram of a computer device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0069] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application are only intended to illustrate and describe the present application, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content in the present application by those skilled in the art.
[0070] In addition, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different 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 claimed present application, but only represents 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 creative labor are within 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 presence of the features declared thereafter, but does not exclude the addition of other features.
[0072] To clearly describe the method of the embodiments of the present application, the route planning method of the UAV provided by the embodiments of the present application will be described as follows in connection with multiple drawings, Figure 1 A flowchart of a route planning method of a UAV provided by an embodiment of the present application is shown in the figure, as Figure 1 The method comprises the following steps:
[0073] In step 101, a user point of a UAV on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map are acquired.
[0074] The user point includes a start point and an end point. The start point is the start point of the flight of the unmanned aerial vehicle, and the end point is the end point of the flight of the unmanned aerial vehicle. The three-dimensional grid map is used to represent the data structure of the target three-dimensional space environment, and the target three-dimensional space is divided into a plurality of grids, each grid representing a specific area in the space. The three-dimensional grid map is a grid map of the flight range of the unmanned aerial vehicle. The occupied grid is a grid occupied after the position of an obstacle on the three-dimensional grid map is inflated according to a preset minimum safety distance. The preset minimum safety distance is determined according to the ratio of the obstacle to the unmanned aerial vehicle and the actual use scene. The obstacle can be a natural environment obstacle, a man-made environment obstacle, a dynamic environment obstacle, a technical obstacle, etc. The inflated obstacle can occupy a plurality of grids.
[0075] Optionally, the user point of the unmanned aerial vehicle on the three-dimensional grid map is obtained according to the flight planning of the unmanned aerial vehicle, and the occupied grid of the obstacle on the three-dimensional grid map of the target region is obtained according to the target region. The target region is a region in the flight planning of the unmanned aerial vehicle.
[0076] Step 102, according to the user point, an initial flight path of the unmanned aerial vehicle is planned in the three-dimensional space where the three-dimensional grid map is located, and an initial planning flight path from the start point to the end point is generated.
[0077] The initial planning flight path includes a plurality of initial three-dimensional flight path points. The initial planning flight path is a smooth line.
[0078] Optionally, according to the user point, that is, the start point and the end point of the unmanned aerial vehicle, a plurality of initial three-dimensional flight path points between the start point and the end point are determined in the three-dimensional space where the three-dimensional grid map is located, and an initial planning flight path from the start point to the end point is generated according to the plurality of initial three-dimensional flight path points. The plurality of initial three-dimensional flight path points between the start point and the end point can be determined by a sampling or searching algorithm, and the embodiments of the present application do not limit this.
[0079] Step 103, according to the occupied grid on the three-dimensional grid map, the initial planning flight path is adjusted to obtain a target planning flight path of the unmanned aerial vehicle in the three-dimensional space.
[0080] Optionally, according to the occupied grid, an initial flight path point on the initial planning flight path within the range of the occupied grid is determined, and the initial flight path point on the initial planning flight path within the range of the occupied grid is adjusted so that the initial flight path point on the initial planning flight path within the range of the occupied grid is outside the occupied grid, so as to obtain a target planning flight path of the unmanned aerial vehicle in the three-dimensional space according to the adjusted initial flight path point.
[0081] In the embodiment of the present application, firstly, the user point of the unmanned aerial vehicle on the three-dimensional grid map and the occupied grid of the obstacle on the three-dimensional grid map are acquired, the occupied grid is the grid occupied after the position of the obstacle on the three-dimensional grid map is inflated according to a preset minimum safety distance, the initial flight path of the unmanned aerial vehicle is planned in the three-dimensional space where the three-dimensional grid map is located according to the user point, the initial planned flight path is generated, the flight path adjustment is performed on the initial planned flight path according to the occupied grid on the three-dimensional grid map, and the target planned flight path of the unmanned aerial vehicle in the three-dimensional space is obtained. The user point of the unmanned aerial vehicle and the occupied grid of the obstacle on the three-dimensional grid map are used to determine the initial planned flight path, the length of the flight path actually participating in the search and collision optimization is reduced according to the occupied grid, the collision detection efficiency is improved, the calculation amount is reduced, the calculation time is greatly reduced, the target planned flight path of the unmanned aerial vehicle in the three-dimensional space is obtained, all three-dimensional flight path points on the target planned flight path are ensured to be not in the occupied grid, and the safety of the flight of the unmanned aerial vehicle is improved.
[0082] On the basis of the above-mentioned embodiment, the present application further provides a flow of determining a target flight path in a flight path planning method of an unmanned aerial vehicle, Figure 2 A flow diagram of determining a target flight path in a flight path planning method of an unmanned aerial vehicle provided in the embodiment of the present application is shown in Figure 2 As shown in the step 103, the flight path adjustment is performed on the initial planned flight path according to the occupied grid on the three-dimensional grid map, the target planned flight path of the unmanned aerial vehicle in the three-dimensional space is obtained, and the target planned flight path includes the following steps.
[0083] In step 201, the collision detection is performed on the initial planned flight path according to the occupied grid on the three-dimensional grid map, and the collision detection result is obtained.
[0084] Optionally, when the initial three-dimensional flight path point on the initial planned flight path is on the occupied grid, it indicates that the initial three-dimensional flight path point collides, therefore, whether each initial three-dimensional flight path point is on the occupied grid is judged according to the occupied grid on the three-dimensional grid map, so that the collision detection is performed on each initial three-dimensional flight path point, and the collision detection result is obtained.
[0085] In step 202, the flight path adjustment is performed on the initial planned flight path according to the collision detection result, and the target planned flight path is obtained.
[0086] Optionally, if the collision detection result indicates that the initial flight path point in each initial three-dimensional flight path point is in the occupied grid, it indicates that each initial three-dimensional flight path point has a collision risk, therefore, the initial planned flight path point needs to be adjusted according to the occupied grid where each initial three-dimensional flight path point is located, so that each initial three-dimensional flight path point is not in the occupied grid, and the target planned flight path is determined according to the adjusted each initial three-dimensional flight path point.
[0087] According to the occupied grid on the three-dimensional grid map, the application embodiment detects collision of the initial planning route to obtain a collision detection result, adjusts the initial planning route to obtain a target planning route. It can be ensured that the route points in the target planning route are not on the occupied grid, thereby ensuring the safety of the unmanned aerial vehicle flight.
[0088] On the basis of the above-mentioned embodiment, the application embodiment further provides another process for determining a target planning route in a route planning method of an unmanned aerial vehicle, Figure 3 The flowchart for determining a target planning route in another route planning method of an unmanned aerial vehicle provided by the application embodiment is shown in FIG. 2, which comprises the following steps. Figure 3 As shown in the above-mentioned step 202, the initial planning route is adjusted according to the collision detection result to obtain a target planning route, which comprises the following steps.
[0089] Step 301: If the collision detection result indicates that the target three-dimensional route point on the initial planning route is in the occupied grid, a risk area is determined from the initial planning route.
[0090] The risk area is an area in which the unmanned aerial vehicle may collide during flight, and the risk area may include an obstacle.
[0091] Optionally, if the collision detection result indicates that the target three-dimensional route point on the initial planning route is in the occupied grid, it indicates that the initial planning route has a collision risk, and then the area of the expanded obstacle is determined according to the obstacle corresponding to the occupied grid in which the target three-dimensional route point is located, and the risk area is determined according to the area of the expanded obstacle.
[0092] Step 302: The risk area is locally planned to obtain an obstacle avoidance route of the risk area.
[0093] The obstacle avoidance route is a smooth curve, and the plurality of three-dimensional route points on the obstacle avoidance route are not in the risk area.
[0094] Optionally, the risk area is locally planned according to the plurality of collision route points to obtain a smooth obstacle avoidance route of the risk area, so that the plurality of three-dimensional route points on the obstacle avoidance route are not in the risk area.
[0095] Step 303: The initial planning route is spliced according to the obstacle avoidance route of the risk area to obtain a target planning route.
[0096] Optionally, according to the start point and the end point of the obstacle-avoiding flight path of the collision risk region, a point on the initial planned flight path corresponding to the start point and the end point of the obstacle-avoiding flight path is determined, and a plurality of initial three-dimensional flight path points in the point on the initial planned flight path corresponding to the start point and the end point of the obstacle-avoiding flight path are replaced by a plurality of three-dimensional flight path points on the obstacle-avoiding flight path of the collision risk region, so as to obtain the target planned flight path of the unmanned aerial vehicle in the three-dimensional space.
[0097] In the embodiment of the application, according to the target three-dimensional flight path point in the initial flight path in the occupied grid, the risk region is determined from the initial planned flight path, the risk region is locally planned to obtain the obstacle-avoiding flight path, and the target planned flight path is determined according to the obstacle-avoiding flight path. The application can plan the obstacle-avoiding flight path in advance to optimize the flight efficiency of the unmanned aerial vehicle, and maintain the continuity of the flight path without changing the overall direction of the initial flight path.
[0098] On the basis of the above-mentioned embodiments, the application further provides a process for determining a collision detection result in a flight path planning method of an unmanned aerial vehicle, Figure 4 A flowchart for determining a collision detection result in a flight path planning method of an unmanned aerial vehicle provided in the embodiment of the application is shown in Figure 4 According to the occupied grid on the three-dimensional grid map, the initial planned flight path is subjected to collision detection in step 201, and the collision detection result is obtained, including:
[0099] Step 401: According to a preset collision detection step, a plurality of initial three-dimensional flight path points are subjected to sparse processing to obtain a plurality of sparse three-dimensional flight path points, so that the interval between two adjacent sparse three-dimensional flight path points is the preset collision detection step.
[0100] According to the preset minimum safety distance, the preset collision detection step is determined. The preset minimum safety distance is a parameter for ensuring that the unmanned aerial vehicle and the obstacle maintain a safety distance. The size of the unmanned aerial vehicle can be determined, or the type of the obstacle can be determined, and the embodiment of the application does not limit this.
[0101] Optionally, if multiple initial three-dimensional route points are processed simultaneously, the processing efficiency is low. Therefore, a preset collision detection step length is set, so that multiple initial three-dimensional route points between lines connecting initial three-dimensional route points at both ends of the preset collision detection step length are not in the occupied grid. When the initial three-dimensional route points at both ends of the preset collision detection step length are not in the occupied grid, the state of the multiple initial three-dimensional route points between the lines connecting the initial three-dimensional route points at both ends of the preset collision detection step length can be determined by detecting only the initial three-dimensional route points at both ends of the preset collision detection step length. Therefore, 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 step 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. The preset collision detection step length refers to a step length at which the unmanned aerial vehicle is checked at intervals on the initial planned route to ensure that the unmanned aerial vehicle does not collide with obstacles during movement.
[0102] Step 402, performing collision detection on each sparse three-dimensional route point according to the occupied grid on the three-dimensional grid map, to obtain the collision detection result.
[0103] Optionally, when there is a sparse three-dimensional route point on the occupied grid, it indicates that the sparse three-dimensional route point is inflated. Therefore, whether each sparse three-dimensional route point is on the occupied grid is judged according to the occupied grid on the three-dimensional grid map, so as to perform collision detection on each sparse three-dimensional route point to obtain the collision detection result.
[0104] In the embodiments of the present application, the multiple initial three-dimensional route points on the initial planned route are sparsely processed according to the preset collision detection step length to obtain multiple sparse three-dimensional route points. Collision detection is performed on each sparse three-dimensional route point according to the occupied grid on the three-dimensional grid map to obtain the collision detection result. The present application can reduce the amount of calculation by sparsely processing the initial three-dimensional route points, thereby improving the speed of collision detection and quickly obtaining the collision detection result.
[0105] On the basis of the above-mentioned embodiments, the present application further provides a process for determining an obstacle avoidance route in a route planning method of an unmanned aerial vehicle, Figure 5 A process diagram for determining an obstacle avoidance route in a route planning method of an unmanned aerial vehicle provided by the embodiments of the present application is shown in Figure 5 The risk area is locally planned in step 302 to obtain an obstacle avoidance route of the risk area, which includes:
[0106] Step 501, determining a risk starting point, a risk ending point, and multiple collision route points of the risk area.
[0107] The collision route points are a plurality of three-dimensional initial route points on the initial planned route in the region where the expanded obstacle is located. The boundary points of the risk region are respectively taken as a risk start point and a risk end point.
[0108] Optionally, the boundary points of the risk region are respectively taken as a risk start point and a risk end point, and a plurality of initial three-dimensional route points on the initial planned route in the risk region are determined as the collision route points according to the risk region.
[0109] Step 502: locally planning the risk region according to the risk start point, the risk end point, and the plurality of collision route points to obtain an obstacle avoidance route of the risk region.
[0110] The risk region includes the region where the expanded obstacle is located. Optionally, the obstacle avoidance route is generated according to the obstacle avoidance path determined by a search algorithm or a sampling algorithm according to the risk start point and the risk end point.
[0111] In the embodiments of the present application, the obstacle avoidance path from the risk start point to the risk end point is obtained according to the risk start point, the risk end point, and the collision route points of the risk region, and the obstacle avoidance route is determined, so that the obtained obstacle avoidance route is more reliable and collision with the obstacle is avoided, thereby improving the safety of the overall flight.
[0112] On the basis of the above-mentioned embodiments, the present application further provides a flow of determining an obstacle avoidance route in a route planning method of a UAV, Figure 6 Another flow of determining an obstacle avoidance route in a route planning method of a UAV provided in the embodiments of the present application is shown in FIG. 6. Figure 6 The risk start point, the risk end point, and the plurality of collision route points of the risk region in the above-mentioned step 501 include:
[0113] Step 601: obtaining an obstacle avoidance path from a risk start point to a risk end point according to the risk start point and the risk end point of the risk region.
[0114] Optionally, the obstacle avoidance path from the risk start point to the risk end point is determined by a search algorithm or a sampling algorithm according to the risk start point and the risk end point of the risk region. The risk region includes the region where the expanded obstacle is located.
[0115] For example, Figure 7 A schematic diagram of determining an obstacle avoidance route provided in the embodiments of the present application is shown in FIG. 6. Figure 7 The 2nd line in the figure is an obstacle avoidance path, and the obstacle avoidance path is determined by a search algorithm or a sampling algorithm according to the risk start point and the risk end point.
[0116] Step 602, determining a plurality of positioning points on the obstacle-avoiding path according to the plurality of collision course points.
[0117] The plurality of positioning points respectively correspond to the plurality of collision course points.
[0118] The collision course points are a plurality of three-dimensional initial course points on the initial planned course in a region occupied by the expanded obstacle. The number of positioning points is the same as the number of collision course points.
[0119] For example, continuing to combine Figure 7 For example, the first line is the initial planned course, and the plurality of first points are the collision course points. According to the positions of the plurality of first points relative to the risk start point and the risk end point, the positions of the plurality of positioning points on the second obstacle-avoiding heading are determined. The positioning points are the second points.
[0120] Step 603, expanding the plurality of positioning points to obtain a plurality of expected points, the plurality of expected points respectively corresponding to the plurality of collision course points.
[0121] The number of collision course points, positioning points, and expected points are the same. The expected points are the course points of the expected unmanned aerial vehicle in the risk region.
[0122] Optionally, the plurality of positioning points are expanded according to the plurality of collision course points to obtain a plurality of expected points, the plurality of expected points respectively corresponding to the plurality of collision course points.
[0123] For example, continuing to combine Figure 7 For example, the third points are the expected points.
[0124] Step 604, locally planning the risk region according to the plurality of expected points to obtain an obstacle-avoiding course of the risk region.
[0125] Optionally, the risk region is locally planned according to the plurality of expected points, the risk start point, and the risk end point. A connection line passing through the plurality of expected points, the risk start point, and the risk end point in the risk region is generated. The obstacle-avoiding course in the risk region passing through the connection line of the plurality of expected points, the risk start point, and the risk end point is optimized, so that any three-dimensional point in the connection line is not on the occupancy grid, thereby generating the obstacle-avoiding course.
[0126] For example, continuing to combine Figure 7 For example, the third line is the obstacle-avoiding course, the start point of the obstacle-avoiding course is the risk start point, and the end point of the obstacle-avoiding course is the risk end point.
[0127] In the embodiment of the present application, the obstacle-avoiding path is obtained from the risk starting point to the risk ending point according to the risk starting point and the risk ending point of the risk area, and the positioning point on the obstacle-avoiding path is determined, so as to obtain the expected point. The obstacle-avoiding flight path is determined according to the expected point, so that the obtained obstacle-avoiding flight path is more reliable and collision with obstacles is avoided, thereby improving the safety of the overall flight.
[0128] On the basis of the above-mentioned embodiment, the present application further provides a flow of determining a risk point in a flight path planning method of a UAV, Figure 8 A flow of determining a risk point in a flight path planning method of a UAV provided in the embodiment of the present application is shown in FIG. 5, which comprises the following steps. Figure 8 As shown in the step 501, the risk starting point, the risk ending point and the plurality of collision flight path points of the risk area are determined, and the method comprises the following steps.
[0129] Step 801, according to the target three-dimensional flight path point, the collision area is captured on the initial planned flight path, and a plurality of collision flight path points in the collision area are determined.
[0130] The target three-dimensional flight path point is a point in the occupancy grid. The collision area is the region where the occupancy grid of the expanded obstacle is located.
[0131] Optionally, according to the target three-dimensional flight path point, the obstacle corresponding to the occupancy grid of the target three-dimensional flight path point is determined, and the region corresponding to the obstacle after expansion is determined as the collision area. According to the collision area and the initial flight path planning point, a plurality of initial three-dimensional flight path points in the collision area are determined as a plurality of collision flight path points.
[0132] Step 802, the collision area is expanded to obtain a risk area, and the risk starting point and the risk ending point are determined according to the boundary points of the risk area.
[0133] The collision area can be expanded according to a predefined rule to ensure that the risk area obtained after expansion does not include the collision area corresponding to another obstacle. By expanding the collision area, the excessive large turning curvature in the subsequent flight process of the UAV can be avoided. The predefined rule can be an inflation algorithm, a minimum distance algorithm or realized through a neural network model, and the embodiment of the present application does not limit this.
[0134] Optionally, the collision area is expanded according to a predefined rule to obtain a risk area, and the boundary points of the risk area are determined as the risk starting point and the risk ending point, respectively.
[0135] In the embodiment of the present application, according to the target three-dimensional route point, the collision region is captured on the initial planned route, and a plurality of collision route points in the collision region are determined; the collision region is expanded to obtain a risk region, a risk starting point and a risk ending point are determined, and by accurately identifying the collision region and the risk region, the route can be more effectively optimized, the sharp turning curvature in the subsequent flight process of the unmanned aerial vehicle is avoided, and the safety of the flight of the unmanned aerial vehicle is improved.
[0136] On the basis of the above-mentioned embodiment, the present application further provides a flow of determining a positioning point in a route planning method of an unmanned aerial vehicle, and the plurality of positioning points are determined from the obstacle-avoiding path according to the plurality of collision route points in the step 602, comprising:
[0137] According to the positions of the collision route points in the risk region, the collision route points are projected onto the obstacle-avoiding path to obtain the corresponding positioning points of the collision route points.
[0138] Alternatively, according to the proportional relationship of the distances between the collision route points in the risk region, the proportional relationship of the distances between the positioning points and the risk starting point on the obstacle-avoiding path is determined according to the proportional relationship of the distances between the collision route points and the risk starting point in the risk region, so as to project the collision route points onto the obstacle-avoiding path to obtain the corresponding positioning points of the collision route points.
[0139] For example, when the proportional relationship of the distances between the collision route points and the risk starting point in the risk region is 0.2:0.3:0.5, the proportional relationship of the distances between the corresponding positioning points and the risk starting point on the obstacle-avoiding path is also 0.2:0.3:0.5.
[0140] In the embodiment of the present application, according to the positions of the collision route points in the risk region, the collision route points are projected onto the obstacle-avoiding path to obtain the corresponding positioning points of the collision route points. It can be ensured that the route of the unmanned aerial vehicle is more clear, the unmanned aerial vehicle can maintain a safe distance when avoiding obstacles, and the risk of collision is reduced.
[0141] On the basis of the above-mentioned embodiment, the present application further provides a flow of determining a desired point in a route planning method of an unmanned aerial vehicle, Figure 9 A flowchart of a flow of determining a desired point in a route planning method of an unmanned aerial vehicle provided in the embodiment of the present application is shown in FIG. 6. Figure 9 As shown in the step 603, the plurality of positioning points are expanded to obtain a plurality of desired points, comprising:
[0142] In step 901, the direction from the corresponding collision route point to each positioning point of each positioning point is the extrapolation direction of each positioning point.
[0143] Optionally, each positioning point is connected with a collision route point, and the collision route point points to the defense line of the positioning point, that is, the extrapolation direction of the corresponding positioning point.
[0144] Step 902, expanding each positioning point by a preset distance along the extrapolation direction of the positioning point to obtain a plurality of expected points.
[0145] Wherein, the expansion preset distance of each positioning point is the same, and the expansion preset distance is determined according to the distance between the expanded obstacles, and it is necessary to ensure that the expected point obtained by extrapolating the positioning point is not in the grid range corresponding to another expanded obstacle.
[0146] For example, continue to combine the above-mentioned Figure 7 It can be seen that, by connecting the collision route point 1 with the positioning point 2, the direction of the collision route point 1 pointing to the positioning point 2 is the extrapolation direction, and the expansion preset distance is the extrapolation distance, and the positioning point 2 is extrapolated by the expansion preset distance and the extrapolation direction to obtain the expected point 3.
[0147] On the basis of the above-mentioned embodiment, the direction from each collision route point to each positioning point is the extrapolation direction of each positioning point, and the positioning point is extrapolated according to the expansion preset distance to obtain the plurality of expected points, so that the obtained obstacle avoidance route is more suitable for the actual scene, unnecessary zigzag and detour are reduced, and flight efficiency is improved.
[0148] On the basis of the above-mentioned embodiment, the present application also provides a process for determining an initial planning route in a route planning method of a UAV, Figure 10 A process diagram for determining an initial planning route in a route planning method of a UAV provided by the present application embodiment is shown in the following Figure 10 As shown in the above-mentioned step 102, according to the user points, an initial route of the UAV is planned in the three-dimensional space where the three-dimensional grid map is located, and an initial planning route from the starting point to the ending point is generated, including:
[0149] Step 1001, according to a plurality of user points, a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of a three-dimensional space are respectively constructed.
[0150] Wherein, the plurality of user points include the starting point, the ending point and the passing point, the passing point can be determined according to the flight task of the UAV or selected artificially, and the present application embodiment does not limit this, and the passing point is not on the occupied grid.
[0151] Optionally, according to any two consecutive user points in the plurality of user points, a plurality of first initial cubic polynomial curves are constructed, and one end point of each first initial three-dimensional polynomial curve is used to represent one user point.
[0152] For example, the present application illustrates the first initial cubic polynomial curve in the horizontal dimension, and constructs the first initial cubic polynomial curve x = at 3 + bt 2 + ct + d in the horizontal dimension of the three-dimensional space according to the user point.
[0153] Step 1002, modeling the first initial cubic polynomial curve with the state constraint of the user point as the solving constraint and the integral of the square of the second derivative as the solving target, to obtain the first route mathematical model.
[0154] The position constraint of the user point includes the state constraint of the starting point, the state constraint of the ending point, the position constraint of the passing point, and the continuity constraint between the segmented curves. The state of the user point is the position, speed, acceleration, and speed limit of the user point related state information constraint. The state constraint of the starting point is the position, speed, acceleration, and speed limit of the user point related state information constraint. The state constraint of the ending point is the position, speed, acceleration, and speed limit of the user point related state information constraint. The position constraint of the passing point is used to constrain the position of the connection of the first initial cubic polynomial curves at both ends of the passing point. The continuity constraint between the segmented curves is used to constrain the speed and acceleration at the connection of the first initial cubic polynomial curves at both ends of the passing point. The integral of the square of the second derivative is used to ensure the smoothness of the first target cubic polynomial curve obtained. The second derivative is related to the curvature of the first target cubic polynomial curve. The greater the second derivative, the higher the degree of curve bending. The smaller the second derivative, the lower the degree of curve bending. The integral of the square of the second derivative is used to accumulate the square of the second derivative over the entire curve length, and is used to smooth the entire first target cubic polynomial curve. Minimizing the integral of the square of the second derivative means that the integral of the square of the second derivative of the first target cubic polynomial curve over the entire domain is as small as possible, which ensures that the first target cubic polynomial curve is smoother.
[0155] Optionally, the integral of the square of the second derivative is minimized as the solving target to ensure the smoothness of the multi-segment first target cubic polynomial curve obtained, the state constraint of the user point is the solving 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 multi-segment first target cubic polynomial curve, so that the multi-segment first target cubic polynomial curve is both smooth and satisfies the state of the user point.
[0156] Step 1003, solving the first route mathematical model to obtain the multi-segment first target cubic polynomial curve with known coefficients.
[0157] Optionally, the first route mathematical model is solved according to a preset optimization algorithm, a solution target and a solution constraint, to obtain a plurality of first target cubic polynomial curves with known coefficients. The preset optimization algorithm can be an algorithm, an interior point algorithm, a gradient descent algorithm, etc., which is not limited in the embodiments of the present application.
[0158] In step 1004, a plurality of initial three-dimensional route points are obtained by sampling the plurality of first target cubic polynomial curves, and an initial planning route is generated according to the plurality of initial three-dimensional route points.
[0159] Optionally, the plurality of first target cubic polynomial curves in three dimensions are sampled multiple times to obtain a plurality of values in three dimensions, respectively, and a plurality of initial three-dimensional route points are determined according to the plurality of values in three dimensions, and the initial planning route is generated by connecting the plurality of initial three-dimensional route points.
[0160] In the embodiments of the present application, the user points also include way points, and 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 constructed, respectively, and the first target cubic polynomial curves are generated according to the solution conditions and the constraint conditions, so as to obtain the initial planning route and ensure that they pass through or are close to the predetermined way points, which can guarantee that the route meets specific path requirements, can optimize the performance of the route, reduce unnecessary acceleration and deceleration, and improve energy efficiency.
[0161] On the basis of the above-mentioned embodiments, the present application further provides a process for determining an obstacle avoidance route in a route planning method of a UAV, Figure 11 Another process for determining an obstacle avoidance route in a route planning method of a UAV provided in the embodiments of the present application is shown in FIG. 11, which comprises the following steps. Figure 11 In step 604, the risk area is locally planned according to the plurality of expected points to obtain an obstacle avoidance route of the risk area, which comprises the following steps.
[0162] In step 1101, a plurality of second initial cubic polynomial curves with unknown coefficients in three dimensions are constructed according to the risk start point, the risk end point and the plurality of expected points, and one end point of each second initial three-dimensional polynomial curve is used to represent the risk start point, the risk end point or any expected point.
[0163] The second initial cubic polynomial is an initial cubic polynomial corresponding to the obstacle avoidance route of the UAV in the risk area.
[0164] Optionally, a plurality of second initial cubic polynomial curves with unknown coefficients in three dimensions are constructed according to two consecutive points in the risk start point, the risk end point and the plurality of expected points.
[0165] In step 1102, a second initial cubic polynomial curve is modeled for each segment, with a first solving target of minimizing the integral of the square of the second derivative, a second solving target of minimizing the distance between the end points of the polynomial curve and the expected points, state constraints of the risk start point, state constraints of the risk end point, and continuity constraints between the segmented curves as solving constraints, to obtain a second flight path mathematical model.
[0166] The state constraints of the risk start point are the position, speed, acceleration, and speed limit of the user point related state information constraints of the start point, the state constraints of the risk end point are the position, speed, acceleration, and speed limit of the user point related state information constraints of the end point, and the continuity constraints between the segmented curves are used to constrain the speed and acceleration at the connection between the first initial cubic polynomial curves at both ends of the passing point.
[0167] In step 1103, the second flight path mathematical model is solved to obtain a second target cubic polynomial curve of multiple segments.
[0168] Optionally, the second flight path mathematical model is solved according to the solving target and the solving constraints by using a preset optimization algorithm, to obtain a second target cubic polynomial curve of multiple segments with known coefficients. The preset optimization algorithm can be an algorithm, an interior point algorithm, a gradient descent algorithm, and the like, which is not limited in the embodiments of the present application.
[0169] In step 1104, an obstacle avoidance flight path of the risk area is generated according to the second target cubic polynomial curve of multiple segments.
[0170] Optionally, the second target cubic polynomial curve of multiple segments in three dimensions is sampled multiple times to obtain multiple values of three dimensions, respectively, and a plurality of three-dimensional flight path points are determined according to the multiple values of three dimensions, and the obstacle avoidance flight path is generated by connecting the plurality of three-dimensional flight path points.
[0171] In the embodiments of the present application, the second initial cubic polynomial curve of multiple segments with unknown coefficients in three dimensions is constructed segmentally according to the risk start point, the risk end point, and the plurality of expected points, the second target cubic polynomial curve of multiple segments is determined by solving conditions and constraint conditions, and the obstacle avoidance flight path of the risk area is generated according to the second target cubic polynomial curve of multiple segments. The present application can improve the smoothness of the obstacle avoidance flight path, so that the obstacle avoidance flight path does not suddenly turn or jump when connecting the expected points, thereby improving the stability of flight.
[0172] Based on the same inventive concept, the embodiments of the present application also provide a flight path planning device of a UAV corresponding to the flight path planning method of the UAV. Since the device in the embodiments of the present application solves the problem by a similar principle to the flight path planning method of the UAV described above, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described herein.
[0173] Figure 12 A structural schematic diagram of a route planning device of a UAV is provided for an embodiment of the present application. The device comprises:
[0174] The acquisition module 1201 is configured to acquire a user point of the UAV on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, the occupied grid being a grid occupied after the position of the obstacle on the three-dimensional grid map is inflated according to a preset minimum safety distance.
[0175] The planning module 1202 is configured to perform initial route planning on the UAV in a three-dimensional space in which the three-dimensional grid map is located according to the user point, to generate an initial planned route.
[0176] The generation module 1203 is configured to perform route adjustment on the initial planned route according to the occupied grid on the three-dimensional grid map, to obtain a target planned route of the UAV in the three-dimensional space.
[0177] Optionally, the generation module 1203 is specifically configured to perform collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map, to obtain a collision detection result.
[0178] The initial planned route is adjusted according to the collision detection result, to obtain the target planned route.
[0179] Optionally, the generation module 1203 is specifically configured to determine a risk area from the initial planned route if the target three-dimensional route point on the initial planned route is in the occupied grid according to the collision detection result.
[0180] The risk area is locally planned to obtain an obstacle avoidance route of the risk area.
[0181] The initial planned route is spliced according to the obstacle avoidance route of the risk area, to obtain the target planned route.
[0182] Optionally, the generation module 1203 is specifically configured 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] The collision detection is performed on each sparse three-dimensional route point according to the occupied grid on the three-dimensional grid map, to obtain the collision detection result.
[0184] Optionally, the generation module 1203 is specifically configured to determine a risk start point, a risk end point, and a plurality of collision route points of the risk area.
[0185] The risk area is locally planned according to the risk start point, the risk end point, and the plurality of collision route points, to obtain the obstacle avoidance route of the risk area.
[0186] Optionally, the generating module 1203 is specifically configured to: according to the risk starting point and the risk ending point of the risk region, obtain an obstacle-avoiding path from the risk starting point to the risk ending point;
[0187] According to the plurality of collision route points, a plurality of positioning points are determined on the obstacle-avoiding path, and the plurality of positioning points respectively correspond to the plurality of collision route points;
[0188] The plurality of positioning points are expanded to obtain a plurality of expected points, and the plurality of expected points respectively correspond to the plurality of collision route points;
[0189] According to the plurality of expected points, the risk region is locally planned to obtain an obstacle-avoiding route of the risk region.
[0190] Optionally, the generating module 1203 is specifically configured to: according to the target three-dimensional route point, capture a collision region on the initial planning route, and determine a plurality of collision route points in the collision region;
[0191] The collision region is expanded to obtain a risk region, and the risk starting point and the risk ending point are determined according to the boundary points of the risk region.
[0192] Optionally, the generating module 1203 is specifically configured to: according to the positions of the collision route points in the risk region, project the collision route points onto the obstacle-avoiding path to obtain the positioning points corresponding to the collision route points.
[0193] Optionally, the generating module 1203 is specifically configured to: determine that the direction from the collision route point corresponding to each positioning point to each positioning point is the extrapolation direction of each positioning point;
[0194] The plurality of positioning points are expanded by a preset distance along the extrapolation directions of the plurality of positioning points to obtain a plurality of expected points.
[0195] Optionally, the planning module 1202 is specifically configured to: according to the plurality of user points, construct a plurality of first initial cubic polynomial curves with unknown coefficients in three dimensions of a three-dimensional space; and one end point of each first initial three-dimensional polynomial curve is used to represent one user point.
[0196] The first initial cubic polynomial curve is modeled to obtain a first route mathematical model, with the minimization of the integral of the square of the second derivative as a solving target and the state constraint of the user point as a solving constraint, wherein the position constraint of the user point includes: the state constraint of the starting point, the state constraint of the ending point, the position constraint of the way point, and the continuity constraint between the segmented curves.
[0197] The first route mathematical model is solved to obtain a plurality of first target cubic polynomial curves with known coefficients;
[0198] According to sampling of the plurality of first target cubic polynomial curves, a plurality of initial three-dimensional route points are obtained, and an initial planning route is generated according to the plurality of initial three-dimensional route points.
[0199] Optionally, the generating module 1203 is specifically configured to: according to the risk starting point, the risk ending point and the plurality of expected points, segmentally construct a plurality of second initial cubic polynomial curves with unknown coefficients in three dimensions, one end point of each second initial three-dimensional polynomial curve being used to represent the risk starting point, the risk ending point or any expected point.
[0200] The second route mathematical model is obtained by modeling each second initial cubic polynomial curve, with minimization of the integral of the square of the second derivative as a first solving target, minimization of the distance between the end point of the polynomial curve and the expected point as a second solving target, the state constraint of the risk starting point, the state constraint of the risk ending point and the continuity constraint between the segmented curves as solving constraints.
[0201] The plurality of second route mathematical models are solved to obtain a plurality of second target cubic polynomial curves.
[0202] According to the plurality of second target cubic polynomial curves, an obstacle avoidance route of the risk region is generated.
[0203] The embodiment of the present application further provides a computer device, Figure 13 A computer device structure schematic diagram provided by the embodiment of the present application comprises 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 runs, the processor 1301 and the memory 1302 communicate through the bus 1303, and the machine readable instructions are executed by the processor 1301 to execute the steps of the route planning method of the unmanned aerial vehicle.
[0204] The embodiment of the present application further provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the route planning method of the unmanned aerial vehicle.
[0205] Those skilled in the art can clearly understand the specific working process of the system and the device described above for the convenience and brevity of description, which can refer to the corresponding process in the method embodiment, and will not be repeated in the present application. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and the actual implementation can have another division, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some communication interface, device or module, which can be electrical, mechanical or other forms.
[0206] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. When the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or say the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products, which are stored in a storage medium and include a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and various program code storage media.
[0207] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for route planning of a UAV, the method comprising: The method comprises: acquiring a user point of a UAV on a three-dimensional grid map and an occupied grid of an obstacle on the three-dimensional grid map, the occupied grid being a grid occupied by the obstacle after the position of the obstacle on the three-dimensional grid map is inflated according to a preset minimum safety distance; performing initial route planning on the UAV in a three-dimensional space in which the three-dimensional grid map is located according to the user point to generate an initial planned route; 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; if the collision detection result indicates that a target three-dimensional route point on the initial planned route is in the occupied grid, determining a risk region from the initial planned route; determining a risk start point, a risk end point and a plurality of collision route points of the risk region; acquiring a barrier-avoiding path from the risk start point to the risk end point according to the risk start point and the risk end point of the risk region; determining a plurality of positioning points from the barrier-avoiding path according to the plurality of collision route points, the plurality of positioning points corresponding to the plurality of collision route points respectively; extending the plurality of positioning points to obtain a plurality of expected points, the plurality of expected points corresponding to the plurality of collision route points respectively; performing local planning on the risk region according to the plurality of expected points to obtain an obstacle-avoiding route of the risk region; performing route splicing on the initial planned route according to the obstacle-avoiding route of the risk region to obtain a target planned route.
2. The method of claim 1, wherein, The collision detection on the initial planned route according to the occupied grid on the three-dimensional grid map to obtain a collision detection result comprises: performing 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; performing collision detection on each sparse three-dimensional route point according to the occupied grid on the three-dimensional grid map to obtain the collision detection result. 3.The method of claim 1, wherein, The determination of the risk start point, the risk end point and the plurality of collision route points of the risk region comprises: capturing a collision region on the initial planned route according to the target three-dimensional route point and determining the plurality of collision route points in the collision region; expanding the collision region to obtain the risk region and determining the risk start point and the risk end point according to the boundary points of the risk region. 4.The method of claim 1, wherein, The determination of the plurality of positioning points from the barrier-avoiding path according to the plurality of collision route points comprises: projecting each collision route point onto the barrier-avoiding path according to the position of the collision route point in the risk region to obtain a positioning point corresponding to the collision route point. 5.The method of claim 1, wherein, The extension of the plurality of positioning points to obtain a plurality of expected points comprises: determining the extrapolation direction of each positioning point as the direction from the collision route point corresponding to the positioning point to the positioning point; extending the plurality of positioning points by a preset distance along the extrapolation direction of the plurality of positioning points to obtain the plurality of expected points. 6.The method of claim 1, wherein, The initial route planning is performed on the unmanned aerial vehicle according to the user points in the three-dimensional space where the three-dimensional grid map is located, and an initial planned route is generated, including: According to the user points, a plurality of first initial three-degree polynomial curves with unknown coefficients in three dimensions are constructed respectively; and one end point of each first initial three-degree polynomial curve is used to represent a user point. The first initial three-degree polynomial curves are modeled by taking the integral of the square of the second derivative as the solving target and the state constraints of the user points as the solving constraints, to obtain a first route mathematical model, wherein the position constraints of the user points include the state constraints of the start point and the end point, the position constraints of the way points, and the continuity constraints between the segmented curves. The first route mathematical model is solved to obtain a plurality of first target three-degree polynomial curves with known coefficients. The initial three-dimensional route points are obtained by sampling the first target three-degree polynomial curves, and the initial planned route is generated according to the initial three-dimensional route points. 7.The method of claim 1, wherein, The risk area is locally planned according to the plurality of expected points to obtain an obstacle avoidance route of the risk area, including: According to the risk start point, the risk end point, and the plurality of expected points, a plurality of second initial three-degree polynomial curves with unknown coefficients in three dimensions are constructed segmentally, and one end point of each second initial three-degree polynomial curve is used to represent the risk start point, the risk end point, or any expected point. The second initial three-degree polynomial curves are modeled by taking the integral of the square of the second derivative as the first solving target, the distance between the end points of the polynomial curves and the expected points as the second solving target, and the state constraints of the risk start point and the risk end point and the continuity constraints between the segmented curves as the solving constraints, to obtain a second route mathematical model. The second route mathematical models are solved to obtain a plurality of second target three-degree polynomial curves. The obstacle avoidance route of the risk area is generated according to the plurality of second target three-degree polynomial curves.
8. A computer device, comprising: The processor and the memory, the memory stores machine readable instructions executable by the processor, when the computer equipment runs, the processor executes the machine readable instructions to execute the steps of the route planning method of the unmanned aerial vehicle as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and equipment for avoiding obstacles
CN109990782A
Unmanned aerial vehicle path planning method and device, and storage medium
CN117590845A