Unmanned aerial vehicle dynamic detection route planning method based on guardrail characteristics and related equipment
By dynamically adjusting the flight parameters and path planning of the UAV, the problem of guardrail detection under complex terrain and environmental obstructions was solved, achieving efficient and accurate guardrail detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-03
AI Technical Summary
Existing drone-based fence detection methods are poorly adaptable to complex terrain and environmental obstructions, resulting in low detection accuracy and efficiency, and an inability to achieve adaptive path planning.
By acquiring initial distribution data of guardrails and terrain data, a road coordinate system is established, point cloud and image data are collected in real time, flight parameters and paths are dynamically adjusted, and obstacle detection is used for local replanning to generate dynamic detection routes.
This improved the completeness of guardrail data collection and the accuracy of detection, reduced invalid data collection, and enhanced detection efficiency and flight stability.
Smart Images

Figure CN121783162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of road inspection technology, specifically to a method and related equipment for dynamic detection route planning by unmanned aerial vehicles (UAVs) based on guardrail features. Background Technology
[0002] Guardrail inspection, as a crucial part of road infrastructure maintenance, plays a vital role in ensuring traffic safety. In recent years, drones, with their advantages of maneuverability and unique perspective, have been widely used in guardrail inspection. Currently, most mainstream drone inspection solutions employ a fixed route planning model, which involves pre-setting a constant flight altitude, heading angle, and fixed intervals for sampling points, allowing the drone to perform automated inspection tasks along the road. This pre-set route-based operation method is feasible and efficient on flat, straight standard road sections, forming the basic background for current technological implementation.
[0003] However, when the detection environment shifts to complex terrain such as mountain bends and undulating road sections, the limitations of existing fixed route planning methods become apparent. Due to the drastic changes in terrain elevation and the constant twists and turns of the guardrail, maintaining a constant flight altitude can easily cause sections of the guardrail to fall outside the effective field of view of the airborne sensors, or result in severe perspective distortion due to improper viewing angles, directly causing detection blind spots and data loss. At the same time, a fixed heading angle cannot adaptively align with the tangent direction of the winding guardrail, leading to a decline in the quality of the acquired images and point cloud data, seriously affecting the subsequent accurate analysis of subtle defects such as guardrail deformation and displacement.
[0004] Besides the challenges posed by terrain and geometry, the complex environmental interference along the roadside is a significant drawback of the fixed-path method. In actual inspection scenarios, roadside obstacles such as trees, billboards, and signs often partially or completely obstruct the guardrails. Pre-set flight paths that cannot be adjusted online cannot actively avoid these obstructions, leading to data interruptions from the sensors and affecting the complete assessment of the guardrail's continuous state. Furthermore, a uniform and fixed data sampling frequency fails to account for the variability in guardrail conditions. This results in a large amount of redundant data in road sections with simple, straight structures, while insufficient sampling may occur in key areas with complex deformations, ultimately reducing the spatiotemporal efficiency and data validity of the inspection operation.
[0005] In summary, existing fixed-route-based UAV fence detection methods have significant shortcomings, including poor adaptability to complex terrain, weak resistance to environmental occlusion, and low data acquisition intelligence. Therefore, there is an urgent need for a path planning method that can adjust online based on real-time fence characteristics and dynamic environmental information to achieve adaptive optimization of the detection path and improve the overall robustness, detection accuracy, and operational efficiency of UAV inspections. Summary of the Invention
[0006] Based on the problems mentioned above, the purpose of this invention is to provide a method and related equipment for dynamic detection route planning of unmanned aerial vehicles (UAVs) based on guardrail features, which solves the problems of low efficiency and low accuracy in object-oriented mapping of monitoring information and standard information.
[0007] This invention is achieved through the following technical solution: The first aspect of this invention provides a method for dynamic detection and route planning of unmanned aerial vehicles (UAVs) based on guardrail features, comprising the following steps: Acquire initial distribution data of guardrails and initial terrain data, and establish a road coordinate system based on the initial distribution data of guardrails; A reference flight path and initial flight parameters parallel to the direction of the guardrail are generated based on the road coordinate system; Real-time acquisition of guardrail point cloud data and terrain image data; extraction of guardrail edge features from the guardrail point cloud data. Based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, the initial flight parameters are dynamically adjusted to obtain the adjusted flight parameters. Obstacles are detected using the point cloud data, and the improved A* algorithm is used to perform local path replanning on the baseline flight path based on the obstacle detection results to obtain the replanned flight path. The dynamic detection route is generated by combining the adjustment of flight parameters and the replanning of flight path.
[0008] In the above technical solution, firstly, the initial distribution data of the guardrail and the initial terrain data of the detection area are obtained through multi-source data acquisition and processing. Based on the initial distribution data of the guardrail, a road coordinate system is established to provide basic data support for subsequent path planning.
[0009] Based on the road coordinate system established according to the initial distribution data of the guardrail, a reference flight path parallel to the direction of the guardrail is generated according to the characteristics of the guardrail's central axis as the starting route for UAV detection. Associating the UAV flight path with the guardrail is beneficial for the UAV to detect the guardrail; at the same time, initial flight parameters are set.
[0010] When the drone performs inspection tasks, it collects guardrail point cloud data and terrain image data in real time through onboard sensors, and extracts guardrail edge features from the guardrail point cloud data to provide real-time basis for dynamic path adjustment.
[0011] The initial flight parameters are dynamically adjusted based on the terrain changes between the terrain image data and the initial terrain data, as well as the changes between the edge features of the guardrail and the initial distribution of the guardrail. This enables dynamic adjustment of the UAV's flight altitude, heading angle, and lateral offset, ensuring that the sensor's field of view always completely covers the guardrail area.
[0012] Obstacles are detected using point cloud data, and an improved A* algorithm is used to perform local path replanning on the baseline flight path based on the obstacle detection results, ensuring the continuity of guardrail detection while avoiding obstacles.
[0013] By comprehensively adjusting flight parameters and replanning flight paths, the flight paths of UAVs after dynamic adjustments and obstacle avoidance are smoothly optimized, reducing attitude fluctuations during flight and improving flight stability and data acquisition quality.
[0014] In one optional embodiment, the initial distribution data of the guardrail includes: the centerline of the guardrail and the height of the guardrail.
[0015] In one optional embodiment, establishing a road coordinate system based on the initial distribution data of the guardrail includes the following steps: Establish an X-axis along the central axis of the guardrail; A Y-axis is established perpendicular to the central axis of the guardrail; wherein the Y-axis points outward from the guardrail. Establish the Z-axis along the vertical upward direction.
[0016] In one optional embodiment, generating a reference flight path and initial flight parameters parallel to the guardrail's orientation based on the road coordinate system includes: Determine the lateral distance of the path, and take the point offset from the lateral distance of the path along the Y-axis as the starting path point of the UAV; Obtain the curvature of the guardrail, and determine the path node spacing based on the guardrail curvature; The initial flight altitude is determined based on the height of the guardrail, wherein the initial flight altitude is greater than the height of the guardrail; Obtain the tangent to the centerline of the guardrail, and set the initial heading angle to be consistent with the direction of the tangent.
[0017] In one optional embodiment, the initial flight parameters are dynamically adjusted based on the terrain changes between the terrain image data and the initial terrain data, as well as the guardrail edge features, including the following steps: The guardrail edge offset is calculated based on the guardrail edge features. If the guardrail edge offset is greater than the offset threshold, the lateral distance of the path is updated using the guardrail edge offset. Calculate the change in terrain elevation between the terrain image data and the initial terrain data. If the change in terrain elevation is greater than an altitude threshold, update the initial flight altitude using the change in terrain elevation. Calculate the rate of change of the guardrail's orientation. If the rate of change of the guardrail's orientation is greater than the rate of change threshold, correct the initial heading angle.
[0018] In one optional embodiment, obstacles are detected using the point cloud data, and a local path replanning is performed on the baseline flight path based on the obstacle detection results using an improved A* algorithm, including the following steps: The DBSCAN algorithm is used to perform point cloud clustering on the point cloud data to obtain clustered point clouds. Obstacle detection is performed based on the clustered point cloud. When obstacles exist, an improved route optimization algorithm is used for local path replanning. Local path replanning includes: The search space is rasterized based on the clustered point cloud; A cost function is constructed, and the cost value of each rasterized search space is calculated using the cost function; wherein, the cost function is constructed by path length cost, path smoothness cost, and guardrail coverage loss; Local path replanning is performed using the aforementioned cost.
[0019] In one optional embodiment, generating a dynamic detection route by combining the adjusted flight parameters and the replanned flight path includes the following steps: The replanned flight path is fitted using a third-order B-spline curve to obtain the fitted UAV path; during the fitting process, the spacing between the curve control points is consistent with the spacing between the path nodes. The fitted UAV path is constrained based on the adjusted flight parameters to obtain a dynamic detection route.
[0020] A second aspect of the present invention provides a dynamic detection route planning system for unmanned aerial vehicles (UAVs) based on guardrail features, comprising: The coordinate establishment module is used to acquire the initial distribution data of the guardrail and the initial terrain data, and to establish a road coordinate system based on the initial distribution data of the guardrail; The initial module is used to generate a reference flight path and initial flight parameters that are parallel to the direction of the guardrail based on the road coordinate system; The extraction module is used to collect guardrail point cloud data and terrain image data in real time, and extract guardrail edge features from the guardrail point cloud data; The adjustment module is used to dynamically adjust the initial flight parameters based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, to obtain the adjusted flight parameters; The replanning module is used to detect obstacles using the point cloud data, and based on the obstacle detection results, it uses an improved A* algorithm to perform local path replanning on the baseline flight path to obtain the replanned flight path. The route generation module is used to generate a dynamic detection route by combining the adjusted flight parameters and the replanned flight path.
[0021] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for dynamic detection route planning of unmanned aerial vehicles based on guardrail features.
[0022] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for dynamic detection route planning of unmanned aerial vehicles based on guardrail features.
[0023] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. By dynamically adjusting the path to ensure that the sensors carried by the drone are always aligned with the guardrail, the integrity of the guardrail data collection is improved, and the accuracy of guardrail detection is guaranteed. 2. By avoiding obstacles, invalid data collection is reduced, thus improving detection efficiency. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating the UAV dynamic detection route planning method based on guardrail features provided in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the structure of the UAV dynamic detection route planning system based on guardrail features provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention. Example
[0026] Figure 1 This is a flowchart illustrating the UAV dynamic detection route planning method based on guardrail features provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the UAV dynamic detection route planning method based on guardrail features includes the following steps: Acquire initial distribution data of guardrails and initial terrain data, and establish a road coordinate system based on the initial distribution data of guardrails; A reference flight path and initial flight parameters parallel to the direction of the guardrail are generated based on the road coordinate system; Real-time acquisition of guardrail point cloud data and terrain image data; extraction of guardrail edge features from the guardrail point cloud data. Based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, the initial flight parameters are dynamically adjusted to obtain the adjusted flight parameters. Obstacles are detected using the point cloud data, and the improved A* algorithm is used to perform local path replanning on the baseline flight path based on the obstacle detection results to obtain the replanned flight path. The dynamic detection route is generated by combining the adjustment of flight parameters and the replanning of flight path.
[0027] It should be noted that, firstly, the initial distribution data of the guardrail and the initial terrain data of the detection area are obtained through multi-source data collection and processing. Based on the initial distribution data of the guardrail, a road coordinate system is established to provide basic data support for subsequent path planning.
[0028] Based on the road coordinate system established according to the initial distribution data of the guardrail, a reference flight path parallel to the direction of the guardrail is generated according to the characteristics of the guardrail's central axis as the starting route for UAV detection. Associating the UAV flight path with the guardrail is beneficial for the UAV to detect the guardrail; at the same time, initial flight parameters are set.
[0029] When the drone performs inspection tasks, it collects guardrail point cloud data and terrain image data in real time through onboard sensors, and extracts guardrail edge features from the guardrail point cloud data to provide real-time basis for dynamic path adjustment.
[0030] The initial flight parameters are dynamically adjusted based on the terrain changes between the terrain image data and the initial terrain data, as well as the changes between the edge features of the guardrail and the initial distribution of the guardrail. This enables dynamic adjustment of the UAV's flight altitude, heading angle, and lateral offset, ensuring that the sensor's field of view always completely covers the guardrail area. This guarantees that the sensors carried by the UAV are always pointed at the guardrail, thus improving the integrity of the collected data.
[0031] Obstacles are detected using point cloud data, and an improved A* algorithm is used to perform local path replanning on the baseline flight path based on the obstacle detection results. This ensures the continuity of guardrail detection while avoiding obstacles. By avoiding obstacles, the collection of invalid data is reduced, thereby improving detection efficiency.
[0032] By comprehensively adjusting flight parameters and replanning flight paths, the flight paths of UAVs after dynamic adjustments and obstacle avoidance are smoothly optimized, reducing attitude fluctuations during flight and improving flight stability and data acquisition quality.
[0033] In one optional embodiment, the initial distribution data of the guardrail includes: the centerline of the guardrail and the height of the guardrail.
[0034] It should be noted that the initial distribution data of the guardrail includes: the centerline coordinates of the guardrail (X0(i), Y0(i), Z0(i)), the guardrail type (such as corrugated beam, concrete guardrail, etc.) and the guardrail height parameters.
[0035] The process of obtaining the coordinates of the centerline of the guardrail is as follows: A vehicle-mounted mobile measurement system (MMS) is used to collect point cloud data of the detection road section. To ensure the accuracy of the data, the point cloud density in this embodiment needs to be ≥200 points / m². The guardrail point cloud is extracted using a point cloud segmentation algorithm based on deep learning. The guardrail centerline is generated by fitting the data to ensure that the centerline positioning error is ≤5cm, and the accuracy meets the requirements of subsequent path planning.
[0036] In one optional embodiment, the process of acquiring initial terrain data includes: collecting digital elevation model (DEM), slope and aspect data, wherein the DEM resolution is not less than 0.5m, which can accurately reflect the changes in terrain undulation and provide a basis for subsequent flight altitude adjustments.
[0037] In one optional embodiment, establishing a road coordinate system based on the initial distribution data of the guardrail includes the following steps: Establish an X-axis along the central axis of the guardrail; A Y-axis is established perpendicular to the central axis of the guardrail; wherein the Y-axis points outward from the guardrail. Establish the Z-axis along the vertical upward direction.
[0038] It should be noted that establishing a road coordinate system is a fundamental and important step in route planning, providing a basis for UAV route detection and ensuring the consistency of spatial location description.
[0039] Specifically, the coordinates of the centerline of the guardrail are extracted from the initial distribution data, and a road coordinate system is established based on these coordinates. The X-axis is established along the direction of the centerline of the guardrail (longitudinal); the Y-axis is established perpendicular to the centerline of the guardrail and pointing outward (lateral); and the Z-axis is established vertically upward, thus forming a three-dimensional rectangular coordinate system.
[0040] In one optional embodiment, generating a reference flight path and initial flight parameters parallel to the guardrail's orientation based on the road coordinate system includes: Determine the lateral distance of the path, and take the point offset from the lateral distance of the path along the Y-axis as the starting path point of the UAV; Obtain the curvature of the guardrail, and determine the path node spacing based on the guardrail curvature; The initial flight altitude is determined based on the height of the guardrail, wherein the initial flight altitude is greater than the height of the guardrail; Obtain the tangent to the centerline of the guardrail, and set the initial heading angle to be consistent with the direction of the tangent.
[0041] It should be noted that the coordinates of the path points of the reference flight path are generated based on the coordinate offset of the guardrail centerline. The offset includes two offsets: the lateral distance of the path and the initial flight altitude, namely (X0(i), Y0(i)+D, Z0(i)+H0), where D is the lateral distance of the path and H0 is the initial flight altitude.
[0042] Preferably, the lateral distance of the path is determined, and the starting path point of the UAV is set at the lateral distance offset along the Y-axis. Further, the lateral distance of the path is offset by 3-5m along the Y-axis of the guardrail. The offset direction is preferably selected in an open area outside the guardrail to avoid interference from vehicles or other facilities on the inside of the road, and to ensure that the guardrail is in the center of the sensor's field of view.
[0043] Preferably, the path node spacing ΔL is adjusted by controlling the curvature K of the guardrail to ensure dynamic adjustment of the drone's path node spacing in different road sections. Specifically: When K > 0.05m⁻¹ (sharp bend), ΔL = 5m, and dense nodes are used to ensure path accuracy at the bend; When 0.02m⁻¹<K≤0.05m⁻¹ (gentle curve section), ΔL=10m; When K≤0.02m⁻¹ (straight road section), ΔL=15m, reducing redundant nodes while ensuring coverage.
[0044] Preferably, the initial flight height H0 is determined based on the guardrail height H, wherein the initial flight height is greater than the guardrail height; furthermore, H0 ≥ H + 2m must be satisfied to ensure that the guardrail is completely within the vertical field of view of the sensor.
[0045] Preferably, the initial heading angle is consistent with the tangent direction of the guardrail's centerline, with a deviation of ≤3°, ensuring that the sensor's main field of view is perpendicular to the guardrail's direction; for special road sections such as bridges and tunnel entrances, the spacing between path nodes is increased to 3m to improve detection accuracy in complex scenarios.
[0046] In one optional embodiment, the initial flight parameters are dynamically adjusted based on the terrain changes between the terrain image data and the initial terrain data, as well as the guardrail edge features, including the following steps: The guardrail edge offset is calculated based on the guardrail edge features. If the guardrail edge offset is greater than the offset threshold, the lateral distance of the path is updated using the guardrail edge offset. Calculate the change in terrain elevation between the terrain image data and the initial terrain data. If the change in terrain elevation is greater than an altitude threshold, update the initial flight altitude using the change in terrain elevation. Calculate the rate of change of the guardrail's orientation. If the rate of change of the guardrail's orientation is greater than the rate of change threshold, correct the initial heading angle.
[0047] It should be noted that during the data acquisition phase, the drone is equipped with two main sensors: a LiDAR and a high-definition camera. The LiDAR acquires point cloud data at a high frequency of 10-20Hz. By setting parameters such as a point cloud echo intensity of no less than 2000 and a horizontal angular resolution of no more than 0.1°, sufficient density and clarity of the acquired point cloud are ensured. The high-definition camera acquires images with a resolution of no less than 20 megapixels at a frequency of 1-3Hz and can automatically adjust the exposure time according to the ambient light intensity, thereby effectively adapting to the detection needs under different lighting conditions.
[0048] In the feature extraction stage, a parallel processing approach combining image and point cloud processing is used to accurately capture the edge features of the guardrail from different dimensions. In the image branch, an adaptive threshold-based edge detection algorithm is employed. By setting the high threshold to 0.3 times the maximum gradient and the low threshold to 0.1 times, the algorithm effectively distinguishes the upper and lower edges of the guardrail from complex background edges, thus reliably outlining the guardrail contour on a two-dimensional plane. In the point cloud branch, the RANSAC algorithm is used to perform planar fitting on the guardrail point cloud, strictly controlling the planar fitting error to within 3 cm, and extracting the edge points of this fitted plane as feature points. This process accurately reconstructs the actual geometric shape and position of the guardrail in three-dimensional space, providing an accurate spatial structural basis for subsequent path planning.
[0049] The above steps enable the extraction of guardrail edge features, providing real-time and accurate data for the dynamic adjustment of the drone's flight path.
[0050] Specifically, the lateral distance of the path is dynamically adjusted by offsetting the guardrail edges. Specifically, the edge offset of the guardrail relative to the initial guardrail distribution data is calculated based on the guardrail edge characteristics, i.e., ΔY_real = Y t (i)-Y0(i), where ΔY_real is the guardrail edge offset, Y t(i) is the current edge of the guardrail, and Y0(i) is the initial edge of the guardrail; when |ΔY_real|>0.5m, the lateral distance of the path is updated to D+ΔY_real, and the adjustment response time is ≤0.5s, which can quickly adapt to the lateral position change of the guardrail.
[0051] For longitudinal changes, adjustments are made based on changes in terrain elevation. Specifically, the change in terrain elevation ΔZ_terrain between the terrain image data and the initial terrain data is calculated, i.e., ΔZ_terrain = Z_terrain(i) - Z_terrain(i-1), where Z_terrain(i) is the terrain elevation at time i and Z_terrain(i-1) is the terrain elevation at time i-1. When the change in terrain elevation ΔZ_terrain > 2m, the flight altitude is compensated using the guardrail height compensation value ΔH, i.e., H = H0 + ΔZ_terrain + ΔH.
[0052] Furthermore, the guardrail height compensation value ΔH is determined by the initial guardrail height, that is, ΔH=H_current-H_base, where H_current is the real-time detected guardrail height and H_base is the initial guardrail height.
[0053] Among them, the height adjustment accuracy is ≤0.2m, ensuring complete vertical coverage of the guardrail.
[0054] For the heading angle, calculate the real-time rate of change of the guardrail's direction, dK / ds. When dK / ds > 0.02 m⁻¹, correct the initial heading angle by θ, where θ = arctan(dY). t / dX t The corrected heading angle deviates from the guardrail tangent direction by no more than ±5°, and the angle adjustment rate is ≤10° / s to ensure that the sensor viewing angle matches the guardrail direction.
[0055] Furthermore, when the guardrail curvature K > 0.05m⁻¹, the camera sampling frequency is increased to 3Hz and the lidar sampling frequency is increased to 20Hz, increasing the data acquisition density at curves and avoiding missed detections; the amount of redundant data is reduced through an adaptive sampling strategy, thus reducing storage costs.
[0056] In one optional embodiment, obstacles are detected using the point cloud data, and a local path replanning is performed on the baseline flight path based on the obstacle detection results using an improved A* algorithm, including the following steps: The DBSCAN algorithm is used to perform point cloud clustering on the point cloud data to obtain clustered point clouds. Obstacle detection is performed based on the clustered point cloud. When obstacles exist, an improved route optimization algorithm is used for local path replanning. Local path replanning includes: The search space is rasterized based on the clustered point cloud; A cost function is constructed, and the cost value of each rasterized search space is calculated using the cost function; wherein, the cost function is constructed by path length cost, path smoothness cost, and guardrail coverage loss; Local path replanning is performed using the aforementioned cost.
[0057] It should be noted that the A* algorithm is a heuristic search algorithm. This embodiment uses the improved A+ algorithm to perform local path replanning on the baseline flight path, thereby achieving obstacle avoidance while detecting guardrails.
[0058] Specifically, obstacle detection is the first step. In the obstacle perception phase, the DBSCAN algorithm is used to cluster the point cloud data collected by the LiDAR. By setting key parameters such as a neighborhood radius of 0.5 meters and a minimum number of points of 10, spatially adjacent point clouds are effectively aggregated into different independent objects. For each identified point cloud cluster, its distance from the guardrail reference plane, the overall height of the cluster, and its three-dimensional volume are further calculated. When the conditions of a distance of less than 1 meter, a height of more than 0.5 meters, and a volume of more than 0.5 cubic meters are simultaneously met, it is determined to be a valid obstacle. This process can accurately distinguish between actual obstacles such as roadside trees and billboards and irrelevant noise points, providing real-time spatial threat information that must be avoided for subsequent dynamic path planning. It is a core link in achieving safe and collision-free inspection.
[0059] Then, the A* algorithm is used to perform local path replanning on the baseline flight path. Specifically, this includes: rasterizing the search space based on clustered point clouds, setting the grid size to 0.5m×0.5m×0.5m to accurately describe the spatial relationship between obstacles and the path. This process divides the three-dimensional space around the UAV into cubic grids with a side length of 0.5m. By marking the state of each grid, a discretized and computable spatial model is constructed to accurately describe the occupancy of obstacles and the spatial relationship between feasible paths, providing a structured environmental representation for subsequent path search.
[0060] Construct a cost function and use it to calculate the cost of each rasterized search space. The cost function is constructed as follows: F = G + λS + βC; Where G is the path length cost (unit: m), λ is the smoothness weight (λ=0.3-0.5), S is the path smoothness cost (S=Σ|θ(i+1)-2θ(i)+θ(i-1)|), β is the coverage weight (β=0.6-0.8), and C is the guardrail coverage loss (C=1-effective detection length / planned detection length). The goal is to balance path length, smoothness, and detection coverage while avoiding obstacles.
[0061] The cost value is calculated using the cost function, and the optimal path is found using the cost value, thereby enabling local path replanning.
[0062] Furthermore, during the local path replanning process, three constraints were set: maintaining a safe distance of no less than 1.5m from obstacles, limiting the length of the detour path to no more than 150% of the original plan, and requiring the return to the original path trend within 100 meters after obstacle avoidance. While ensuring the absolute safety of the UAV flight, the efficiency loss caused by obstacle avoidance was effectively controlled, and the route continuity and execution consistency of the overall detection task were guaranteed.
[0063] In one optional embodiment, generating a dynamic detection route by combining the adjusted flight parameters and the replanned flight path includes the following steps: The replanned flight path is fitted using a third-order B-spline curve to obtain the fitted UAV path; during the fitting process, the spacing between the curve control points is consistent with the spacing between the path nodes. The fitted UAV path is constrained based on the adjusted flight parameters to obtain a dynamic detection route.
[0064] It should be noted that in the path smoothing and motion constraint stage, a third-order B-spline curve is first used to smoothly fit the path nodes generated by the replanning flight path. By maintaining the consistency between the spacing of the curve control points and the spacing of the path nodes, the geometric continuity and natural transition of the path are ensured.
[0065] Subsequently, constraints were imposed on the fitted path: including limiting the rate of change of heading angle between adjacent nodes to no more than 10° / m and the curvature of the entire path to no more than 0.1m⁻¹, to control the turning amplitude of the UAV; constraining flight speed fluctuations to within 2m / s and acceleration to no more than 2m / s², to ensure flight stability; simultaneously, mandating a distance range of 2 to 8 meters between the path and the guardrail, combined with a horizontal field of view of no less than 60° for the sensors, to ensure that the guardrail is within the effective detection range throughout the entire process; in addition, it is required that the total length of the optimized path be reduced by no more than 10%, and the guardrail detection coverage rate be no less than 98%, thereby improving flight efficiency while strictly ensuring the quality of the core detection task.
[0066] After completing path generation and constraint processing, the next step is path evaluation and feedback. This step systematically verifies the satisfaction of all the aforementioned constraints and evaluates the safety and feasibility of the path in actual execution.
[0067] In the path evaluation phase, the generated final detection route is comprehensively simulated and evaluated based on key indicators such as guardrail coverage, path smoothness, flight time, and obstacle avoidance success rate. This quantitative evaluation process provides an objective and comprehensive performance metric for the planning results, ensuring that the output path achieves an executable level in terms of detection completeness, motion smoothness, operational efficiency, and safety.
[0068] If all evaluation indicators fail to meet the preset thresholds (such as coverage of no less than 95%, smoothness greater than 0.8, and obstacle avoidance success rate of 100%), the evaluation results and deviation information will be fed back, and the initial flight parameters will be dynamically adjusted and the local path will be replanned, triggering a new round of planning and optimization until all indicators meet the requirements, thus forming a continuous self-improving closed-loop optimization mechanism.
[0069] The core function of this closed-loop mechanism is to fundamentally ensure that the route ultimately applied to actual flight operations can not only dynamically adapt to changes in the environment and mission, effectively overcome the inherent defects of traditional fixed routes, but also continuously improve the overall adaptability, accuracy and operational economy of guardrail detection in long-term operation.
[0070] To demonstrate the effectiveness of the method provided in this embodiment, a specific example of data is used for illustration, including: Step S1, Preprocessing stage: Collect road section data using vehicle-mounted LiDAR, generate guardrail centerline vector file (.shp format) and DEM model (0.5m resolution), and import them into the UAV ground station system.
[0071] Step S2, Baseline Path Generation: Set the initial parameters in the ground station software: lateral distance D=4m, initial height H0=8m, node spacing for straight sections 10m, and spacing for curved sections 5m. Generate the baseline path and save it in advance.
[0072] Step S3, Real-time Detection Phase: The UAV takes off along the baseline path, the lidar scans at a frequency of 20Hz, the camera captures images at a frequency of 2Hz, and the data is transmitted to the onboard processor in real time.
[0073] S4. Dynamic Path Adjustment: Different path calculation parameters are adjusted based on the real-time flight trajectory of the UAV. When correcting lateral offset, the coordinates are updated and corrected accordingly. When adjusting altitude, data is updated based on changes in longitudinal coordinates and relevant guardrail compensation values. Simultaneously, the UAV detection angle is adjusted in real-time to ensure the UAV sensor's main field of view remains perpendicular to the guardrail's direction, resulting in excellent path detection performance.
[0074] S5. Obstacle avoidance is implemented by determining obstacles based on the distance between the clustered point cloud and the guardrail. Specifically, when an obstacle is more than 1m high and less than 0.5m away from the guardrail, and a roadside tree (3m high and 0.8m away from the guardrail) is detected, obstacle avoidance is triggered. The local path is shifted 2m inward to the inside of the road, bypasses the tree, and returns to the original path. The node spacing of the obstacle avoidance section is increased to 3m to ensure continuous guardrail coverage.
[0075] S6. Path optimization results: The optimized path has a smooth heading angle change with a maximum fluctuation of ≤8° / m, a stable flight speed of 5m / s, and a data acquisition coverage of 99.5%.
[0076] Through the above methods, dynamic path adjustment ensures that the sensor is always aligned with the guardrail, improving the integrity of the collected data by more than 30%; obstacle avoidance function reduces invalid data collection, improving detection efficiency by more than 25%; and adaptive sampling strategy reduces redundant data volume, reducing storage costs by more than 40%. Example
[0077] Figure 2 This is a schematic diagram of the structure of the UAV dynamic detection route planning system based on guardrail features provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the UAV dynamic detection route planning system based on guardrail features includes: The coordinate establishment module is used to acquire the initial distribution data of the guardrail and the initial terrain data, and to establish a road coordinate system based on the initial distribution data of the guardrail; The initial module is used to generate a reference flight path and initial flight parameters that are parallel to the direction of the guardrail based on the road coordinate system; The extraction module is used to collect guardrail point cloud data and terrain image data in real time, and extract guardrail edge features from the guardrail point cloud data; The adjustment module is used to dynamically adjust the initial flight parameters based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, to obtain the adjusted flight parameters; The replanning module is used to detect obstacles using the point cloud data, and based on the obstacle detection results, it uses an improved A* algorithm to perform local path replanning on the baseline flight path to obtain the replanned flight path. The route generation module is used to generate a dynamic detection route by combining the adjusted flight parameters and the replanned flight path. Example
[0078] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention, as shown below. Figure 3As shown, the electronic device includes a processor 21, a memory 22, an input device 23, and an output device 24; the number of processors 21 in the computer device can be one or more. Figure 3 Taking a processor 21 as an example; the processor 21, memory 22, input device 23, and output device 24 in an electronic device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0079] The memory 22, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor 21 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 22, thereby implementing the UAV dynamic detection route planning method based on guardrail features in Embodiment 1.
[0080] The memory 22 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 22 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 22 may further include memory remotely located relative to the processor 21, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0081] Input device 23 can be used to receive user input such as ID and password. Output device 24 is used to output the network configuration page. Example
[0082] Embodiment 4 of the present invention also provides a computer-readable storage medium, wherein the computer-executable instructions, when executed by a computer processor, are used to implement the UAV dynamic detection route planning method based on guardrail features as provided in Embodiment 1.
[0083] The storage medium containing computer-executable instructions provided in the embodiments of the present invention is not limited to the method operation provided in Embodiment 1, but can also execute related operations in the UAV dynamic detection route planning method based on guardrail features provided in any embodiment of the present invention.
[0084] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for dynamic detection and route planning of unmanned aerial vehicles based on guardrail features, characterized in that, Includes the following steps: Acquire initial distribution data of guardrails and initial terrain data, and establish a road coordinate system based on the initial distribution data of guardrails; A reference flight path and initial flight parameters parallel to the direction of the guardrail are generated based on the road coordinate system; Real-time acquisition of guardrail point cloud data and terrain image data; extraction of guardrail edge features from the guardrail point cloud data. Based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, the initial flight parameters are dynamically adjusted to obtain the adjusted flight parameters. Obstacles are detected using the point cloud data, and the improved A* algorithm is used to perform local path replanning on the baseline flight path based on the obstacle detection results to obtain the replanned flight path. The dynamic detection route is generated by combining the adjustment of flight parameters and the replanning of flight path.
2. The UAV dynamic detection route planning method based on guardrail features according to claim 1, characterized in that, The initial distribution data of the guardrail includes: the centerline of the guardrail and the height of the guardrail.
3. The method for dynamic detection and route planning of unmanned aerial vehicles based on guardrail features according to claim 1, characterized in that, Establishing a road coordinate system based on the initial distribution data of the guardrails includes the following steps: Establish an X-axis along the central axis of the guardrail; A Y-axis is established perpendicular to the central axis of the guardrail; wherein the Y-axis points outward from the guardrail. Establish the Z-axis along the vertical upward direction.
4. The UAV dynamic detection route planning method based on guardrail features according to claim 3, characterized in that, Based on the road coordinate system, a reference flight path and initial flight parameters parallel to the direction of the guardrail are generated, including: Determine the lateral distance of the path, and take the point offset from the lateral distance of the path along the Y-axis as the starting path point of the UAV; Obtain the curvature of the guardrail, and determine the path node spacing based on the guardrail curvature; The initial flight altitude is determined based on the height of the guardrail, wherein the initial flight altitude is greater than the height of the guardrail; Obtain the tangent to the centerline of the guardrail, and set the initial heading angle to be consistent with the direction of the tangent.
5. The UAV dynamic detection route planning method based on guardrail features according to claim 4, characterized in that, Based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, the initial flight parameters are dynamically adjusted, including the following steps: The guardrail edge offset is calculated based on the guardrail edge features. If the guardrail edge offset is greater than the offset threshold, the lateral distance of the path is updated using the guardrail edge offset. Calculate the change in terrain elevation between the terrain image data and the initial terrain data. If the change in terrain elevation is greater than an altitude threshold, update the initial flight altitude using the change in terrain elevation. Calculate the rate of change of the guardrail's orientation. If the rate of change of the guardrail's orientation is greater than the rate of change threshold, correct the initial heading angle.
6. The UAV dynamic detection route planning method based on guardrail features according to claim 4, characterized in that, Obstacles are detected using the point cloud data, and based on the obstacle detection results, an improved A* algorithm is used to perform local path replanning on the baseline flight path, including the following steps: The DBSCAN algorithm is used to perform point cloud clustering on the point cloud data to obtain clustered point clouds. Obstacle detection is performed based on the clustered point cloud. When obstacles exist, an improved route optimization algorithm is used for local path replanning. Local path replanning includes: The search space is rasterized based on the clustered point cloud; A cost function is constructed, and the cost value of each rasterized search space is calculated using the cost function; wherein, the cost function is constructed by path length cost, path smoothness cost, and guardrail coverage loss; Local path replanning is performed using the aforementioned cost.
7. The UAV dynamic detection route planning method based on guardrail features according to claim 4, characterized in that, The process of generating a dynamic detection route by combining the adjustment of flight parameters and the replanning of the flight path includes the following steps: The replanned flight path is fitted using a third-order B-spline curve to obtain the fitted UAV path; during the fitting process, the spacing between the curve control points is consistent with the spacing between the path nodes. The fitted UAV path is constrained based on the adjusted flight parameters to obtain a dynamic detection route.
8. A UAV dynamic detection route planning system based on guardrail features, the system being used to implement the UAV dynamic detection route planning method based on guardrail features according to any one of claims 1 to 7, characterized in that, The system includes: The coordinate establishment module is used to acquire the initial distribution data of the guardrail and the initial terrain data, and to establish a road coordinate system based on the initial distribution data of the guardrail; The initial module is used to generate a reference flight path and initial flight parameters that are parallel to the direction of the guardrail based on the road coordinate system; The extraction module is used to collect guardrail point cloud data and terrain image data in real time, and extract guardrail edge features from the guardrail point cloud data; The adjustment module is used to dynamically adjust the initial flight parameters based on the terrain changes between the terrain image data and the initial terrain data, as well as the edge features of the guardrail, to obtain the adjusted flight parameters; The replanning module is used to detect obstacles using the point cloud data, and based on the obstacle detection results, it uses an improved A* algorithm to perform local path replanning on the baseline flight path to obtain the replanned flight path. The route generation module is used to generate a dynamic detection route by combining the adjusted flight parameters and the replanned flight path.
9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the UAV dynamic detection route planning method based on guardrail features as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the UAV dynamic detection route planning method based on guardrail features as described in any one of claims 1 to 7.