CN116627164A - Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system - Google Patents

Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system Download PDF

Info

Publication number
CN116627164A
CN116627164A CN202310392580.2A CN202310392580A CN116627164A CN 116627164 A CN116627164 A CN 116627164A CN 202310392580 A CN202310392580 A CN 202310392580A CN 116627164 A CN116627164 A CN 116627164A
Authority
CN
China
Prior art keywords
aerial vehicle
unmanned aerial
point
ground
laser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310392580.2A
Other languages
Chinese (zh)
Other versions
CN116627164B (en
Inventor
张勇
覃卫文
赵宝林
徐光彩
张衡
康泰钟
胡诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lvtuzhi New Technology Co ltd
Beijing Digital Green Earth Technology Co ltd
Original Assignee
Shenzhen Lvtuzhi New Technology Co ltd
Beijing Digital Green Earth Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lvtuzhi New Technology Co ltd, Beijing Digital Green Earth Technology Co ltd filed Critical Shenzhen Lvtuzhi New Technology Co ltd
Priority to CN202310392580.2A priority Critical patent/CN116627164B/en
Publication of CN116627164A publication Critical patent/CN116627164A/en
Application granted granted Critical
Publication of CN116627164B publication Critical patent/CN116627164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention provides a terrain-height-based unmanned aerial vehicle ground-imitation flight control method and system, wherein the unmanned aerial vehicle ground-imitation flight control method comprises the steps of obtaining point cloud POS data of an unmanned aerial vehicle, and calculating the current flight position and flight direction of the unmanned aerial vehicle according to the point cloud POS data; filtering point cloud POS data according to the current flight position and the flight direction to obtain laser point cloud data in a preset range; constructing a DEM three-dimensional voxel grid according to laser point cloud data, searching the lowest point of the corresponding plane position of each voxel in the grid, and constructing to obtain a DEM model; extracting ground points according to the elevation difference between any pixel point and adjacent pixel points in the DEM model; calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model; and calculating and adjusting the flying height of the unmanned aerial vehicle relative to the terrain according to the terrain height of the DEM model and the current flying position of the unmanned aerial vehicle. The technical scheme of the invention can solve the problem that the unmanned aerial vehicle always flies at the same height because effective ground information is difficult to extract in the prior art.

Description

Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system
Technical Field
The invention relates to the technical field of unmanned aerial vehicles, in particular to an unmanned aerial vehicle ground-imitating flight control method and system based on terrain height.
Background
The ground-imitating flight is a flight mode in which the unmanned aerial vehicle keeps constant height difference with the target ground object by setting the height fixed with the known three-dimensional terrain when in flight operation. Through flying with the aid of the ground, unmanned aerial vehicle can adapt to the topography of different altitudes, can automatically generate the high route of becoming according to the district topography to keep ground resolution unanimous, acquire better data effect.
The existing unmanned aerial vehicle mainly adopts a camera shooting mode to acquire ground information, and has the main defects that three-dimensional reconstruction is needed in real time, the accuracy is low, and the unmanned aerial vehicle has no penetrability to complex objects, so that the ground information cannot be obtained or is available, and calculation fluctuation is large. In order to solve the above problems, the prior art adopts a laser radar to collect ground data. Currently, in the unmanned aerial vehicle field, a technology for acquiring ground data by using a laser radar is very popular, however, the data acquisition work depends on manual control of a flight crew. The route planning of the unmanned aerial vehicle either utilizes satellite terrain data with lower resolution or adopts 2d plane position planning only, which leads to the unmanned aerial vehicle always fly at the same altitude.
Flying at the same altitude can lead to difficult data acquisition in some complex terrain areas and increased flight risk. Flying at the same altitude can also lead to overlong scanning distance of lasers in low-lying areas such as valley areas, and insufficient reflection intensity can lead to data loss. In addition, because the fluctuation of the terrain height is large, the point densities collected in different areas are very different, and the point densities in certain areas are possibly insufficient, so that reworking and repair are further caused, the operation period of the unmanned aerial vehicle is increased, and the normal propulsion of projects is influenced. In addition, with existing satellite terrain data, there may be low resolution and high acquisition difficulty, and the accuracy of use may be limited.
Disclosure of Invention
The invention provides a terrain-height-based unmanned aerial vehicle ground-imitation flight control scheme, and aims to solve the problems that in the prior art, an unmanned aerial vehicle flies at the same height, so that data acquisition work of a complex terrain area is difficult, the flight risk is increased, data loss is caused by flying at the same height, the point density is insufficient, reworking and repair flight is caused, the working period is increased, and the normal operation of projects is influenced.
In order to solve the above problems, according to a first aspect of the present invention, there is provided an unmanned aerial vehicle ground-imitating flight control method based on terrain elevation, comprising:
Acquiring point cloud POS data of the unmanned aerial vehicle in real time, and calculating the current flight position and flight direction of the unmanned aerial vehicle according to the point cloud POS data;
filtering point cloud POS data according to the current flight position and the flight direction of the unmanned aerial vehicle to obtain laser point cloud data in a preset distance range of a visual axis of the unmanned aerial vehicle laser radar and a ground intersection point;
constructing a DEM three-dimensional voxel grid of laser point cloud data, searching the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid, and constructing to obtain a DEM model;
extracting ground points in the DEM model according to the elevation difference between any pixel point and adjacent pixel points in the DEM model;
calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model;
and calculating and adjusting the flying height of the unmanned aerial vehicle relative to the terrain according to the terrain height of the DEM model and the current flying position of the unmanned aerial vehicle.
Preferably, in the ground-imitating flight control method of an unmanned aerial vehicle, the step of acquiring point cloud POS data of the unmanned aerial vehicle in real time and calculating a current flight position and a flight direction of the unmanned aerial vehicle according to the point cloud POS data includes:
acquiring original point cloud data in real time by using an unmanned airborne laser radar;
converting coordinates of original point cloud data according to POS information corresponding to the original point cloud data at the same moment to obtain point cloud projection data;
Extracting the current flight position of the unmanned aerial vehicle according to the point cloud projection data;
and estimating the flight direction of the unmanned aerial vehicle according to the current flight position of the unmanned aerial vehicle and the last-moment flight position of the unmanned aerial vehicle.
Preferably, in the ground-imitating flight control method of an unmanned aerial vehicle, the step of filtering point cloud POS data according to a current flight position and a flight direction of the unmanned aerial vehicle to obtain laser point cloud data within a predetermined distance range between a view axis of the unmanned aerial vehicle laser radar and a ground intersection point includes:
constructing a flight direction linear equation of the unmanned aerial vehicle by taking the current flight position of the unmanned aerial vehicle as a starting point;
according to the flight direction straight line equation, calculating the horizontal distance from each laser point in the point cloud POS data to the flight direction straight line of the unmanned aerial vehicle;
according to the horizontal distance from each laser point to the straight line of the flying direction of the unmanned aerial vehicle, filtering to obtain first laser point cloud data in the preset horizontal distance range of the straight line of the flying direction;
horizontally rotating the flight direction linear equation to obtain a vertical direction linear equation perpendicular to the flight direction on the same horizontal plane;
according to a vertical direction straight line equation, calculating the horizontal distance from each laser point to a vertical direction straight line of the unmanned aerial vehicle in the first laser point cloud data point by point;
And filtering to obtain second laser point cloud data in a preset horizontal distance range of the vertical straight line according to the horizontal distance between each laser point and the vertical straight line of the unmanned aerial vehicle, wherein the second laser point cloud data is used as laser point cloud data in a preset distance range of an intersection point of a visual center axis of the unmanned aerial vehicle laser radar and the ground.
Preferably, in the ground-imitating flight control method of an unmanned aerial vehicle, after the step of obtaining laser point cloud data within a predetermined distance range between a view axis of the unmanned aerial vehicle laser radar and a ground intersection point, the method further comprises:
generating a k-d tree of laser point cloud data according to a kdtree algorithm, and establishing a topological relation of the laser point cloud data;
traversing all laser points in the neighborhood of the unlabeled laser points in the laser point cloud data in the k-d tree, and marking all the searched laser points;
reserving one laser point in all the searched laser points in the neighborhood;
when traversing all untagged laser points in the laser point cloud data, finishing resampling of the laser point cloud data;
and constructing a voxel grid of the resampled point cloud data, and when the number of points in a single voxel is smaller than a preset certain number of thresholds, regarding the points in the voxel as noise points and filtering.
Preferably, the unmanned aerial vehicle ground-like flight control method further comprises, after taking points in the voxels as noise points and filtering:
calculating the average value of the distances between the laser points and all the laser points in the neighborhood;
judging whether the average value of the distances exceeds a preset distance threshold value or not;
if the preset distance threshold value is exceeded, marking the laser point as a noise point;
when all laser points of the laser point cloud data are traversed to obtain all noise points in the laser point cloud data, a voxel filtering algorithm is used for filtering all the noise points.
Preferably, in the ground-imitating flight control method of an unmanned aerial vehicle, the steps of constructing a three-dimensional voxel grid of a DEM of laser point cloud data, searching a lowest point of a corresponding plane position of each voxel in the three-dimensional voxel grid of the DEM, and constructing and obtaining a DEM model include:
establishing a DEM three-dimensional voxel grid of laser point cloud data according to a preset resolution;
calculating the voxel coordinates of each laser point in the laser point cloud data in the DEM three-dimensional voxel grid;
according to voxel coordinates of the laser points, calculating the number of the laser points and the laser point id contained in each voxel;
traversing the DEM three-dimensional voxel grid from bottom to top along the vertical direction, and searching the lowest point of the corresponding plane position of each voxel according to the number of laser points and the laser point id contained in each voxel;
And constructing the DEM model by using the lowest points of the corresponding plane positions of all voxels in the DEM three-dimensional voxel grid.
Preferably, in the ground-imitating flight control method of an unmanned aerial vehicle, the step of extracting the ground point in the DEM model according to the elevation difference between any pixel point and the adjacent pixel point in the DEM model includes:
searching all adjacent pixel point pairs with the absolute value of the elevation difference being greater than or equal to the maximum elevation difference threshold value from the DEM model;
searching all adjacent ultrahigh pixel points with the height difference greater than or equal to the maximum height difference threshold value by taking the pixel point with the lowest height in the adjacent pixel point pair as a reference ground point;
and eliminating all adjacent ultrahigh pixel points from the DEM model, and eliminating pixel points with the absolute value of the elevation difference of any ultrahigh pixel point in all ultrahigh pixel points smaller than or equal to the minimum elevation difference threshold value, so as to obtain all ground points in the DEM model.
Preferably, in the ground-like flight control method of an unmanned aerial vehicle, the step of removing all adjacent ultra-high pixel points from the DEM model, and removing pixel points with an absolute value of an elevation difference of any ultra-high pixel point of all ultra-high pixel points being smaller than or equal to a minimum elevation difference threshold value, to obtain all ground points in the DEM model includes:
Traversing each pixel point in the DEM model, and judging whether the absolute value of the elevation difference between the current pixel point and any adjacent pixel point is larger than or equal to a maximum elevation difference threshold value;
if the absolute value of the elevation difference is larger than or equal to the maximum elevation difference threshold value, selecting the pixel point with the lowest elevation in the current pixel point or any adjacent pixel point as a reference ground point, and eliminating the pixel point with the highest elevation;
judging whether the ultrahigh pixel point with the height difference greater than or equal to the maximum height difference threshold value exists in other adjacent pixel points of the current pixel point;
if the difference of elevation with the reference ground point is larger than or equal to the maximum difference of elevation threshold value, the ultra-high pixel point exists; removing the ultra-high pixel point and removing all adjacent pixel points with the absolute value of the elevation difference between the ultra-high pixel point and the minimum elevation difference threshold value or less;
and after traversing all the pixel points in the DEM model, selecting all the rest pixel points in the DEM model as ground points of the DEM model.
Preferably, in the above ground-simulated flight control method for an unmanned aerial vehicle, the step of calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model includes:
dividing the DEM model into a plurality of DEM grids;
Counting the elevation values of all the ground points in each DEM grid, and sorting the elevation values of all the ground points according to the order from large to small;
summing the elevation values of the ground points with the number of the front preset proportion of the sequencing results to obtain the average height of the current terrain;
and calculating the weighted height of the current terrain according to the average height of the current terrain, the average height of the previous frame of terrain and the weights of the previous and subsequent frames of terrain, and taking the weighted height of the current terrain as the terrain height of the DEM model.
Preferably, the above ground-simulated flight control method for an unmanned aerial vehicle further includes, after the step of calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model:
constructing a DSM voxel grid of laser point cloud data;
traversing each voxel in the DSM voxel grid sequentially in a vertical direction;
respectively counting the number of laser points in each voxel of the DSM voxel grid, and judging whether the number of the laser points is larger than or equal to a preset number threshold;
if the number of the laser points is greater than or equal to a preset number threshold, determining the highest ground feature point of the position of the plane corresponding to the searched voxel;
when the highest feature point of the plane position corresponding to all voxels in the DSM voxel grid is obtained, selecting the highest feature point with the largest elevation value from all the highest feature points as the maximum feature height corresponding to the laser point cloud data.
According to a second aspect of the present invention, the present invention also provides an unmanned aerial vehicle ground-like flight control system based on terrain elevation, comprising:
the method comprises the steps of a memory, a processor and an unmanned aerial vehicle ground-imitating flight control program which is stored in the memory and runs on the processor and is based on the terrain height, wherein the unmanned aerial vehicle ground-imitating flight control program is executed by the processor to realize the unmanned aerial vehicle ground-imitating flight control method provided by any one of the technical schemes.
In summary, the terrain-height-based unmanned aerial vehicle ground-simulating flight control scheme provided by the invention adopts an unmanned aerial vehicle laser radar technology to process laser point clouds acquired in real time in the flight process and estimate the terrain, confirms the height deviation between the unmanned aerial vehicle and the terrain in real time, reasonably predicts the next flight position by integrating historical terrain and flight tracks, and adjusts the flight state in real time according to the preset flight height so as to maintain the flight height relatively stable with the ground, thereby finally achieving the effect of ground-simulating flight.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an unmanned aerial vehicle ground-imitating flight control method based on terrain height, which is provided by the embodiment of the invention;
fig. 2 is a flow chart of a method for calculating a current flight position and a flight direction of the unmanned aerial vehicle according to the embodiment shown in fig. 1;
fig. 3 is a flow chart of a method for acquiring laser point cloud data according to the embodiment shown in fig. 1;
fig. 4 is a schematic flow chart of a filtering method of laser point cloud data according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a method for constructing a DEM model according to the embodiment shown in FIG. 1;
FIG. 6 is a schematic flow chart of a method for extracting ground points in a DEM model according to the embodiment shown in FIG. 1;
FIG. 7 is a flowchart of a method for acquiring all ground points in the DEM model according to the embodiment shown in FIG. 6;
FIG. 8 is a flow chart of a method for calculating terrain elevation for a DEM model provided by the embodiment of FIG. 1;
FIG. 9 is a flow chart of a method for selecting a maximum ground feature height according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an unmanned aerial vehicle ground-like flight control system based on terrain elevation according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The technical problems mainly solved by the embodiment of the invention are as follows:
currently in the unmanned aerial vehicle field, data acquisition work relies on manual control by the flight crew. The route planning of the unmanned aerial vehicle either utilizes satellite terrain data with lower resolution or adopts 2d plane position planning only, which leads to the unmanned aerial vehicle always fly at the same altitude. Flying at the same altitude can lead to difficult data acquisition in some complex terrain areas and increased flight risk. In addition, because the fluctuation of the terrain height is large, the point densities collected in different areas are very different, and the point densities in certain areas are possibly insufficient, so that reworking and repair are further caused, the operation period of the unmanned aerial vehicle is increased, and the normal propulsion of projects is influenced. To reduce the above problems, the prior art adopts a camera photographing mode or adopts a distance and plane fitting method to estimate the terrain. The former needs to carry out three-dimensional reconstruction in real time, the precision is not high, and the forest land can not have penetrability like a laser radar, and effective ground information is difficult to obtain, so that calculation fluctuation is large. The latter fails to effectively estimate the overall trend of the terrain and the flight trajectory, and also causes large fluctuations.
In order to solve the problems, the following embodiment of the invention provides a terrain-height-based unmanned aerial vehicle ground-simulating flight control scheme, which is characterized in that a DEM model is built by establishing a DEM three-dimensional voxel grid according to laser point cloud data, then a ground point in the DEM model is extracted according to the elevation difference between any pixel point and an adjacent pixel point in the DEM model, and the terrain height of the DEM model is calculated according to the elevation of the ground point, so that the unmanned aerial vehicle is guided to maintain a relatively fixed flight height with the terrain in the process of collecting data, and smooth flight is realized.
In order to achieve the above objective, referring to fig. 1, fig. 1 is a schematic flow chart of an unmanned aerial vehicle ground-imitating flight control method based on terrain height according to an embodiment of the present invention. As shown in fig. 1, the unmanned aerial vehicle ground-like flight control method includes:
s110: and acquiring point cloud POS data of the unmanned aerial vehicle in real time, and calculating the current flight position and flight direction of the unmanned aerial vehicle according to the point cloud POS data.
The original point cloud data acquired by the unmanned aerial vehicle-mounted laser radar are usually transmitted through a udp, the transmitted data packet contains the intensity, azimuth and distance information of the laser point, polar coordinates are required to be converted into Cartesian coordinates through coordinate conversion, the world coordinates of the laser point are calculated by combining the POS information (inertial navigation attitude and GNSS position) at the current moment in a specific conversion mode, so that the world coordinates can be converted into UTM projection coordinates, further point cloud POS data comprising point cloud and POS information are obtained, and then the current flight position and flight direction of the unmanned aerial vehicle can be calculated according to the point cloud POS data. And after resolving the original point cloud data at the acquisition end of the unmanned aerial vehicle, directly sending the original point cloud data to a ground imitation algorithm module, and constructing a thread safe cache in the ground imitation algorithm module to store the original point cloud data and POS information, and accumulating the record piece by piece. When the algorithm needs to calculate the data, a certain amount of original point cloud data and POS data are read from the cache at a certain time interval for processing.
Specifically, as a preferred embodiment, as shown in fig. 2, in the above-mentioned ground-like flight control method for an unmanned aerial vehicle, step S110: the method for acquiring the point cloud POS data of the unmanned aerial vehicle in real time comprises the steps of:
s111: and acquiring original point cloud data in real time by using an unmanned airborne laser radar. The raw point cloud data acquired in real time by the unmanned aerial vehicle laser radar comprises the intensity, azimuth and distance information of the ground laser point, and is usually in the form of polar coordinates because the laser radar is mounted on the unmanned aerial vehicle.
S112: and converting coordinates of the original point cloud data according to the POS information corresponding to the original point cloud data at the same moment to obtain point cloud projection data. The unmanned aerial vehicle can acquire POS information of the current moment in real time in the flight process, the POS information comprises the inertial navigation attitude and the GNSS position of the unmanned aerial vehicle, so that the polar coordinates of each laser point in the original point cloud data can be converted into world coordinates by combining the inertial navigation attitude and the GNSS position in the POS information, and then converted into UTM projection coordinates, the point cloud POS data can be obtained, and the point cloud projection data are part of the point cloud POS data.
Because POS information is used to describe the position and attitude of an aircraft, the point cloud projection data is a point cloud with projection coordinates obtained by projecting an original point cloud. Therefore, the POS information can describe the flight state of the unmanned aerial vehicle, and the point cloud projection data is reflection of projection coordinates of ground objects and can be used as one type of point cloud POS data.
S113: and extracting the current flight position of the unmanned aerial vehicle according to the point cloud projection data. Because the point cloud projection data comprises the POS information, namely the inertial navigation attitude and the GNSS position of the unmanned aerial vehicle are included, the world coordinates of the unmanned aerial vehicle at the current moment can be calculated by combining the flight attitude and the GNSS position of the unmanned aerial vehicle, namely the current flight position of the unmanned aerial vehicle is extracted.
S114: and estimating the flight direction of the unmanned aerial vehicle according to the current flight position of the unmanned aerial vehicle and the last-moment flight position of the unmanned aerial vehicle.
According to the embodiment of the application, the flight direction of the unmanned aerial vehicle is estimated by utilizing the current flight position of the unmanned aerial vehicle at the current moment and the last-moment flight position of the unmanned aerial vehicle, if the flight distance of the interval between the flight position points at the two moments is smaller than or equal to the set distance threshold value, the unmanned aerial vehicle returns, and the flight direction is not calculated; until the requirement of the set distance threshold is met, a next step of calculating the direction of flight may be performed. Because the unmanned aerial vehicle is in a hovering state or flies slowly in certain time periods, setting a certain flight distance can avoid large deviation in estimating the flight direction of the unmanned aerial vehicle.
The unmanned aerial vehicle can acquire laser point cloud data of the ground in real time in the flight process, so that the laser point cloud data needs to be filtered, only the laser point cloud data in a preset distance range between a view center axis of the laser at the current moment and the ground intersection point is reserved, and other point cloud filtering is not processed. Therefore, after the current flight position and flight direction of the unmanned aerial vehicle are calculated according to the point cloud POS data, the technical scheme provided in the embodiment shown in fig. 1 further includes:
s120: and filtering the point cloud POS data according to the current flight position and the flight direction of the unmanned aerial vehicle to obtain laser point cloud data in a preset distance range of the intersection point of the visual axis of the unmanned aerial vehicle laser radar and the ground.
By utilizing the current flight position and the flight direction of the unmanned aerial vehicle to perform longitudinal and transverse point cloud data filtering on a horizontal plane, only laser point cloud data in a certain range near the intersection point of the direction of the visual axis of the laser and the ground is reserved, and the rest point clouds in the original point cloud POS data are filtered and are not processed. Therefore, the method is favorable for estimating the topography in a certain range below the unmanned aerial vehicle, and the situation that the scanning range of the unmanned aerial vehicle laser radar is overlarge and the topography beyond distance is estimated is prevented.
Specifically, as a preferred embodiment, as shown in fig. 3, in the above-mentioned unmanned aerial vehicle ground-like flight control method, step S120: the method comprises the steps of filtering point cloud POS data according to the current flight position and the flight direction of the unmanned aerial vehicle to obtain laser point cloud data in a preset distance range between a visual axis of the unmanned aerial vehicle laser radar and a ground intersection point, and comprises the following steps:
S121: and constructing a flight direction linear equation of the unmanned aerial vehicle by taking the current flight position of the unmanned aerial vehicle as a starting point. The flight direction of the unmanned aerial vehicle is taken as the longitudinal direction, so that the flight direction linear equation of the unmanned aerial vehicle is constructed by taking the current flight position of the unmanned aerial vehicle as the starting point, and the flight direction instant moment of the unmanned aerial vehicle can be regarded as a straight line, so that a space straight line can be constructed according to the flight direction linear equation of the unmanned aerial vehicle. Specifically, the flight direction straight line equation includes:
X=n x ·t+X 0
Y=n y ·t+Y 0
Z=n z ·t+Z 0
wherein, (n) x ,n y ,n z ) Is the straight line flight direction of the unmanned plane, (X) 0 ,Y 0 ,Z 0 ) Is the current flight position.
S122: and calculating the horizontal distance from each laser point in the point cloud POS data to the flight direction straight line of the unmanned aerial vehicle according to the flight direction straight line equation.
S123: and filtering to obtain first laser point cloud data in a predetermined horizontal distance range of the flight direction straight line according to the horizontal distance between each laser point and the flight direction straight line of the unmanned aerial vehicle.
The method comprises the steps of removing point cloud data on the left side and the right side of the flight direction of the unmanned aerial vehicle, calculating the horizontal distance from each laser point in the point cloud POS data to a longitudinal linear equation point by point, wherein the horizontal distance is the perpendicular line section from the laser point to the straight line of the flight direction in the horizontal direction, filtering all laser points exceeding a preset horizontal distance threshold range, and reserving all laser points within the preset horizontal threshold range, so that the far points on the left side and the right side of the flight direction of the unmanned aerial vehicle can be filtered.
S124: and horizontally rotating the flight direction linear equation to obtain a vertical direction linear equation perpendicular to the flight direction on the same horizontal plane. Because UTM coordinates are used in the point cloud POS data, the position of the unmanned aerial vehicle is used as an origin of coordinates, the vertical direction is the Z axis, the anticlockwise center around the Z axis can also earn 90 degrees of the flight direction straight line equation, namely, the flight direction straight line equation can be horizontally rotated, and the vertical direction straight line equation perpendicular to the flight direction on the same horizontal plane is obtained.
S125: and calculating the horizontal distance from each laser point to the vertical straight line of the unmanned aerial vehicle in the first laser point cloud data point by point according to the vertical straight line equation.
S126: and filtering to obtain second laser point cloud data in a preset horizontal distance range of the vertical straight line according to the horizontal distance between each laser point and the vertical straight line of the unmanned aerial vehicle, wherein the second laser point cloud data is used as laser point cloud data in a preset distance range of an intersection point of a visual center axis of the unmanned aerial vehicle laser radar and the ground.
And calculating the distance from each laser point to a vertical direction linear equation in the first laser point cloud data point by point, filtering all laser points exceeding a preset horizontal distance range, and reserving the laser points within the preset horizontal distance threshold range, so that all the laser points far in front and behind in the current flight direction of the unmanned aerial vehicle are filtered, and obtaining the second laser point cloud data, namely, the laser point cloud data in the preset distance range of the intersection point of the view axis of the unmanned aerial vehicle laser radar and the ground.
The technical solution provided in the embodiment shown in fig. 1 further includes, after calculating laser point cloud data within a predetermined distance range between a view axis of the unmanned aerial vehicle laser radar and a ground intersection point:
s130: and constructing a DEM three-dimensional voxel grid of the laser point cloud data, searching the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid, and constructing to obtain a DEM model.
DEM (Digital Elevation Model ) is a physical floor model representing floor elevation in the form of a set of ordered arrays of values, a branch of digital terrain model DTM, from which various other terrain features can be derived. The DEM model can describe the spatial distribution of linear and nonlinear combinations of various topographical factors including elevation, such as slope, slope direction, rate of change of slope, etc., where the DEM model is a zero-order purely single-item digital topographical model, and other topographical characteristics such as slope, slope direction, and rate of change of slope, etc., may be derived based on the DEM. When the embodiment of the application is used for constructing the DEM model, firstly, a DEM three-dimensional voxel grid is constructed according to a certain resolution, a point cloud bounding box is estimated, and the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid is searched according to the range size of the bounding box, so that the DEM model is constructed, and the terrain characteristics of the corresponding ground of each laser point of laser point cloud data can be determined by using the DEM model.
Specifically, as a preferred embodiment, as shown in fig. 5, the above-mentioned ground-imitating flight control method for the unmanned aerial vehicle, step S130: the method for constructing the DEM three-dimensional voxel grid of the laser point cloud data comprises the steps of searching the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid, and constructing to obtain a DEM model, and comprises the following steps:
s131: and establishing a DEM three-dimensional voxel grid of the laser point cloud data according to the preset resolution. Specifically, firstly, a DEM three-dimensional voxel grid of the laser point cloud data is constructed according to a certain resolution, a point cloud bounding box is estimated, and the size of the bounding box range is determined, so that voxel coordinates of each laser point in the DEM three-dimensional voxel grid can be set.
S132: and calculating voxel coordinates of each laser point in the laser point cloud data in the DEM three-dimensional voxel grid.
Specifically, a lower left corner pl and an upper right corner pr of the DEM three-dimensional voxel grid are obtained. In the UTM coordinate system, with the lower left corner coordinate point (plx, ply, plz) of the DEN three-dimensional voxel grid as the origin, assuming that the resolution size of the DEM three-dimensional voxel grid is r, and the length, width and height of the voxel grid are (L, W, Z), the size of the DEM three-dimensional voxel grid can be expressed as:
the voxel coordinates where each laser point pt in the point cloud is located can be expressed as:
nx=(pt.x-pl.x)/r
ny=(pt.y-pl.y)/r
nz=(pt.z-pl.z)/r
According to the above formula, the voxel where each laser point is located can be calculated and the id of the laser point is saved in the voxel. Further, the number of points and the corresponding id of the laser spot included in each voxel can be known through calculation.
S133: the number of laser points and the laser point id contained in each voxel are calculated according to the voxel coordinates of the laser points. Because the formula can calculate and obtain the voxel coordinates of each laser point, the coordinate range of each voxel can be determined according to the lower left corner pl and the upper right corner pr of each voxel in the DEM three-dimensional voxel grid, and after the voxel coordinates of each laser point are obtained, the voxel where each laser point is located can be determined, so that the quantity and id of the laser points contained in each voxel can be obtained.
S134: traversing the DEM three-dimensional voxel grid from bottom to top along the vertical direction, and searching the lowest point of the corresponding plane position of each voxel according to the number of laser points and the laser point id contained in each voxel. Because the number of laser points at the lowest point of the corresponding plane position of the voxel is far more than that of other heights, the whole DEM three-dimensional voxel grid is traversed from bottom to top along the vertical direction (namely the Z-axis direction) based on the DEM three-dimensional voxel grid, if the number of the laser points in one voxel is greater than or equal to the preset number N, the lowest point of the corresponding plane position of the voxel is considered to be found, the current position is not found upwards any more, the lowest point of the other plane position is continuously different from bottom to top, and all voxel plane positions of the DEM three-dimensional voxel grid are known to be traversed.
S135: and constructing the DEM model by using the lowest points of the corresponding plane positions of all voxels in the DEM three-dimensional voxel grid. Traversing the lowest points of the corresponding plane positions of all voxels in the DEM three-dimensional voxel grid through the traversing process until the traversing of the lowest points of the corresponding plane positions of all voxels is completed, and obtaining an initial two-dimensional DEM model through the steps.
In addition, if an effective number of points are not found at certain voxel corresponding plane positions, the found laser points are marked as invalid values. For example: for some penetrable woodlands or floors, ground points can be obtained; for some building areas, the lowest points extracted are still roof locations, and these laser points need to be removed.
According to the technical scheme provided by the embodiment of the invention, the number of laser points and the laser point id contained in each voxel of the DEM three-dimensional voxel grid can be obtained by establishing the DEM three-dimensional voxel grid of the laser point cloud data according to the preset resolution, then calculating the voxel coordinates of each laser point in the DEM three-dimensional voxel grid in the laser point cloud data, so that the DEM three-dimensional voxel grid is traversed from bottom to top according to the number of laser points and the laser point id contained in each voxel, the lowest point, namely the laser point with the lowest voxel coordinates and the id thereof, of the corresponding plane position of all voxels in the DEM three-dimensional voxel grid can be obtained, and a two-dimensional DEM model can be constructed by using the lowest point of the corresponding plane position of all voxels in the DEM three-dimensional voxel grid.
After the two-dimensional initial DEM model is constructed, the two-dimensional initial DEM model corresponding to the historical multi-frame laser point cloud data is required to be added to the DEM model corresponding to the current frame, and the DEM model with a larger terrain range is obtained. For the DEM model, rapid filtering of ground points is required for the DEM model. See in particular fig. 1. After the DEM model is constructed, the technical solution provided in the embodiment shown in fig. 1 further includes the following steps:
s140: and extracting the ground point in the DEM model according to the elevation difference between any pixel point and the adjacent pixel point in the DEM model.
Because there may be ground points in the DEM model obtained by the above steps, there may also be Gao Chengyuan ground-exceeding buildings, such as e.g. grand trees and high-rise roofs, which are relatively tall and are in a sheet form, the pixels of these ground-exceeding buildings need to be filtered out to obtain the ground points in the DEM model. The specific technical idea of the step of the application is to extract the ground point in the DEM model by utilizing the elevation difference between any pixel point in the DEM model and the adjacent pixel point, when the elevation difference is larger than or equal to the designed maximum elevation difference threshold value, the pixel point with higher elevation is determined to be the pixel point of a tall building far exceeding the ground point, the pixel point is filtered at the moment, and when all the pixel points exceeding the maximum elevation difference threshold value and the pixel points with adjacent elevations close to the pixel point are filtered, the ground point in the DEM model can be obtained.
As shown in fig. 6, as a preferred embodiment, the step of extracting the ground point in the DEM model according to the difference in elevation between any pixel point and the adjacent pixel point in the DEM model includes:
s141: and searching all adjacent pixel point pairs with the absolute value of the elevation difference greater than or equal to the maximum elevation difference threshold value from the DEM model.
S142: and searching all adjacent ultrahigh pixel points with the height difference greater than or equal to the maximum height difference threshold value by taking the pixel point with the lowest height in the adjacent pixel point pair as the reference ground point.
S143: and eliminating all adjacent ultrahigh pixel points from the DEM model, and eliminating pixel points with the absolute value of the elevation difference of any ultrahigh pixel point in all ultrahigh pixel points smaller than or equal to the minimum elevation difference threshold value, so as to obtain all ground points in the DEM model.
According to the technical scheme provided by the embodiment of the invention, all adjacent pixel point pairs with the absolute value of the elevation difference greater than or equal to the maximum elevation difference threshold value are searched from the DEM model, so that the pixel point with the highest elevation in the adjacent pixel point pairs can be the pixel point corresponding to the tall building, namely the ultrahigh pixel point, at the moment, the pixel point with the highest elevation is removed, the pixel point with the lowest elevation is taken as the reference ground point, the adjacent pixel points with the elevation difference greater than or equal to the maximum elevation difference threshold value, namely the ultrahigh pixel point, are compared, and the ultrahigh pixel point is removed and the pixel points with the nearby elevation differences around the ultrahigh pixel point are removed, so that the tall building in the DEM model can be filtered. For example, for some high-rise buildings or tree point clouds, the ground points are relatively low, while the building or tree points are high and distributed in sheets. In the process of carrying out front-back left-right recursion processing on the DEM three-dimensional voxel grid, if a reference ground point with a lower position is found, the pixel points of all tall buildings or trees in the DEM model can be filtered out by filtering the pixel points of a slice with smaller adjacent elevation deviation and larger elevation deviation from the reference ground point, and only the ground point in the DEM model is reserved.
Specifically, as a preferred embodiment, as shown in fig. 7, in the above-mentioned ground-like flight control method for an unmanned aerial vehicle, step S143: removing all adjacent ultrahigh pixel points from the DEM model, and removing pixel points with the absolute value of the elevation difference of any ultrahigh pixel point of all ultrahigh pixel points being smaller than or equal to the minimum elevation difference threshold value, so as to obtain all ground points in the DEM model, wherein the method comprises the following steps of:
s1431: and traversing each pixel point in the DEM model, and judging whether the absolute value of the elevation difference between the current pixel point and any adjacent pixel point is larger than or equal to a maximum elevation difference threshold value.
S1432: if the absolute value of the elevation difference is larger than or equal to the maximum elevation difference threshold value, selecting the pixel point with the lowest elevation in the current pixel point or any adjacent pixel point as a reference ground point, and eliminating the pixel point with the highest elevation.
S1433: and judging whether the ultrahigh pixel point with the height difference greater than or equal to the maximum height difference threshold value exists in other adjacent pixel points of the current pixel point.
S1434: if the difference of elevation with the reference ground point is larger than or equal to the maximum difference of elevation threshold value, the ultra-high pixel point exists; and eliminating the ultra-high pixel point and eliminating all adjacent pixel points with the absolute value of the elevation difference between the ultra-high pixel point and the minimum elevation difference threshold value or less.
S1435: and after traversing all the pixel points in the DEM model, selecting all the rest pixel points in the DEM model as ground points of the DEM model.
According to the technical scheme provided by the embodiment of the invention, whether the absolute value of the elevation difference between the current pixel point and any adjacent pixel point is larger than or equal to the maximum elevation difference threshold value is judged by traversing each pixel point in the DEM model, if yes, the pixel point with the highest elevation in the two adjacent pixel points possibly needs to be removed as the pixel point corresponding to a tall building, at the moment, the pixel point with the lowest elevation is selected as a reference ground point, whether the elevation difference between the other adjacent pixel points of the current pixel point is larger than or equal to the maximum elevation difference threshold value is judged, and therefore the ultrahigh pixel point and all the adjacent pixel points with the height Cheng Chaxiao larger than or equal to the minimum elevation difference threshold value are removed, and after all the pixel points of the DEM model are traversed, all the rest pixel points in the DEM model can be used as the ground points of the DEM model, and all the pixel points (tall building) with the great elevation difference with the ground point are removed.
Specifically, as a specific embodiment, each pixel in the DEM model is traversed point by point, and if the pixel is found to be marked as an invalid value or processed in the traversing process, the pixel is not processed; otherwise, the next step is carried out;
And respectively comparing the elevation difference between the current position A (nx, ny) of the pixel point and the adjacent upper, lower, left and right positions, and if the absolute value of the elevation difference between the current position A and the adjacent upper, lower, left and right adjacent positions B is greater than or equal to the maximum elevation difference threshold value dmax, marking the current position A as processed, and setting the elevation of the current position A as an invalid value. At this time, the next adjacent position C of the adjacent position B is recursively processed by taking the elevation of the adjacent position B (i.e., the point with the lowest elevation) as the reference elevation; if the difference in elevation between the next adjacent position C and the adjacent position D is smaller than or equal to the minimum difference threshold dmin, and the difference in elevation between the next adjacent position C and the adjacent position B is larger than or equal to the maximum difference threshold dmax, the adjacent position C and the adjacent position D are removed, and the recursion processing is performed until the coordinate marks of all positions near the current point are completed or the recursion condition is not met.
Otherwise, if the difference in elevation of Gao Chengxiao of the current position a to the adjacent position B reaches the threshold value dmax, the adjacent position B is marked as processed, the elevation of the adjacent position B is set to an invalid value, the elevation of the current position a is set to a reference elevation, and the next adjacent position C is recursively processed. If the difference between the next adjacent position C and the adjacent position B is less than or equal to the minimum difference threshold dmin, and the difference between the adjacent position C and the reference elevation of the current position a is greater than or equal to the maximum difference threshold dmax, the recursion can be continued until all the pixels satisfying the requirement are processed.
Through the steps, the higher points near the ground point, namely, the high points with the height difference reaching the maximum height difference threshold value dmax at the adjacent positions can be removed, and only the ground point is reserved. After the ground points are obtained, the DEM model is filtered, and all outliers in the DEM model are removed. Specifically traversing all pixels in the DEM model, and if any effective value is required to meet the condition that at least one effective value exists in the pixels at the upper, lower, left and right positions, otherwise, setting the effective value as an ineffective value to be removed. And traversing all pixels of the DEM model, extracting elevation values of the adjacent 9 pixel positions including the current position, sequencing according to the order of the elevation values, and replacing the current value with a median value if the front value of the elevation is larger than the median value. Through the steps, some adjacent high points in the DEM model can be further removed, and more accurate ground points are obtained.
After obtaining the ground point of the DEM model, the terrain height needs to be calculated according to the ground point, specifically referring to fig. 1, and the technical scheme provided by the embodiment shown in fig. 1 further includes the following steps after extracting the ground point of the DEM model:
s150: and calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model. The steps above have filtered the higher point in the DEM model, only kept the ground point in the DEM model, so can calculate and get the topography height of the DEM model through calculating the elevation value of the ground point, and then estimate and highly compensate the topography trend, confirm the change trend of topography height under the unmanned aerial vehicle.
Specifically, as a preferred embodiment, as shown in fig. 8, in the above-mentioned ground-like flight control method for an unmanned aerial vehicle, step S150: according to the elevation value of the ground point in the DEM model, calculating the terrain height of the DEM model, wherein the step comprises the following steps:
s151: the DEM model is divided into a plurality of DEM grids. Specifically, the current DEM model is divided into a large grid of 3*3, and a plurality of small grids are combined into one large grid. If the length and width of the original DEM model are L and W respectively, the size distribution of each new large grid is L/3 and W/3.
S152: and counting the elevation values of all the ground points in each DEM grid, and sequencing the elevation values of all the ground points according to the order from large to small.
S153: and summing the elevation values of the ground points with the number of the front preset proportion of the sequencing results to obtain the average height of the current terrain. And counting the elevation values of all the ground points in each DEM grid, sorting the elevation values of all the ground points from large to small, and selecting the elevation values of the ground points of the previous preset proportion number, for example 10%, to sum so as to obtain the average height of the current terrain.
S154: and calculating the weighted height of the current terrain according to the average height of the current terrain, the average height of the previous frame of terrain and the weights of the previous and subsequent frames of terrain, and taking the weighted height of the current terrain as the terrain height of the DEM model.
Because the average height of the estimated current terrain may still have larger fluctuation, and because the elevation of the adjacent area has small variation, in order to reduce the fluctuation, the embodiment of the application performs weighted average on the elevation obtained by the previous frame estimation and the elevation obtained by the current frame estimation, thereby obtaining the final elevation value of the current estimation. Setting the estimated terrain height of the previous frame as H1, and setting the weight of the terrain height as w1; the terrain height estimated for the current frame is H2, and the weight thereof is w2, then the weighted height h=h1×w1+h2×w2, where w1+w2=1. The weighted height is the height of the current terrain after the fluctuation is reduced. And finally, estimating and compensating the terrain trend after calculating the elevation values of all the ground points of the DEM, so that the weighted terrain height of all the ground points of the DEM can be obtained.
The technical solution provided by the embodiment shown in fig. 1 further includes the following steps after obtaining the terrain height of the DEM model:
s160: and calculating and adjusting the flying height of the unmanned aerial vehicle relative to the terrain according to the terrain height of the DEM model and the current flying position of the unmanned aerial vehicle.
The method and the device can adjust the current flight position of the unmanned aerial vehicle by acquiring the terrain height of the ground in the DEM model, so that the unmanned aerial vehicle tracks the terrain height in real time, and flies in a simulated manner with a specific height difference relative to the terrain height, so that the unmanned aerial vehicle is kept stable in flight, the flight risk of the unmanned aerial vehicle is reduced, the reworking and supplementing flying condition is reduced, the method and the device do not need to strike points in advance or acquire high-precision terrain data, and the method and the device can be applied to various scenes such as urban areas, mountain areas and forest lands.
In summary, according to the unmanned aerial vehicle ground-imitation flight control method provided by the embodiment of the invention, the point cloud POS data of the unmanned aerial vehicle is obtained in real time, the current flight position and the flight direction of the unmanned aerial vehicle are calculated according to the point cloud POS data, then the point cloud POS data are filtered according to the current flight position and the flight direction of the unmanned aerial vehicle, so that laser point cloud data in a preset distance range of a visual center axis of an unmanned aerial vehicle on-air radar and a ground intersection point are obtained, the laser point cloud data reflect three-dimensional coordinates of ground points, a DEM three-dimensional voxel grid can be constructed through the laser point cloud data, then the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid is searched, so that a DEM model is constructed, the ground point can be obtained through extraction by using the elevation difference between any pixel point and the adjacent pixel point in the DEM model, and then the terrain height of the DEM model is calculated, and after the terrain height of the DEM model is obtained, the current flight position of the unmanned aerial vehicle is adjusted, so that the ground height of the unmanned aerial vehicle can be adjusted, and the ground-imitation flight of the unmanned aerial vehicle can be constructed. By the method, the relative height of the unmanned aerial vehicle and the ground can be kept, so that the unmanned aerial vehicle can fly stably, the flying risk of the unmanned aerial vehicle is reduced, the reworking and the flying supplementing situation is reduced, the embodiment of the invention does not need to dot or acquire high-precision terrain data in advance, and the method and the device can be applied to various scenes such as urban areas, mountain areas and forest lands.
In addition, in step S120, after the step of obtaining the laser point cloud data within the predetermined distance range between the view axis of the unmanned aerial vehicle-mounted laser radar and the ground intersection point, the point cloud density is filtered, and the collected noise points and outliers of the multi-frame point cloud are removed. Specifically, as a preferred embodiment, as shown in fig. 4, the unmanned aerial vehicle ground-like flight control method described above, in step S120: after the step of obtaining the laser point cloud data in the preset distance range of the intersection point of the view axis of the unmanned aerial vehicle laser radar and the ground, the method further comprises the following steps:
s210: and generating a k-d tree of the laser point cloud data according to a kdtree algorithm, and establishing a topological relation of the laser point cloud data.
S220: traversing all laser points in the neighborhood of the unlabeled laser points in the laser point cloud data in the k-d tree, and marking all the searched laser points; when traversing all untagged laser points in the laser point cloud data, finishing resampling of the laser point cloud data;
s230: constructing a voxel grid of the resampled point cloud data, and when the number of points in a single voxel is smaller than a preset certain number threshold, regarding the points in the voxel as noise points and filtering;
S240: whether the distance average value exceeds a predetermined distance threshold value is determined.
S250: if the predetermined distance threshold is exceeded, the marking laser spot is a noise spot.
S260: when all laser points of the laser point cloud data are traversed to obtain all noise points in the laser point cloud data, a voxel filtering algorithm is used for filtering all the noise points.
Because the real-time collected multi-frame point cloud has the conditions of repeated scanning, position overlapping and the like, the collected multi-frame point cloud has a large number of noise points and outliers. Therefore, according to the technical scheme provided by the embodiment of the invention, certain noise points and outliers can be effectively removed through filtering treatment according to the density of laser point cloud data. Firstly, constructing a kdtree for sampling, traversing all laser points in laser point cloud data, and searching the point cloud according to a certain radius by utilizing the kdtree. If the searched point is processed, the processing is not performed; if the searched point is not processed, the unprocessed point is marked to be processed, and the current point is added into the result to be iterated. And after sampling is finished, filtering all point clouds with the number of points smaller than a certain preset distance threshold value in a single voxel by utilizing voxel filtering, so that outlier points and noise points can be removed, and a denoising effect is achieved.
In addition, as a preferred embodiment, as shown in fig. 9, the unmanned aerial vehicle ground-like flight control method described above, in step 150: after the step of calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model, the method further comprises the following steps:
s310: constructing a DSM voxel grid of laser point cloud data; the construction of the DSM voxel grid is similar to that of the DEM voxel grid and will not be described in detail here.
S320: traversing each voxel in the DSM voxel grid sequentially in a vertical direction; taking the DSM grid as an example, the number of laser points in each voxel can be determined by traversing each voxel in the DSM grid from bottom to top in the vertical direction.
S330: respectively counting the number of laser points in each voxel of the DSM voxel grid, and judging whether the number of the laser points is larger than or equal to a preset number threshold;
s340: if the number of the laser points is greater than or equal to a preset number threshold, determining the highest ground feature point of the position of the plane corresponding to the searched voxel;
s350: when the highest feature point of the plane position corresponding to all voxels in the DSM voxel grid is obtained, selecting the highest feature point with the largest elevation value from all the highest feature points as the maximum feature height corresponding to the laser point cloud data.
According to the technical scheme provided by the embodiment of the invention, on the basis of the DSM voxel grid, each voxel in the DSM grid is traversed one by one from top to bottom along the vertical direction, if the number of the existence points reaches the set number threshold, the highest ground feature point of the position of the corresponding plane of the voxel is found, and the highest ground feature point is not searched downwards; otherwise, continue looking down until all voxels in the vertical direction have been traversed. And obtaining an initial DSM model after traversing all the plane positions. And traversing all elevation values of the DSM model, and selecting the maximum value in the current elevation range of the DSM model as the maximum ground feature height.
In addition, based on the same concept of the above method embodiment, the embodiment of the present invention further provides an unmanned aerial vehicle ground-like flight control system based on terrain height, which is used for implementing the above method of the present invention, and because the principle of solving the problem of the system embodiment is similar to that of the method, the system embodiment has at least all the beneficial effects brought by the technical solution of the above embodiment, and will not be described in detail herein.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an unmanned aerial vehicle ground-like flight control system based on terrain elevation. As shown in fig. 10, the terrain-height-based unmanned aerial vehicle ground-like flight control system includes:
The steps of the unmanned aerial vehicle ground-imitation flight control method provided in any of the above embodiments are implemented when the unmanned aerial vehicle ground-imitation flight control program is executed by the processor 1001, and the unmanned aerial vehicle ground-imitation flight control program is stored in the memory 1004 and runs on the processor 1001.
In summary, the terrain-height-based unmanned aerial vehicle ground-simulating flight control scheme provided by the invention adopts an unmanned aerial vehicle laser radar technology to process laser point clouds acquired in real time in the flight process and estimate the terrain, confirms the height deviation between the unmanned aerial vehicle and the terrain in real time, reasonably predicts the next flight position by integrating historical terrain and flight tracks, and adjusts the flight state in real time according to the preset flight height so as to maintain the flight height relatively stable with the ground, thereby finally achieving the effect of ground-simulating flight.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. The ground-imitating flight control method of the unmanned aerial vehicle based on the terrain height is characterized by comprising the following steps of:
acquiring point cloud POS data of the unmanned aerial vehicle in real time, and calculating the current flight position and flight direction of the unmanned aerial vehicle according to the point cloud POS data;
filtering the point cloud POS data according to the current flight position and the flight direction of the unmanned aerial vehicle to obtain laser point cloud data in a preset distance range of a view axis and a ground intersection point of the unmanned aerial vehicle laser radar;
constructing a DEM three-dimensional voxel grid of the laser point cloud data, searching the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid, and constructing to obtain a DEM model;
Extracting ground points in the DEM model according to the elevation difference between any pixel point and adjacent pixel points in the DEM model;
calculating the terrain height of the DEM model according to the elevation value of the ground point in the DEM model;
and calculating and adjusting the flying height of the unmanned aerial vehicle relative to the terrain according to the terrain height of the DEM model and the current flying position of the unmanned aerial vehicle.
2. The unmanned aerial vehicle ground-imitation flight control method according to claim 1, wherein the step of acquiring the point cloud POS data of the unmanned aerial vehicle in real time and calculating the current flight position and flight direction of the unmanned aerial vehicle according to the point cloud POS data comprises the steps of:
acquiring original point cloud data in real time by using the unmanned aerial vehicle laser radar;
converting coordinates of the original point cloud data according to POS information corresponding to the original point cloud data at the same moment to obtain point cloud projection coordinate data;
extracting the current flight position of the unmanned aerial vehicle according to the point cloud projection data;
and estimating the flight direction of the unmanned aerial vehicle according to the current flight position of the unmanned aerial vehicle and the last-moment flight position of the unmanned aerial vehicle.
3. The unmanned aerial vehicle ground-imitation flight control method of claim 1, wherein the step of filtering the point cloud POS data according to the current flight position and flight direction of the unmanned aerial vehicle to obtain laser point cloud data within a predetermined distance range of a view axis of an unmanned aerial vehicle laser radar and a ground intersection point comprises the steps of:
Constructing a flight direction linear equation of the unmanned aerial vehicle by taking the current flight position of the unmanned aerial vehicle as a starting point;
according to the flight direction straight line equation, calculating the horizontal distance from each laser point in the point cloud POS data to the flight direction straight line of the unmanned aerial vehicle;
according to the horizontal distance from each laser point to the straight line of the flying direction of the unmanned aerial vehicle, filtering to obtain first laser point cloud data in a preset horizontal distance range of the straight line of the flying direction;
horizontally rotating the flight direction linear equation to obtain a vertical direction linear equation perpendicular to the flight direction on the same horizontal plane;
calculating the horizontal distance from each laser point to the vertical straight line of the unmanned plane in the first laser point cloud data point by point according to the vertical straight line equation;
and filtering to obtain second laser point cloud data in a preset horizontal distance range of the vertical straight line according to the horizontal distance between each laser point and the vertical straight line of the unmanned aerial vehicle, wherein the second laser point cloud data is used as laser point cloud data in a preset distance range of an intersection point of a visual axis of the unmanned aerial vehicle laser radar and the ground.
4. The unmanned aerial vehicle ground-imitation flight control method of claim 1, wherein after the step of obtaining laser point cloud data within a predetermined distance range of a view axis of the unmanned aerial vehicle laser radar and the ground intersection point, the method further comprises:
Generating a k-d tree of the laser point cloud data according to a kdtree algorithm, and establishing a topological relation of the laser point cloud data;
traversing all laser points in the neighborhood of the laser points in the k-d tree, which are not marked in the laser point cloud data, and marking all the searched laser points;
reserving one laser point in all the searched laser points in the neighborhood;
when traversing all untagged laser points in the laser point cloud data, finishing resampling of the laser point cloud data;
and constructing a voxel grid of the resampled point cloud data, and when the number of points in a single voxel is smaller than a preset number threshold, treating the points in the voxel as noise points and filtering.
5. The unmanned aerial vehicle ground-imitation flight control method of claim 1, wherein the step of constructing the DEM three-dimensional voxel grid of the laser point cloud data, searching the lowest point of the corresponding plane position of each voxel in the DEM three-dimensional voxel grid, and constructing to obtain the DEM model comprises the following steps:
establishing a DEM three-dimensional voxel grid of the laser point cloud data according to a preset resolution;
calculating the voxel coordinates of each laser point in the laser point cloud data in the DEM three-dimensional voxel grid;
According to the voxel coordinates of the laser points, calculating the number of the laser points and the laser point id contained in each voxel;
traversing the DEM three-dimensional voxel grid from bottom to top along the vertical direction, and searching the lowest point of the corresponding plane position of each voxel according to the laser point number and the laser point id contained in each voxel;
and constructing the DEM model by using the lowest points of the positions of all the voxels in the DEM three-dimensional voxel grid corresponding to the plane.
6. The unmanned aerial vehicle ground-imitation flight control method of claim 5, wherein the step of extracting the ground point in the DEM model according to the elevation difference between any pixel point and the adjacent pixel point in the DEM model comprises:
searching all adjacent pixel point pairs with the absolute value of the elevation difference being greater than or equal to the maximum elevation difference threshold value from the DEM model;
searching all adjacent ultrahigh pixel points with the height difference greater than or equal to a maximum height difference threshold value by taking the pixel point with the lowest height in the adjacent pixel point pair as a reference ground point;
and eliminating all adjacent ultrahigh pixel points from the DEM model, and eliminating pixel points with the absolute value of the elevation difference of any ultrahigh pixel point in all ultrahigh pixel points smaller than or equal to the minimum elevation difference threshold value, so as to obtain all ground points in the DEM model.
7. The unmanned aerial vehicle ground-like flight control method of claim 6, wherein the step of removing all the adjacent ultra-high pixel points from the DEM model, and removing pixel points with an absolute value of an elevation difference from any one of the ultra-high pixel points being less than or equal to a minimum elevation difference threshold value, to obtain all ground points in the DEM model comprises:
traversing each pixel point in the DEM model, and judging whether the absolute value of the elevation difference between the current pixel point and any adjacent pixel point is larger than or equal to a maximum elevation difference threshold value;
if the absolute value of the elevation difference is larger than or equal to the maximum elevation difference threshold value, selecting the pixel point with the lowest elevation in the current pixel point or any adjacent pixel point as the reference ground point, and eliminating the pixel point with the highest elevation;
judging whether the ultrahigh pixel point with the elevation difference larger than or equal to the maximum elevation difference threshold value exists in other adjacent pixel points of the current pixel point;
if the difference of elevation with the reference ground point is larger than or equal to the maximum difference of elevation threshold value, the super-high pixel point exists; removing the ultra-high pixel point and removing all adjacent pixel points with the absolute value of the elevation difference with the ultra-high pixel point smaller than or equal to the minimum elevation difference threshold value;
And after traversing all pixel points in the DEM model, selecting all the rest pixel points in the DEM model as ground points of the DEM model.
8. The unmanned aerial vehicle ground-like flight control method of claim 6, wherein the step of calculating the terrain height of the DEM model from the elevation values of the ground points in the DEM model comprises:
dividing the DEM model into a plurality of DEM grids;
counting the elevation values of all the ground points in each DEM grid, and sequencing the elevation values of all the ground points according to the sequence from large to small;
summing the elevation values of the ground points with the number of the front preset proportion of the sequencing results to obtain the average height of the current terrain;
and calculating the weighted height of the current terrain according to the average height of the current terrain, the average height of the terrain of the previous frame and the weights of the terrain of the previous and subsequent frames, and taking the weighted height of the current terrain as the terrain height of the DEM model.
9. The unmanned aerial vehicle ground-imitation flight control method of claim 1, wherein after the step of calculating the terrain height of the DEM model from the elevation values of the ground points in the DEM model, the method further comprises:
Constructing a DSM voxel grid of the laser point cloud data;
sequentially traversing each voxel in the DSM voxel grid in a vertical direction;
respectively counting the number of laser points in each voxel of the DSM voxel grid, and judging whether the number of the laser points is larger than or equal to a preset number threshold;
if the number of the laser points is greater than or equal to a preset number threshold, determining to find the highest ground feature point of the plane position corresponding to the voxel;
when the highest ground feature point of the plane positions corresponding to all voxels in the DSM voxel grid is obtained, selecting the highest ground feature point with the largest elevation value from all the highest ground feature points as the maximum ground feature height corresponding to the laser point cloud data.
10. Unmanned aerial vehicle ground-like flight control system based on topography altitude, characterized by comprising:
memory, processor and the unmanned aerial vehicle ground-engaging flight control program based on the topography of the operation on the processor that stores on the memory, the unmanned aerial vehicle ground-engaging flight program when being executed by the processor realizes the steps of the unmanned aerial vehicle ground-engaging flight control method according to any one of claims 1 to 9.
CN202310392580.2A 2023-04-13 2023-04-13 Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system Active CN116627164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310392580.2A CN116627164B (en) 2023-04-13 2023-04-13 Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310392580.2A CN116627164B (en) 2023-04-13 2023-04-13 Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system

Publications (2)

Publication Number Publication Date
CN116627164A true CN116627164A (en) 2023-08-22
CN116627164B CN116627164B (en) 2024-04-26

Family

ID=87616007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310392580.2A Active CN116627164B (en) 2023-04-13 2023-04-13 Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system

Country Status (1)

Country Link
CN (1) CN116627164B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952242A (en) * 2016-01-06 2017-07-14 北京林业大学 A kind of progressive TIN point cloud filtering method based on voxel
CN110132238A (en) * 2019-05-09 2019-08-16 苏州嘉奕晟中小企业科技咨询有限公司 Unmanned plane mapping method for landform image digital elevation model
KR20190114523A (en) * 2018-03-30 2019-10-10 서울시립대학교 산학협력단 Method, system and computer program for topographical change detection using LiDAR data
CN110780681A (en) * 2019-11-26 2020-02-11 贵州电网有限责任公司 Unmanned aerial vehicle autonomous inspection insulator path planning method based on laser point cloud
CN111026150A (en) * 2019-11-25 2020-04-17 国家电网有限公司 System and method for pre-warning geological disasters of power transmission line by using unmanned aerial vehicle
CN111966129A (en) * 2020-08-31 2020-11-20 金陵科技学院 Photovoltaic inspection unmanned aerial vehicle and ground-imitating flying method thereof
CN113625731A (en) * 2021-07-23 2021-11-09 北京中天博地科技有限公司 Unmanned aerial vehicle terrain matching ground-imitating flight method based on DEM data
CN114355364A (en) * 2021-12-21 2022-04-15 武汉大学 Real-time safety distance diagnosis method for laser point cloud of unmanned aerial vehicle power inspection
CN114488190A (en) * 2021-12-30 2022-05-13 浙江零跑科技股份有限公司 Laser radar 3D point cloud ground detection method
CN115032647A (en) * 2022-05-13 2022-09-09 中交二公局第三工程有限公司 Original ground earthwork retest method based on unmanned aerial vehicle laser point cloud
CN115167529A (en) * 2022-09-08 2022-10-11 北京煜邦电力技术股份有限公司 Monitoring method and system, unmanned aerial vehicle, mobile terminal and storage medium
US20220413146A1 (en) * 2021-06-25 2022-12-29 The Florida International University Board Of Trustees Systems and methods for terrain mapping using lidar

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952242A (en) * 2016-01-06 2017-07-14 北京林业大学 A kind of progressive TIN point cloud filtering method based on voxel
KR20190114523A (en) * 2018-03-30 2019-10-10 서울시립대학교 산학협력단 Method, system and computer program for topographical change detection using LiDAR data
CN110132238A (en) * 2019-05-09 2019-08-16 苏州嘉奕晟中小企业科技咨询有限公司 Unmanned plane mapping method for landform image digital elevation model
CN111026150A (en) * 2019-11-25 2020-04-17 国家电网有限公司 System and method for pre-warning geological disasters of power transmission line by using unmanned aerial vehicle
CN110780681A (en) * 2019-11-26 2020-02-11 贵州电网有限责任公司 Unmanned aerial vehicle autonomous inspection insulator path planning method based on laser point cloud
CN111966129A (en) * 2020-08-31 2020-11-20 金陵科技学院 Photovoltaic inspection unmanned aerial vehicle and ground-imitating flying method thereof
US20220413146A1 (en) * 2021-06-25 2022-12-29 The Florida International University Board Of Trustees Systems and methods for terrain mapping using lidar
CN113625731A (en) * 2021-07-23 2021-11-09 北京中天博地科技有限公司 Unmanned aerial vehicle terrain matching ground-imitating flight method based on DEM data
CN114355364A (en) * 2021-12-21 2022-04-15 武汉大学 Real-time safety distance diagnosis method for laser point cloud of unmanned aerial vehicle power inspection
CN114488190A (en) * 2021-12-30 2022-05-13 浙江零跑科技股份有限公司 Laser radar 3D point cloud ground detection method
CN115032647A (en) * 2022-05-13 2022-09-09 中交二公局第三工程有限公司 Original ground earthwork retest method based on unmanned aerial vehicle laser point cloud
CN115167529A (en) * 2022-09-08 2022-10-11 北京煜邦电力技术股份有限公司 Monitoring method and system, unmanned aerial vehicle, mobile terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张齐勇: "基于森林地区LiDAR点云数据的DEM提取", 工程勘察, no. 5, 1 May 2015 (2015-05-01), pages 81 - 85 *

Also Published As

Publication number Publication date
CN116627164B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN102506824A (en) Method for generating digital orthophoto map (DOM) by urban low altitude unmanned aerial vehicle
CN111667574B (en) Method for automatically reconstructing regular facade three-dimensional model of building from oblique photography model
KR102275572B1 (en) Method and apparatus for matching 3-dimensional geographic information using heterogeneous altitude aerial images
CN110889899B (en) Digital earth surface model generation method and device
CN110880202B (en) Three-dimensional terrain model creating method, device, equipment and storage medium
CN109459759B (en) Urban terrain three-dimensional reconstruction method based on quad-rotor unmanned aerial vehicle laser radar system
CN114065339A (en) High tower construction site selection method based on three-dimensional visual model
CN113096181B (en) Method and device for determining equipment pose, storage medium and electronic device
CN109063638A (en) Method, system and medium based on oblique photograph prediction waste yield
CN115855060A (en) Geometric primitive guided route planning method and device
CN111829514A (en) Road surface working condition pre-aiming method suitable for vehicle chassis integrated control
CN109490926B (en) Path planning method based on binocular camera and GNSS
CN114119902A (en) Building extraction method based on unmanned aerial vehicle inclined three-dimensional model
CN116627164B (en) Terrain-height-based unmanned aerial vehicle ground-simulated flight control method and system
Rebelo et al. Building 3D city models: Testing and comparing Laser scanning and low-cost UAV data using FOSS technologies
CN116912443A (en) Mining area point cloud and image fusion modeling method using unmanned aerial vehicle aerial survey technology
CN116977580A (en) Method for manufacturing mountain area large scale DEM based on airborne LiDAR
JP4026623B2 (en) Ground height estimation method
CN115984490A (en) Modeling analysis method and system for wind field characteristics, unmanned aerial vehicle equipment and storage medium
CN114777745A (en) Inclined evidence obtaining modeling method based on unscented Kalman filtering
DE112022002421T5 (en) Movement amount estimation device, movement amount estimation method and movement amount estimation program
AT525210A1 (en) Method for the three-dimensional reconstruction of the course of the rail center line of rails in a rail network for rail vehicles
CN111932574A (en) Building facade point cloud extraction system and method based on multi-level semantic features
KR102557775B1 (en) Drone used 3d mapping method
CN113029166B (en) Positioning method, positioning device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant