A cable trench inspection robot obstacle avoidance method and system based on ArUco code semantic labeling
Patent Information
- Application Number
- CN202611248706.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-10-27
AI Technical Summary
[0008]本发明的目的在于:克服现有技术的不足,提供一种基于ArUco码语义标记的电缆沟巡检机器人避障方法及系统,解决现有激光雷达方案成本高且无法区分障碍物类型、深度学习视觉方案算力需求大且昏暗环境下准确率低的技术问题,实现低算力条件下障碍物类型的快速识别与差异化避障
[0053](1)本发明无需训练或运行深度学习目标检测模型,仅通过ArUco码检测解码与查表方式即可获取障碍物类型和避障策略,计算量小,适合算力有限的嵌入式巡检平台,降低了机器人的硬件成本。
Smart Images

Figure CN122984689A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile robot visual recognition and autonomous obstacle avoidance technology, specifically relating to an obstacle avoidance method and system for cable trench inspection robots based on ArUco code semantic tagging, which is applicable to obstacle recognition and autonomous obstacle avoidance of inspection robots in narrow cable trenches and dim environments. Background Technology
[0002] Cable trenches are underground passages in power systems used to house and protect power cables. Due to their narrow spaces, insufficient lighting, dense cable arrangement, and frequent accumulation of water and debris, manual management and maintenance are extremely difficult. Inspection robots have emerged to address this problem, replacing manual labor in performing daily inspections of cable trenches. However, when autonomously navigating such environments, inspection robots need to accurately identify and promptly avoid obstacles such as cable joints, protruding supports, waterlogged areas, and trench bends.
[0003] Currently, obstacle avoidance solutions for inspection robots mainly fall into two categories:
[0004] The first category is obstacle avoidance solutions based on LiDAR. This solution has high ranging accuracy and can accurately obtain the distance and contour information of obstacles, but it has the following drawbacks: First, LiDAR equipment is expensive, increasing the overall cost of the inspection robot; second, LiDAR can only obtain the geometry of obstacles and cannot distinguish the type of obstacles, resulting in a single obstacle avoidance strategy. It cannot take differentiated avoidance actions for different obstacles. For example, it should stop or lift in areas with water accumulation, and make minor adjustments to the steering for protruding supports. A single obstacle avoidance mode will either over-avoid, affecting inspection efficiency, or under-avoid, posing a collision risk.
[0005] The second category is obstacle avoidance solutions based on deep learning vision algorithms. These solutions identify obstacle types by training object detection models (such as the YOLO series) and then combine this with ranging information to perform obstacle avoidance. While this approach can distinguish obstacle types, it has the following drawbacks: First, it requires a large amount of labeled data for model training, resulting in high data collection and labeling costs; second, the inference process places high demands on the computing resources of the embedded platform, making it difficult for low-powered embedded platforms to run in real time; and third, cable trenches have poor lighting conditions, and the accuracy of deep learning detection models drops significantly in dim environments, easily leading to missed or false detections and obstacle avoidance failure.
[0006] In addition, ArUco codes, as a reference mark, are widely used in the field of robotics for localization and attitude estimation. However, existing technologies use them as localization aids, and there is no technical solution to convert ArUco codes from localization marks into obstacle avoidance semantic labels and achieve fast obstacle avoidance with low computing power by pre-encoding obstacle types.
[0007] In summary, existing technologies lack a low-computational-power obstacle avoidance method that is suitable for the narrow and dimly lit environment of cable trenches, does not require deep learning models, can distinguish obstacle types, and can perform differentiated obstacle avoidance. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for obstacle avoidance of cable trench inspection robots based on ArUco code semantic tagging. This solves the technical problems of existing LiDAR solutions being costly and unable to distinguish obstacle types, and deep learning vision solutions requiring high computing power and having low accuracy in low-light environments. It enables rapid identification of obstacle types and differentiated obstacle avoidance under low computing power conditions.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] An obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging includes four core steps: ArUco code semantic environment construction, ArUco code adaptive recognition and pose estimation, semantic mapping and hierarchical obstacle avoidance decision-making, and obstacle avoidance execution and state recovery, as detailed below:
[0011] S1: ArUco code semantic environment construction; ArUco codes are pre-deployed on the sidewalls of cable trenches or cable supports, and an ID-semantic mapping library is established in the robot control system. Each unique ArUco code ID in the mapping library corresponds to an obstacle type and a preset obstacle avoidance strategy.
[0012] S2: ArUco code adaptive recognition and pose estimation; The robot acquires images containing ArUco codes through an RGB-D camera, and after adaptive lighting and image preprocessing, it detects and decodes the ArUco codes to obtain their unique IDs. The PnP algorithm is then used to calculate the relative pose and distance between the robot and the ArUco codes.
[0013] S3: Semantic mapping and hierarchical obstacle avoidance decision-making; The decoded ArUco code ID is used as an index to query the ID-semantic mapping library, obtain the corresponding obstacle semantic labels and preset obstacle avoidance strategies, and trigger the corresponding level of obstacle avoidance response according to the distance between the robot and the ArUco code;
[0014] S4: Obstacle avoidance execution and state recovery; The robot executes the corresponding obstacle avoidance action according to the obstacle avoidance decision. After the action is completed, it judges whether the path ahead is clear. If it is clear, it exits the obstacle avoidance mode and resumes the inspection speed. If there are still obstacles, it repeats steps S2 to S4.
[0015] As a preferred embodiment of the present invention, step S1: ArUco code semantic environment construction
[0016] The core innovation of this step lies in transforming ArUco codes from traditional location markers into obstacle avoidance semantic tags, achieving low-cost identification of obstacle types through pre-encoding.
[0017] Establish an ID-semantic mapping library: A mapping table is pre-built and stored in the robot control system. In the mapping table, each unique ArUco code ID corresponds to one and only one obstacle type and one preset obstacle avoidance strategy. This invention uses the predefined DICT_6X6_1000 dictionary in the OpenCV library, which contains 1000 ArUco tags with unique IDs, providing sufficient encoding capacity and a mature recognition algorithm.
[0018] ArUco code IDs are divided into ranges to correspond to different semantics, as exemplified below:
[0019] ID0~99: Cable joint type obstacles, the corresponding obstacle avoidance strategy is to decelerate and detour;
[0020] ID100~199: Obstacles with protruding supports, the corresponding obstacle avoidance strategy is deceleration plus fine-tuning of steering;
[0021] ID200~299: Obstacles in waterlogged areas, the corresponding obstacle avoidance strategy is to stop or raise the chassis;
[0022] ID300~399: Ditch turning type, the corresponding obstacle avoidance strategy is deceleration and steering;
[0023] ID400~499: Other obstacles or emergency stop categories, the corresponding obstacle avoidance strategy is immediate stop;
[0024] ID500~999: Reserved extended IDs for use in the future when adding new obstacle types.
[0025] The above ID range division is an exemplary scheme. In practical applications, the mapping relationship can be flexibly adjusted according to the type and number of obstacles in the cable trench.
[0026] ArUco code pre-deployment rules: Fix the ArUco code to the side wall of the cable trench or cable bracket, with a deployment height of 30-50cm from the bottom of the trench, and flush with the optical center of the RGB-D camera mounted on the robot, ensuring that the code plane is approximately perpendicular to the camera's optical axis to obtain the best recognition effect.
[0027] In straight sections of the cable trench, adjacent ArUco codes are spaced 10m apart to ensure the robot can continuously acquire environmental semantic information during its movement. At turns, since cable trench turns are typically right angles, ArUco codes are deployed at both the entry and exit points, with a spacing of 3-5m to ensure continuous positioning and semantic guidance during the turn. The robot is considered to have completed the turn when the angle between the camera and the center point of the ArUco code at the turn is within 1°.
[0028] Taking a 1km cable trench as an example, a straight section requires approximately 100 ArUco codes, with an additional 20-50 codes at bends, totaling approximately 120-150 codes. The number of codes required for cable trenches of different lengths is calculated proportionally.
[0029] As a preferred embodiment of the present invention, step S2: ArUco code adaptive recognition and pose estimation
[0030] Adaptive lighting: The robot is equipped with a light sensor to detect the ambient light intensity in real time. When the light intensity is below a preset threshold of 10 lux, the robot's onboard supplemental lighting is automatically activated to ensure sufficient illumination of the ArUco code area. This mechanism solves the problem of difficult visual recognition in the dim environment of cable trenches, ensuring that ArUco codes can still be accurately detected under low-light conditions.
[0031] Image Acquisition and Preprocessing: Images containing ArUco codes were acquired using an RGB-D camera. Preprocessing included two operations: first, histogram equalization was performed on the images to enhance image contrast and make the black and white grids of the ArUco codes more distinct; second, adaptive thresholding was used for binarization to effectively separate the black borders of the ArUco codes from the background, creating conditions for subsequent contour detection.
[0032] ArUco code detection and decoding: The ArUco detection algorithm (such as the detectMarkers() function in OpenCV) is used to detect the preprocessed image. First, candidate regions that meet the square feature are selected by contour detection. Then, the internal binary code of the candidate region is verified to see if it matches the valid codewords in the ArUco dictionary. Finally, the unique ID number of the ArUco code is obtained by decoding. ArUco codes themselves have a certain error correction capability and can still be accurately identified under partial occlusion or damage.
[0033] Pose estimation: Using the pixel coordinates of the four corner points of the detected ArUco code, combined with the actual physical size of the ArUco code and the camera intrinsic parameters, the three-dimensional position (x, y, z) and orientation (roll, pitch, yaw) of the ArUco code relative to the camera are calculated using the PnP (Perspective-n-Point) algorithm, thereby obtaining the relative pose and distance d between the robot and the ArUco code.
[0034] As a preferred embodiment of the present invention, step S3: semantic mapping and hierarchical obstacle avoidance decision-making
[0035] Semantic query: Using the ArUco code ID obtained from decoding in step S2 as an index, query the pre-built ID-semantic mapping library in step S1 to obtain the obstacle semantic label and preset obstacle avoidance strategy corresponding to the ID. This query process is a simple table lookup operation with minimal computational cost, which can be completed in milliseconds.
[0036] Three-level obstacle avoidance triggering mechanism: Based on the distance d between the robot and the ArUco code estimated in step S2, different levels of obstacle avoidance response are triggered:
[0037] Level 1 (Long-distance warning): When d is greater than the first distance threshold (e.g., 2m), it is determined that the robot is still at a safe distance, maintains the normal inspection speed, and continuously monitors the distance change of the ArUco code.
[0038] Level 2 (mid-distance deceleration): When d is greater than the second distance threshold (e.g., 1m) and less than or equal to the first distance threshold, it is determined that an obstacle is approaching. The robot performs a deceleration action to reduce its travel speed and reserve reaction time for obstacle avoidance actions.
[0039] Level 3 (Near-range obstacle avoidance): When d is less than or equal to the second distance threshold, it is determined that the obstacle avoidance distance has been entered. The robot executes specific obstacle avoidance actions according to the obstacle avoidance strategy corresponding to the ID-semantic mapping library, including turning around, stopping or raising the chassis.
[0040] The aforementioned distance thresholds can be adjusted based on the robot's travel speed, braking distance, and cable run width.
[0041] As a preferred embodiment of the present invention, step S4: obstacle avoidance execution and state recovery
[0042] Based on the decision result of step S3, the robot executes the corresponding obstacle avoidance action:
[0043] Deceleration: Achieved by reducing the motor's PWM duty cycle;
[0044] Steering / Deflection: A predetermined angle of deflection can be achieved through differential steering or servo control;
[0045] Stop: Motor holding brake;
[0046] Lift: Activate the chassis lifting mechanism (if available).
[0047] After completing the obstacle avoidance maneuver, the robot determines whether the path ahead is clear: if clear, it exits the obstacle avoidance mode and resumes the preset inspection speed to continue moving; if there are still obstacles, it repeats steps S2 to S4 until it passes through the obstacle area.
[0048] Correspondingly, the present invention also provides an obstacle avoidance system for a cable trench inspection robot based on ArUco code semantic tagging, including a semantic environment construction module for deploying ArUco codes in the cable trench and establishing an ID-semantic mapping library;
[0049] The image acquisition and recognition module includes an RGB-D camera, a light sensor, and a fill light, used for image acquisition, adaptive lighting, preprocessing, ArUco code detection and decoding, and pose estimation.
[0050] The obstacle avoidance decision module is used to query the semantic mapping library based on the ArUco code ID and perform a three-level obstacle avoidance decision based on distance information.
[0051] The obstacle avoidance execution module is used to perform deceleration, steering around, stopping, or lifting actions based on the decision results; the modules work together to implement the above methods and steps.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] (1) This invention does not require training or running a deep learning target detection model. It can obtain the obstacle type and obstacle avoidance strategy by simply using ArUco code detection, decoding and table lookup. It has a small computational load and is suitable for embedded inspection platforms with limited computing power, thus reducing the hardware cost of the robot.
[0054] (2) The detection and decoding of the ArUco code of the present invention has a small computational load. With the three-level triggering mechanism, obstacle avoidance decision can be completed in milliseconds after recognition, which meets the real-time obstacle avoidance requirements of the inspection robot.
[0055] (3) Through the ID-semantic mapping library, the robot can distinguish different types of obstacles such as cable joints, bracket protrusions, water accumulation areas, and ditch turns, and adopt targeted obstacle avoidance strategies to avoid efficiency loss or insufficient avoidance caused by a single obstacle avoidance mode.
[0056] (4) The present invention solves the problem of visual recognition in the dim environment of cable trench through the adaptive supplementary lighting mechanism; the error correction capability of ArUco code itself enables it to be accurately identified even under partial obstruction or dirt, thus improving the reliability of the system in complex environments.
[0057] (5) The ArUco code of this invention is inexpensive to produce and easy to deploy. The ID-semantic mapping library can be flexibly configured and the reserved ID range supports the subsequent addition of obstacle types, which is convenient for promotion and deployment in different cable trench scenarios. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating the overall process of the obstacle avoidance method of the present invention.
[0059] Figure 2This is a schematic diagram illustrating the construction and deployment of the ArUco code semantic environment of the present invention;
[0060] Figure 3 This is a flowchart of the ArUco code adaptive recognition and pose estimation process of the present invention;
[0061] Figure 4 This is a schematic diagram of the three-level obstacle avoidance triggering mechanism of the present invention. Detailed Implementation
[0062] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0063] like Figure 1 As shown in this embodiment, the obstacle avoidance method for cable trench inspection robots based on ArUco code semantic tagging is divided into four stages:
[0064] S1: ArUco code semantic environment construction; ArUco codes are pre-deployed on the sidewalls of cable trenches or cable supports, and an ID-semantic mapping library is established in the robot control system. Each unique ArUco code ID in the mapping library corresponds to an obstacle type and a preset obstacle avoidance strategy.
[0065] S2: ArUco code adaptive recognition and pose estimation; The robot acquires images containing ArUco codes through an RGB-D camera, and after adaptive lighting and image preprocessing, it detects and decodes the ArUco codes to obtain their unique IDs. The PnP algorithm is then used to calculate the relative pose and distance between the robot and the ArUco codes.
[0066] S3: Semantic mapping and hierarchical obstacle avoidance decision-making; The decoded ArUco code ID is used as an index to query the ID-semantic mapping library, obtain the corresponding obstacle semantic labels and preset obstacle avoidance strategies, and trigger the corresponding level of obstacle avoidance response according to the distance between the robot and the ArUco code;
[0067] S4: Obstacle avoidance execution and state recovery; The robot executes the corresponding obstacle avoidance action according to the obstacle avoidance decision. After the action is completed, it judges whether the path ahead is clear. If it is clear, it exits the obstacle avoidance mode and resumes the inspection speed. If there are still obstacles, it repeats steps S2 to S4.
[0068] Before the inspection task begins, the ArUco codes are deployed in the cable trench, and the ID-semantic mapping library is configured. During the inspection, the robot continuously acquires images of the front using an RGB-D camera. When an ArUco code is detected, the robot immediately decodes the ID and estimates the pose, queries the mapping library to obtain the obstacle type and obstacle avoidance strategy, and triggers the corresponding level of obstacle avoidance response based on distance information. After executing the obstacle avoidance action, the robot determines whether the path is clear. If it is clear, the inspection resumes; otherwise, the loop continues.
[0069] like Figure 2 As shown, this embodiment uses a cable trench containing straight sections and right-angle turns as an example to illustrate the ArUco code deployment scheme.
[0070] ID-Semantic Mapping Library Configuration
[0071] An ID-semantic mapping library is pre-configured in the robot control system, using the DICT_6X6_1000 dictionary. The specific mapping relationships are as follows: ID0-99 correspond to cable connectors, with obstacle avoidance strategy of deceleration and detour; ID100-199 correspond to bracket protrusions, with obstacle avoidance strategy of deceleration and fine-tuning steering; ID200-299 correspond to water accumulation areas, with obstacle avoidance strategy of stopping or lifting; ID300-399 correspond to ditch turns, with obstacle avoidance strategy of deceleration and steering; ID400-499 correspond to emergency stop; ID500-999 are reserved.
[0072] ArUco code deployment
[0073] ArUco codes are affixed to the sidewalls of the cable trench, 40cm above the trench bottom, level with the optical center of the robot's RGB-D camera, and with the code plane perpendicular to the camera's optical axis. One ArUco code is placed every 10m along the straight section, selecting the code's ID range based on the type of obstacle in front of that location. For example, an ArUco code with ID 025 is placed 5m from the cable joint, and an ArUco code with ID 130 is placed 5m from the support protrusion.
[0074] At the right-angle turn, a turning marker with ID 310 is placed 3 meters before the turn entrance, and another turning marker is placed 3 meters after the turn exit. When the robot reaches the turn entrance, it detects the ArUco code ID 310 and triggers a deceleration and steering strategy; when the angle between the camera and the center point of the ArUco code at the turn exit is within 1°, the turn is considered complete, and the robot resumes straight-line travel.
[0075] Taking this 500m cable trench as an example, it includes 3 right-angle turns. The straight section needs to be equipped with about 50 ArUco codes, and the turns need to be equipped with about 12 more, for a total of about 62 codes. The deployment cost is low and the maintenance is simple.
[0076] like Figure 3As shown in the figure, this embodiment details the process of ArUco code recognition and pose estimation.
[0077] Adaptive lighting
[0078] Once the robot enters the cable trench, the light sensor monitors the ambient light in real time. Cable trenches are typically poorly lit; when the detected light intensity drops below 10 lux, the control system automatically activates supplemental lighting, aligning it with the center of the robot's field of view to ensure uniform illumination of the ArUco code area.
[0079] Image acquisition and preprocessing
[0080] The RGB-D camera captures images of the foreground at 30fps. For each frame, histogram equalization is first performed to stretch the grayscale distribution of the image to the full range, enhancing the contrast of the ArUco code's black and white squares. Then, adaptive Gaussian thresholding is used for binarization to separate the black square borders of the ArUco code from the dark background.
[0081] Detection and Decoding
[0082] The binarized image is processed by calling OpenCV's ArUco detection module: First, all quadrilateral contours are found through contour detection, and candidate regions that meet the proportions of the ArUco code outline are selected; then, perspective transformation and binary encoding are performed on the candidate regions, and the code is compared and verified with the valid codewords in the DICT_6X6_1000 dictionary; after verification, the unique ID of the ArUco code and the pixel coordinates of the four corner points are output.
[0083] Pose estimation
[0084] Given that the actual physical size of the ArUco code is 10cm × 10cm, and combining the camera intrinsic parameter matrix and distortion coefficients, the solvePnP function is used to solve for the rotation and translation vectors of the ArUco code relative to the camera, transforming them into the three-dimensional position (x, y, z) and Euler angles (roll, pitch, yaw). The distance in the z-direction is the distance d between the robot and the ArUco code, used for subsequent hierarchical obstacle avoidance decisions.
[0085] like Figure 4 As shown in the figure, this embodiment takes the robot encountering a cable joint as an example to illustrate the three-level obstacle avoidance triggering and execution process.
[0086] The robot is moving along the cable trench at a normal speed of 0.5 m / s. There is a cable joint 5 m ahead, and the corresponding location has been marked with an ArUco code with ID 025.
[0087] Level 1: Long-range early warning
[0088] When the robot travels to a position 2.5 m away from the ArUco code (d=2.5 m> the first threshold of 2 m), the camera clearly detects the ArUco code with ID025 for the first time. The system decodes the ID and queries the mapping library to learn that the front is a cable joint, and the corresponding obstacle avoidance strategy is to decelerate and detour. At this time, the distance is still far, the robot continues to travel at a speed of 0.5 m / s, and continuously updates the distance d at the same time.
[0089] Second level: Medium-distance deceleration
[0090] When d decreases to 1.5 m (the second threshold of 1 m < d ≤ the first threshold of 2 m), the second-level response is triggered. The control system reduces the PWM duty cycle of the motor, and reduces the traveling speed to 0.2 m / s, so as to reserve reaction time for the subsequent detour action.
[0091] Third level: Short-distance obstacle avoidance
[0092] When d decreases to 0.8 m (d ≤ the second threshold of 1 m), the third-level response is triggered. According to the deceleration and detour strategy corresponding to ID025, the robot deflects 15° to the left through differential speed control, and detours past from one side of the cable joint. During the detour process, the ArUco code in front is continuously detected. When the ArUco code corresponding to the cable joint moves out of the field of view and there is no new obstacle mark in front, it is determined that the path is unobstructed.
[0093] State recovery
[0094] After the path is unobstructed, the robot exits the obstacle avoidance mode, the PWM duty cycle of the motor returns to the normal value, the traveling speed rises back to 0.5 m / s, and the inspection task is continued.
[0095] If the encountered mark is a water accumulation area mark with an ID of 210, the third-level obstacle avoidance action becomes stopping or starting the chassis lifting mechanism to lift, so as to prevent the robot from wading; if the encountered mark is a turning mark with an ID of 310, deceleration and turning are performed, and the right-angle turn is completed in cooperation with the densely arranged ArUco codes at the turning point.
[0096] It can be seen from the above embodiments that the present invention realizes rapid identification of obstacle types and differentiated obstacle avoidance in the cable trench environment under the condition of low computing power through the combination of ArUco code semantic marking and the three-level obstacle avoidance mechanism, and has the advantages of low deployment cost, fast response speed and strong environmental adaptability.
[0097] The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall all be included in the protection scope of the present invention.
Claims
1. A method for obstacle avoidance in a cable trench inspection robot based on ArUco code semantic tagging, characterized in that, Includes the following steps: S1: ArUco code semantic environment construction; ArUco codes are pre-deployed on the sidewalls of cable trenches or cable supports, and an ID-semantic mapping library is established in the robot control system. Each unique ArUco code ID in the mapping library corresponds to an obstacle type and a preset obstacle avoidance strategy. S2: ArUco code adaptive recognition and pose estimation; The robot acquires images containing ArUco codes through an RGB-D camera, and after adaptive lighting and image preprocessing, it detects and decodes the ArUco codes to obtain their unique IDs. The PnP algorithm is then used to calculate the relative pose and distance between the robot and the ArUco codes. S3: Semantic mapping and hierarchical obstacle avoidance decision-making; The decoded ArUco code ID is used as an index to query the ID-semantic mapping library, obtain the corresponding obstacle semantic labels and preset obstacle avoidance strategies, and trigger the corresponding level of obstacle avoidance response according to the distance between the robot and the ArUco code; S4: Obstacle avoidance execution and state recovery; The robot executes the corresponding obstacle avoidance action according to the obstacle avoidance decision. After the action is completed, it judges whether the path ahead is clear. If it is clear, it exits the obstacle avoidance mode and resumes the inspection speed. If there are still obstacles, it repeats steps S2 to S4.
2. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S1, the ArUco code uses the predefined DICT_6X6_1000 dictionary in the OpenCV library, which contains 1000 ArUco tags with unique IDs; the ID-semantic mapping library divides semantic categories according to ID ranges, including cable joints, bracket protrusions, water accumulation areas, and ditch turning obstacles, with each category corresponding to a different preset obstacle avoidance strategy; some ID ranges are reserved for future expansion.
3. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S1, the pre-deployment rules for the ArUco code are as follows: The ArUco code is placed at a height of 30-50cm from the bottom of the cable trench, level with the optical center of the RGB-D camera mounted on the robot, and the code plane is approximately perpendicular to the camera's optical axis. In straight sections of the cable trench, the spacing between adjacent ArUco codes is 10m. At bends in the cable trench, codes are placed at both the in-bend and out-bend points, with the spacing between them increased to 3-5m. When the angle between the camera and the center point of the ArUco code at the bend is within 1°, the robot is considered to have completed the turn.
4. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S2, the adaptive supplementary lighting specifically refers to: The robot is equipped with a light sensor to detect the ambient light intensity in real time. When the light intensity is lower than the preset threshold of 10 lux, the robot's auxiliary light is automatically turned on to ensure that the ArUco code area is adequately illuminated.
5. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In step S2, image preprocessing includes: Histogram equalization is performed on the acquired images to enhance contrast; adaptive thresholding is used for binarization to separate the black border of the ArUco code from the background.
6. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S2, the ArUco code detection and decoding are specifically as follows: The ArUco detection algorithm is used to detect the preprocessed image. Candidate regions that meet the square feature are selected by contour detection. The internal binary code of the candidate region is verified to match the legal code words in the ArUco dictionary. The unique ID number of the ArUco code is obtained by decoding.
7. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S2, the pose estimation is specifically as follows: Using the pixel coordinates of the four corner points of the detected ArUco code, combined with the actual physical size of the ArUco code and the camera intrinsic parameters, the three-dimensional position (x, y, z) and orientation (roll, pitch, yaw) of the ArUco code relative to the camera are calculated using the PnP algorithm, thus obtaining the relative pose and distance d between the robot and the ArUco code.
8. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 7, characterized in that: In S3, the graded obstacle avoidance decision-making adopts a three-level triggering mechanism, dividing the distance interval into three ranges based on the distance d between the robot and the ArUco code: When d is greater than the first distance threshold, it is determined to be a long-distance warning zone, and the robot maintains the normal inspection speed and continues to monitor. When d is greater than the second distance threshold and less than or equal to the first distance threshold, it is determined to be a medium-distance deceleration zone, and the robot performs a deceleration action and prepares to avoid obstacles. When d is less than or equal to the second distance threshold, it is determined to be a near-distance obstacle avoidance zone. The robot then performs turning, detouring, stopping, or lifting actions according to the obstacle avoidance strategy corresponding to the ID-semantic mapping library.
9. The obstacle avoidance method for a cable trench inspection robot based on ArUco code semantic tagging according to claim 1, characterized in that: In S4, the obstacle avoidance action includes: Deceleration is achieved by reducing the motor's PWM duty cycle; steering or detouring is achieved by differential steering or servo control to achieve a predetermined angle of deflection. Stopping is achieved through motor-operated brakes; The chassis is raised by activating the lifting mechanism.
10. An obstacle avoidance system for a cable trench inspection robot based on ArUco code semantic tagging, characterized in that, include: The semantic environment construction module is used to deploy ArUco codes in cable trenches and establish an ID-semantic mapping library; The image acquisition and recognition module includes an RGB-D camera, a light sensor, and a fill light, used for image acquisition, adaptive lighting, preprocessing, ArUco code detection and decoding, and pose estimation. The obstacle avoidance decision module is used to query the semantic mapping library based on the ArUco code ID and perform a three-level obstacle avoidance decision based on distance information. The obstacle avoidance execution module is used to perform deceleration, steering around, stopping, or lifting actions based on the decision results; The system is configured to perform the method as described in any one of claims 1 to 9.