Improvement of Robot Accuracy with an Optical Tracking System

Robot positioning accuracy plays an important role in industrial automation applications. In this paper, a method is proposed for the improvement of robot accuracy with an optical tracking system that integrates a least-square numerical algorithm for the identification of kinematic parameters. In the process of establishing the system kinematics model, the positioning errors of the tool and the robot base, and the errors of the Denavit-Hartenberg parameters are all considered. In addition, the linear dependence among the parameters is analyzed. Numerical simulation based on a 6-axis UR robot is performed to validate the effectiveness of the proposed method. Then, the method is implemented on the actual robot, and the experimental results show that the robots can reach desired poses with an accuracy of ±0.35 mm for position and ±0.07° for orientation. Benefitting from the optical tracking system, the proposed procedure can be easily automated to improve the robot accuracy for applications requiring high positioning accuracy such as riveting, drill, and precise assembly.


Introduction
Industrial robots have been widely applied for manufacturing automation in high-volume production due to their good task repeatability features. In a common scenario of the use of these machines, a human operator teaches the robot to move to a desired position; the robot records this position and then repeats the taught path to complete the task. However, robot teaching is usually time-consuming for low-volume applications. Although offline programming can significantly reduce the workload for robot teaching, the generated robot paths are based on the robot's nominal kinematic model and, therefore, whether the robot can successfully complete the task via offline programming depends on its absolute accuracy. The robot manufacturers provide the nominal values of the Denavit-Hartenberg (D-H) parameters of the robot. However, the actual values of these parameters can deviate from their nominal values due to the errors in manufacturing, assembly, etc., which accordingly cause positioning errors to the robot end-effector. As a result, the absolute accuracy of industrial robots is relatively low compared with many other types of manufacturing equipment such as CNC machine tools [1]. As a result, industrial robots still face challenges in many low-volume applications where high absolute accuracy (with the positioning error less than 0.50 mm for an industrial robot of a medium to large size) is required, such as milling, drilling, and precise assembly.
Kinematic calibration is a significant way to improve the absolute accuracy of robots [2]. Two types of calibration methods are available based on measurement methods. One is the open-loop calibration in which the absolute position and orientation of the robot end-effector are measured; the other is closed-loop calibration in which the position and orientation of the end-effector are measured relative to another reference part or gauge.
For open-loop calibration, laser trackers have been adopted as the measurement device with different calibration algorithms. By using a laser tracker in [3][4][5][6][7], the absolute positioning accuracy of the robot can reach about 0.10-0.30 mm. Among them, the least squares technique is the most often applied one, which aims at minimizing the sum of squared residuals [4,5]. In [7], a new kinematic calibration method has been presented using the extended Kalman filter (EKF) and particle filter (PF) algorithm that can significantly improve the positioning accuracy of the robot. Thanks to the principle of data driven modeling, artificial neural network (ANN) has a promising application in modeling complex systems such as calibration [3,6]. Nguyen [3] combined a model-based identification method of the robot geometric errors and an artificial neural network to obtain an effective solution for the correction of robot parameters. In [6], a back propagation neural network (BPNN) and particle swarm optimization (PSO) algorithm have been employed for the kinematic parameter identification of industrial robots with an enhanced convergence response. Coordinate measuring machines (CMM) have also been used in open-loop robot calibration [8][9][10]. For example, Lightcap [10] has determined the geometric and flexibility parameters of robots to achieve significant reduction of systematic positioning errors. In [11], an optical CMM and a laser tracker have been combined to calibrate the ABB IRB 120 industrial robot, so that the mean and maximum position errors can be reduced from more than 3.00 mm and 5.00 mm to about 0.15 mm and 0.50 mm, respectively.
For closed-loop calibration, the calibration models are established by incorporating different types of kinematic constraints induced by the extra reference parts or gauges. By using gauges in [12][13][14], the absolute positioning accuracy of the robot also can reach about 0.10-0.30 mm. He [12] has used point constraints to improve the accuracy of six-axis industrial robots. The robot parameters are calibrated by controlling a robot to reach the same location in different poses. In [13], a non-kinematic calibration method has been developed to improve the accuracy of a six-axis serial robot, by using a linear optimization model based on the closed-loop calibration approach with multiple planar constraints. Joubair [14] has presented a kinematic calibration method using distance and sphere constraints effectively improving the positioning accuracy of the robot. In another category of closed-loop calibration methods, the kinematic constraints are induced by vision systems [15][16][17][18]. For example, Du [15] has developed a vision-based robot calibration method that only requires several reference images, and the mean positioning error was reduced from 5-7 mm to less than 2 mm. Zhang [18] has proposed a stereo vision based self-calibration procedure with the max position error and orientation errors reduced to less than 2.50 mm and 3.50 • , respectively.
The calibration procedure is usually not specific to a certain task, it does not account for the influence of the robot end-effector and it is difficult to correct the errors due to structural elastic deformation and other factors. Other research works are focused on the online positioning error compensation, i.e." correcting the positioning error directly with the integration of an external metrology system. Online positioning error compensation is usually task-oriented and does not require a precise kinematics model [19][20][21][22][23][24][25][26][27][28][29]. For example, Jiang [20] has proposed an on-line iterative compensation method combining with a feed-forward compensation method to enhance the assembly accuracy of a robot system (MIRS) with the integration of a 6-DoF measurement system (T-Mac) to track the real-time robot movement. In [21], an online compensation method has been presented based on a laser tracker to increase robot accuracy without precise calibration. Yin [22] has developed a real-time dynamic thermal error compensation method for a robotic visual inspection system. The method is designed to be applied on the production line and correct the thermal error during the robotic system operation. In [23], an embedded real-time algorithm has been presented for the compensation of the lateral tool deviation for a robotic friction stir welding system. Shu [26] has presented a dynamic path tracking scheme that can realize automatic preplanned tasks and improve the tracking accuracy with eye-to-hand photogrammetry measurement feedback. A dynamic pose correction scheme has been proposed by Gharaaty [27] which adopts the PID controller and generates commands to the FANUC robot controller. In [28,29], the authors have adopted an iterative learning control (ILC) to improve the tracking performance of an industrial robot.
In summary, different offline calibration and online compensation methods to improve the absolute accuracy of robots have been reported in the literature. However, to achieve high precision (up to 0.30-0.50 mm), these methods have some drawbacks. For open-loop calibration, those methods usually require external metrology systems such as laser trackers and CMM that are costly and lack of flexibility for production automation. For closed-loop calibration, using gauges to calibrate requires manual teaching and is difficult to automate, which will affect the calibration efficiency; using vision systems to calibrate can be quite flexible for autonomous calibration, but the positioning error can be as high as a few millimeters limited by the precision of vision systems. For online compensation, most methods adopt a laser tracker as an external metrology system with a laser target mounted on the end-effector, which is costly and can be influenced by the visibility of the laser target. Moreover, most of the above methods do not take into account the influence of positioning accuracy caused by tools. For these reasons, improving absolute accuracy is still a bottleneck challenge for robotic applications in low-volume high-precision tasks.
To overcome the above issues, we propose an approach to correct the values of the kinematic parameters through the measurement of the actual end-effector poses via an optical tracking system. This approach integrates an optical tracking system and a rigid-body marker (with multiple marker targets) mounted on the end-effector for online compensation of robot positioning error. The optical tracking system enables online measurement of the 6-DOF motion of the robot end-effector. In the parameter identification process, the influence of the tool, the positioning error of the robot base and the error in the D-H parameters are all considered. A least-square numerical algorithm is then used to correct the errors in these kinematic parameters of the robot. Compared with laser trackers, the cost of an optical tracking system is significantly lower than that of a laser tracking system. Also, the optical tracking system can simultaneously measure the poses of multiple markers attached on the measured object, which brings good visibility of the object and flexibility for integration to the optical tracking system. Compared with closed-loop calibration with gauges, the optical tracking system is convenient and easy to automate to improve the calibration efficiency. Compared with online compensation with laser trackers, this method is more cost effective and can provide better visibility of the robot tools. In summary, the contribution of this work is to propose a comprehensive method to correct not only the errors in the D-H parameters but also the positioning errors in the base and tool frames for the kinematic model, which by adopting the optical tracking system, can lead to an efficient and automatic calibration of the robotic system for the robot users.
In the rest of the paper, the system setup as described in Section 2, the detailed theoretical development is presented in Sections 3 and 4 for the robot kinematics and the calibration of kinematic parameters respectively and then simulation and experimental results are given in Sections 5 and 6, respectively.

System Setup
As illustrated in Figure 1, the system under study is composed of a serial robot, a tool mounted on the robot, and an optical tracking system. The robot can be programmed to drive the tool to move along a given path. The pose (position and orientation) of the tool can be obtained through the optical tracking system.
More specifically, a Camsense S optical tracking system (Camsense, Shenzhen, China) is adopted in this system. It is a high-precision dynamic tracking device customized for precision robotic applications which can localize the 3-DOF positions of single-point markers and 6-DOF poses (position and orientation) of rigid-body markers moving in space in real time. The optical tracking system has been calibrated by measuring an object mounted on a CMM. The measuring range of this optical tracking system is 2 to 5 m as drawn in Figure 2. The positioning accuracies in the measuring ranges of 2 to 3 m, 3 to 4 m and 4 to 5 m are 0.08 mm, 0.14 mm and 0.21 mm, respectively. The optical tracking system uses two infrared CCD cameras working at a frame rate of 40 Hz. The camera and the markers are synchronized through 2.40 G wireless network, hence to enable the markers to work under the pulse mode and further to increase the signal noise ratio. The marker is wireless and contains multiple active light sources with infrared diodes emitting light at prescribed frequencies, thus they can be easily identifiable and not sensitive to external light conditions. A power source is integrated with the marker, and wireless communication can be established between the marker and the controller of the optical tracking system. Moreover, the markers are light and compact, for example, the rigid-body markers are with a mass of about 400 g, a diameter of 136 mm and a height of 16.5 mm.  Benefitting from the fact that the markers of the optical tracking system are light, compact and equipped with an internal power source, these markers can be easily attached on the robot end-effector during the measurement. By this means, the influence of the end-effector on the robot accuracy can be taken into account using this approach. Also, the optical tracking system can simultaneously measure the poses of multiple markers attached on the end-effector to guarantee the visibility of the end-effector by the tracking system.
Compared with laser tracking systems, the optical tracking system provides smaller measurement volume and they are slightly less accurate, but they are much less expensive and more flexible for automation. Also, the optical tracking can already provide sufficient accuracy for the machining and assembly tasks that are targeted in this work with a positioning accuracy requirement of about 0.30-0.50 mm. Moreover, since the repeatability of a medium to large-size industrial robot for the targeted tasks is about 0.10-0.20 mm, it would be difficult to improve the robot accuracy better than its repeatability by calibration even with a laser tracking system.

System Integration
The integration of the optical tracking system with the UR robot used in this work is illustrated in Figure 3. With TCP/IP communication protocol, a computer running on robot operating system (ROS) can communicate with the robot controller and send commands to move the robot in a position control mode. When the robot moves to a series of calibration points, the position and orientation of the rigid-body marker mounted on the end-effector is measured by the optical tracking system for each point, and the robot joint angles are recorded simultaneously. Then, these data are used to calculate the actual kinematic parameters of the robotic system. Finally, these actual parameters can be output and used to calculate the robot kinematics for controlling the robot motion. The above procedure can be completed without human intervention, and thus provide the feasibility of autonomous calibration with the tool mounted on the robot.

Errors in the D-H Parameters
The kinematic scheme of a typical serial robot with m links and m revolute joints is plotted in Figure 4. The position vector of the i th joint in the base frame {O_X B Y B Z B } is denoted by t i . A local frame {o i _x i y i z i } is established on each of the links with the origin at the i th joint. The tip of the tool mounted on the last link is denoted as E, with its position vector written in the base frame as t E . The homogeneous matrix of the i th body frame {o i _x i y i z i } relative to the (i-1) th body frame can be given as follows: where a i , d i , α i and θ i are the D-H parameters of the i th link as described in Figure 5, in which a i is the link length, d i is the link offset, α i is the link twist angle, and θ i is the joint angle. Then the homogeneous matrix of the end-effector {O_X E Y E Z E } relative to the robot base frame {O_X B Y B Z B } can be calculated as: where the nonlinear function g represents robotic forward kinematics, subscript n denotes nominal value, and x m ∈ R m×1 is a vector of the joint variables calculated with nominal D-H parameters p n , i.e.,: (3) Vector p n contains the 4 m nominal D-H parameters, in which m is the number of the links. For a 6-axis industrial robot, vector p n ∈ R 24×1 contains 24 parameters in total.
If we consider the errors in the D-H parameters, then the forward kinematics of the robot can be re-written as: Vector ∆p contains the errors in the D-H parameters, and p a contains the actual D-H parameters. The errors of the D-H parameters can be caused by many factors. For example, the errors in the joint encoders can affect the values of the θ i parameters in the D-H description.

Errors in the Marker Frame
In order to determine the pose relationship of the local frame fixed on the rigid-body marker relative to the end effector, the nominal pose of the marker frame with respect to the end-effector frame is written as: where E R R n and E R t n represent the nominal rotation matrix and nominal position vector between the end-effector tool frame and the rigid-body marker frame, respectively. In reality, the actual base frame E R T n can be inconsistent with the nominal base frame. We can use ∆ R E T to represent the transformation relationship between the actual and normal frames, i.e.,: where ∆α RE , ∆β RE and ∆γ RE represent the errors in the rotation angles of the marker frame with respect to the x, y and z axes of the end-effector frame, ∆x MB , ∆y MB and ∆z MB represent the errors of the origin coordinates of the marker frame with respect to the end-effector frame.

Errors in the Base Frame
The nominal pose of the robot base frame with respect to the measurement frame cannot be obtained directly. However, the nominal D-H parameters of the robot are known, and the nominal pose of the marker frame with respect to the end-effector also is known. For a given robot configuration, the pose of the marker frame with respect to the measurement frame can be measured by the optical tracking system within the measurement range. Therefore, the nominal pose of the robot base frame with respect to the measurement frame can be obtained as follows: Similarly, in order to determine the pose relationship of the actual robot base frame relative to the measurement frame, the nominal pose of the actual base frame with respect to the measurement frame is written as: where ∆α MB , ∆β MB and ∆γ MB represent the errors in the rotation angles of the base frame with respect to the x, y and z axes of the measurement frame, ∆x MB , ∆y MB and ∆z MB represent the errors in the origin coordinates of the base frame with respect to the measurement frame.

Errors of the System
In order to clearly show the systematic error, we establish coordinate frames for robot calibration as shown in Figure 6, where {O M X M Y M Z M } represents the measurement frame fixed on the laser tracking system, {O B,n X B,n Y B,n Z B,n } represents the nominal robot base frame, {O B X B Y B Z B } is the actual robot base frame, {O E,n X E,n Y E,n Z E,n } is the frame fixed on the end-effector obtained with the nominal D-H parameters, {O E X E Y E Z E } is the actual end-effector frame of the robot, {O R,n X R,n Y R,n Z R,n } represents the nominal frame fixed on the rigid-body marker, and {O R X R Y R Z R } represents the actual marker frame. According to the above relationship, introduce the error of each part into the system, we can get the following relationship: Not only the errors in the D-H parameters but also the positioning errors of the robot base and the end-effector tool are considered in the calibration model in Equation (11).

Kinematic Parameter Identification
According to Equation (11), the pose of the marker frame relative to the measurement frame is a function of these kinematic parameters as: where y MR = [x MR , y MR , z MR , α MR , β MR , γ MR ] represent position and orientation of the marker frame relative to the measurement frame. Taking the small disturbance for both sides of Equation (12), the model can be linearized as: where ∆y MR ∈ R 6×1 represents the disturbance in the pose of the marker frame, ∆e ∈ R 36×1 represents the disturbance in each parameter, and J is the 6 × 36 Jacobian matrix of the nonlinear kinematic model Equation (12) defined as follows: This matrix can be numerically calculated by finite difference. For example, its element on the first row and the first column can be obtained as: where ∆x MB is a small disturbance and we use a value of 1 × 10 −6 in this work. We can compare the column vectors in the Jacobian matrix J. If two column vectors are identical, the errors in the two corresponding kinematic parameters have identical effect on the error in the end-effector pose. According to Equation (11), matrix ∆ M B T is generated from 6 variables as ∆y MB = [∆x MB , ∆y MB , ∆z MB , ∆α MB , ∆β MB , ∆γ MB ], ∆ E R T is generated from 6 variables as ∆y ER = [∆x ER , ∆y ER , ∆z ER , ∆α ER , ∆β ER , ∆γ ER ], and vector ∆p is generated from 4 m variables as the errors in the D-H parameter values. In this paper, multiple measurement data points are sampled for the pose of the marker frame relative to the measurement frame, and the robot joint angles are recorded simultaneously for each point. For each point, we have: where subscript k denotes the k th sample point, f is the forward kinematics of the calibration system, and x m,k denotes the robot joint angles. In this study, a least-square numerical algorithm is applied to solve for the errors in the kinematic parameters, so the objective equation can be established as: (∆y MB , ∆p, ∆y ER ) = argmin where · represents the 2 norm. In the optimization process, we use the fsolve function with the Levenberg-Marquard algorithm for a numerical solution in MATLAB. Since the system kinematic parameters error is small, we set the initial values of all the kinematic parameter errors to be zero; the maximum number of iterations is set to be 500; the value of the function tolerance is set to be 1 × 10 −6 ; and the value of the variable tolerance is set to be 1 × 10 −6 . The optimal solution is obtained as the system kinematic parameters error.
In summary, if we define a trajectory based on the robot base frame, the specific process of the robot to accurately track the trajectory is shown in Figure 7. After establishing the kinematics model, we can select a series of robot configurations to calibrate the robot. In order to implement our method on a robot, the direct and inverse kinematic problems should be solved for the robot on its controller using the corrected values of the kinematic parameters. By using the optical tracking system to measure the pose error, we can identify the kinematic parameters of the robot. According to the nominal value of the robot, we can solve the joint angle corresponding to the target trajectory. Substituting the joint angle obtained by the nominal value into the calibrated model, we can accurately reach the target position.

Giving Errors in Kinematic Parameters
In this simulation case, we define the errors in the base frame relative to the measurement frame in Table 2. We define the errors in the D-H parameters in Table 3. Also, we define the errors in the marker frame relative to the end-effector in Table 4.

Simulation Result
In the calibration process, the position and orientation of the rigid-body marker is measured by the optical tracking system. In order to make the simulation closer to reality, we introduce random measurement errors into the measurement results. The position errors in the X, Y and Z directions are between −0.10 mm and +0.10 mm, the orientation errors in the X, Y and Z directions are between −0.10 • and +0.10 • . A total of 30 sets of data are selected with joint angles shown in Appendix A. Simultaneously, the actual poses of the marker frame with respect to the measurement frame can be obtained as shown in Appendix B. For each data point, we establish six equations; therefore, the errors in the required kinematic parameters can be obtained numerically. The pose errors of the base frame relative to the measurement frame are shown in Table 5. The errors in the D-H parameters are shown in Table 6. The pose errors of the marker frame relative to the end-effector are shown in Table 7. Through the above analysis, the parameter error after calibration can be compared with the parameter errors given in Tables 2-4. The comparison is shown in Table 8, with the given parameter error in the second column and the calculated parameter errors in the third column. It can be seen that the kinematic errors calculated from the theoretical model reasonably match the errors given in Section 5.2, which shows the effectiveness of the proposed method. A further investigation of the column vectors of the Jacobian matrix shows that some kinematic parameter errors cause identical effect on the end-effector pose. For instance, the third and the ninth column vectors in matrix J are identical, which represents that the kinematic parameter errors ∆z MB and ∆d 1 have identical effect on the positioning error of the effector, since the z MB axis is parallel to the axis of the first joint. These are related to the geometric characteristics of the UR10 robotic system. For these parameters, their calculated errors after calibration do not guarantee to be close to their given errors, but the summation of their calculated errors is close to the summation of their given errors.
We proceed to demonstrate the improvement of the robot absolute accuracy in the simulation. According to the joint angles of the robot at the 30 data points, the positions of the marker frame relative to the measurement frame can be obtained from the forward kinematics with the nominal parameter values given in Section 5.1, which are called the nominal positions. After calibration, the positions of the marker frame relative to the measurement frame can be calculated by the corrected parameters, which are called the corrected positions. The actual positions of the marker frame relative to the measurement frame can be obtained from the forward kinematics with the actual parameter values given in Section 5.  Figure 9. It can be seen that the positioning accuracy of the robot is obviously improved after calibration.
Before calibration, the average error of the marker poses in each direction is shown in Table 9. After calibration, the average error of the marker poses in each direction is shown in Table 10. It is obvious that the error is significantly reduced in each direction.  We have also carried out a series of numerical simulation studies with different amount of errors in the D-H parameters. For the length variables, we set the error varying from −1 to +1 mm with a step of 0.05 mm; for the angle variable, we set the error varying from −1 • to +1 • with a step of 0.05 • . For all the cases, the optimization process can converge and output the predefined error values.

Experimental Setup
An experimental study is given to demonstrate the validity of the proposed approach for a pin-hole insertion at multiple points. It is expected that after the robot is taught to insert the pin at limited points, it can complete the insertion automatically and smoothly at all the points. We will show that with nominal kinematic parameters, the robot is difficult to complete the task smoothly, while with corrected parameters, the insertion is performed much more smoothly.
As shown in Figure 10, the experimental setup consists of a six-DOF UR10 robot fixed on a workbench, an optical tracking system fixed on the ground, a rigid marker, an adaptor plate, and a tool mounted on the robot. Also, an aluminum rod with a diameter of 20.00 mm and an aluminum plate with a length of 800.00 mm, a width of 600.00 mm and 24 holes are machined for the assembly task. The rod and the plate are shown in Figure 10.

Calibration Results
It is preferable to move the robot throughout the workspace and within the measurement range during the calibration process. For this optical tracking system, the measuring range is 2 to 5 m with a nominal volumetric positioning accuracy of 0.20 mm. As mentioned in Section 2, the measurement accuracy in the measurement range of 2 to 3 m is better than that in the range of 3 to 5 m, therefore the measurement distance of the experimental platform is within 2 to 3 m. We have carried out a series of other tests where the poses of the marker were measured at different data points. In these tests, the number of the data points varied from 30 to 40, and we found very similar results from these calibration tests. Using the above method, the pose of the base frame relative to the measurement frame are initially determined as: Also, the pose relationship between the marker frame and the end-effect can be initially determined from their CAD model, i.e.,: 0. 00 0. 00 0. 00 0.00 0. 00 1. 00 − 98. 50(mm) 0.00 − 1. 00 0. 00 103. 50(mm) 0.00 0. 00 0. 00 1. 00 During the calibration process, we recorded the joint angles of the robot at 30 data points as shown in Appendix C. The poses of the marker relative to the measurement frame are obtained by the optical tracking system and listed in Appendix D. By using the proposed calibration method, the pose error of the base frame relative to the measurement frame is calculated and shown in Table 11. The D-H parameter error obtained by the solution is shown in Table 12. The pose error of the marker frame relative to the end-effector frame is shown in Table 13. The nominal positions (calculated from forward kinematics with nominal kinematic parameters) and corrected positions (calculated from forward kinematics with corrected kinematic parameters) are compared with actual positions (measured by optical tracking system) are compared Figure 11. It can be observed that the corrected positions are closer to the actual positions than the nominal positions. The pose errors before and after calibration are shown in Figure 12 for the calibration points. The average error at these points each direction before and after calibration is shown in Tables 14 and 15 respectively. It is seen that the positioning accuracy of the robot can be dramatically improved for each direction at these calibration points. For example, the position error is reduced from 2.00-3.00 mm to less than 0.20 mm.   Furthermore, to verify the calibrated parameters, we randomly sampled 10 points rather than the calibration points and measured the poses of the marker at these random points. The joint angles for these points are shown in Appendix E and the measured pose of the marker relative to the measurement frame is shown in Appendix F. Substituting the joint angle of the robot into forward kinematics of the calibration system Equation (11) with nominal and corrected parameters, we can obtain the pose relationship of the marker frame relative to the measurement frame before and after calibration. The pose errors before and after calibration are compared in Figure 13 for these points. The average error of the marker pose in each direction before and after calibration is listed in Tables 16 and 17, respectively. Again, we observe that the positioning accuracy of the robot can be dramatically improved for each direction at these randomly sampled points. It can be found that with the optical tracking system, the mean value of the position errors of the UR10 robot at the sampled points is improved to about 0.348 mm with a standard deviation of about 0.096 mm and the mean value of the angular errors is improved to about 0.070 • with a standard deviation of about 0.024 • . The resulting position accuracy is compared with the results obtained in some previous works on robot calibration in Table 18. It is observed is the position accuracy obtained using the proposed method is slightly lower than or similar to the accuracy after open-loop calibration with laser tracking system and CMM [4,7,11] and after closed-loop calibration with probes and gauges [13], and it is significantly higher than the accuracy after calibration with monocular and stereo vision cameras [15,18]. Note that the angular errors of the robots after calibration were not provided in these references. The robot accuracy improvement using the proposed method is limited by the measurement accuracy of the optical tracking system mentioned in Section 2.1, and it is also affected by the intrinsic characteristics of the robot such as the errors induced by non-kinematic factors like structural deformations. However, the proposed method can already provide sufficient accuracy for many tasks targeted by this work with an accuracy requirement of about 0.30-0.50 mm. Moreover, benefited from the compact size, light weight and good visibility of the markers of the optical tracking system, the proposed method provides possibility for correcting the kinematic model for a whole robotic system with a specific tool mounted on the robot withouts human intervention, which is convenient and easy to automate.

Insertion Results
We proceed to perform the insertion task with the robot. In the experiment, the robot is programmed to perform multiple pin-hole insertion tasks in a position control mode. If the robot experiences small positioning error, the pin can be well aligned with the holes and then successfully inserted into the hole. The diameter of the holes on the aluminum plate hole is inspected as 20.15 mm, and the rod diameter is inspected as 19.85 mm. To insert the aluminum rod into the holes, it is first necessary to determine the relationship between the base frame and the plate. For this purpose, three holes (not on the same line) are selected in the aluminum plate. Then the robot is taught to insert the pin into these holes using a traditional teaching method, and we can obtain the positional relationship of the teaching point relative to the base frame. As shown in Figure 14, in this experiment, we select points H 11 , H 41 and H 16 for teaching the robot. After teaching, we can obtain the positions of the t 11 , t 41 and t 16 relative to the robot base through the forward kinematics with recorded joint angles at these points. Then the position of the point on the i th row and j th column on the plate relative to the base can be obtained through three points, i.e.,: When the robot reaches other positions, we maintain the same orientation for the end-effector as at the first teaching point H 11 . By performing inverse kinematics, the joint angles for the robot moving to each position can be obtained.
It is found that the pin can be smoothly inserted into each hole after calibration. However, with the nominal D-H parameters, the insertion is not smooth and can fail at some points. For example, the close observation at point H 44 before and after calibration is shown in Figure 15. We can observe considerable misalignment between the tip of the pin and the centerline of the hole before calibration. To demonstrate the influence of positioning error correction on the actual robot motion, the joint angles of the robot before and after the calibration to reach the six holes on the third row of the workpiece are listed in Appendices G and H. The difference between the joint angles before and after calibration is shown in Figure 16. We can observe considerable joint angle difference when the corrected kinematic parameters are used to solve the inverse kinematics. Accordingly, the difference between the end-effector pose before and after calibration is displayed in Figure 17. Again, we observe considerable corrections in the X and Y directions and in the α angle which can significantly affect the smoothness of the insertion. We further analyze the corrected misalignment between the pin and the hole using the proposed method. As shown in Figure 18, we can define the orientation deviation as R ab and the position deviation as t ab for marker frame before and after calibration. The position displacements of the tip of the rod before and after calibration are denoted as: where t tip is the position vector of the tip of the pin written in the marker frame. It is noted that the displacement along the direction of the hole does not affect the insertion task. Therefore, we can obtain the misalignment of the pin as follows: where ∆l is the misalignment, and n is the unit direction vector of along the direction of the hole. Figure 19 shows the misalignment corresponding to each hole on the part. In general, the larger the misalignment is, the more difficult it is to insert successfully. In this experiment, the points H 44 , H 45 and H 46 are not inserted successfully. A further observation shows the insertion forces acting on the robot in the vertical direction can be reduced from over 100 N before correction to less 2 N after correction for these holes.

Conclusions
In this work, we propose a method for the improvement of robot accuracy with an optical tracking system. Compared with existing methods using laser trackers, the proposed method has lower cost and is more flexible due to the advantages of the optical tracking system. In both the simulation and the experiment, the influence of the tool on the robot accuracy can be considered in this method, while most existing calibration methods are performed without the tool for the automation tasks. Furthermore, the proposed calibration procedure can be easily automated, in which the errors in the D-H parameters, the robot base position, and the tool position are all corrected. Instead of updating the kinematic parameters directly on the robot controller, the users can incorporate a separate controller to re-calculate the joint angles with the actual values of the kinematic parameters and then to send these joint angles to the robot to complete the motion. The proposed method provides possibility for a comprehensive calibration of a whole robotic system with a specific tool mounted on the robot. The procedure can be completed without human intervention and thus can be easily automated by robot users.
Simulation and experimental studies are performed to demonstrate the effectiveness of the proposed method for a UR10 robot. It is shown that the robot cannot complete an insertion task for multiple holes smoothly with nominal kinematic parameters by teaching a very limited number of points. However, using the proposed method, the robot can successfully complete the same task. This enables us to use the paths generated from offline programming to complete complicated tasks over a large work envelope. Although the simulation and experimental demo are done on a UR10 robot, it is expected that the proposed method can be extended to other industrial and collaborative serial robots. In future research, theoretical analysis on the convergence of the optimization process is necessary to evaluate the reliability of the final solution and using other equipment like a laser tracking system to calibrate the UR10 robot will be investigated for a comparison with the proposed method.

Conflicts of Interest:
The authors declare no conflict of interest.
Appendix A Table A1. Robot joint angles corresponding to 30 data points in the simulation.  Table A3. Robot joint angles corresponding to 30 data points in the experiment.