Method for sensing obstacle of unmanned aerial vehicle in pipeline based on TOF (Time of Flight) technology and related equipment
Through TOF sensor and point cloud data processing technology, the problem of drone obstacle perception in underground pipelines is solved, real-time obstacle identification and risk determination of drones in narrow environments is realized, and perception accuracy and stability are improved , suitable for economical and applicable lightweight drone equipment.
Patent Information
- Application Number
- CN202411005522.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
In the underground pipeline environment, the difficulty of obstruction perception of drones is due to the narrow space and the lack of natural light sources, which leads to misjudgment of obstacles and reduced perception accuracy. It is difficult for the prior art to effectively realize real-time obstruction perception of drones in pipelines.
The TOF sensor is used to collect data in real time, convert it into a point cloud data set, and use filtering processing and safe pass area determination algorithm to judge the obstacle situation in front of the drone. Combining the actual size and flight performance of the drone, the obstacle coefficient is calculated. to determine the degree of danger.
It improves the accuracy and stability of the perception of obstacles in narrow pipes, is suitable for lightweight and small drone equipment, reduces costs and realizes the economical applicability of pipeline inspection.
Smart Images

Figure CN118968464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and in particular to a method for sensing obstacles of unmanned aerial vehicles in a pipeline based on TOF technology and related equipment. Background Art
[0002] Obstacle perception of drones is a very important part of drone control. The accuracy of obstacle perception largely determines the stability and safety of drone flight. In the underground pipeline environment, the requirements for drones are different from those in conventional environments. They have the following characteristics: 1. The environment is narrow. Usually, the inner diameter of the underground pipeline is about 400mm. The narrow environment can easily cause misjudgment of drone obstacles; 2. There is no natural light source. There is no natural light source such as sunlight in the underground pipeline, which will affect the accuracy of drone obstacle detection. For example, the camera sensor has high requirements for the brightness of the subject. 3. The types of obstacles are complex. The obstacles in the underground pipeline mainly include stones, steatites, urban domestic garbage, etc., which are different from the types of obstacles on the ground.
[0003] That is, how to provide a new obstacle perception method for drones in pipelines based on TOF 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 obstacles in pipelines by drones 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 obstacles of a UAV in a pipeline based on TOF technology and related equipment thereof to solve at least one of the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a method for detecting obstacles of a drone in a pipeline based on TOF technology, which is applied to a drone for inspecting underground pipelines, wherein a TOF sensor is installed at the front end of the drone, and the method comprises:
[0006] After the UAV enters the target pipeline, controlling the TOF sensor to collect a TOF data set in front of the UAV in real time;
[0007] Converting the TOF data set into an original point cloud data set according to the internal parameters of the TOF sensor, and filtering the original point cloud data set to obtain a basic point cloud data set;
[0008] Establishing a safe passage area for the UAV in the target pipeline according to the actual size of the UAV and the flight performance of the UAV;
[0009] The obstacle situation ahead of the UAV is determined based on the intrusion point cloud information of the safe passage area in the basic point cloud data set.
[0010] Preferably, establishing a safe passage area for the drone in the target pipeline according to the actual size of the drone and the flight performance of the drone includes:
[0011] Obtaining the actual size of the drone, and constructing a minimum cuboid that encloses the drone based on the actual size, wherein the actual size includes the length L, width W, and height H of the drone;
[0012] Configuring a proportional parameter threshold according to the flight performance of the UAV;
[0013] A safe passage area for the UAV in the target pipeline is constructed based on the minimum cuboid and the proportional parameter threshold, wherein the minimum cuboid is located at the inner center of the safe passage area, and the safe passage area is a cuboid area.
[0014] Preferably, the ratio parameter thresholds include a height ratio parameter threshold a, a width ratio parameter threshold b, and a length ratio parameter threshold c, and the step of constructing a safe passage area for the UAV in the target pipeline based on the ratio parameter thresholds based on the minimum cuboid includes:
[0015] Calculate the length l, width w, and height h of the safe passage area according to the ratio parameter threshold and the actual size, where l=aL, w=bW, and h=cH;
[0016] Taking the center of the smallest cuboid as the center of the safe passage area, constructing the safe passage area according to the length, width and height of the safe passage area;
[0017] A spatial rectangular coordinate system is established with the center of the minimum cuboid as the origin, and the set expression of all point clouds in the safe passage area based on the spatial rectangular coordinate system is:
[0018]
[0019] Among them, O is a point cloud set composed of all point clouds in the safe passage area, and (x, y, z) is the three-dimensional coordinates of any point cloud in the safe passage area in the spatial rectangular coordinate system.
[0020] Preferably, the determining of obstacles in front of the drone based on the intrusion point cloud information in the basic point cloud data set that invades the safe passage area includes:
[0021] Acquire the relative position coordinates of the TOF sensor based on the spatial rectangular coordinate system;
[0022] Converting the safe passage area according to the relative position coordinates to obtain a relative passage area;
[0023] Determine whether there is a point cloud in the basic point cloud data set invading the relatively passable area;
[0024] If there is a point cloud invading the relative passable area in the basic point cloud data set, the invading point cloud information invading the relative passable area is obtained in real time, and the obstacle coefficient of the invading point cloud information based on the relative passable area is calculated, and the obstacle danger degree is determined according to the obstacle coefficient;
[0025] If there is no point cloud in the basic point cloud data set invading the relatively passable area, it is determined that there is no obstacle in front of the drone.
[0026] Preferably, converting the safe passage area according to the relative position coordinates to obtain a relative passage area includes:
[0027] Let the relative position coordinates be (Δx, Δy, Δz);
[0028] The set expression of all point clouds in the relative passage area obtained by transforming the safe passage area according to the relative position coordinates based on the sensor coordinate system is:
[0029]
[0030] Wherein, O' is a point cloud set composed of all point clouds in the relative passage area, and (x', y', z') is the three-dimensional coordinate of any point cloud in the relative passage area in the relative rectangular coordinate system.
[0031] Preferably, the calculating of the intrusion point cloud information based on the obstacle coefficient of the relative passage area includes:
[0032] Calculate the ratio S of the projection area of all the intrusion point clouds in the intrusion point cloud information projected onto the front side surface of the relative passage area to the area of the front side surface;
[0033] Calculate the ratio D of the shortest distance from the intrusion point cloud in the intrusion point cloud information to the front side surface to the length l of the relative passage area;
[0034] Calculate the percentage M of the change in the number of intrusion point clouds in the intrusion point cloud information within a preset time period;
[0035] Preset weight values, the weight values include area weight value α, distance weight value β, and change weight value γ;
[0036] The obstacle coefficient T of the intrusion point cloud information based on the relative passage area is calculated based on the area proportion S, the distance ratio D, and the percentage of change M according to the corresponding preset weight values, where T=α*S+β*D+γ*M;
[0037] The front side surface is a vertical plane located in front of the drone in the forward direction of the drone.
[0038] Preferably, the determining of the degree of danger of an obstacle according to the obstacle coefficient includes:
[0039] Presetting a value interval of the obstacle coefficient according to historical data, the value interval includes a first value interval, a second value interval and a third value interval;
[0040] When the obstacle coefficient is in the first value interval, it is determined that the obstacle in front of the UAV has a first-level danger level, and the first-level danger level indicates that the obstacle is suspected to exist;
[0041] When the obstacle coefficient is in the second value interval, it is determined that the obstacle in front of the UAV has a second-level danger level, and the second-level danger level indicates that the obstacle is definitely present;
[0042] When the obstacle coefficient is in the third value interval, it is determined that the obstacle in front of the drone has a third level of danger, and the third level of danger indicates that the obstacle is about to contact the drone.
[0043] Preferably, the internal parameters of the TOF sensor include a horizontal focal length, a vertical focal length, a horizontal position of the optical center, and a vertical position of the optical center.
[0044] 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 executable on the processor, wherein the processor is used to implement any one of the TOF technology-based methods for perceiving obstacles of unmanned aerial vehicles in a pipeline in the first aspect when executing the computer program stored in the memory.
[0045] In a third aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for sensing obstacles of drones in pipelines based on TOF technology according to any one of the first aspects.
[0046] The method for sensing obstacles of unmanned aerial vehicles in pipelines based on TOF technology provided by the present invention is applied to unmanned aerial vehicles with a TOF sensor installed at the front end for inspecting underground pipelines. First, the unmanned aerial vehicle is controlled to enter the target pipeline. After the unmanned aerial vehicle enters the target pipeline, the TOF sensor is controlled to collect the TOF data set in front of the unmanned aerial vehicle in real time. Then, the TOF data set is converted into an original point cloud data set according to the internal reference of the TOF sensor, and the original point cloud data set is filtered to obtain a basic point cloud data set. The safe passage area of the unmanned aerial vehicle in the target pipeline is established according to the actual size of the unmanned aerial vehicle and the flight performance of the unmanned aerial vehicle. Finally, the obstacle situation in front of the unmanned aerial vehicle is determined according to the intrusion point cloud information of the intrusion point cloud in the safe passage area in the basic point cloud data set. The method for sensing obstacles of unmanned aerial vehicles in pipelines based on TOF technology provided by the present invention is suitable for sensing obstacles in narrow pipeline environments, can be applied to lightweight and small unmanned aerial vehicle equipment for inspecting pipelines, has a simple implementation method, low cost, high economic applicability, and by using the TOF sensor for obstacle determination, the stability and accuracy of the determination can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 creative work.
[0048] Figure 1 A flow chart of a method for detecting obstacles of drones in pipelines based on TOF technology provided in this application;
[0049] Figure 2 A structural schematic diagram of a safe passage area in the obstacle perception method of a drone in a pipeline based on TOF technology provided in this application;
[0050] Figure 3 A schematic diagram of the structure of an electronic device provided by this application;
[0051] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided in this application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0053] 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 here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations 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 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 change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0054] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. 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. In addition, 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 in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0055] Next, see Figure 1 , Figure 1 The present invention is a flowchart of a method for sensing obstacles of a drone in a pipeline based on TOF technology in an embodiment of the present invention. As an embodiment of a method for sensing obstacles of a drone in a pipeline based on TOF technology provided by the present invention, the method is applied to a drone for inspecting underground pipelines. A TOF sensor is installed at the front end of the drone. The method for sensing obstacles of a drone in a pipeline based on TOF technology specifically includes the following steps S110 to S160:
[0056] Step S110: After the UAV enters the target pipeline, the TOF sensor is controlled to collect a TOF data set in front of the UAV in real time;
[0057] Among them, underground pipelines include underground horizontal pipes and underground vertical shafts. Underground horizontal pipes refer to underground pipelines laid in a horizontal direction, and underground vertical shafts refer to underground pipelines laid in a vertical direction. The target pipeline involved in this application can be an underground horizontal pipe or an underground vertical shaft.
[0058] Step S120: converting the TOF data set into an original point cloud data set according to the internal parameters of the TOF sensor, and filtering the original point cloud data set to obtain a basic point cloud data set;
[0059] The filtering process includes isolated point filtering process, which performs isolated point filtering process or outlier filtering process on the original point cloud data set to reduce the influence of noise on the accuracy of the method. The basic point cloud data set includes the three-dimensional coordinates of the point cloud based on the sensor coordinate system.
[0060] As an achievable method, the internal parameters of the TOF sensor include the horizontal focal length f x , vertical focal length f y , the horizontal position of the optical center c x and the vertical position of the optical center c y , that is, the internal parameter matrix of the TOF sensor is:
[0061]
[0062] Step S130: establishing a safe passage area for the drone in the target pipeline according to the actual size of the drone and the flight performance of the drone;
[0063] As an achievable manner, the step S130 involved in establishing a safe passage area for the drone in the target pipeline based on the actual size of the drone and the flight performance of the drone specifically includes the following sub-steps:
[0064] (1) obtaining the actual size of the drone, and constructing a minimum cuboid that encloses the drone based on the actual size, where the actual size includes the length L, width W, and height H of the drone;
[0065] (2) configuring a proportional parameter threshold according to the flight performance of the UAV;
[0066] The ratio parameter thresholds include a height ratio parameter threshold a, a width ratio parameter threshold b, and a length ratio parameter threshold c.
[0067] Then, the proportional parameter threshold value configured according to the flight performance of the drone can be specifically determined according to the maximum value of the left and right shaking of the drone during flight control. The height proportional parameter threshold value a and the width proportional parameter threshold value b are generally set to be equal, that is, a=b, and the length proportional parameter threshold value c is determined according to the braking stopping distance of the drone during flight.
[0068] As an achievable manner, the height ratio parameter threshold a and the width ratio parameter threshold b may both be determined to be 1.5, and the length ratio parameter threshold c may be determined to be 2, that is, a=b=1.5, c=2.
[0069] (3) A safe passage area for the UAV in the target pipeline is constructed based on the minimum cuboid and the proportional parameter threshold, wherein the minimum cuboid is located at the inner center of the safe passage area, and the safe passage area is a cuboid area.
[0070] As an achievable manner, the above sub-step (3) involves constructing a safe passage area for the UAV in the target pipeline based on the minimum cuboid and the proportional parameter threshold, which specifically includes the following contents:
[0071] Calculate the length l, width w, and height h of the safe passage area according to the ratio parameter threshold and the actual size, where l=aL, w=bW, and h=cH;
[0072] Taking the center of the smallest cuboid as the center of the safe passage area, constructing the safe passage area according to the length, width and height of the safe passage area;
[0073] A spatial rectangular coordinate system is established with the center of the minimum cuboid as the origin, and the set expression of all point clouds in the safe passage area based on the spatial rectangular coordinate system is:
[0074]
[0075] Among them, O is a point cloud set composed of all point clouds in the safe passage area, and (x, y, z) is the three-dimensional coordinates of any point cloud in the safe passage area in the spatial rectangular coordinate system.
[0076] Among them, the spatial rectangular coordinate system is a coordinate system established with the center of the drone (the center of the smallest cuboid) as the origin, the direction of movement of the drone as the x-axis, the vertical upward direction as the z-axis, and the horizontal direction of the left side of the drone as the y-axis.
[0077] Since the safe passage area is a rectangular area, the three-dimensional coordinates of the eight vertices of the safe passage area based on the spatial rectangular coordinate system can be obtained based on the spatial rectangular coordinate system and the length, width and height of the safe passage area. The width and height of the safe passage area are smaller than the inner diameter of the target pipeline.
[0078] Specific as Figure 2 As shown, the eight vertices of the safe passage area are P 0 , P 1 , P 2 , P 3 , P 4 , P 5 , P 6 , P 7 , where P 0 The three-dimensional coordinates of P are (-l / 2, w / 2, -h / 2) or (-aL / 2, bW / 2, -cH / 2); 1 The three-dimensional coordinates of P are (l / 2,w / 2,-h / 2) or (aL / 2,nW / 2,-cH / 2); 2 The three-dimensional coordinates of P are (l / 2, -w / 2, -h / 2) or (aL / 2, -bW / 2, -cH / 2); 3 The three-dimensional coordinates of P are (-l / 2,-w / 2,-h / 2) or (-aL / 2,-bW / 2,-cH / 2); 4 The three-dimensional coordinates of P are (-l / 2,w / 2,h / 2) or (-aL / 2,bW / 2,cH / 2); 5 The three-dimensional coordinates of P are (l / 2,w / 2,h / 2) or (aL / 2,bW / 2,cH / 2); 6 The three-dimensional coordinates of P are (l / 2, -w / 2, h / 2) or (aL / 2, -bW / 2, cH / 2); 7 The three-dimensional coordinates are (-l / 2, -w / 2, h / 2) or (-aL / 2, -bW / 2, cH / 2).
[0079] Specifically, when a=b=1.5, c=2, l=2L, w=1.5W, h=1.5H, the set expression of all point clouds in the corresponding safe passage area based on the spatial rectangular coordinate system is:
[0080]
[0081] Step S140: Determine obstacles ahead of the UAV based on the intrusion point cloud information of the safe passage area in the basic point cloud data set.
[0082] As an achievable manner, the step S140 involved in determining the obstacle situation in front of the drone based on the intrusion point cloud information in the basic point cloud data set that invades the safe passage area specifically includes the following sub-steps:
[0083] 1) Obtaining the relative position coordinates of the TOF sensor based on the spatial rectangular coordinate system;
[0084] 2) converting the safe passage area according to the relative position coordinates to obtain a relative passage area;
[0085] As an achievable manner, the step of converting the safe passage area according to the relative position coordinates to obtain the relative passage area in the above sub-step 2) specifically includes the following contents:
[0086] Let the relative position coordinates be (Δx, Δy, Δz);
[0087] The set expression of all point clouds in the relative passage area obtained by transforming the safe passage area according to the relative position coordinates based on the sensor coordinate system is:
[0088]
[0089] Wherein, O' is a point cloud set composed of all point clouds in the relative passage area, and (x', y', z') is the three-dimensional coordinate of any point cloud in the relative passage area in the relative rectangular coordinate system.
[0090] Specifically, since the three-dimensional coordinates of the point cloud in the basic point cloud data set collected by the TOF sensor are based on the sensor coordinate system established with the TOF sensor as the origin, in order to convert the points in the spatial rectangular coordinate system to the sensor coordinate system, a coordinate transformation is required, that is, a translation according to (Δx, Δy, Δz).
[0091] Therefore, after converting the safe passage area to the coordinate system corresponding to the TOF sensor, the coordinates of the eight vertices relative to the passage area are obtained as P′ 0 , P′ 1 , P′ 2 , P′ 3 , P′ 4 , P′ 5 , P′ 6 , P′ 7 , where P′ 0 The three-dimensional coordinates of P are (Δx-l / 2, Δy+w / 2, Δz-h / 2); 1 The three-dimensional coordinates of P are (Δx+l / 2, Δy+w / 2, Δz-h / 2); 2The three-dimensional coordinates of P are (Δx+l / 2, Δy-w / 2, Δz-h / 2); 3 The three-dimensional coordinates of P are (Δx-l / 2, Δy-w / 2, Δz-h / 2); 4 The three-dimensional coordinates of P are (Δx-l / 2, Δy+w / 2, Δz+h / 2); 5 The three-dimensional coordinates of P are (Δx+l / 2, Δy+w / 2, Δz+h / 2); 6 The three-dimensional coordinates of P are (Δx+l / 2, Δy-w / 2, Δz+h / 2); 7 The three-dimensional coordinates are (Δx-l / 2, Δy-w / 2, Δz+h / 2).
[0092] 3) Determining whether there is a point cloud in the basic point cloud data set invading the relatively passable area;
[0093] Whether there is a point cloud intrusion in the relative pass area in the basic point cloud dataset is based on whether the three-dimensional point cloud in the basic point cloud dataset satisfies the set expression of all point clouds in the relative pass area based on the sensor coordinate system.
[0094] 4) If there is a point cloud invading the relative passable area in the basic point cloud data set, the invading point cloud information of the relative passable area is obtained in real time, and the obstacle coefficient of the invading point cloud information based on the relative passable area is calculated, and the obstacle danger degree is determined according to the obstacle coefficient;
[0095] As an achievable manner, the calculation of the intrusion point cloud information involved in the above sub-step 4) is based on the obstacle coefficient of the relative passage area, and specifically includes the following contents:
[0096] Calculate the ratio S of the projection area of all the intrusion point clouds in the intrusion point cloud information projected onto the front side surface of the relative passage area to the area of the front side surface;
[0097] Calculate the ratio D of the shortest distance from the intrusion point cloud in the intrusion point cloud information to the front side surface to the length l of the relative passage area;
[0098] Calculate the percentage M of the change in the number of intrusion point clouds in the intrusion point cloud information within a preset time period;
[0099] Preset weight values, the weight values include area weight value α, distance weight value β, and change weight value γ;
[0100] The obstacle coefficient T of the intrusion point cloud information based on the relative passage area is calculated based on the area proportion S, the distance ratio D, and the percentage of change M according to the corresponding preset weight values, where T=α*S+β*D+γ*M;
[0101] Wherein, the front side surface is a vertical plane located in front of the drone in the forward direction of the drone. The values of the area weight value α, the distance weight value β, and the change weight value γ can be: α=0.2, β=0.3, λ=0.5. Wherein, α, β, γ can be calibrated in an experimental field, and the experimental field is used to simulate the scenario of this application. Obstacles can be placed in the experimental pipeline at 10 cm, 20 cm, and 30 cm in front of the drone, and then the optimal value can be obtained by experiment according to the undetermined coefficient method and the least squares fitting method.
[0102] Specifically, Figure 2 As shown, the front side is the vertex P corresponding to P1, P2, P5, and P6 in the figure. 1 '、P' 2 , P' 5 , P' 6 The area ratio is the ratio of the area obtained by connecting all the projection points after the intrusion point cloud is projected to the front side surface to the area of the front side surface.
[0103] Generally, the percentage of change in the number of intrusion point clouds in the intrusion point cloud information within 0.5 seconds is calculated, and the percentage of change is the percentage of the change in the number of intrusion point clouds after 0.5 seconds and the number of intrusion point clouds before 0.5 seconds.
[0104] As an achievable manner, the above sub-step 4) involves determining the degree of obstacle danger based on the obstacle coefficient, specifically including the following contents:
[0105] Presetting a value interval of the obstacle coefficient according to historical data, the value interval includes a first value interval, a second value interval and a third value interval;
[0106] When the obstacle coefficient is in the first value interval, it is determined that the obstacle in front of the UAV has a first-level danger level, and the first-level danger level indicates that the obstacle is suspected to exist;
[0107] When the obstacle coefficient is in the second value interval, it is determined that the obstacle in front of the UAV has a second-level danger level, and the second-level danger level indicates that the obstacle is definitely present;
[0108] When the obstacle coefficient is in the third value interval, it is determined that the obstacle in front of the drone has a third level of danger, and the third level of danger indicates that the obstacle is about to contact the drone.
[0109] Specifically, the first value interval, the second value interval and the third value interval can be calculated by corresponding historical data and artificial simulation tests, wherein the first value interval can be (0, 0.4], the second value interval can be (0.4, 0.7], and the third value interval can be (0.7, 1]. When the obstacle coefficient is in (0, 0.4], it means that there may be an obstacle ahead; when the obstacle coefficient is in (0.4, 0.7], it means that there is an obstacle ahead; when the obstacle coefficient is in (0.7, 1], it means that the obstacle is about to be encountered.
[0110] 5) If there is no point cloud invading the relatively passable area in the basic point cloud data set, it is determined that there is no obstacle in front of the drone.
[0111] The method for sensing obstacles of unmanned aerial vehicles in pipelines based on TOF technology provided by the embodiment of the present invention is applied to unmanned aerial vehicles with a TOF sensor installed at the front end for inspecting underground pipelines. First, the unmanned aerial vehicle is controlled to enter the target pipeline. After the unmanned aerial vehicle enters the target pipeline, the TOF sensor is controlled to collect the TOF data set in front of the unmanned aerial vehicle in real time. Then, the TOF data set is converted into an original point cloud data set according to the internal reference of the TOF sensor, and the original point cloud data set is filtered to obtain a basic point cloud data set. The safe passage area of the unmanned aerial vehicle in the target pipeline is established according to the actual size of the unmanned aerial vehicle and the flight performance of the unmanned aerial vehicle. Finally, the obstacle situation in front of the unmanned aerial vehicle is determined according to the intrusion point cloud information in the safe passage area in the basic point cloud data set. The method for sensing obstacles of unmanned aerial vehicles in pipelines based on TOF technology provided by the embodiment of the present invention is suitable for sensing obstacles in narrow pipeline environments, can be applied to lightweight and small unmanned aerial vehicle equipment for inspecting pipelines, has a simple implementation method, low cost, high economic applicability, and by using the TOF sensor for obstacle determination, the stability and accuracy of the determination can be improved.
[0112] An electronic device is also provided in an embodiment of the present invention. Figure 3 , Figure 3 The electronic device of the present invention is a schematic diagram of an embodiment of the electronic device, including:
[0113] A memory 301, a processor 302, and a computer program 303 stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for sensing obstacles of a drone in a pipeline based on TOF technology when executing the computer program 303 stored in the memory.
[0114] For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the part of the embodiment of the present invention on a method for sensing obstacles of drones in a pipeline based on TOF technology. The memory 301 can be used to store a computer program 303, which includes software programs, modules and data. The processor 302 executes the computer program 303 stored in the memory 301 to perform various functional applications and data processing of the electronic device.
[0115] The present invention also provides a computer-readable storage medium. Figure 4 , Figure 4 The present invention 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 obstacles in a pipeline using a drone based on TOF technology as described in the above method embodiment.
[0116] Technicians in the relevant field 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 perceiving obstacles of a drone in a pipeline based on TOF technology in the aforementioned method embodiment, and will not be repeated here.
[0117] In the several embodiments provided in the present 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 only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, 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.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0120] If the integrated unit is implemented in the form of 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of a method for sensing obstacles in a pipeline drone based on TOF technology in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0121] 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 aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may 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 detecting obstacles in a pipeline using a drone 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. It is characterized in that The method comprises: After the UAV enters the target pipeline, controlling the TOF sensor to collect a TOF data set in front of the UAV in real time; Converting the TOF data set into an original point cloud data set according to the internal parameters of the TOF sensor, and filtering the original point cloud data set to obtain a basic point cloud data set; Establishing a safe passage area for the UAV in the target pipeline according to the actual size of the UAV and the flight performance of the UAV; The obstacle situation ahead of the UAV is determined based on the intrusion point cloud information of the safe passage area in the basic point cloud data set.
2. According to the TOF technology-based method for sensing the heading of a UAV in a pipeline, It is characterized in that The step of establishing a safe passage area for the drone in the target pipeline according to the actual size of the drone and the flight performance of the drone includes: Obtaining the actual size of the drone, and constructing a minimum cuboid that encloses the drone based on the actual size, wherein the actual size includes the length L, width W, and height H of the drone; Configuring a proportional parameter threshold according to the flight performance of the UAV; A safe passage area for the UAV in the target pipeline is constructed based on the minimum cuboid and the proportional parameter threshold, wherein the minimum cuboid is located at the inner center of the safe passage area, and the safe passage area is a cuboid area.
3. According to claim 2, a method for sensing the heading of a UAV in a pipeline based on TOF technology, It is characterized in that The ratio parameter thresholds include a height ratio parameter threshold a, a width ratio parameter threshold b, and a length ratio parameter threshold c. The method of constructing a safe passage area for the UAV in the target pipeline based on the ratio parameter thresholds and taking the minimum cuboid as a reference includes: Calculate the length l, width w, and height h of the safe passage area according to the ratio parameter threshold and the actual size, where l=aL, w=bW, and h=cH; Taking the center of the smallest cuboid as the center of the safe passage area, constructing the safe passage area according to the length, width and height of the safe passage area; A spatial rectangular coordinate system is established with the center of the minimum cuboid as the origin, and the set expression of all point clouds in the safe passage area based on the spatial rectangular coordinate system is: Among them, O is a point cloud set composed of all point clouds in the safe passage area, and (x, y, z) is the three-dimensional coordinates of any point cloud in the safe passage area in the spatial rectangular coordinate system.
4. According to claim 3, a method for sensing the heading of a UAV in a pipeline based on TOF technology, It is characterized in that The determining of obstacles in front of the UAV based on the intrusion point cloud information in the basic point cloud data set that invades the safe passage area includes: Acquire the relative position coordinates of the TOF sensor based on the spatial rectangular coordinate system; Converting the safe passage area according to the relative position coordinates to obtain a relative passage area; Determine whether there is a point cloud in the basic point cloud data set invading the relatively passable area; If there is a point cloud invading the relative passable area in the basic point cloud data set, the invading point cloud information invading the relative passable area is obtained in real time, and the obstacle coefficient of the invading point cloud information based on the relative passable area is calculated, and the obstacle danger degree is determined according to the obstacle coefficient; If there is no point cloud in the basic point cloud data set invading the relatively passable area, it is determined that there is no obstacle in front of the drone.
5. According to claim 4, a method for sensing the heading of a UAV in a pipeline based on TOF technology, It is characterized in that The safe passage area is converted according to the relative position coordinates to obtain a relative passage area, including: Let the relative position coordinates be (Δx, Δy, Δz); The set expression of all point clouds in the relative passage area obtained by transforming the safe passage area according to the relative position coordinates based on the sensor coordinate system is: Among them, O ’ is a point cloud set composed of all point clouds in the relative pass area, (x ’ ,y ’ ,z ’ ) is the three-dimensional coordinate of any point cloud in the relative passage area in the relative rectangular coordinate system.
6. According to claim 5, a method for sensing the heading of a UAV in a pipeline based on TOF technology, It is characterized in that The calculating of the intrusion point cloud information based on the obstacle coefficient of the relative passage area includes: Calculate the ratio S of the projection area of all the intrusion point clouds in the intrusion point cloud information projected onto the front side surface of the relative passage area to the area of the front side surface; Calculate the ratio D of the shortest distance from the intrusion point cloud in the intrusion point cloud information to the front side surface to the length l of the relative passage area; Calculate the percentage M of the change in the number of intrusion point clouds in the intrusion point cloud information within a preset time period; Preset weight values, the weight values include area weight value α, distance weight value β, and change weight value γ; The obstacle coefficient T of the intrusion point cloud information based on the relative passage area is calculated based on the area proportion S, the distance ratio D, and the percentage of change M according to the corresponding preset weight values, where T=α*S+β*D+γ*M; The front side surface is a vertical plane located in front of the drone in the forward direction of the drone.
7. According to claim 6, a method for sensing the heading of a UAV in a pipeline based on TOF technology, It is characterized in that The determining of the degree of danger of an obstacle according to the obstacle coefficient includes: Presetting a value interval of the obstacle coefficient according to historical data, the value interval includes a first value interval, a second value interval and a third value interval; When the obstacle coefficient is in the first value interval, it is determined that the obstacle in front of the UAV has a first-level danger level, and the first-level danger level indicates that the obstacle is suspected to exist; When the obstacle coefficient is in the second value interval, it is determined that the obstacle in front of the UAV has a second-level danger level, and the second-level danger level indicates that the obstacle is definitely present; When the obstacle coefficient is in the third value interval, it is determined that the obstacle in front of the drone has a third level of danger, and the third level of danger indicates that the obstacle is about to contact the drone.
8. According to claim 7, a method for sensing the heading of a UAV in a pipeline based on TOF technology, Features: The internal parameters of the TOF sensor include the horizontal focal length, the vertical focal length, the horizontal position of the optical center, and the vertical position of the optical center.
9. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement a method for sensing obstacles of unmanned aerial vehicles in a pipeline based on TOF technology as described in any one of claims 1 to 8 when executing the computer program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, the method for sensing obstacles of a UAV in a pipeline based on TOF technology as described in any one of claims 1 to 8 is implemented.
