Wall climbing obstacle avoidance method for outer wall detection robot

An adaptive magnetic adsorption force model combining terahertz radar and static magnetic image method was developed to solve the problem of magnetic adsorption force adjustment for wall-climbing robots in complex external wall environments. This enabled high-precision obstacle detection and efficient detection, reduced slippage risk, and improved detection efficiency.

CN122469890APending Publication Date: 2026-07-28FUZHOU PLANNING DESIGN & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUZHOU PLANNING DESIGN & RES INST
Filing Date
2026-06-26
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing wall-climbing robots cannot dynamically adjust the magnetic adsorption force according to working parameters such as exterior wall material, coating thickness, wall inclination angle, and curvature, resulting in insufficient or excessive adsorption force, which leads to the risk of slippage and overturning, and also has low detection accuracy and efficiency.

Method used

By employing terahertz radar combined with the static magnetic image method and the multi-source fusion extended Kalman filter algorithm, an adaptive magnetic adsorption force model is constructed to adjust the magnetic adsorption force in real time. Combined with terahertz material inversion and visual perception, accurate pose calculation and obstacle detection are achieved.

Benefits of technology

It achieves accurate obstacle perception and internal defect detection, reduces slippage risk, improves detection accuracy and efficiency, optimizes the matching of adsorption force and motion resistance, reduces slippage risk by 95%, and improves detection efficiency by 50%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122469890A_ABST
    Figure CN122469890A_ABST
Patent Text Reader

Abstract

The application discloses a kind of outer wall detection robot wall-climbing obstacle avoidance methods, belong to the field of obstacle avoidance, comprising the following steps: S1, the working condition of outer wall is preliminarily detected to determine robot adsorption parameter;S2, construct adaptive magnetic adsorption force model and calculate dynamic safety adsorption force threshold, output real-time magnetic adsorption force, dynamic safety threshold and terahertz inversion spherical magnetic wheel-outer wall friction coefficient;S3, adopt terahertz ranging auxiliary multi-source fusion extended Kalman filtering algorithm, realize robot pose solution, output robot real-time pose and positioning error data;S4, realize outer wall obstacle and internal defect joint detection by terahertz multi-modal perception, complete obstacle avoidance mode determination, and customize obstacle avoidance mode.The above-mentioned outer wall detection robot wall-climbing obstacle avoidance method is used, and in strong magnetic interference, dust water mist environment, safe and stable operation, centimeter-level positioning and efficient nondestructive testing are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of obstacle avoidance technology, and in particular to a method for an external wall inspection robot to climb walls and avoid obstacles. Background Technology

[0002] With the continuous growth of the number of high-rise buildings in cities, safety accidents caused by defects such as hollowness, delamination, cracks, and corrosion in exterior walls are frequent. Regular inspection and maintenance of building exterior walls has become a necessity for the building operation and maintenance industry. Traditional manual high-altitude exterior wall inspection operations have drawbacks such as high risk, low efficiency, poor inspection accuracy, and strong data subjectivity. Therefore, wall-climbing exterior wall inspection robots, with their advantages of operational safety and automation, are gradually becoming the mainstream technical solution for exterior wall inspection.

[0003] Existing wall-climbing robots mostly use permanent magnet adsorption, negative pressure adsorption, or electromagnetic adsorption to attach to walls. Among them, Halbach array permanent magnets are widely used in metal exterior wall climbing robots because they can provide stable adsorption force with high magnetic energy product and low magnetic leakage. However, in existing technologies, the magnetic adsorption force is mostly a fixed value preset by the factory, which cannot be dynamically adjusted according to working parameters such as exterior wall material, coating thickness, wall inclination angle, and curvature. This can easily lead to slippage and overturning risks due to insufficient adsorption force, or problems such as increased movement resistance, increased energy consumption, and accelerated wear of the mechanism due to excessive adsorption force, making it difficult to adapt to the complex and ever-changing working conditions of exterior walls. Summary of the Invention

[0004] The purpose of this invention is to provide a method for an external wall inspection robot to climb walls and avoid obstacles, thereby solving the above-mentioned technical problems.

[0005] To achieve the above objectives, the present invention provides a method for an external wall inspection robot to climb walls and avoid obstacles, comprising the following steps: S1. Initialize robot configuration parameters, and simultaneously complete robot hardware self-test and sensor zero bias calibration. Perform preliminary detection of the external wall working conditions to determine robot adsorption parameters, and output sensor calibration parameters, initialized robot adsorption parameters and robot configuration parameters. S2. Based on the preliminary detection data of S1, combined with the static magnetic mirror method and terahertz material inversion results, an adaptive magnetic adsorption force model is constructed and the dynamic safety adsorption force threshold is calculated. The real-time magnetic adsorption force, dynamic safety threshold and terahertz inversion spherical magnetic wheel-external wall friction coefficient are output. S3. Based on the sensor calibrated by S1, the terahertz ranging-assisted multi-source fusion extended Kalman filter algorithm is used to realize the robot pose calculation and output the robot's real-time pose and positioning error data. S4, based on the robot's real-time pose output by S3 and the dynamic safety adsorption force threshold output by S2, achieves joint detection of external wall obstacles and internal defects through terahertz multimodal perception, completes obstacle avoidance mode determination, and customizes obstacle avoidance mode.

[0006] Therefore, the present invention employs the above-mentioned method for wall climbing and obstacle avoidance by an external wall inspection robot, which has the following beneficial effects: 1. Employing terahertz radar + AprilTag visual fusion perception, terahertz waves penetrate coatings to detect internal defects and resist environmental interference, while visual correction of posture is achieved; obstacle perception accuracy ≤1mm and defect detection depth ≤5mm can be achieved, solving the problem of perception failure in harsh environments such as high-altitude exterior walls. 2. Terahertz ranging is used to replace the traditional UWB ranging front end, eliminating magnetic interference and multipath effects from metal exterior walls. It integrates IMU / wheel odometer / vision, with a positioning error of ≤3cm, which is 40% more accurate than traditional methods, providing centimeter-level pose assurance for obstacle avoidance. 3. Terahertz spectroscopy is used to identify the exterior wall material, coating thickness, and hollowness in real time. The friction coefficient between the wheel, the spherical magnetic wheel, and the exterior wall is calculated online. Based on the static magnetic mirror method, the safety threshold of magnetic adsorption force is dynamically optimized to achieve the optimal match between adsorption force, motion resistance, and obstacle avoidance safety, reducing the risk of slippage by 95%. 4. The obstacle avoidance trajectory planning simultaneously reserves a terahertz detection window, and the external wall defect scanning is completed simultaneously throughout the obstacle avoidance process. No separate detection operation is required, and the overall detection efficiency is improved by 50%, realizing the closed-loop collaboration of "obstacle avoidance + detection".

[0007] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0008] Figure 1 This is a flowchart of a wall-climbing and obstacle-avoiding method for an external wall inspection robot according to the present invention. Detailed Implementation

[0009] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.

[0010] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0011] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0012] like Figure 1 As shown, a method for an exterior wall inspection robot to climb walls and avoid obstacles includes the following steps: S1. Initialize robot configuration parameters, and simultaneously complete robot hardware self-test and sensor zero-bias calibration. Perform preliminary detection of the external wall working conditions to determine robot adsorption parameters, and output sensor calibration parameters, initialized robot adsorption parameters, and robot configuration parameters.

[0013] S2. Based on the preliminary detection data of S1, combined with the static magnetic mirror method and terahertz material inversion results, an adaptive magnetic adsorption force model is constructed and the dynamic safety adsorption force threshold is calculated. The real-time magnetic adsorption force, dynamic safety threshold and terahertz inversion spherical magnetic wheel-external wall friction coefficient are output.

[0014] S3. Based on the sensor calibrated by S1, a terahertz ranging-assisted multi-source fusion extended Kalman filter algorithm is used to calculate the robot pose and output the robot's real-time pose and positioning error data.

[0015] S4, based on the robot's real-time pose output by S3 and the dynamic safety adsorption force threshold output by S2, achieves joint detection of external wall obstacles and internal defects through terahertz multimodal perception, completes obstacle avoidance mode determination, and customizes obstacle avoidance mode.

[0016] Step S1 specifically includes the following steps: S11. Initialize the robot configuration parameters, including the center distance between the left and right spherical magnetic wheels of the robot. Longitudinal wheel track Center of mass height Safety factor and the coefficient of friction between the spherical magnetic wheel and the outer wall .

[0017] In this embodiment, the center-to-center distance between the left and right spherical magnetic wheels of the robot is... Longitudinal wheel track Center of mass height Safety factor Initial spherical magnetic wheel-external wall friction coefficient .

[0018] S12. Perform zero-bias calibration on the IMU sensor, wheel odometer, terahertz radar, terahertz spectrometer, and vision camera mounted on the robot, and adjust the terahertz radar transmission frequency to 0.1THz-10THz and the focusing focal length. Suitable for exterior wall distance: ; In the formula, Indicates the terahertz wavelength; Indicates the aperture of a terahertz radar antenna; This indicates the ranging resolution.

[0019] S13. Use the calibrated terahertz radar to scan the surface of the exterior wall and obtain the radius of curvature. Wall angle Hollowness of the wall surface and exterior wall coating thickness And determine the type of unevenness on the exterior wall: ; in, ; In the formula, Indicates the critical radius of curvature for plane determination; Indicates the terahertz scanning string length; This indicates the terahertz scanning string height.

[0020] S14. Initialize the robot's adsorption parameters, including the initial swing angle of the magnetic support inside the robot's spherical magnetic wheel. Initial air gap of spherical magnet wheel And the magnetization direction of the Halbach array elements.

[0021] Among them, the initial swing angle of the magnetic support inside the spherical magnetic wheel of the robot. The calculation formula is as follows: ; In the formula, This indicates the center-to-center distance between the left and right spherical magnetic wheels of the robot; This indicates the outer diameter of the spherical magnetic wheel.

[0022] Initial air gap of spherical magnet wheel The calculation formula is as follows: ; In the formula, Indicates the minimum safe air gap for machinery; This represents the air gap adjustment coefficient.

[0023] The expression for the magnetization direction of a Halbach array element is as follows: ; in, ; In the formula, , , These represent the x, y, and z components of the magnetization vector, respectively. This represents the magnetization amplitude of the permanent magnet in a Halbach array cell; Indicates the deflection angle of the magnetization direction; Indicates the robot's body attitude angle; Indicates the reference magnetization deflection angle; This indicates the robot's heading angle at the current moment.

[0024] Step S2 specifically includes the following steps: S21. Based on preliminary detection results, the friction coefficient between the spherical magnetic wheel and the outer wall is retrieved: ; In the formula, This represents the inverted real-time spherical magnetic wheel-external wall friction coefficient; This represents the coating attenuation coefficient.

[0025] S22. Divide the Halbach array elements inside the spherical magnetic wheel into cuboid elements along the height, and the division expression is as follows (by calculating with conservative intervals, it is ensured that each element is completely contained within the original magnet cross-section, ensuring that the subsequently estimated magnetic attraction force is not greater than the actual magnetic attraction force, and providing safety redundancy): , ; ; , ; In the formula, Indicates the first Segment center height; and These represent the minimum and maximum heights of the permanent magnets within a Halbach array cell, respectively. Indicates a sharded index; Indicates the thickness of the slice; Indicates the optimal number of partitions; They represent the first The left and right boundaries of the conservative interval of the segment are set to ensure that the segment is completely contained within the original magnet cross section. They represent the first The x-coordinates of the intersection points of the upper and lower boundaries of the left side of the segment with the interface of the original permanent magnet; They represent the first The x-coordinates of the intersection points of the upper and lower boundaries of the right side of the segment with the original permanent magnet interface; Indicates the first The center x-coordinate of the segment; Indicates the first Width of the slice.

[0026] S23. Constructing a mirror magnetic array using the static magnetic mirror method: The ferromagnetic outer wall is equivalent to a mirror Halbach array unit. The magnet-wall interaction is transformed into the source magnet-mirror magnet interaction. It is set that the normal magnetization component remains unchanged and the tangential component is reversed.

[0027] S24. Based on the analytical force formula between cuboid magnets, calculate the interaction force between the source magnet unit and the mirror magnet unit pairwise, and sum them to obtain the total adsorption force. : ; in, ; ; ; ; ; ; In the formula, Indicates the total number of segments; Indicates the first Source magnet and the first Mirror magnet force; This represents the magnetization amplitude of a mirrored Halbach array magnet element; Indicates the permeability of free space; , These represent the indices of the two endpoints along the x-axis. , These represent the indices of the two endpoints along the y-axis. , These represent the indices of the two endpoints along the z-axis. Represents the force kernel function; These represent the relative positional differences between the source magnet and the mirror magnet in the x-axis, y-axis, and z-axis directions, respectively. This represents the Euclidean distance between corresponding corner points of the source magnet and the mirror magnet; , , These represent the half-dimensions of the source magnet unit in the x, y, and z axes, respectively; , , These represent the displacements of the centers of the source magnet unit and the mirror magnet unit in the x, y, and z axes, respectively. , , These represent the half-dimensions of the mirror magnet unit along the x, y, and z axes, respectively. Indicates the z-axis spacing between the source magnet and the mirror magnet; Indicates the real-time interval.

[0028] S25. Calculate the dynamic safety adsorption force threshold: Based on the force balance of the robot on the inclined wall, calculate the minimum magnetic adsorption force threshold required for the robot to prevent longitudinal tipping. Minimum magnetic attraction force threshold required for robot anti-slip : ; ; In the formula, This indicates the robot's own weight; Indicates the load weight; This indicates the angle between the exterior wall surface and the horizontal plane.

[0029] S26. Determine the safe range of adsorption force. ,in, , .

[0030] S27, Comparison of total adsorption force and the safe range of adsorption force The air gap is adjusted based on the comparison results, and the adjustment rules are as follows: ; In the formula, This indicates the basic safety air gap adjustment amount during routine operation.

[0031] Updated and adjusted air gap: ; Constraints: ; In the formula, This indicates the adjusted air gap; and These represent the maximum and minimum air gaps, respectively.

[0032] Step S3 specifically includes the following steps: S31. Define the state vector of the multi-source fusion extended Kalman filter algorithm, and establish the nonlinear discrete state transition equation based on the robot's motion characteristics: ; ; In the formula, Represents the current state vector; , , This represents the robot's x, y, and z coordinates in the world coordinate system at the current moment; This represents the linear velocity of the robot's center of mass at the current moment; This represents the robot's turning angular velocity at the current moment; Indicates the transpose operation; Nonlinear state transition function; This indicates the linear velocity of the fused center of mass at the previous moment; This indicates the combined steering angular velocity at the previous moment; This represents the system process noise, and it follows a zero-mean Gaussian distribution; This represents the state vector at the previous moment.

[0033] S32. Using the state transition equation constructed in step S31 as a constraint, collect the raw motion data from the IMU sensor and wheel odometer, and perform weighted fusion: ; ; In the formula, This indicates the current velocity of the fused center of mass line. Indicates the fused angular velocity at the current moment; and These represent the weighted coefficients for the fusion of the center-of-mass linear velocity and the fusion of the steering angular velocity, respectively. and These represent the measured centroid linear velocity and measured steering angular velocity of the IMU sensor, respectively. and These represent the measured linear velocity of the center of mass and the measured steering angular velocity, respectively, measured by the wheel odometer.

[0034] S33. Based on the fused centroid linear velocity and steering angular velocity obtained in step S32, predict the system state and error covariance: ; ; In the formula, This represents the predicted state value at the current moment; , These represent the robot's x and y coordinates at the previous moment, respectively. This indicates the robot's heading angle at the previous moment; Indicates the filter sampling period; This represents the prediction error covariance matrix at the current time. Represents the state transition Jacobian matrix; This represents the posterior error covariance matrix of the previous time step; This represents the system process noise covariance matrix.

[0035] S34. Based on the terahertz radar ranging data calibrated in step S1, calculate the three-dimensional spatial coordinate observations of the robot relative to the outer wall. : ; in, ; In the formula, , , These represent the robot's three-dimensional coordinate observations calculated using terahertz ranging; , , Represents the world coordinates of the feature points on the exterior wall; Indicates the elevation angle of the terahertz radar; This indicates the horizontal azimuth angle of the terahertz radar. Represents the speed of light; This indicates the flight time of terahertz waves.

[0036] Simultaneously, based on the vision camera calibrated in step S1, the AprilTag tags on the exterior wall are identified, and the robot pose observations are calculated. : ; In the formula, , This represents the robot's two-dimensional coordinate observations obtained through visual processing; This represents the robot's heading angle observation value obtained from visual calculation; This represents the coordinate transformation matrix from the vision camera to the robot body; This represents the coordinate transformation matrix from the AprilTag label to the visual camera.

[0037] S35. Observe the three-dimensional spatial coordinates of the robot relative to the outer wall. Robot pose observations Combined into the total observation vector of the multi-source extended Kalman filter algorithm : ; The system's nonlinear observation equations and observation Jacobian matrix are established. : ; ; In the formula, Represents a nonlinear observation function; Indicates observation noise; S36. System State and Covariance Updates: ; ; in, ; In the formula, This represents the optimal estimate of the system's posterior state at the current moment, and is regarded as the robot's real-time pose. Indicates the Kalman gain at the current moment; Represents the observation Jacobian matrix transpose; Represents the observation noise covariance matrix; This represents the posterior error covariance matrix at the current time. Represents the identity matrix.

[0038] S37. Calculate the real-time positioning error of the robot. : ; In the formula, , , This represents the robot's actual three-dimensional coordinates.

[0039] Step S4 specifically includes the following steps: S41. Based on the robot's real-time pose output by S3, initialize the terahertz radar scanning parameters and establish a local environmental perception coordinate system for the wall: ; In the formula, , , Represents the coordinates in the robot's local coordinate system; , , This represents the world coordinate system coordinates of the environmental perception point.

[0040] S42. Using the robot's local coordinate system as the sensing reference, drive the terahertz radar to perform a three-dimensional scan of the area in front of the outer wall, reconstruct the geometric contour of the external obstacle, and calculate the three-dimensional coordinates and geometric dimensions of the obstacle: ; ; In the formula, , , Represents the world coordinates of the obstacle center; , , Represents the discrete coordinates of the obstacle point cloud; , , These represent the length, width, and height of the obstacle, respectively.

[0041] S43. Based on the sensing reference and obstacle zone coordinates, drive the terahertz spectrometer to perform transmission and reflection scans on the obstacle area and surrounding outer walls. Determine the coordinates, defect type, defect size, and damage extent of internal defects in the outer wall within the robot's local coordinate system using the terahertz wave transmission characteristics, and identify the defect risk. ; ; ; ; ; in, ; ; ; ; ; ; In the formula, , , This represents the coordinates of the defect in the robot's local coordinate system. , , This represents the three-dimensional coordinates of the defect center in the world coordinate system, where, ; This represents the measured distance from the terahertz radar to the center point of the defect area. These represent the membership degree of hollow areas, the membership degree of delamination, the membership degree of cracks, and the membership degree of corrosion, respectively. , , , This indicates the effective projected area of ​​the defect on the wall, the vertical depth of the defect, and the length and width of the linear defect. This indicates the number of terahertz point clouds in the defect region. Indicates the defect number The micro-element area of ​​a terahertz point cloud; , Indicates the defect number The planar coordinates of a terahertz point cloud; , Indicates the defect number The planar coordinates of a terahertz point cloud; This indicates the echo delay time of the terahertz wave inside the defect; This indicates the transmittance of the terahertz wave in the defect area; Indicates the number of crack point clouds; , Indicates the first The planar coordinates of a crack point cloud; , Indicates the first The planar coordinates of a crack point cloud; Indicates the number of crack point clouds; and These represent the maximum and minimum terahertz ranging values ​​in the crack region, respectively. Indicates the overall damage factor of defects; All represent weighting coefficients; This represents the phase difference between the incident and reflected terahertz waves; Indicates the reflectivity of terahertz waves; This represents the measured reflected power of the terahertz spectrometer; This represents the measured transmission power of the terahertz spectrometer. This indicates the emission power of the terahertz spectrometer; , , , , All represent damage weighting coefficients; This indicates the total area covered by a single scan of a terahertz radar. , , , , This represents the defect risk weighting coefficient; This represents the quantitative value of the defect risk level.

[0042] S44. Obstacle height calculated based on step S42 Classify obstacles into different levels and define rules for determining the feasibility of overcoming them: ; ; in, ; In the formula, , These represent the boundary thresholds between small obstacles and regular obstacles (3mm in this embodiment) and between regular obstacles and large obstacles (7mm in this embodiment); Level 1, Level 2, and Level 3 in the obstacle levels represent small obstacles, regular obstacles, and large obstacles, respectively. This represents the combined obstacle-defect obstacle-crossing feasibility coefficient. This represents the minimum threshold for obstacle crossing feasibility. , , All of these represent the weighted coefficients for obstacle crossing feasibility.

[0043] S45. Based on the obstacle level output by S44 and the defect risk level output by S43, determine the obstacle avoidance mode: ; The formulas for adjusting the swing angle of the air gap and the internal magnetic support during adsorption-induced obstacle crossing are as follows: ; ; in, ; ; ; In the formula, and These represent the target air gap and the swing angle of the magnetic support inside the target, respectively. Indicates the current air gap; This indicates the adaptive closed-loop air gap adjustment amount during the obstacle crossing phase. Indicates the correction amount for the obstacle crossing angle; This represents the air gap adjustment proportional coefficient; This indicates the adsorption capacity that regulates the safe adsorption force of the target when it overcomes obstacles; Indicates the safety factor for adsorption over obstacles; , , All of these represent the adsorption force correction weighting coefficients; This represents the swing angle correction coefficient.

[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for an external wall inspection robot to climb walls and avoid obstacles, characterized in that: Includes the following steps: S1. Initialize robot configuration parameters, and simultaneously complete robot hardware self-test and sensor zero bias calibration. Perform preliminary detection of the external wall working conditions to determine robot adsorption parameters, and output sensor calibration parameters, initialized robot adsorption parameters and robot configuration parameters. S2. Based on the preliminary detection data of S1, combined with the static magnetic mirror method and terahertz material inversion results, an adaptive magnetic adsorption force model is constructed and the dynamic safety adsorption force threshold is calculated. The real-time magnetic adsorption force, dynamic safety threshold and terahertz inversion spherical magnetic wheel-external wall friction coefficient are output. S3. Based on the sensor calibrated by S1, the terahertz ranging-assisted multi-source fusion extended Kalman filter algorithm is used to realize the robot pose calculation and output the robot's real-time pose and positioning error data. S4, based on the robot's real-time pose output by S3 and the dynamic safety adsorption force threshold output by S2, achieves joint detection of external wall obstacles and internal defects through terahertz multimodal perception, completes obstacle avoidance mode determination, and customizes obstacle avoidance mode.

2. The method for wall climbing and obstacle avoidance by an external wall inspection robot according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11. Initialize the robot configuration parameters, including the center distance between the left and right spherical magnetic wheels of the robot. Longitudinal wheel track Center of mass height Safety factor and the coefficient of friction between the spherical magnetic wheel and the outer wall ; S12. Perform zero-bias calibration on the IMU sensor, wheel odometer, terahertz radar, terahertz spectrometer, and vision camera mounted on the robot, and adjust the terahertz radar transmission frequency to 0.1THz-10THz and the focusing focal length. Suitable for exterior wall distance: ; In the formula, Indicates the terahertz wavelength; Indicates the aperture of a terahertz radar antenna; Indicates the ranging resolution; S13. Use the calibrated terahertz radar to scan the surface of the exterior wall and obtain the radius of curvature. Wall angle Hollowness of the wall surface and exterior wall coating thickness And determine the type of unevenness on the exterior wall: ; in, ; In the formula, Indicates the critical radius of curvature for plane determination; Indicates the terahertz scanning string length; Indicates the terahertz scanning string height; S14. Initialize the robot's adsorption parameters, including the initial swing angle of the magnetic support inside the robot's spherical magnetic wheel. Initial air gap of spherical magnet wheel and the magnetization direction of the Halbach array elements; Among them, the initial swing angle of the magnetic support inside the spherical magnetic wheel of the robot. The calculation formula is as follows: ; In the formula, This indicates the center-to-center distance between the left and right spherical magnetic wheels of the robot; Indicates the outer diameter of the spherical magnetic wheel; Initial air gap of spherical magnet wheel The calculation formula is as follows: ; In the formula, Indicates the minimum safe air gap for machinery; Indicates the air gap adjustment coefficient; The expression for the magnetization direction of a Halbach array element is as follows: ; in, ; In the formula, , , These represent the x, y, and z components of the magnetization vector, respectively. This represents the magnetization amplitude of the permanent magnet in a Halbach array cell; Indicates the deflection angle of the magnetization direction; Indicates the robot's body attitude angle; Indicates the reference magnetization deflection angle; This indicates the robot's heading angle at the current moment.

3. The method for wall climbing and obstacle avoidance by an external wall inspection robot according to claim 2, characterized in that: Step S2 specifically includes the following steps: S21. Based on preliminary detection results, the friction coefficient between the spherical magnetic wheel and the outer wall is retrieved: ; In the formula, This represents the inverted real-time spherical magnetic wheel-external wall friction coefficient; Indicates the coating attenuation coefficient; S22. Divide the Halbach array elements within the spherical magnetic wheel into cuboid elements along the height, and the division expression is as follows: , ; ; , ; In the formula, Indicates the first Segment center height; and These represent the minimum and maximum heights of the permanent magnets within a Halbach array cell, respectively. Indicates a sharded index; Indicates the thickness of the slice; Indicates the optimal number of partitions; They represent the first The left and right boundaries of the conservative interval segmentation; They represent the first The x-coordinates of the intersection points of the upper and lower boundaries of the left side of the segment with the interface of the original permanent magnet; They represent the first The x-coordinates of the intersection points of the upper and lower boundaries of the right side of the segment with the original permanent magnet interface; Indicates the first The center x-coordinate of the segment; Indicates the first The width of the slice; S23. Constructing a mirror magnetic array using the static magnetic mirror method: The ferromagnetic outer wall is equivalent to a mirror Halbach array unit. The magnet-wall interaction is transformed into the source magnet-mirror magnet interaction. It is set that the normal magnetization component remains unchanged and the tangential component is reversed. S24. Based on the analytical force formula between cuboid magnets, calculate the interaction force between the source magnet unit and the mirror magnet unit pairwise, and sum them to obtain the total adsorption force. : ; in, ; ; ; ; ; ; In the formula, Indicates the total number of segments; Indicates the first Source magnet and the first Mirror magnet force; This represents the magnetization amplitude of a mirrored Halbach array magnet element; Indicates the permeability of free space; , These represent the indices of the two endpoints along the x-axis. , These represent the indices of the two endpoints along the y-axis. , These represent the indices of the two endpoints along the z-axis. Represents the force kernel function; These represent the relative positional differences between the source magnet and the mirror magnet in the x-axis, y-axis, and z-axis directions, respectively. This represents the Euclidean distance between corresponding corner points of the source magnet and the mirror magnet; , , These represent the half-dimensions of the source magnet unit in the x, y, and z axes, respectively; , , These represent the displacements of the centers of the source magnet unit and the mirror magnet unit in the x, y, and z axes, respectively. , , These represent the half-dimensions of the mirror magnet unit along the x, y, and z axes, respectively. Indicates the z-axis spacing between the source magnet and the mirror magnet; Indicates the real-time interval; S25. Calculate the dynamic safety adsorption force threshold: Based on the force balance of the robot on the inclined wall, calculate the minimum magnetic adsorption force threshold required for the robot to prevent longitudinal tipping. Minimum magnetic attraction force threshold required for robot anti-slip : ; ; In the formula, This indicates the robot's own weight; Indicates the load weight; Indicates the angle of inclination between the exterior wall surface and the horizontal plane; S26. Determine the safe range of adsorption force. ,in, , ; S27, Comparison of total adsorption force and the safe range of adsorption force The air gap is adjusted based on the comparison results, and the adjustment rules are as follows: ; In the formula, This indicates the basic safety air gap adjustment amount during routine operation. Updated and adjusted air gap: ; Constraints: ; In the formula, This indicates the adjusted air gap; and These represent the maximum and minimum air gaps, respectively.

4. The method for wall climbing and obstacle avoidance by an external wall inspection robot according to claim 3, characterized in that: Step S3 specifically includes the following steps: S31. Define the state vector of the multi-source fusion extended Kalman filter algorithm, and establish the nonlinear discrete state transition equation based on the robot's motion characteristics: ; ; In the formula, Represents the current state vector; , , This represents the robot's x, y, and z coordinates in the world coordinate system at the current moment; This represents the linear velocity of the robot's center of mass at the current moment; This represents the robot's turning angular velocity at the current moment; Indicates the transpose operation; Nonlinear state transition function; This indicates the linear velocity of the fused center of mass at the previous moment; This indicates the combined steering angular velocity at the previous moment; This represents the system process noise, and it follows a zero-mean Gaussian distribution; This represents the state vector from the previous time step. S32. Using the state transition equation constructed in step S31 as a constraint, collect the raw motion data from the IMU sensor and wheel odometer, and perform weighted fusion: ; ; In the formula, This indicates the current velocity of the fused center of mass line. Indicates the fused angular velocity at the current moment; and These represent the weighted coefficients for the fusion of the center-of-mass linear velocity and the fusion of the steering angular velocity, respectively. and These represent the measured centroid linear velocity and measured steering angular velocity of the IMU sensor, respectively. and These represent the measured linear velocity of the center of mass and the measured steering angular velocity, respectively, measured by the wheel odometer. S33. Based on the fused centroid linear velocity and steering angular velocity obtained in step S32, predict the system state and error covariance: ; ; In the formula, This represents the predicted state value at the current moment; , These represent the robot's x and y coordinates at the previous moment, respectively. This indicates the robot's heading angle at the previous moment; Indicates the filter sampling period; This represents the prediction error covariance matrix at the current time. Represents the state transition Jacobian matrix; This represents the posterior error covariance matrix of the previous time step; Represents the system process noise covariance matrix; S34. Based on the terahertz radar ranging data calibrated in step S1, calculate the three-dimensional spatial coordinate observations of the robot relative to the outer wall. : ; in, ; In the formula, , , These represent the robot's three-dimensional coordinate observations calculated using terahertz ranging; , , Represents the world coordinates of the feature points on the exterior wall; Indicates the elevation angle of the terahertz radar; This indicates the horizontal azimuth angle of the terahertz radar. Represents the speed of light; Indicates the flight time of terahertz waves; Simultaneously, based on the vision camera calibrated in step S1, the AprilTag tags on the exterior wall are identified, and the robot pose observations are calculated. : ; In the formula, , This represents the robot's two-dimensional coordinate observations obtained through visual processing; This represents the robot's heading angle observation value obtained from visual calculation; This represents the coordinate transformation matrix from the vision camera to the robot body; This represents the coordinate transformation matrix from the AprilTag label to the visual camera; S35. Observe the three-dimensional spatial coordinates of the robot relative to the outer wall. Robot pose observations Combined into the total observation vector of the multi-source extended Kalman filter algorithm : ; The system's nonlinear observation equations and observation Jacobian matrix are established. : ; ; In the formula, Represents a nonlinear observation function; Indicates observation noise; S36. System State and Covariance Updates: ; ; in, ; In the formula, This represents the optimal estimate of the system's posterior state at the current moment, and is regarded as the robot's real-time pose. Indicates the Kalman gain at the current moment; Represents the observation Jacobian matrix transpose; Represents the observation noise covariance matrix; This represents the posterior error covariance matrix at the current time. Represents the identity matrix; S37. Calculate the real-time positioning error of the robot. : ; In the formula, , , This represents the robot's actual three-dimensional coordinates.

5. The method for wall climbing and obstacle avoidance by an external wall inspection robot according to claim 4, characterized in that: Step S4 specifically includes the following steps: S41. Based on the robot's real-time pose output by S3, initialize the terahertz radar scanning parameters and establish a local environmental perception coordinate system for the wall: ; In the formula, , , Represents the coordinates in the robot's local coordinate system; , , Represents the world coordinate system coordinates of the environmental sensing point; S42. Using the robot's local coordinate system as the sensing reference, drive the terahertz radar to perform a three-dimensional scan of the area in front of the outer wall, reconstruct the geometric contour of the external obstacle, and calculate the three-dimensional coordinates and geometric dimensions of the obstacle: ; ; In the formula, , , Represents the world coordinates of the obstacle center; , , Represents the discrete coordinates of the obstacle point cloud; , , These represent the length, width, and height of the obstacle, respectively. S43. Based on the sensing reference and obstacle zone coordinates, drive the terahertz spectrometer to perform transmission and reflection scans on the obstacle area and surrounding outer walls. Determine the coordinates, defect type, defect size, and damage extent of internal defects in the outer wall within the robot's local coordinate system using the terahertz wave transmission characteristics, and identify the defect risk. ; ; ; ; ; in, ; ; ; ; ; ; In the formula, , , This represents the coordinates of the defect in the robot's local coordinate system. , , This represents the three-dimensional coordinates of the defect center in the world coordinate system, where, ; This represents the measured distance from the terahertz radar to the center point of the defect area. These represent the membership degree of hollow areas, the membership degree of delamination, the membership degree of cracks, and the membership degree of corrosion, respectively. , , , This indicates the effective projected area of ​​the defect on the wall, the vertical depth of the defect, and the length and width of the linear defect. This indicates the number of terahertz point clouds in the defect region. Indicates the defect number The micro-element area of ​​a terahertz point cloud; , Indicates the defect number The planar coordinates of a terahertz point cloud; , Indicates the defect number The planar coordinates of a terahertz point cloud; This indicates the echo delay time of the terahertz wave inside the defect; This indicates the transmittance of the terahertz wave in the defect area; Indicates the number of crack point clouds; , Indicates the first The planar coordinates of a crack point cloud; , Indicates the first The planar coordinates of a crack point cloud; Indicates the number of crack point clouds; and These represent the maximum and minimum terahertz ranging values ​​in the crack region, respectively. Indicates the overall damage factor of defects; All represent weighting coefficients; This represents the phase difference between the incident and reflected terahertz waves; Indicates the reflectivity of terahertz waves; This represents the measured reflected power of the terahertz spectrometer; This represents the measured transmission power of the terahertz spectrometer. This indicates the emission power of the terahertz spectrometer; , , , , All represent damage weighting coefficients; This indicates the total area covered by a single scan of a terahertz radar. , , , , This represents the defect risk weighting coefficient; This represents the quantified value of the defect risk level; S44. Obstacle height calculated based on step S42 Classify obstacles into different levels and define rules for determining the feasibility of overcoming them: ; ; in, ; In the formula, , These represent the boundary thresholds between minor and regular obstacles, and between regular and large obstacles, respectively; Level 1, Level 2, and Level 3 in the obstacle level represent minor obstacles, regular obstacles, and large obstacles, respectively. This represents the combined obstacle-defect obstacle-crossing feasibility coefficient. This represents the minimum threshold for obstacle crossing feasibility. , , All represent the weighted coefficients for obstacle crossing feasibility; S45. Based on the obstacle level output by S44 and the defect risk level output by S43, determine the obstacle avoidance mode: ; The formulas for adjusting the swing angle of the air gap and the internal magnetic support during adsorption-induced obstacle crossing are as follows: ; ; in, ; ; ; In the formula, and These represent the target air gap and the swing angle of the magnetic support inside the target, respectively. Indicates the current air gap; This indicates the adaptive closed-loop air gap adjustment amount during the obstacle crossing phase. Indicates the correction amount for the obstacle crossing angle; This represents the air gap adjustment proportional coefficient; This indicates the adsorption capacity that regulates the safe adsorption force of the target when it overcomes obstacles; Indicates the safety factor for adsorption over obstacles; , , All of these represent the adsorption force correction weighting coefficients; This represents the swing angle correction coefficient.