## 3 Proposed Error Compensation Method
### The Hand-Eye Calibration  
The initial vision-based robot involved determining the coordinate relationship between the robot coordinate and the sensor coordinate [21; 22]. Common setup of the sensor can be located at a fixed position or can be mounted on the tool of the robot according to a specific application. In this work, the sensor was attached to the tool of the robot for a better field of view in the workspace. The setup of the sensor was fixed on that position during the calibration. If there was any rearrangement about the setting, the calibration was implemented again. Figure 4 represents the coordinate frames used to perform the hand-eye calibration in this paper, where (B), (E), (C) and (W) are the coordinates of the robot base, the robot, the camera, and the world, respectively. The relationship between each coordinate can be described by a homogenous transformation matrix. In the literature, several approaches have been published to solve the hand-eye calibration; the problem yields a homogeneous matrix equation of the \(\textbf{{A}}\textbf{{X}}=\textbf{{X}}\textbf{{B}}\) form as the following:  
\[\textbf{{r}}_{a}\textbf{{r}}_{x}=\textbf{{r}}_{x}\textbf{{r}}_{b}\, \tag{5}\]  
\[(\textbf{{r}}_{a}-\textbf{{i}}_{3})\textbf{{r}}_{x}=\textbf{{r}}_{x}\textbf{{r }}_{b}-\textbf{{t}}_{a}\, \tag{6}\]  
where \(\textbf{{i}}_{3}\) is \(3\times 3\) unit matrix \(\textbf{{r}}_{a}\), \(\textbf{{r}}_{b}\in\) SO3 are rotation matrices corresponding to the robot and camera transformation, respectively. \(\textbf{{r}}_{x}\in SO3\,\textbf{{t}}_{x}\ \in R^{3}\) are the rotation matrix and translation matrix, respectively, which denotes \(\textbf{{X}}\). The linear optimization method is a common solution to solve this  
Figure 4: Coordinates for hand-eye calibration. equation based on the assumption that \(\mathbf{A},\mathbf{B}\) satisfy the rigid transformation or their rotation angles in Equation (5) are equal. However, in most cases, their \(\mathbf{A},\mathbf{B}\), and \(\mathbf{X}\) might not satisfy rigid transformation. A direct solution based on the iterative computation with Jacobian optimization is proposed by [PERSON] et al. [23]. Given multiple pairs, \((\mathbf{A}_{i},\mathbf{B}_{i})\)\(for\)\(i=1,\ldots,n\), where \(i\) represents the sequence number of the equation \(\mathbf{AX}=\mathbf{XB}\). The problem of hand-eye can be stated using the properties of Kronecker product (8), the Equations (5) and (6) can be written as:  
\[F(i)=\left(\mathbf{r}_{a}(i)\otimes\mathbf{i}_{3}-\mathbf{i}_{3}\otimes\mathbf{r}_{b}^{j}(i) \right)\mathbf{vec}(\mathbf{r}_{X})\, \tag{7}\]  
\[G(i)=\left(\mathbf{r}_{a}(i)-\mathbf{i}_{3}\right)\mathbf{t}_{ai}-\mathbf{t}_{X}\mathbf{t}_{bi}+\ \mathbf{t}_{ai}\, \tag{8}\]  
where \(vec\) is an operation, which stretches a matrix as the row's direction, \(vec(R_{X})\in\mathbb{R}^{9}\) is the vector obtained by stacking the columns of \(\mathbf{t}_{X}\), and \(F(i),\ G(i)\) are the vectors of \((9\times 1)\) and \((3\times 1)\) separately. Find the rotation \(\theta_{min}\in R^{3}\) and the translation \(\mathbf{t}_{min}\in R^{3}\) for which the error function \(L(\mathbf{\theta},\mathbf{t})=\min\sum_{i}\left[\left\|F(i)\right\|^{2}+\left\|G(i) \right\|^{2}\right]\) attains its global minimum, where \(L(\mathbf{\theta},\mathbf{t})\) is the objective function of optimization for solving the hand-eye problem. Let \(J(i)\) be the Jacobian formula for the object function, \(H=\ \left[F(i),G(i),\ldots,F(n),G(n)\right]^{T}\) can be represented of multi-equations such as Equations (7) and (8). Then the interactive formula for optimization is given as:  
\[\mathbf{J}\mathbf{\Lambda_{X}}=\ -\mathbf{H}\, \tag{9}\]  
\[\mathbf{X^{n+1}}=\ \mathbf{X^{n}}+\Delta_{\mathbf{X}}. \tag{10}\]  
The transformation \(\mathbf{X(\theta,t)}\) is then the solution that _best fits_ the multiple pairs \((\mathbf{A}_{i},\mathbf{B}_{i})\)\(for\)\(i=1,\ldots,n\). A linear solution can be found using singular value decomposition (SVD) or using a pseudo-inverse.