Research on Visualization and Error Compensation of Demolition Robot Attachment Changing.

Attachment changing in demolition robots has a high docking accuracy requirement, so it is hard for operators to control this process remotely through the perspective of a camera. To solve this problem, this study investigated positioning error and proposed a method of error compensation to achieve a highly precise attachment changing process. This study established a link parameter model for the demolition robot, measured the error in the attachment changing, introduced a reference coordinate system to solve the coordinate transformation from the dock spot of the robot’s quick-hitch equipment to the dock spot of the attachment, and realized error compensation. Through calculation and experimentation, it was shown that the error compensation method proposed in this study reduced the level of error in attachment changing from the centimeter to millimeter scale, thereby meeting the accuracy requirements for attachment changing. This method can be applied to the remote-controlled attachment changing process of demolition robots, which provides the basis for the subsequent automatic changing of attachments. This has the potential to be applied in nuclear facility decommissioning and dismantling, as well as other radioactive environments.


Introduction
With the growing number of aging nuclear facilities and uncontrollable nuclear incidents, the ability to efficiently and safely treat and dispose of radioactive materials has become an important prerequisite for nuclear facility emergencies and nuclear facility decommissioning missions. Handling heavy radioactive materials, such as fuel rods or contaminated waste, as well as test, inspection, maintenance, and repair operations have been performed with robots for many years. A demolition robot is a kind of remote-controlled machine that is specially designed for working in dangerous environments and is widely applied in fields like nuclear facility emergencies and nuclear facility decommissioning [1,2]. Demolition robots are multifunctional, and their attachments, such as a bucket, grapple, metal shear, or breaker, can be changed based on different working conditions. Compared with the common method of changing construction machinery attachments manually, quick-hitch attachment changing of the demolition robot can be controlled remotely by the operator, which is safer and more efficient [3][4][5]. The BROKK company [6] from Sweden is one of the world's leading manufacturers and has developed more than 15 types of demolition robots.
Attachment changing of a demolition robot includes four procedures, as shown in Figure 1: First, initialization is carried out. In this stage, attachments begin to dock and the quick-hitch equipment is at the initial position and orientation. Second, preparation is done. At this stage, the quick-hitch equipment moves quickly to the preparation position. Third, range alignment occurs. The quick-hitch equipment moves to the dock spot and its coordinate origin overlaps with the attachment's coordinate origin. Fourth, angle alignment is carried out. The quick-hitch equipment is rotated to make its coordinate frame overlap with the attachment's coordinate frame. When this stage is finished, the hydraulic quick coupling (male) of the quick-hitch equipment connects with the hydraulic quick coupling (female) of the attachment. The hydraulic circuit is enabled and the quick-hitch equipment and the attachment lock up at the same time, thereby completing the attachment change. All movements of the robot are achieved through remote control of the operator. During the attachment changing procedure, the operator needs to observe the movement trajectory of the quick-hitch equipment from a close distance and multiple angles to meet the position accuracy requirements. When the working environment is hazardous [7,8], it is unsafe for the operator to enter the scene, and it is hard to complete remote attachment changing through cameras attached to the robot due to the narrow field of vision. If a visual system for attachment changing is provided, this problem can be solved and the working efficiency of the demolition robot can be improved.
Sensors 2020, 20, x FOR PEER REVIEW 2 of 17 equipment moves to the dock spot and its coordinate origin overlaps with the attachment's coordinate origin. Fourth, angle alignment is carried out. The quick-hitch equipment is rotated to make its coordinate frame overlap with the attachment's coordinate frame. When this stage is finished, the hydraulic quick coupling (male) of the quick-hitch equipment connects with the hydraulic quick coupling (female) of the attachment. The hydraulic circuit is enabled and the quickhitch equipment and the attachment lock up at the same time, thereby completing the attachment change. All movements of the robot are achieved through remote control of the operator. During the attachment changing procedure, the operator needs to observe the movement trajectory of the quickhitch equipment from a close distance and multiple angles to meet the position accuracy requirements. When the working environment is hazardous [7,8], it is unsafe for the operator to enter the scene, and it is hard to complete remote attachment changing through cameras attached to the robot due to the narrow field of vision. If a visual system for attachment changing is provided, this problem can be solved and the working efficiency of the demolition robot can be improved. A forward kinematics model needs to be established to develop the visual system of the demolition robot attachment changing. The coordinate transformation between the base frame and the end-effector frame is found using the Denavit-Hartenberg (D-H) model [9], which is common in motor-driven robotic applications. Because of the high machining accuracy and high precision encoder for position feedback, motor-driven robots have a high precision and a reliable stability level. The rotary encoder and potentiometer are used to measure the posture of the excavator robot endeffector, which can lead to automatic excavation [10][11][12][13][14]. However, the repeated positioning accuracy of hydraulic robots is worse than that of motor-driven robots due to the range of workspaces and mechanical structures. Positioning error can be compensated for by using the hand-eye calibration approach, which provides a robot calibration method when the base frame of a robot is difficult or even impossible to measure [15]. However, although the hand-eye calibration approach is suitable for the non-real-time calibration of small-size and high-precision industrial robots, the position error of the end-effector of the demolition robot is nonlinear and needs to be compensated for in real time. Attachment changing in the demolition robot requires positional preciseness, especially from the A forward kinematics model needs to be established to develop the visual system of the demolition robot attachment changing. The coordinate transformation between the base frame and the end-effector frame is found using the Denavit-Hartenberg (D-H) model [9], which is common in motor-driven robotic applications. Because of the high machining accuracy and high precision encoder for position feedback, motor-driven robots have a high precision and a reliable stability level. The rotary encoder and potentiometer are used to measure the posture of the excavator robot end-effector, which can lead to automatic excavation [10][11][12][13][14]. However, the repeated positioning accuracy of hydraulic robots is worse than that of motor-driven robots due to the range of workspaces and mechanical structures. Positioning error can be compensated for by using the hand-eye calibration approach, which provides a robot calibration method when the base frame of a robot is difficult or even impossible to measure [15]. However, although the hand-eye calibration approach is suitable for the non-real-time calibration of small-size and high-precision industrial robots, the position error of the end-effector of the demolition robot is nonlinear and needs to be compensated for in real time. Attachment changing in the demolition Sensors 2020, 20, 2428 3 of 16 robot requires positional preciseness, especially from the preparation stage to the range alignment stage. If the error in the position is above 5 mm, the task will not be completed. This study aimed to propose a method for real-time camera calibration that could compensate for the position error and achieve remote, long-distance control of attachment changing with the assistance of a 3D visualization model of the demolition robot. The main contributions of this paper are illustrated in the following points: • The forward kinematics model of the BROKK 160 (BROKK MACHINES CO. LTD., Beijing, China) robot was established through measurement and calibration, and then error analysis of the motion trajectory of the robot's end-effector was carried out. The results show that the large-sized robot driven by a hydraulic system could not achieve high-precision motion control through the conventional off-line calibration method.

•
Based on this problem, a method of real-time error compensation for the attachment changing of large-size demolition robots was proposed. By introducing a reference coordinate system that was fixed near the dock spot of the robot quick-hitch equipment, this method was able to complete the coordinate transformation from the dock spot of the robot quick-hitch equipment to the dock spot of the attachment, thereby achieving the error compensation.

•
Both indoor and outdoor experiments were carried out to verify this method. It was shown that the error compensation method proposed in this paper could reduce the level of error in the attachment changing process from the centimeter to the millimeter scale, thereby meeting the accuracy requirements.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 17 preparation stage to the range alignment stage. If the error in the position is above 5 mm, the task will not be completed. This study aimed to propose a method for real-time camera calibration that could compensate for the position error and achieve remote, long-distance control of attachment changing with the assistance of a 3D visualization model of the demolition robot. The main contributions of this paper are illustrated in the following points: • The forward kinematics model of the BROKK 160 (BROKK MACHINES CO. LTD., Beijing, China) ( robot was established through measurement and calibration, and then error analysis of the motion trajectory of the robot's end-effector was carried out. The results show that the largesized robot driven by a hydraulic system could not achieve high-precision motion control through the conventional off-line calibration method. • Based on this problem, a method of real-time error compensation for the attachment changing of large-size demolition robots was proposed. By introducing a reference coordinate system that was fixed near the dock spot of the robot quick-hitch equipment, this method was able to complete the coordinate transformation from the dock spot of the robot quick-hitch equipment to the dock spot of the attachment, thereby achieving the error compensation. • Both indoor and outdoor experiments were carried out to verify this method. It was shown that the error compensation method proposed in this paper could reduce the level of error in the attachment changing process from the centimeter to the millimeter scale, thereby meeting the accuracy requirements.

Kinematics
A demolition robot's coordinate frame was established [16,17], as shown in Figure 2.  The key point of remote-control attachment changing lies in obtaining the attachment dock spot coordinate frame {T}, relative robot quick-hitch dock spot coordinate frame {W}, and homogeneous transformation matrix , all while ensuring a small positioning error. is expressed in Equation (1). The transformation of the coordinate frame during the attachment changing is shown in Figure  3.

=
(1) Figure 2. Coordinate frame of a BROKK 160 robot. {B} is the robot's base coordinate frame, {W} is the quick-hitch dock spot coordinate frame, {C} is the camera coordinate frame, and {T} is the attachment dock spot coordinate frame (the red axis is the X-axis, the green axis is the Y-axis, and the blue axis is the Z-axis).
The key point of remote-control attachment changing lies in obtaining the attachment dock spot coordinate frame {T}, relative robot quick-hitch dock spot coordinate frame {W}, and homogeneous transformation matrix W T T, all while ensuring a small positioning error. W T T is expressed in Equation (1). The transformation of the coordinate frame during the attachment changing is shown in Figure 3.  By measuring the BROKK 160 robot, then calibrating using the hand eye calibration method, the link parameters of the robot were obtained, as shown in Figure where: Through the above calculation, with the obtained values of θ1 to θ5, was obtained. θ1 is the joint angle obtained by the chassis hydraulic motor, and the measurement of θ1 is complex. This study assumed that θ1 = 0. θ2 to θ5 are the values of joint angles created by the hydraulic cylinders. θ2 was measured directly using a digital inclination sensor. The length of the cylinder was measured using a linear displacement sensor, where the analog signal was converted to a digital signal using a 16-bit By measuring the BROKK 160 robot, then calibrating using the hand eye calibration method, the link parameters of the robot were obtained, as shown in Figure 2. Joints {1}, {2}, {3}, {4}, and {5} were revolute joints with rotation angles of θ 1 , θ 2 , θ 3 , θ 4 , and θ 5 , respectively. The lengths of the links were l 1 = 680 mm, l 2 = 515 mm, l 3 = 820 mm, l 4 = 1415 mm, l 5 = 938 mm, w x = 219 mm, and w y = 206 mm.
Calculation of the homogeneous transformation matrix from the base coordinate frame {B} to the robot quick hitch equipment dock coordinate frame {W} is shown in Equation (2): where: l 1 = 680 mm, l 2 = 515 mm, l 3 = 820 mm, l 4 = 1415 mm, l 5 = 938 mm, w x = 219 mm, w y = 206 mm.
Through the above calculation, with the obtained values of θ 1 to θ 5 , B W T was obtained. θ 1 is the joint angle obtained by the chassis hydraulic motor, and the measurement of θ 1 is complex. This study assumed that θ 1 = 0. θ 2 to θ 5 are the values of joint angles created by the hydraulic cylinders. θ 2 was measured directly using a digital inclination sensor. The length of the cylinder was measured using a Sensors 2020, 20, 2428 5 of 16 linear displacement sensor, where the analog signal was converted to a digital signal using a 16-bit analog to digital converter, and the joint angles θ 3 to θ 5 were obtained via polynomial fitting of the length value of cylinder.
AprilTag 36h11 series tags [18,19] were stuck to the surface of the attachment. The positions and orientations of the tags were acquired using a BASLER avA1600-50gm camera (Basler Vision Technology Co., Ltd., Beijing, China), and then an attachment coordinate frame was obtained. Three AprilTag 36h11 tags were bundled and calibrated, and then the homogeneous transformation matrix C T T from camera {C} to the attachment dock spot coordinate frame {T} was obtained. The bundle calibration of the AprilTag 36h11 series tags, the recognition algorithm, and visualization were carried out using the apriltag_ros package [20,21].

Error Estimation
Errors during the dock stage of BROKK 160 robot's attachment changing process consisted of two parts, as shown in Figure 4: the error e W between the true value {W} of the BROKK quick-hitch equipment and the measured value {W } and the error e T between the true value {T} of the attachment dock spot and the measured value {T } according to the method shown in Section 2. The dock stage of the attachment changing requires the error of the distance between the true value B W T and the measured value B W T to be less than 5 mm, and the relative error must be less than 0.1% (the maximum working distance of a BROKK 160 is 3.5 m).
Sensors 2020, 20, x FOR PEER REVIEW 5 of 17 analog to digital converter, and the joint angles θ3 to θ5 were obtained via polynomial fitting of the length value of cylinder. AprilTag 36h11 series tags [18,19] were stuck to the surface of the attachment. The positions and orientations of the tags were acquired using a BASLER avA1600-50gm camera (Basler Vision Technology Co., Ltd., Beijing, China), and then an attachment coordinate frame was obtained. Three AprilTag 36h11 tags were bundled and calibrated, and then the homogeneous transformation matrix from camera {C} to the attachment dock spot coordinate frame {T} was obtained. The bundle calibration of the AprilTag 36h11 series tags, the recognition algorithm, and visualization were carried out using the apriltag_ros package [20,21].

Error Estimation
Errors during the dock stage of BROKK 160 robot's attachment changing process consisted of two parts, as shown in Figure 4: the error between the true value {W} of the BROKK quick-hitch equipment and the measured value {W'} and the error between the true value {T} of the attachment dock spot and the measured value {T'} according to the method shown in Section 2. The dock stage of the attachment changing requires the error of the distance between the true value and the measured value to be less than 5 mm, and the relative error must be less than 0.1% (the maximum working distance of a BROKK 160 is 3.5 m). is the error of . The measurement of involved measuring the relative position and absolute angle using the laser range finder. The laser range finder was fixed on {W}, and then the joints (θ1 ≡ 0) of the robot were moved to let the laser project the mark point. The θ2 to θ5, distance, and inclination of the laser range finder were recorded, and then the previous steps were repeated to acquire more groups of data. The measurements are shown in Table 1.  e W is the error of B W T. The measurement of e W involved measuring the relative position and absolute angle using the laser range finder. The laser range finder was fixed on {W}, and then the joints (θ 1 ≡ 0) of the robot were moved to let the laser project the mark point. The θ 2 to θ 5 , distance, and inclination of the laser range finder were recorded, and then the previous steps were repeated to acquire more groups of data. The e W measurements are shown in Table 1.
There were 23 sets of measurement data in total. The joint angles in the data were used to calculate the position coordinates of the robot's quick-hitch dock spot {W} using Equation (2), as shown by the blue dots in Figure 5a. At the same time, the rotation angle of {W} was determined. Because θ 1 = 0, {W} only rotated around the Z-axis of the base coordinate frame {B}. This rotation angle is shown as R Z in Figure 5a, where the lines represent the laser emitted by the laser range finder. The length of the line is equal to the value measured by the laser range finder, and the angle of the line is equal to R Z . The black dots in the partially enlarged figure are the positions of the calculated fixed mark points. As can be seen from Figure 5a, the positions of the marked points calculated through different sets of data did not overlap, indicating that an error e W existed between the measured value B W T and the true value B W T.

Reference Coordinates Frame
Due to the existence of the ineliminable , the calculated using Equation (1) was too inaccurate to meet the requirements of attachment changing. In this section, by introducing the reference coordinate frame {R}, we describe our proposed method to solve and compensate for the error . The coordinate frame {R} was fixed on the quick hitch equipment, as shown in Figure  6. The angle error of e W was obtained by comparing the calculated R Z with the measured value from the laser range finder, as shown in Figure 5a by red and orange lines. The value angle RMS error was 0.13 • , which is relatively small, and the influence of the angle error on attachment changing was found to be relatively small.
To calculate the position error of e W , it was necessary to obtain the position of the marked point relative to the base coordinate {B}. Due to the large measurement error in the direct measurement, the least-squares method was adopted to calculate the desired intersection point of the laser. The sum of the distances between this intersection point and all marked points calculated through different sets of data was the minimum, as shown in Figure 5a. After the desired intersection point was obtained, the desired position of {W} was obtained using the measured distance and angle, as shown by the red Sensors 2020, 20, 2428 7 of 16 dot in Figure 5a. The error of distance of {W} is shown by the blue line in Figure 5b. In the 23 sets of data, the RMS value of the distance error was 10.77 mm, the maximum error was 23.75 mm, and the minimum error was 0.07 mm. About 30% of the data in the seven sets met the requirement that the error should be less than 5 mm. The position error was caused by the measurement error of the sensor itself, the error and backlash of the robot connecting rod assembly, and the measurement error of the connecting rod size. For the BROKK 160 robot, it was difficult to keep the position error of e W below 5 mm.

Reference Coordinates Frame
Due to the existence of the ineliminable e W , the W T T calculated using Equation (1) was too inaccurate to meet the requirements of attachment changing. In this section, by introducing the reference coordinate frame {R}, we describe our proposed method to solve W T T and compensate for the error e W . The coordinate frame {R} was fixed on the quick hitch equipment, as shown in Figure 6.

Reference Coordinates Frame
Due to the existence of the ineliminable , the calculated using Equation (1) was too inaccurate to meet the requirements of attachment changing. In this section, by introducing the reference coordinate frame {R}, we describe our proposed method to solve and compensate for the error . The coordinate frame {R} was fixed on the quick hitch equipment, as shown in Figure  6. can also be expressed using Equation (3): In the actual measurement process, the measured value {W'} of the dock spot of the robot quickhitch equipment can only be obtained by collecting sensor data and introducing {Tadjust}, as shown in Figure 7 and Equation (4): The homogeneous matrix of {R} relative to {W} is W R T, and the homogeneous matrix of {R} relative to {C} is C R T. W T T can also be expressed using Equation (3): In the actual measurement process, the measured value {W } of the dock spot of the robot quick-hitch equipment can only be obtained by collecting sensor data and introducing {T adjust }, as shown in Figure 7 and Equation (4): Equation (4)

Offsetting the Camera Coordinate Frame {Coffset}
After the fourth stage of the attachment changing, namely angle alignment, {W} overlaps with the origin of {T}, the Y-axis of {W} overlaps with the Z-axis of {T}, and the X-axis of {W} overlaps with the Y-axis of {T}. Then: In Equation (5), the subscript 4 signifies the fourth stage, Rot means rotation, and the subscript x means rotation around the X-axis. The homogeneous transformation matrix of {C} to {R} was as follows: Equation (6) gives the constant value of :

Offsetting the Camera Coordinate Frame {Coffset}
After the fourth stage of the attachment changing, namely angle alignment, {W} overlaps with the origin of {T}, the Y-axis of {W} overlaps with the Z-axis of {T}, and the X-axis of {W} overlaps with the Y-axis of {T}. Then: In Equation (5), the subscript 4 signifies the fourth stage, Rot means rotation, and the subscript x means rotation around the X-axis. The homogeneous transformation matrix of {C} to {R} was as follows: The homogeneous transformation matrix of {C} to {T} was as follows: Equation (6) gives the constant value of W R T:  (7): Sensors 2020, 20, 2428 9 of 16

Error Compensation Algorithm
As explained above, the error compensation algorithm goes through several steps. The block diagram of this algorithm is shown in Figure 8.
The error compensation method in this paper can be understood as moving {R} and {T} to {R'} and {Tadjust}. This is shown in Figure 7. Because the positions and orientations of {R} and {T} are obtained through camera coordinate frame {C}, {C} should be offset. The positions and orientations of {C} can be offset using Equation (7):

Error Compensation Algorithm
As explained above, the error compensation algorithm goes through several steps. The block diagram of this algorithm is shown in Figure 8.  Figure 8. Block diagram of the error compensation algorithm.

Experimental Scene 1: Contrasting Experiment of Error Compensation
This study developed the brokk160 toolkit using the ros platform, which included a robot visualization program, a robot cylinder length data acquisition and joint angle conversion program, a Basler Pylon industrial camera driver, and the apriltag_ros program and real-time error compensation program described in Section 4. The experiment involved remotely controlling the BROKK 160 robot to complete the attachment changing process. The movement trajectories of {W} and {T} with and without the error compensation algorithm were recorded using rosbag. As shown in Figure 9, the experimental results were divided into five stages, lasting 52 s each, and 556 sets of motion track data were recorded.
At this time, the end device of the robot and the attachment were firmly connected, and {W} and {T} were always aligned. During the fifth stage, the end device and the attachment were controlled to rotate counter-clockwise around joint {3}. Figure 9f shows the experimental data in the fifth stage at 52 s, where the position coordinates of {W} were (2.894, 0, 1.336), the position coordinates with the error compensation of {T} were (2.895, 0, 1.338), and the position coordinates of {T} without the error compensation were (2.909, −0.001, 1.302). In Figure 9f, the green curve on the right is the motion track of {W} in the fifth stage.

Discussion
Since the reference coordinate system {R} did not appear in the view of the camera {C}, the position and orientation of {C} were default values that could be obtained by hand-eye calibration. Figure 10 shows the change in distance between {T} and {W} during the process of attachment changing. The blue line is the result obtained without the error compensation procedure, and the orange line is the result obtained with the error compensation procedure. From Figure 10, it can be seen that in the first stage, the two curves completely overlapped because there was no reference coordinate frame {R} for error compensation.
In the second half of the third stage, collisions and contacts occurred between the quick-hitch equipment of the robot and the attachment. {T} moved with the movement of {W}, and the two finally coordinated with each other and overlapped. As can be seen from Figure 10 of the third stage, the blue curve deviated from the compensated orange curve, which was moving closer to {W}. When the

Initialization
In the experimental data, 0-9.6 s represents the first stage, which was the initial stage in the process of the tool head replacement. Figure 9a shows the experimental data at the beginning of the first stage. The left side of the figure shows the real-time 3D model of the robot (the oil cylinder model is omitted), the image obtained by the camera, and a magnified partial overlooking view at the attachment dock spot. On the right side of the figure, the initial 3D position coordinates of {W} (2.777, 0, 1.284) and {T} (2.863, 0.002, 0.826) are shown. At this stage, the reference coordinate frame {R} did not appear in the view of the camera {C}. The movement of {W} was controlled downward until the camera successfully captured the reference coordinate frame {R}, which was at a time of 9.6 s. The first stage ended at this point (and the second stage began at this point). Figure 9b shows the experimental data at the end of the first stage at a time of 9.6 s. The blue curve on the right is the movement track of {W} at this stage. {W} moved to (2.696, 0, 0.858) at 9.6 s.

Preparation
In the experimental data, 9.6-12 s represents the second stage, which was the preparatory stage in the process of the robot tool head replacement. Figure 9b shows the experimental data when the starting point of the second stage is was taken as being 9.6 s. In the second stage, {W} continued downwards to find the appropriate docking path until 12 s. Figure 9c shows the experimental data at the end of the second stage at 12 s. It can be seen from the left side of the figure that the quick-change device of the robot was close to the tool head, and there was enough space to complete the docking between {W} and {T}. In Figure 9c, the orange curve on the right is the movement trajectory of {W} in the second stage.

The Alignment Range
In the experimental data, 12-32 s represents the third stage, which was the docking stage in the process of attachment changing. Figure Figure 9f, the green curve on the right is the motion track of {W} in the fifth stage.

Discussion
Since the reference coordinate system {R} did not appear in the view of the camera {C}, the position and orientation of {C} were default values that could be obtained by hand-eye calibration. Figure 10 shows the change in distance between {T} and {W} during the process of attachment changing. The blue line is the result obtained without the error compensation procedure, and the orange line is the result obtained with the error compensation procedure. From Figure 10, it can be seen that in the first stage, the two curves completely overlapped because there was no reference coordinate frame {R} for error compensation. The results of the contrast experiment of error compensation are shown in Table 2. The results analysis is listed in the following: • In a safe scenario, the operator can observe the movement trajectory of the quick-hitch equipment from a close distance and multiple angles during the whole procedure until the task of demolition robot attachment changing can be finished. • In a hazardous scenario, the operator remote attachment changing needs to be done through cameras, the third stage cannot be completed.   In the second half of the third stage, collisions and contacts occurred between the quick-hitch equipment of the robot and the attachment. {T} moved with the movement of {W}, and the two finally coordinated with each other and overlapped. As can be seen from Figure 10 of the third stage, the blue curve deviated from the compensated orange curve, which was moving closer to {W}. When the docking was completed, the distance between {T} and {W} decreased rapidly, and the attachment slid into the dock spot of the robot quick-hitch equipment. After docking, the distance between the compensated {T} and {W} was 1.68 mm, while the distance between {T} and {W} without the error compensation was 16.8 mm.
{W} and {T} were aligned in the fourth and fifth stages, and the relative distance between {W} and {T} was 0. Therefore, the effectiveness of the real-time error compensation described in Section 4 could be quantitatively evaluated in these two stages. Figure 10 is a partial enlarged view of the distance between {T} and {W} in the fourth and fifth stages with and without the error compensation. The data circled in red are the abnormal data of the orange curve from around 34-36 s, and the value was equal to the value of the blue curve. The reason for the abnormal data was that during the period of 34-36 s, the reference coordinate frame {R} was perpendicular to the light source, which generated a strong reflection, resulting in the camera misrecognizing the attitude of {R}. The real-time error compensation program in the BROKK 160 robot toolkit screened the attitude of {R}. Compared with the attitude in the previous frame, if the current attitude produced a large displacement and rotation, it was recognized as error data. The program output the default value of the camera {C} such that the orange curve overlapped with the blue curve in the period of 34-36 s. Apart from this interval, the distance between the adjusted {T} and {W} distances had nothing to do with the motion of {W}.
The results of the contrast experiment of error compensation are shown in Table 2. The results analysis is listed in the following: • In a safe scenario, the operator can observe the movement trajectory of the quick-hitch equipment from a close distance and multiple angles during the whole procedure until the task of demolition robot attachment changing can be finished.

•
In a hazardous scenario, the operator remote attachment changing needs to be done through cameras, the third stage cannot be completed.

•
In a hazardous scenario, the operator remote attachment changing is done through

Experiment Scene 2: Attachment Remote Changing Indoors
This experiment was carried out in our laboratory under relatively ideal lighting conditions and on flat ground. The demolition robot was operated remotely and the crushing hammer disassembly and grab reloading was completed through a 3D visualization and error compensation system. A Video S1 of the whole experiment is available online at https://youtu.be/HnHOf0xLWXo.

Experiment Scene 3: Attachment Remote Changing Outdoors
This experiment was conducted outdoors under complex lighting conditions and on uneven ground. The demolition robot was operated remotely and the crushing hammer disassembly and grab reloading was completed through a 3D visualization and error compensation system. A Video S2 of the whole experiment is available online at https://youtu.be/ZM4Fkztawb4.

Conclusions
In this study, a method of real-time error compensation for the attachment changing of large-size demolition robots was proposed. This method converts the absolute error that is difficult to eliminate in the attachment changing process into a relative error, which is easy to control through real-time compensation of the camera coordinate frame. The experiments were carried out to verify that this method could reduce the level of error in the attachment changing process, and the maximum value of the position error was 4.53 mm, thereby meeting the accuracy requirements.
In this study, a visualization and error compensation system for remote demolition robot attachment changing was developed. The operator could achieve the attachment remote changing through this system, but the efficiency of this work still depends on the technical level and proficiency of the operator. In the next step in the dynamic robot model research, kinematic trajectory planning and hydraulic servo control research will be carried out to achieve automatic changing of the demolition robot attachment.