A small unmanned aerial vehicle fine inspection path planning method, system, device and medium based on a three-dimensional voxelized map
By using a refined path planning method based on 3D voxel maps, the problems of unsafe paths, low efficiency of inspection point traversal, and uneven flight paths for UAVs in complex 3D structures were solved, achieving safe and efficient UAV inspection path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI YUNDING DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-23
AI Technical Summary
Existing UAV inspection path planning technologies suffer from problems such as unsafe paths, low efficiency in traversing inspection points, and uneven flight paths in complex three-dimensional structures, which are particularly difficult to solve effectively in the inspection of large infrastructure.
A refined inspection path planning method based on 3D voxelized maps is adopted. By combining environmental voxelization and obstacle expansion, inspection viewpoint generation and S-shaped sorting, 3D A* path search, path smoothing processing and coordinate transformation, a safe and smooth flight path is generated.
It improves the safety and efficiency of drone inspections, generates smoother paths, reduces disordered flight and gimbal jitter, improves the quality of inspection data, and realizes a fully automated processing flow.
Smart Images

Figure CN122258901A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of unmanned aerial vehicle (UAV) control technology, specifically relating to a method, system, equipment, and medium for refined inspection path planning of small UAVs based on three-dimensional voxelized maps. Background Technology
[0002] With the development of drone technology, using drones for visual inspection of large infrastructure such as bridges and high-rise buildings has become an industry trend. Current inspection path planning technologies are mainly divided into two categories: one is waypoint planning based on two-dimensional maps, which cannot handle complex three-dimensional structures and is prone to collisions; the other is planning based on manual teaching, which relies on pilot experience, is inefficient, and difficult to reuse.
[0003] While existing 3D path planning algorithms (such as RRT, A*, etc.) can solve obstacle avoidance problems, they have the following shortcomings in practical engineering applications:
[0004] Safety margin is difficult to control: planning directly on the model is prone to collisions due to positioning errors, and there is a lack of effective expansion buffer mechanism.
[0005] Disorganized inspection order: Faced with hundreds of discrete inspection points (points of interest), the lack of an efficient traversal order strategy causes the drone to fly back and forth, wasting power.
[0006] Poor path smoothness: Traditional grid search algorithms generate jagged paths, which are not conducive to smooth drone flight and shooting.
[0007] Therefore, there is an urgent need for a drone inspection path planning solution that can solve the above problems simultaneously. Summary of the Invention
[0008] To address the shortcomings of existing technologies, the present invention aims to provide a method, system, device, and medium for refined inspection path planning of small unmanned aerial vehicles (UAVs) based on 3D voxelized maps. By organically combining five stages—environment voxelization and obstacle expansion, inspection viewpoint generation and S-shaped sorting, 3D A* path search, path smoothing processing, and coordinate transformation—the invention can solve problems such as unsafe path planning, low inspection point traversal efficiency, and unsmooth flight paths when existing UAVs are inspecting complex 3D structures.
[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0010] A method for refined inspection path planning of small UAVs based on 3D voxelized maps includes the following steps:
[0011] S1: Perform 3D voxel modeling of the inspection object and environment, construct an occupation grid map, perform safety expansion processing on obstacles, and generate a safe flight corridor;
[0012] S2: Obtain the original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance. Cluster the original inspection viewpoint set and sort the viewpoints in each cluster according to the S-shaped path order.
[0013] S3: An optimized 3D A* algorithm is used to generate collision-free polyline paths between determined ordered viewpoints by maintaining an open list and a closed list, wherein the open list is implemented using a minimum priority queue and the closed list is implemented using a Boolean 3D array;
[0014] S4: Use the line-of-sight algorithm to smooth the polyline path generated in step S3, remove redundant nodes, and generate a smooth flight trajectory.
[0015] S5: A decoupling fitting strategy based on control points is used to convert the smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates, generating a GPS waypoint sequence that can be executed by the UAV.
[0016] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on 3D voxelized maps, step S1 specifically includes:
[0017] S11. Establish a three-dimensional mesh model of the inspection object, determine the voxel resolution according to the physical size of the UAV, and convert the three-dimensional mesh model into a three-dimensional voxel grid according to the set voxel resolution.
[0018] S12. Initialize a three-dimensional Boolean voxel matrix based on the bounding box of the inspected object;
[0019] S13. In the three-dimensional Boolean voxel matrix, mark the grid occupied by the inspected object as an obstacle;
[0020] S14. Determine the dilation parameters based on the physical dimensions of the UAV, and use a morphological dilation algorithm to dilate the obstacle, generating convolution kernels of different sizes to extend the obstacle region outward by multiple grid units.
[0021] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps, the convolution kernel used for dilating the obstacles is a 26-neighborhood kernel.
[0022] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on 3D voxelized maps, step S2 specifically includes:
[0023] S21. Generate original surface inspection points based on the three-dimensional model of the inspection object, traverse each original surface inspection point, and obtain the normal vector of the triangular facet in which it is located; extend a safe distance outward along the direction of the normal vector, calculate the hovering shooting viewpoint of the UAV, and thus obtain the original viewpoint set.
[0024] S22. Based on the characteristics of the normal vectors, the original viewpoint set is clustered into multiple viewpoint clusters;
[0025] S23. Perform PCA analysis on the set of three-dimensional viewpoints within each cluster to extract two principal component directions, namely the primary extension direction and the secondary extension direction, and project the three-dimensional points onto the principal plane formed by the two principal component directions.
[0026] S24. Based on the projected coordinates, first divide the viewpoints into layers along the secondary extension direction, and then sort them along the main extension direction within each layer to achieve layered S-shaped traversal.
[0027] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps, the sorting rule is as follows: even-numbered layers are sorted in the forward direction, and odd-numbered layers are sorted in the reverse direction, or even-numbered layers are sorted in the reverse direction and odd-numbered layers are sorted in the forward direction, with adjacent layers naturally connected at the end or beginning of the layer, thereby forming an S-shaped or serpentine traversal path.
[0028] Furthermore, the core mathematical model of the optimized 3D A* algorithm described in step S3 of the above-mentioned method for refined inspection path planning of small UAVs based on 3D voxel maps is as follows:
[0029] For any voxel node n in the search space, its total cost evaluation function F(n) is defined as:
[0030] F(n) = G(n) + H(n)
[0031] Where: G(n) represents the actual movement cost from the starting node S to the current node n; H(n) represents the heuristic estimated cost from the current node n to the target node E, both calculated using Euclidean distance;
[0032] Let the coordinates of the current node be... The target node coordinates are Then the heuristic function The calculation formula is:
[0033]
[0034] When expanding nodes, if n next From the current node n curr If the destination is reached by moving one step, then its cumulative actual cost G(n) is... next The updated formula is:
[0035]
[0036]
[0037] Where: n curr Represents the current node, n next C(n) represents a candidate child node that is adjacent to it. curr n next The distance between two adjacent nodes is G. The algorithm compares the G values of different paths to the same point and always retains the parent node path with the smallest G value.
[0038] Expand all neighboring nodes of the current node according to the 26-neighborhood, and remove illegal nodes that are outside the map boundary or located in the obstacle set.
[0039] Furthermore, in the refined inspection path planning method for small UAVs based on 3D voxelized maps described above, the search strategy employed in step S3 is as follows:
[0040] S31. Create a minimum priority queue as an open list, and create a three-dimensional boolean array as a closed list;
[0041] S32. Starting from the starting point, check the adjacent nodes in its 26-neighborhood, that is, the voxels in the surrounding 26 directions.
[0042] S33. Determine whether a neighboring node has crossed the boundary or is located within an obstacle area on the voxel map;
[0043] S34. Update the cost F=G+H. If a better path is found, update the parent node's pointer until the target point is reached.
[0044] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on 3D voxelized maps, step S4 specifically includes:
[0045] S41. Starting from the beginning of the original folded path, try to connect subsequent nodes and use a three-dimensional digital differential analysis algorithm to detect whether the line connecting the two points passes through any obstacle grid in the voxel map.
[0046] S42. If there are no obstacles between node i and node j, then directly connect i and j and remove all intermediate nodes.
[0047] S43. Repeat this process until the end of the original path is reached, thereby transforming the dense grid path into a sparse keypoint path, ultimately generating a smooth flight trajectory.
[0048] Furthermore, in the above-described method for refined inspection path planning of small UAVs based on 3D voxelized maps, step S5 specifically comprises:
[0049] S51. Select several feature points in the digital model of the inspected object and obtain their corresponding real WGS84 coordinates to construct a set of control point pairs S:
[0050]
[0051] S52. For longitude and latitude, ignoring the projection distortion caused by small changes in elevation, we treat it as an affine transformation based on the model's horizontal plane coordinates and construct a system of linear equations:
[0052]
[0053] The least squares method is used to perform regression analysis on the control point set to solve for the optimal fitting coefficient matrix, thereby establishing the mapping relationship between the model plane coordinates and geographical latitude and longitude.
[0054] S53. Regarding altitude information, assuming the model's Z-axis is approximately parallel to the geographic elevation direction, a linear regression model is adopted:
[0055] h=k·z+Δh
[0056] The proportionality coefficient k and elevation deviation Δh are solved using the least squares method.
[0057] S54. Input the smooth path point set and viewpoint set output in step S4 into the above fitting model to calculate the corresponding latitude, longitude and absolute flight altitude in batches.
[0058] Furthermore, as described above, the method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps imports the converted path file from step S5 into the UAV flight control system, visualizes the conversion results on a two-dimensional GIS map, and verifies whether the path points accurately conform to the building outline.
[0059] A refined inspection path planning system for small unmanned aerial vehicles (UAVs) based on 3D voxelized maps, characterized by comprising:
[0060] Environment Modeling Module: Used to perform 3D voxel modeling of inspection objects and environment, build occupation grid map, perform safety expansion processing on obstacles, and generate safe flight corridor;
[0061] Viewpoint generation and sorting module: used to generate an original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance, cluster the original inspection viewpoint set, and sort the viewpoints in each cluster according to the S-shaped path order;
[0062] Path search module: Used to generate collision-free folded paths between determined ordered viewpoints by maintaining an optimized 3D A* algorithm and an open list and a closed list, wherein the open list is implemented using a minimum priority queue and the closed list is implemented using a Boolean 3D array;
[0063] Path smoothing module: Used to smooth the polyline path generated in step S3 using a line-of-sight algorithm, remove redundant nodes, and generate a smooth flight trajectory;
[0064] Coordinate transformation module: Used to convert smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates using a control point-based decoupling fitting strategy, generating a GPS waypoint sequence that can be executed by the UAV.
[0065] A computer device includes one or more processors; the processors are used to store one or more programs; when the one or more programs are executed by the one or more processors, the method for fine-grained inspection path planning of small unmanned aerial vehicles based on three-dimensional voxelized maps as described above is implemented.
[0066] A computer-readable storage medium having a computer program thereon, which, when executed, implements the refined inspection path planning method for small unmanned aerial vehicles based on a three-dimensional voxelized map as described above.
[0067] Compared with existing technologies, the method, system, equipment, and medium for refined inspection path planning of small UAVs based on three-dimensional voxelized maps provided by this invention have the following beneficial effects:
[0068] High safety: By performing morphological expansion of obstacles in voxel space, a physical safety distance is reserved for the drone at the algorithm level. Compared with simple point and line obstacle avoidance, it can effectively deal with positioning errors caused by GPS drift or environmental interference.
[0069] Inspection efficiency is significantly improved: By introducing PCA dimensionality reduction combined with S-shaped sorting strategy, hundreds of disordered inspection points are transformed into a continuous path that conforms to aerodynamics and energy efficiency, avoiding disordered back-and-forth and violent maneuvers of drones in the air, and greatly shortening the total flight distance and operation time.
[0070] Dual optimization of computation and flight: Boolean voxel matrix is used to replace complex geometric intersection operations, which greatly improves the speed of A* search; combined with line-of-sight smoothing, the final output flight path is smoother, gimbal jitter is reduced, and the quality of inspection data collection is improved.
[0071] Fully automated process: It realizes fully automated processing from 3D model input to final latitude and longitude route output, eliminating the need for manual point marking and reducing the operation threshold;
[0072] High-precision automatic coordinate registration: Unlike traditional manual calibration or single seven-parameter transformation, this invention employs a least-squares fitting method with horizontal and vertical decoupling. This method is robust to control point measurement errors and can adapt to situations common in large infrastructure models where local coordinate system definitions are not standardized (such as origin offset or slight scale distortion), ensuring that the generated waypoints accurately fall on the actual structural surface without the need for repeated on-site test flights for correction. Attached Figure Description
[0073] To further illustrate the above and other advantages and features of this application, the specific embodiments of this application will be described in more detail below with reference to the accompanying drawings. The accompanying drawings, together with the following detailed description, are included in and form a part of this specification. It should be understood that these drawings only depict typical examples of this application and should not be considered as limiting the scope of this application.
[0074] Figure 1 The flowchart of the fine-grained inspection path planning method for small UAVs based on three-dimensional voxelized maps provided by the present invention is shown. Detailed Implementation
[0075] Exemplary embodiments of this application will be described below with reference to the accompanying drawings. For clarity and brevity, not all features of actual implementations are described in the specification. However, it should be understood that many implementation-specific decisions must be made in the development of any such actual embodiment to achieve the developer's specific goals, such as complying with constraints related to the system and business, and these constraints may vary depending on the implementation. Furthermore, it should be understood that while development work can be very complex and time-consuming, such development work is merely a routine task for those skilled in the art who benefit from the content of this application.
[0076] It should also be noted that, in order to avoid obscuring this application with unnecessary details, only the equipment structure and / or processing steps closely related to the solution according to this application are shown in the accompanying drawings, while other details that are not closely related to this application are omitted.
[0077] The embodiments or examples disclosed below are used to implement this application. To simplify the disclosure of this application, the components and methods of specific examples are described below. Of course, they are merely examples and are not intended to limit this application.
[0078] This invention proposes a refined inspection path planning method for small unmanned aerial vehicles (UAVs) based on 3D voxelized maps. Its core processes include: environment voxelization and obstacle inflation, inspection viewpoint generation and S-shaped sorting, 3D A* path search, path smoothing, and coordinate transformation. The implementation process is as follows: Figure 1As shown, the specific implementation method includes the following steps:
[0079] S1. Perform 3D voxel modeling of the inspection object and environment, construct an occupation grid map, perform safety expansion processing on obstacles, and generate a safe flight corridor. Specifically, this includes the following steps:
[0080] S11. Establish a three-dimensional mesh model of the inspection object, determine the voxel resolution according to the physical size of the UAV, and convert the three-dimensional mesh model into a three-dimensional voxel grid according to the set voxel resolution.
[0081] To transform a continuous 3D geometric model into a discrete data structure that is easily processed by a computer, this invention first reads the 3D mesh model of the structure to be inspected, and then, according to a set resolution, uses a subdivision method to convert the 3D mesh model into a 3D voxel grid. The side length of the voxel grid can be adjusted according to the 3D parameters of the UAV. The higher the resolution, the finer the voxels, and the more details are preserved, but the greater the memory consumption.
[0082] In path planning, drones are typically abstracted as a single point. However, real drones have dimensions. Without expansion, the planned path might place the drone's center point right next to the obstacle edge, causing the actual drone to collide. Therefore, obstacles must be extended outwards by a safe distance to ensure the drone's physical entity does not collide with the real obstacle. The specific implementation steps are as follows:
[0083] S12. Initialize a three-dimensional Boolean voxel matrix based on the bounding box of the inspected object. The size of the three-dimensional Boolean matrix covers the bounding box of the entire model.
[0084] S13. Mark the grid occupied by the inspected object model as an obstacle in the three-dimensional Boolean voxel matrix;
[0085] S14. Determine the dilation parameters based on the physical dimensions of the UAV, and use a morphological dilation algorithm to dilate the obstacle, generating convolution kernels of different sizes to extend the obstacle region outward by multiple grid units.
[0086] This invention utilizes a morphological dilation algorithm to dilate obstacles. Based on set dilation parameters and resolution, it generates convolutional kernels of different sizes, extending the obstacle region outward by several grid units. This not only constructs a physical obstacle avoidance zone but also reserves a safe flight corridor. Compared to simple point-line obstacle avoidance algorithms, the morphological dilation algorithm effectively addresses positioning errors caused by GPS drift or environmental interference, improving robustness to map noise and positioning errors.
[0087] In some preferred embodiments, a 26-neighborhood kernel is generated based on set dilation parameters and resolution. The 26-neighborhood kernel is a standard for defining proximity in 3D voxel processing, referring to all neighboring voxels, including the central voxel itself, that share vertices, edges, or faces with that voxel. In dilation operations, the 26-neighborhood produces the fullest expansion effect; in path planning, it allows diagonal movement, resulting in more natural trajectories.
[0088] S2. Obtain the original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance. Cluster the original inspection viewpoint set and sort the viewpoints in each cluster according to the S-shaped path order.
[0089] This invention calculates the hovering shooting points of the UAV based on the input original surface inspection points and the shooting distance set according to actual needs, and optimizes the access order of shooting points to minimize the Euclidean distance between adjacent viewpoints. The specific steps include:
[0090] S21. Calculate the inspection viewpoint: Generate original surface inspection points based on the three-dimensional model of the inspection object, traverse each original surface inspection point, and obtain the normal vector of the triangular facet where it is located; extend a safe distance outward along the direction of the normal vector to calculate the hovering shooting viewpoint of the UAV, thereby obtaining the original viewpoint set.
[0091] S22. Inspection Viewpoint Clustering: The original viewpoint set is clustered based on normal vector features, resulting in multiple viewpoint clusters. Directly optimizing paths for a large number of viewpoints leads to excessive computational complexity and redundant flight paths. Therefore, it's necessary to group spatially adjacent viewpoints with similar observation directions to lay the foundation for subsequent path optimization. For example, on the left and right sides of a bridge, ensure the UAV completes inspection on one side before moving to the other, avoiding frequent back-and-forth movement. Various methods can be used for viewpoint clustering, such as the K-Means clustering algorithm based on spatial distance and the DBSCAN clustering algorithm based on density. The appropriate method should be selected based on the specific task characteristics.
[0092] To approximate the Traveling Salesman Problem (TSP), this invention performs sorting optimization within each viewpoint cluster to form an S-shaped or serpentine traversal path. The specific operation consists of two steps:
[0093] S23. Principal Component Analysis: First, perform principal component analysis on the three-dimensional point set within each cluster to extract two principal component directions, namely the primary extension direction and the secondary extension direction. Then, project the three-dimensional points onto the principal plane formed by the primary extension direction and the secondary extension direction.
[0094] S24. Layered S-shaped traversal: Based on the projected coordinates, the viewpoint is first layered along the secondary extension direction (such as the height direction), and then sorted within each layer along the primary extension direction (such as the horizontal direction). The sorting rules are: even-numbered layers are sorted forward, and odd-numbered layers are sorted backward, or even-numbered layers are sorted backward and odd-numbered layers are sorted forward. Adjacent layers are naturally connected at the end or beginning of each layer, thus forming an S-shaped or serpentine traversal path, which can minimize the Euclidean distance between adjacent points.
[0095] This invention introduces PCA dimensionality reduction and combines it with an S-shaped sorting strategy to transform hundreds of disordered inspection points into a continuous path that conforms to aerodynamics and energy efficiency. This avoids the disordered back-and-forth and violent maneuvers of UAVs in the air, significantly shortens the total flight distance and operation time, and significantly improves inspection efficiency.
[0096] S3. An optimized 3D A* algorithm is used to generate collision-free polyline paths between determined ordered viewpoints by maintaining an open list and a closed list. The open list is implemented using a minimum priority queue, and the closed list is implemented using a Boolean 3D array.
[0097] To generate the optimal collision-free path between defined ordered viewpoints, this invention employs an improved 3D A* algorithm, which uses an open list and a closed list to find the optimal path from the starting point S to the ending point E.
[0098] 3.1 Core Mathematical Model
[0099] (1) Node definition
[0100] A node is defined by its three-dimensional coordinates (x, y, z), actual cost G, heuristic cost H, and parent node pointer.
[0101] (2) Definition of global cost function
[0102] For any voxel node n in the search space, its total cost evaluation function F(n) is defined as:
[0103] F(n) = G(n) + H(n)
[0104] in:
[0105] G(n): represents the actual movement cost from the starting node S to the current node n.
[0106] H(n): represents the heuristic estimated cost of moving from the current node n to the target node E.
[0107] (3) Distance metrics and heuristic functions
[0108] To ensure that the generated path is the shortest straight-line distance in three-dimensional space, this invention uses Euclidean distance, which is the straight-line distance between two points, when calculating the movement cost and heuristic cost. Euclidean distance is also the most basic distance metric in three-dimensional space.
[0109] Let the coordinates of the current node be... The target node coordinates are Then the heuristic function The calculation formula is:
[0110]
[0111] (4) Cost update strategy
[0112] When expanding nodes, let the current node be n. curr Its adjacent candidate child node is n next If n next From n curr If the destination is reached by moving one step, then its cumulative actual cost G(n) is... next The updated formula is:
[0113]
[0114]
[0115] Where C(n) curr n next Let G be the Euclidean distance between two adjacent nodes. The algorithm compares the G values of different paths leading to the same point and always retains the path with the smallest G value to the parent node.
[0116] (5) 26 Neighborhood search space
[0117] To allow drones to fly diagonally in three-dimensional space to obtain smoother paths, the extended domain of a node is defined as a 26-neighborhood. For a node with coordinates (x, y, z), its valid subset of nodes is N. child Defined as:
[0118]
[0119] The algorithm removes illegal nodes that are outside the map boundaries or located in the obstacle set (Grid(x,y,z)=True) during expansion.
[0120] 3.2 Search Strategy
[0121] This invention employs an improved 3D A* algorithm for path search, specifically including the following steps:
[0122] S321. Create a minimum priority queue as an open list and a three-dimensional boolean array as a closed list.
[0123] S322. Starting from the origin, check the neighboring nodes in its 26-neighborhood, that is, the voxels in the surrounding 26 directions.
[0124] S323. Validity Check: Determines whether neighboring nodes have crossed boundaries or are located within obstacle areas on the voxel map. If safety constraints are enabled, it can also check whether corners are too sharp or heights are too low.
[0125] S324. Update cost F=G+H. If a better path is found, update the parent node's pointer until the target point is reached.
[0126] This invention utilizes Boolean voxel matrices to replace complex geometric intersection operations, employs a minimum priority queue to implement the open list and a three-dimensional Boolean array to implement the closed list, significantly improving the speed of A* search. Simultaneously, by introducing a 26-neighborhood movement pattern, the path is made more consistent with the actual movement characteristics of UAVs.
[0127] S4. The line-of-sight algorithm is used to smooth the polyline path generated in step S3, remove redundant nodes, and generate a smooth flight trajectory.
[0128] The path generated by the A* algorithm is a polyline based on the grid center, containing a large number of redundant inflection points. This invention introduces a Line of Sight (LOS) algorithm for post-processing, specifically including the following steps:
[0129] S41. Line of Sight Detection: Starting from the beginning of the original folded path, attempt to connect subsequent nodes. Use the 3D DDA (Digital Differential Analyzer) algorithm to detect whether the line connecting two points passes through any obstacle grid in the voxel map.
[0130] S42. Redundancy Removal: If there are no obstacles between node i and node j, then directly connect i and j and remove all intermediate nodes (from i+1 to j-1).
[0131] S43. Iterative Loop: Repeat this process until the end of the original path is reached, thereby transforming the dense grid path into a sparse keypoint path, ultimately generating a smooth flight trajectory.
[0132] S5. A decoupling fitting strategy based on control points is adopted to convert the smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates, generating a GPS waypoint sequence that can be executed by the UAV.
[0133] The planned path point set is located in the local model coordinate system (x, y, z). To enable the UAV to perform tasks in a real geographical environment, it needs to be mapped to the WGS84 global coordinate system (longitude λ, latitude ϕ, elevation h). This invention adopts a control point-based decoupling fitting strategy, specifically including:
[0134] S51. Control Point Pair Selection
[0135] In the structural digital model of the object to be inspected (such as a bridge), select several feature points (such as the bridgehead, bridge tail, and the apex of the main tower), and obtain their corresponding real WGS84 coordinates to construct a set of control point pairs S:
[0136]
[0137] S52, Planar coordinate parameter fitting (horizontal direction)
[0138] For longitude and latitude, neglecting the projection distortion caused by small changes in elevation, we treat it as an affine transformation based on the model's horizontal plane coordinates (x, y). We then construct a system of linear equations:
[0139]
[0140] By using the least squares method to perform regression analysis on the control point set, the optimal fitting coefficient matrix is obtained, thereby establishing the mapping relationship between the model's planar coordinates and geographical latitude and longitude.
[0141] S53, Elevation parameter fitting (vertical direction)
[0142] Regarding altitude information, assuming the model's Z-axis is approximately parallel to the geographic elevation direction, a linear regression model is used:
[0143] h=k·z+Δh
[0144] The scaling factor k and elevation deviation Δh are solved using the least squares method. This method can effectively correct for differences in elevation datum between the model and the actual terrain, such as the difference between the geoid and the ellipsoid.
[0145] S54, Batch Path Conversion and Verification
[0146] Input the smoothed path point set and viewpoint set output in step S4 into the above fitting model to calculate the corresponding latitude, longitude, and absolute flight altitude in batches. The converted path file can be directly imported into the UAV flight control system. At the same time, the system supports visualizing the conversion results on a 2D GIS map to verify whether the path points accurately fit the building outlines, forming a closed-loop verification.
[0147] This invention also provides a refined inspection path planning system for small unmanned aerial vehicles based on a three-dimensional voxelized map, comprising:
[0148] Environment Modeling Module: Used to perform 3D voxel modeling of inspection objects and environment, build occupation grid map, perform safety expansion processing on obstacles, and generate safe flight corridor;
[0149] Viewpoint generation and sorting module: used to generate an original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance, cluster the original inspection viewpoint set, and sort the viewpoints in each cluster according to the S-shaped path order;
[0150] Path search module: Used to generate collision-free folded paths between determined ordered viewpoints by maintaining an optimized 3D A* algorithm and an open list and a closed list, wherein the open list is implemented using a minimum priority queue and the closed list is implemented using a Boolean 3D array;
[0151] Path smoothing module: Used to smooth the polyline path generated in step S3 using a line-of-sight algorithm, remove redundant nodes, and generate a smooth flight trajectory;
[0152] Coordinate transformation module: Used to convert smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates using a control point-based decoupling fitting strategy, generating a GPS waypoint sequence that can be executed by the UAV.
[0153] The present invention also provides a computer device, including one or more processors; the processors are used to store one or more programs; when the one or more programs are executed by the one or more processors, the fine-grained inspection path planning method for small UAVs based on three-dimensional voxelized maps described above is implemented.
[0154] The present invention also provides a computer-readable storage medium having a computer program thereon, which, when executed, implements the refined inspection path planning method for small unmanned aerial vehicles based on a three-dimensional voxel map as described above.
[0155] This invention provides a method, system, device, and medium for refined inspection path planning of small unmanned aerial vehicles (UAVs) based on 3D voxel maps. While ensuring obstacle avoidance, it can automatically generate a flight space with a safety buffer zone; it optimally sorts a large number of discrete 3D inspection points to reduce invalid flight distances; it rapidly generates smooth, executable, collision-free paths in a 3D grid environment, reducing gimbal jitter and improving the quality of inspection data acquisition; and it employs a horizontally and vertically decoupled least-squares fitting method for high-precision automatic coordinate registration, ensuring that the generated waypoints accurately land on the actual structural surface. This method achieves a fully automated processing flow from 3D model input to final latitude and longitude route output, eliminating the need for manual point marking and lowering the operational threshold.
[0156] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention is also intended to include these modifications and variations.
Claims
1. A method for refined inspection path planning of small unmanned aerial vehicles based on 3D voxelized maps, comprising the following steps: S1: Perform 3D voxel modeling of the inspection object and environment, construct an occupation grid map, perform safety expansion processing on obstacles, and generate a safe flight corridor; S2: Obtain the original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance. Cluster the original inspection viewpoint set and sort the viewpoints in each cluster according to the S-shaped path order. S3: An optimized 3D A* algorithm is used to generate collision-free polyline paths between determined ordered viewpoints by maintaining an open list and a closed list, wherein the open list is implemented using a minimum priority queue and the closed list is implemented using a Boolean 3D array; S4: Use the line-of-sight algorithm to smooth the polyline path generated in step S3, remove redundant nodes, and generate a smooth flight trajectory. S5: A decoupling fitting strategy based on control points is used to convert the smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates, generating a GPS waypoint sequence that can be executed by the UAV.
2. The method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps according to claim 1, characterized in that, Step S1 is as follows: S11. Establish a three-dimensional mesh model of the inspection object, determine the voxel resolution according to the physical size of the UAV, and convert the three-dimensional mesh model into a three-dimensional voxel grid according to the set voxel resolution. S12. Initialize a three-dimensional Boolean voxel matrix based on the bounding box of the inspected object; S13. In the three-dimensional Boolean voxel matrix, mark the grid occupied by the inspected object as an obstacle; S14. Determine the dilation parameters based on the physical dimensions of the UAV, and use a morphological dilation algorithm to dilate the obstacle, generating convolution kernels of different sizes to extend the obstacle region outward by multiple grid units. The convolution kernel is a 26-neighborhood kernel.
3. The method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps according to claim 2, characterized in that, Step S2 is as follows: S21. Generate original surface inspection points based on the three-dimensional model of the inspection object, traverse each original surface inspection point, and obtain the normal vector of the triangular facet in which it is located; extend a safe distance outward along the direction of the normal vector, calculate the hovering shooting viewpoint of the UAV, and thus obtain the original viewpoint set. S22. Based on the characteristics of the normal vectors, the original viewpoint set is clustered into multiple viewpoint clusters; S23. Perform PCA analysis on the set of three-dimensional viewpoints within each cluster to extract two principal component directions, namely the primary extension direction and the secondary extension direction, and project the three-dimensional points onto the principal plane formed by the two principal component directions. S24. Based on the projected coordinates, the viewpoints are first layered along the secondary extension direction, and then sorted along the main extension direction within each layer. The sorting rules are: even-numbered layers are sorted forward and odd-numbered layers are sorted backward, or even-numbered layers are sorted backward and odd-numbered layers are sorted forward. Adjacent layers are naturally connected at the end or beginning of the layer, thus forming an S-shaped or serpentine traversal path.
4. The method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps according to claim 3, characterized in that, The core mathematical model of the optimized 3D A* algorithm described in step S3 is as follows: For any voxel node n in the search space, its total cost evaluation function F(n) is defined as: F(n) = G(n) + H(n) Where: G(n) represents the actual movement cost from the starting node S to the current node n; H(n) represents the heuristic estimated cost from the current node n to the target node E, both calculated using Euclidean distance; Let the coordinates of the current node be... The target node coordinates are Then the heuristic function The calculation formula is: When expanding nodes, if n next From the current node n curr If the destination is reached by moving one step, then its cumulative actual cost G(n) is... next The updated formula is: Where: n curr Represents the current node, n next C(n) represents a candidate child node that is adjacent to it. curr n next The distance between two adjacent nodes is G. The algorithm compares the G values of different paths to the same point and always retains the parent node path with the smallest G value. Expand all neighboring nodes of the current node according to the 26-neighborhood, and remove illegal nodes that are outside the map boundary or located in the obstacle set.
5. The method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps according to claim 4, characterized in that, The search strategy used in step S3 is as follows: S31. Create a minimum priority queue as an open list, and create a three-dimensional boolean array as a closed list; S32. Starting from the starting point, check the adjacent nodes in its 26-neighborhood, that is, the voxels in the surrounding 26 directions. S33. Determine whether a neighboring node has crossed the boundary or is located within an obstacle area on the voxel map; S34. Update the cost F=G+H. If a better path is found, update the parent node's pointer until the target point is reached.
6. The method for refined inspection path planning of small unmanned aerial vehicles based on three-dimensional voxelized maps according to claim 5, characterized in that, Step S4 is as follows: S41. Starting from the beginning of the original folded path, try to connect subsequent nodes and use a three-dimensional digital differential analysis algorithm to detect whether the line connecting the two points passes through any obstacle grid in the voxel map. S42. If there are no obstacles between node i and node j, then directly connect i and j and remove all intermediate nodes. S43. Repeat this process until the end of the original path is reached, thereby transforming the dense grid path into a sparse keypoint path, ultimately generating a smooth flight trajectory.
7. The method for refined inspection path planning of small UAVs based on three-dimensional voxelized maps according to claim 6, characterized in that, Step S5 is as follows: S51. Select several feature points in the digital model of the inspected object and obtain their corresponding real WGS84 coordinates to construct a set of control point pairs S: S52. For longitude and latitude, ignoring the projection distortion caused by small changes in elevation, we treat it as an affine transformation based on the model's horizontal plane coordinates and construct a system of linear equations: The least squares method is used to perform regression analysis on the control point set to solve for the optimal fitting coefficient matrix, thereby establishing the mapping relationship between the model plane coordinates and geographical latitude and longitude. S53. Regarding altitude information, assuming the model's Z-axis is approximately parallel to the geographic elevation direction, a linear regression model is adopted: h=k·z+Δh The proportionality coefficient k and elevation deviation Δh are solved using the least squares method. S54. Input the smooth path point set and viewpoint set output in step S4 into the above fitting model to calculate the corresponding latitude and longitude and absolute flight altitude in batches. Import the converted path file into the UAV flight control system, visualize the conversion results on a 2D GIS map, and verify whether the path points accurately match the building outlines.
8. A refined inspection path planning system for small unmanned aerial vehicles (UAVs) based on a three-dimensional voxelized map, characterized in that, include: Environment Modeling Module: Used to perform 3D voxel modeling of inspection objects and environment, build occupation grid map, perform safety expansion processing on obstacles, and generate safe flight corridor; Viewpoint generation and sorting module: used to generate an original inspection viewpoint set based on the original surface inspection points of the inspection object and the set drone shooting distance, cluster the original inspection viewpoint set, and sort the viewpoints in each cluster according to the S-shaped path order; Path search module: Used to generate collision-free folded paths between determined ordered viewpoints by maintaining an optimized 3D A* algorithm and an open list and a closed list, wherein the open list is implemented using a minimum priority queue and the closed list is implemented using a Boolean 3D array; Path smoothing module: Used to smooth the polyline path generated in step S3 using a line-of-sight algorithm, remove redundant nodes, and generate a smooth flight trajectory; Coordinate transformation module: Used to convert smoothed path points from local model coordinates to WGS84 latitude and longitude coordinates using a control point-based decoupling fitting strategy, generating a GPS waypoint sequence that can be executed by the UAV.
9. A computer device, characterized in that, It includes one or more processors; the processors are used to store one or more programs; when the one or more programs are executed by the one or more processors, they implement the method for fine-grained inspection path planning of small UAVs based on three-dimensional voxelized maps as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It contains a computer program, which, when executed, implements the method for fine-grained inspection path planning of small unmanned aerial vehicles based on a three-dimensional voxel map as described in any one of claims 1 to 7.