Pipeline unmanned aerial vehicle heading sensing method based on TOF technology and related equipment thereof

By using TOF sensors and RANSAC algorithms to achieve heading perception for UAVs inside underground pipelines, this approach solves the perception challenges of traditional methods and provides a real-time, accurate, and economical heading perception solution.

CN118938257BActive Publication Date: 2025-10-21WUHAN DAOXIAOFEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411005523.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-10-21
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Traditional GPS heading sensing methods are difficult to implement for UAVs in underground pipelines due to the confined environment, lack of natural light, absence of GPS signals, and the limited size of the UAVs.

Method used

A TOF sensor is used to collect pipeline data in real time. The cylinder is fitted through filtering processing and RANSAC algorithm, and the angle at which the drone's direction deviates from the central axis of the cylinder is calculated to achieve heading perception.

Benefits of technology

It enables real-time heading perception of lightweight, small drones within pipelines, improving perception accuracy and data reliability while reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118938257B_ABST
    Figure CN118938257B_ABST
Patent Text Reader

Abstract

The application provides a pipeline unmanned aerial vehicle heading perception method based on TOF technology and related equipment thereof, comprising the following steps: after the unmanned aerial vehicle enters a target pipeline, a TOF sensor is controlled to collect a pipeline TOF data set in front of the unmanned aerial vehicle in real time; the pipeline TOF data set is sequentially subjected to one-time filtering processing and data conversion processing, to obtain a three-dimensional point cloud original data set based on the pipeline TOF data set; then the three-dimensional point cloud original data set is subjected to secondary filtering processing, to obtain a basic point cloud data set; the basic point cloud data set is fitted according to a RANSAC algorithm, to obtain an optimal fitting cylinder; and the angle of the advancing direction of the unmanned aerial vehicle deviating from the central axis of the optimal fitting cylinder is calculated according to the optimal fitting cylinder, so as to realize the heading perception of the unmanned aerial vehicle in the pipeline. The application realizes the real-time heading perception of the unmanned aerial vehicle in the pipeline by updating the environmental data in real time, avoids the generation of cumulative errors, and increases the reliability of the data and the accuracy of the perception by filtering the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) and control technology, and in particular to a method for sensing the heading of an UAV in a pipeline based on TOF technology and related equipment. Background Art

[0002] Drone heading perception is a crucial component of drone control. The control requirements for drones in underground pipelines differ from those in conventional environments. Underground pipeline control environments typically exhibit the following characteristics: 1. The environment is confined, with the inner diameter of underground pipelines typically around 400mm. 2. There is no natural light source, such as sunlight, within underground pipelines. 3. There is no GPS signal, as underground pipelines are enclosed spaces and cannot receive GPS signals. 4. Drones are physically limited, and the space within underground pipelines is relatively small. To ensure flight, the size of the drone itself is significantly restricted, making it impossible for the drone to carry a high-performance computing platform. Due to these unique operating conditions, traditional GPS heading perception methods struggle to achieve heading perception for drones within pipelines.

[0003] That is, how to provide a new method for sensing the heading of drones in pipelines based on 3DTOF technology, which is suitable for lightweight and small drone equipment, so as to achieve the technical effect of reducing costs and realizing real-time perception of the heading of drones in pipelines is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] An embodiment of the present invention provides a method for sensing the heading of a UAV in a pipeline based on TOF technology and related equipment to solve at least one of the above technical problems.

[0005] In a first aspect, the present application provides a method for sensing the heading of a drone in a pipeline based on TOF technology, which is applied to a drone inspecting underground pipelines, wherein a TOF sensor is installed at the front end of the drone. The method comprises:

[0006] Controlling the UAV to enter the target pipeline, and after the UAV enters the target pipeline, controlling the TOF sensor to collect a TOF dataset of the pipeline in front of the UAV in real time;

[0007] Performing filtering and data conversion on the pipeline TOF dataset in sequence to obtain a three-dimensional point cloud original dataset based on the pipeline TOF dataset;

[0008] Performing secondary filtering on the original three-dimensional point cloud data set to obtain a basic point cloud data set;

[0009] Fitting the basic point cloud data set according to the RANSAC algorithm to obtain the optimal fitting cylinder;

[0010] The angle at which the direction of travel of the UAV deviates from the central axis of the best-fit cylinder is calculated based on the best-fit cylinder.

[0011] Preferably, fitting the basic point cloud data set according to the RANSAC algorithm to obtain the optimal fitting cylinder includes:

[0012] Obtaining the pipe radius R of the target pipe;

[0013] Preset RANSAC parameters, including the algorithm's iteration number threshold, inlier distance threshold, exit iteration inlier number ratio, and radius difference threshold;

[0014] The basic point cloud data set is iteratively updated by performing cylinder fitting according to the pipeline radius R, the RANSAC parameters, and the RANSAC algorithm to obtain an optimal fitting cylinder.

[0015] Preferably, performing cylinder fitting iterative update on the basic point cloud dataset according to the pipeline radius R, the RANSAC parameters, and the RANSAC algorithm to obtain the optimal fitting cylinder includes:

[0016] Performing a cylinder fitting calculation operation on the basic point cloud data set according to the RANSAC parameters to obtain a surface equation of a basic fitting cylinder;

[0017] Performing a target inlier calculation operation on the point cloud in the basic point cloud dataset according to the surface equation of the basic fitting cylinder to obtain a target inlier ratio;

[0018] Obtaining the current number of iterations corresponding to the currently calculated target interior point ratio or the surface equation of the basic fitting cylinder;

[0019] When the target inner point ratio meets the preset first iteration stop condition, the currently obtained basic fitting cylinder is determined as the optimal fitting cylinder, and the iterative calculation is exited;

[0020] When the target inlier ratio does not satisfy the preset first iteration stop condition, determine whether the current number of iterations satisfies the preset second iteration stop condition. When the current number of iterations satisfies the preset second iteration stop condition, select the basic fitting cylinder corresponding to the largest target inlier ratio in the historical iteration process as the optimal fitting cylinder, and exit the iterative calculation. When the current number of iterations does not satisfy the preset second iteration stop condition, continue to iteratively execute the cylinder fitting calculation operation and the target inlier calculation operation until the first iteration stop condition or the second iteration stop condition is satisfied, and determine the optimal fitting cylinder accordingly based on the satisfied first iteration stop condition or the satisfied second iteration stop condition.

[0021] Preferably, the first iteration stopping condition is: the target inlier ratio is greater than or equal to the exit iteration inlier ratio;

[0022] The second iteration stopping condition is: the current iteration number reaches the iteration number threshold.

[0023] Preferably, performing a cylinder fitting calculation operation on the basic point cloud data set according to the RANSAC parameters to obtain a surface equation of a basic fitting cylinder includes:

[0024] A first group of point clouds is randomly selected from the basic point cloud data set to perform circle fitting calculation, and a first center coordinate C1 and a first radius r1 of a first fitting circle are obtained. The first radius r1 satisfies: ;

[0025] A second group of point clouds is randomly selected from the basic point cloud data set to perform circle fitting calculation, and a second center coordinate C2 and a second radius r2 of the second fitting circle are obtained. The second radius r2 satisfies: ;

[0026] Performing cylinder fitting calculation on the first fitting circle and the second fitting circle to obtain a surface equation of a basic fitting cylinder;

[0027] Wherein, any point cloud in the first group of point clouds is different from any point cloud in the second group of point clouds.

[0028] Preferably, performing a target inlier calculation operation on the point cloud in the basic point cloud dataset according to the surface equation of the basic fitting cylinder to obtain a target inlier ratio includes:

[0029] Calculating the number of point clouds in the basic point cloud dataset whose minimum distance to the surface of the basic fitting cylinder is less than the inlier distance threshold based on the surface equation of the basic fitting cylinder to obtain the number of target inliers;

[0030] Calculating the ratio of the number of target inliers to the total number of point clouds in the basic point cloud dataset to obtain the target inlier ratio;

[0031] The target inliers are point clouds in the basic point cloud dataset whose minimum distance to the surface of the basic fitting cylinder is less than the inlier distance threshold; and the target inlier ratio is the ratio of the target inliers in the basic point cloud dataset.

[0032] Preferably, the calculating, based on the best-fit cylinder, the angle at which the direction of travel of the UAV deviates from the central axis of the best-fit cylinder comprises:

[0033] Obtaining the center axis direction information of the optimal fitting cylinder;

[0034] Obtaining a moving direction of the UAV relative to the TOF sensor;

[0035] The horizontal deviation angle of the UAV's moving direction from the central axis in the horizontal direction and the vertical deviation angle of the UAV's moving direction from the central axis in the vertical direction are calculated based on the central axis direction information.

[0036] Preferably, the primary filtering process includes isolated point filtering process, abnormal point filtering process and depth threshold filtering process, and the secondary filtering process includes outlier filtering process.

[0037] In a second aspect, the present application also provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor is configured to implement any one of the TOF technology-based methods for sensing the heading of an in-pipeline drone in the first aspect when executing the computer program stored in the memory.

[0038] In a third aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, any of the TOF technology-based methods for sensing the heading of a UAV in a pipeline in the first aspect is implemented.

[0039] The present invention is applied to a drone for inspecting underground pipelines. The front end of the drone is equipped with a time-of-flight (TOF) sensor. First, the drone is controlled to enter the target pipeline. After the drone enters the target pipeline, the TOF sensor is controlled to collect a TOF data set of the pipeline in front of the drone in real time. The TOF data set is filtered and converted to obtain a three-dimensional point cloud raw data set based on the pipeline TOF data set. The three-dimensional point cloud raw data set is then filtered to obtain a basic point cloud data set. The basic point cloud data set is fitted according to the RANSAC algorithm to obtain an optimal fitting cylinder. The angle of the drone's travel direction deviating from the central axis of the optimal fitting cylinder is calculated based on the optimal fitting cylinder to achieve the heading perception of the drone in the pipeline. The TOF technology-based method for sensing the heading of a drone in a pipeline provided by the present invention is applicable to lightweight small drone equipment. By updating environmental data in real time, the real-time perception of the heading in the pipeline is achieved, thereby avoiding the generation of cumulative errors. By filtering the data, the reliability of the data is increased while the accuracy of the perception is improved. The method for sensing the heading in the pipeline of the present application is low in cost, simple in implementation, and highly economical. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flow chart of a method for sensing the heading of a UAV in a pipeline based on TOF technology provided in this application;

[0042] Figure 2 A schematic diagram of the structure of an electronic device provided in this application;

[0043] Figure 3 A schematic diagram of the structure of the computer-readable storage medium provided in this application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0045] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can be changed in the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0046] The division of modules in this application is a logical division. In actual application, there may be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. Moreover, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed into multiple circuit modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application.

[0047] Next, see Figure 1 , Figure 1 The present invention is a flowchart of a method for sensing the heading of a UAV in a pipeline based on TOF technology according to an embodiment of the present invention. The method of the present invention is applied to a UAV for inspecting underground pipelines. A TOF sensor is installed at the front end of the UAV. As an embodiment of the method for sensing the heading of a UAV in a pipeline based on TOF technology provided by the present invention, the method for sensing the heading of a UAV in a pipeline based on TOF technology specifically includes the following steps S110 to S150:

[0048] Step S110: Control the drone to enter the target pipeline. After the drone enters the target pipeline, control the TOF sensor to collect the TOF data set of the pipeline in front of the drone in real time.

[0049] Among them, underground pipelines include underground horizontal pipes and underground vertical shafts. Underground horizontal pipes refer to underground pipelines laid in the horizontal direction, and underground vertical shafts refer to underground pipelines laid in the vertical direction. The target pipeline involved in this application is the underground horizontal pipe in the underground pipeline.

[0050] Step S120: performing filtering and data conversion on the pipeline TOF dataset in sequence to obtain a three-dimensional point cloud original dataset based on the pipeline TOF dataset;

[0051] As a feasible approach, a single filtering process includes isolated point filtering, outlier filtering, and depth threshold filtering. This single filtering process increases the reliability of TOF data and prevents unreliable observation data from affecting the accuracy of subsequent steps. Through data conversion processing, the data collected by the TOF sensor is converted into three-dimensional point cloud coordinate data. The point cloud coordinates are obtained by establishing a coordinate system with the TOF sensor as the origin.

[0052] Step S130: performing secondary filtering on the original 3D point cloud dataset to obtain a basic point cloud dataset;

[0053] As an implementable approach, the secondary filtering process includes outlier filtering to reduce the impact of noise on the accuracy of the method.

[0054] Step S140: Fit the basic point cloud data set according to the RANSAC algorithm to obtain the optimal fitting cylinder;

[0055] As an achievable approach, the step S140 involves fitting the basic point cloud dataset according to the RANSAC algorithm to obtain the optimal fitting cylinder, which specifically includes the following sub-steps:

[0056] Get the pipe radius R of the target pipe;

[0057] Preset RANSAC parameters, including the algorithm's iteration threshold , inlier distance threshold , the proportion of exit iteration internal points , radius difference threshold ;

[0058] According to the pipe radius R, RANSAC parameters and RANSAC algorithm, the basic point cloud dataset is iteratively updated with cylinder fitting to obtain the optimal fitting cylinder.

[0059] Among them, the pipe radius R of the target pipe involved in this application is mainly obtained in the following two ways: one is to measure it through other measuring equipment, which can be a measuring equipment installed on a drone; 2. It is obtained through the pipeline construction design drawing corresponding to the target pipe. The pipe radius R of the target pipe is the predicted true value of the pipe radius. The calculation process of the RANSAC algorithm is correspondingly limited by the known pipe radius, which can reduce the calculation intensity of the algorithm and improve the calculation speed. The iteration threshold is the maximum number of iterations for the cylindrical fitting calculation of the basic point cloud data set through the RANSAC algorithm, and the inner point distance threshold is The minimum distance threshold for the inner point distance to the surface of the fitted cylinder, the radius difference threshold It can be preset based on the pipe radius R, and refers to the preset value of the difference between the radius of the fitting circle and the pipe radius R.

[0060] As an implementable method, the sub-step of step S140 above is to perform iterative cylinder fitting on the basic point cloud dataset according to the pipe radius R, RANSAC parameters, and RANSAC algorithm to obtain the optimal fitting cylinder, which specifically includes the following sub-steps:

[0061] (1) Perform cylindrical fitting calculation operations on the basic point cloud dataset according to the RANSAC parameters to obtain the surface equation of the basic fitting cylinder;

[0062] As an achievable method, the above sub-step (1) involves performing a cylinder fitting calculation operation on the basic point cloud dataset based on the RANSAC parameters to obtain the surface equation of the basic fitting cylinder, including:

[0063] The first group of point clouds are randomly selected from the basic point cloud dataset for circle fitting calculation, and the first center coordinates C1 and the first radius r1 of the first fitting circle are obtained. The first radius r1 satisfies: ;

[0064] A second set of point clouds is randomly selected from the basic point cloud dataset for circle fitting calculation, and the second center coordinates C2 and the second radius r2 of the second fitting circle are obtained. The second radius r2 satisfies: ;

[0065] Perform cylinder fitting calculation on the first fitting circle and the second fitting circle to obtain the surface equation of the basic fitting cylinder;

[0066] The first point cloud group and the second point cloud group are both different from each other. The first point cloud group and the second point cloud group each include at least three point clouds.

[0067] Specifically, three point clouds can be randomly selected from the basic point cloud dataset for circle fitting, and the radius r1 of the first fitting circle obtained should satisfy , if the radius r1 does not satisfy , that is, when When , three point clouds are taken from the basic point cloud dataset for circle fitting. When the first fitting circle is successfully selected, three point clouds different from the point clouds forming the first fitting circle are selected from the basic point cloud dataset for fitting to form a second fitting circle. The radius r2 of the second fitting circle should satisfy , and when , three point clouds (different from the point clouds forming the first fitting circle) are taken from the basic point cloud dataset for circle fitting.

[0068] Furthermore, let the first circle center coordinate C1 be (x c1 ,y c1 , z c1 ), the coordinates of the second circle center C2 are (x c2 ,y c2 , z c2 ), the surface equation of the fitting cylinder formed by the first fitting circle and the second fitting circle can be expressed as:

[0069] =R

[0070] in, , , , 、 and is the intermediate parameter.

[0071] (2) Execute the target inlier calculation operation on the point cloud in the basic point cloud dataset according to the surface equation of the basic fitting cylinder to obtain the target inlier ratio;

[0072] As an achievable method, the target inlier calculation operation is performed on the point cloud in the basic point cloud dataset based on the surface equation of the basic fitting cylinder in the above sub-step (2) to obtain the target inlier ratio, which specifically includes the following:

[0073] The minimum distance between the surface of the basic point cloud dataset and the surface of the basic fitting cylinder calculated based on the surface equation of the basic fitting cylinder is less than the inner point distance threshold The number of point clouds is used to obtain the number of internal points of the target;

[0074] Calculate the ratio of the number of target internal points to the total number of point clouds in the basic point cloud dataset to obtain the target internal point ratio;

[0075] Among them, the minimum distance between the target inlier point in the basic point cloud dataset and the surface of the basic fitting cylinder is less than the inlier distance threshold The target inlier ratio is the ratio of target inliers to the base point cloud dataset.

[0076] Step S150: Calculate the angle at which the UAV's direction of travel deviates from the central axis of the best-fit cylinder based on the best-fit cylinder.

[0077] Specifically, let the data coordinates of any point cloud in the basic point cloud dataset be , substitute the point cloud coordinates into the basic fitting cylinder equation, when When , it means that the point cloud is an internal point of the target. When , it means that the point cloud is an outlier. There are several point clouds in the basic point cloud dataset, and the ratio of the number of target inliers to the number of all point clouds is the target inlier ratio.

[0078] (3) Obtain the current number of iterations corresponding to the currently calculated target interior point ratio or the surface equation of the basic fitting cylinder;

[0079] Each time a cylindrical fitting operation and a target inlier calculation operation are performed, an iteration is completed. During the iteration process, the number of target inliers can be recorded. If the number of target inliers calculated in the current iteration exceeds the maximum value of the previous iteration, the optimal model and the maximum number of inliers are updated.

[0080] (4) When the target inner point ratio meets the preset first iteration stop condition, the currently obtained basic fitting cylinder is determined as the optimal fitting cylinder, and the iterative calculation is exited;

[0081] The first iteration stopping condition is: the target internal point ratio is greater than or equal to the number of internal points in the exit iteration ratio .

[0082] (5) When the target inlier ratio does not meet the preset first iteration stop condition, determine whether the current number of iterations meets the preset second iteration stop condition. When the current number of iterations meets the preset second iteration stop condition, select the basic fitting cylinder corresponding to the largest target inlier ratio in the historical iteration process as the optimal fitting cylinder, and exit the iterative calculation; when the current number of iterations does not meet the preset second iteration stop condition, continue to iteratively execute the cylinder fitting calculation operation and the target inlier calculation operation until the first iteration stop condition or the second iteration stop condition is met, and determine the optimal fitting cylinder according to the first iteration stop condition or the second iteration stop condition.

[0083] The second iteration stop condition is: the current number of iterations reaches the iteration threshold (greater than or equal to the iteration threshold).

[0084] As an implementable manner, the step S150 of calculating the angle at which the direction of travel of the UAV deviates from the central axis of the best-fit cylinder based on the best-fit cylinder specifically includes the following sub-steps:

[0085] Obtain the center axis direction information of the best fitting cylinder;

[0086] Get the direction of the drone relative to the TOF sensor;

[0087] The horizontal deviation angle of the UAV's moving direction from the central axis in the horizontal direction and the vertical deviation angle of the UAV's moving direction from the central axis in the vertical direction are calculated based on the central axis direction information.

[0088] Specifically, assuming that the fitting cylinder formed by the first fitting circle and the second fitting circle is the optimal fitting cylinder, the central axis of the optimal fitting cylinder can be expressed as The horizontal and vertical offset angles between the UAV’s moving direction relative to the TOF sensor and the above vector are the UAV’s heading perception information.

[0089] The present invention is applied to a drone for inspecting underground pipelines. The front end of the drone is equipped with a time-of-flight (TOF) sensor. First, the drone is controlled to enter the target pipeline. After the drone enters the target pipeline, the TOF sensor is controlled to collect a TOF data set of the pipeline in front of the drone in real time. The TOF data set is filtered and converted to obtain a three-dimensional point cloud raw data set based on the pipeline TOF data set. The three-dimensional point cloud raw data set is then filtered to obtain a basic point cloud data set. The basic point cloud data set is fitted according to the RANSAC algorithm to obtain an optimal fitting cylinder. The angle of the drone's travel direction deviating from the central axis of the optimal fitting cylinder is calculated based on the optimal fitting cylinder to achieve the heading perception of the drone in the pipeline. The TOF technology-based method for sensing the heading of a drone in a pipeline provided by the present invention is applicable to lightweight small drone equipment. By updating environmental data in real time, the real-time perception of the heading in the pipeline is achieved, thereby avoiding the generation of cumulative errors. By filtering the data, the reliability of the data is increased while the accuracy of the perception is improved. The method for sensing the heading in the pipeline of the present application is low in cost, simple in implementation, and highly economical.

[0090] An electronic device is also provided in the embodiment of the present invention. Figure 2 , Figure 2 The following is a schematic diagram of an electronic device according to an embodiment of the present invention, including:

[0091] A memory 201, a processor 202, and a computer program 203 stored in the memory and executable on the processor, wherein when the processor executes the computer program 203 stored in the memory, the method for sensing the heading of a UAV in a pipeline based on TOF technology is implemented.

[0092] For ease of explanation, only the portions relevant to the embodiments of the present invention are shown. For specific technical details not disclosed, please refer to the section on a method for sensing the heading of a drone in a pipeline based on TOF technology in an embodiment of the present invention. Memory 201 can be used to store computer program 203, which includes software programs, modules, and data. Processor 202 executes computer program 203 stored in memory 201 to perform various functional applications and data processing of the electronic device.

[0093] The present invention also provides a computer-readable storage medium. Figure 3 , Figure 3 This is a schematic diagram of an embodiment of a computer-readable storage medium in an embodiment of the present invention, wherein the computer-readable storage medium may store a computer program, which, when executed, includes some or all of the steps of a method for sensing the heading of a UAV in a pipeline based on TOF technology as described in the above method embodiment.

[0094] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described device, electronic device and computer-readable storage medium can refer to the corresponding process of a method for sensing the heading of an in-pipeline drone based on TOF technology in the aforementioned method embodiment, and will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0096] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0097] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0098] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method for sensing the heading of a drone in a pipeline based on TOF technology in various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0099] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for sensing the heading of a drone in a pipeline based on TOF technology, which is applied to a drone used for inspecting underground pipelines. The front end of the drone is equipped with a TOF sensor, and is characterized in that: The method comprises: Controlling the UAV to enter the target pipeline, and after the UAV enters the target pipeline, controlling the TOF sensor to collect a TOF dataset of the pipeline in front of the UAV in real time; Performing filtering and data conversion on the pipeline TOF dataset in sequence to obtain a three-dimensional point cloud original dataset based on the pipeline TOF dataset; Performing secondary filtering on the original three-dimensional point cloud data set to obtain a basic point cloud data set; Obtain the pipe radius R of the target pipe; preset RANSAC parameters, which include an algorithm iteration number threshold, an inlier distance threshold, a ratio of inliers for exiting iteration, and a radius difference threshold; perform cylindrical fitting iteratively on the basic point cloud dataset based on the pipe radius R, the RANSAC parameters, and the RANSAC algorithm to obtain an optimal fitting cylinder; Calculating an angle at which the direction of travel of the UAV deviates from the central axis of the best-fit cylinder based on the best-fit cylinder; The method of iteratively updating the cylinder fitting of the basic point cloud data set according to the pipe radius R, RANSAC parameters, and RANSAC algorithm to obtain the optimal fitting cylinder includes: The first group of point clouds are randomly selected from the basic point cloud dataset for circle fitting calculation, and the first center coordinates C1 and the first radius r1 of the first fitting circle are obtained. The first radius r1 satisfies: ; A second set of point clouds is randomly selected from the basic point cloud dataset for circle fitting calculation, and the second center coordinates C2 and the second radius r2 of the second fitting circle are obtained. The second radius r2 satisfies: ; Perform cylindrical fitting calculation on the first fitting circle and the second fitting circle to obtain the surface equation of the basic fitting cylinder; let the coordinates of the first circle center C1 be (x c1 ,y c1 , z c1 ), the coordinates of the second circle center C2 are (x c2 ,y c2 , z c2 ), the surface equation of the fitting cylinder formed by the first fitting circle and the second fitting circle is expressed as: =R in, , , , 、 and is an intermediate parameter, any point cloud in the first group of point clouds is different from any point cloud in the second group of point clouds, and both the first group of point clouds and the second group of point clouds include at least 3 point clouds.

2. The method for sensing the direction of a UAV in a pipeline based on TOF technology according to claim 1 is characterized in that: Performing cylinder fitting iterative update on the basic point cloud dataset according to the pipeline radius R, the RANSAC parameters, and the RANSAC algorithm to obtain an optimal fitting cylinder, including: Performing a cylinder fitting calculation operation on the basic point cloud data set according to the RANSAC parameters to obtain a surface equation of a basic fitting cylinder; Performing a target inlier calculation operation on the point cloud in the basic point cloud dataset according to the surface equation of the basic fitting cylinder to obtain a target inlier ratio; Obtaining the current number of iterations corresponding to the currently calculated target interior point ratio or the surface equation of the basic fitting cylinder; When the target inner point ratio meets the preset first iteration stop condition, the currently obtained basic fitting cylinder is determined as the optimal fitting cylinder, and the iterative calculation is exited; When the target inlier ratio does not satisfy the preset first iteration stop condition, determine whether the current number of iterations satisfies the preset second iteration stop condition. When the current number of iterations satisfies the preset second iteration stop condition, select the basic fitting cylinder corresponding to the largest target inlier ratio in the historical iteration process as the optimal fitting cylinder, and exit the iterative calculation. When the current number of iterations does not satisfy the preset second iteration stop condition, continue to iteratively execute the cylinder fitting calculation operation and the target inlier calculation operation until the first iteration stop condition or the second iteration stop condition is satisfied, and determine the optimal fitting cylinder accordingly based on the satisfied first iteration stop condition or the satisfied second iteration stop condition.

3. The method for sensing the heading of a UAV in a pipeline based on TOF technology according to claim 2 is characterized by: The first iteration stopping condition is: the target inlier ratio is greater than or equal to the exit iteration inlier ratio ; The second iteration stopping condition is: the current iteration number reaches the iteration number threshold.

4. The method for sensing the heading of a UAV in a pipeline based on TOF technology according to claim 3 is characterized in that: The performing a target inlier calculation operation on the point cloud in the basic point cloud dataset according to the surface equation of the basic fitting cylinder to obtain a target inlier ratio includes: Calculating the number of point clouds in the basic point cloud dataset whose minimum distance to the surface of the basic fitting cylinder is less than the inlier distance threshold based on the surface equation of the basic fitting cylinder to obtain the number of target inliers; Calculating the ratio of the number of target inliers to the total number of point clouds in the basic point cloud dataset to obtain the target inlier ratio; The target inliers are point clouds in the basic point cloud dataset whose minimum distance to the surface of the basic fitting cylinder is less than the inlier distance threshold; and the target inlier ratio is the ratio of the target inliers in the basic point cloud dataset.

5. The method for sensing the heading of a UAV in a pipeline based on TOF technology according to claim 4 is characterized in that: The calculating, based on the best-fit cylinder, the angle at which the direction of travel of the UAV deviates from the central axis of the best-fit cylinder includes: Obtaining the center axis direction information of the optimal fitting cylinder; Obtaining a moving direction of the UAV relative to the TOF sensor; The horizontal deviation angle of the UAV's moving direction from the central axis in the horizontal direction and the vertical deviation angle of the UAV's moving direction from the central axis in the vertical direction are calculated based on the central axis direction information.

6. The method for sensing the heading of a UAV in a pipeline based on TOF technology according to claim 5 is characterized by: The primary filtering process includes isolated point filtering process, abnormal point filtering process and depth threshold filtering process, and the secondary filtering process includes outlier filtering process.

7. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the method for sensing the heading of a UAV in a pipeline based on TOF technology as described in any one of claims 1 to 6 when executing the computer program stored in the memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for sensing the heading of a UAV in a pipeline based on TOF technology according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Steel member cylinder fitting algorithm

    CN111027010A

  • Method and system for detecting offset of central axis of cigarette

    CN118225007A