# Using Full Pose Measurement for Serial Robot Calibration
## 7 Simulation  
All calculations were performed in Matlab. Built-in nonlinear least-square (NLS) optimizer \(Isqnonlin\) with default input parameters was used to minimize the error function \(Err_{pos}\) in (10), \(Err_{rot}\) in (17) and \(Err_{full}\) in (18). As a starting point for all optimizations, default DH parameters were used. To test the proposed calibration method, a kinematic model of a 7 degrees-of-freedom (DoF) industrial robot arm KUKA LWR 4+ was used. The robot's default DH parameters \((\epsilon_{0},\mathbf{\alpha}_{0},\mathbf{r}_{0},\mathbf{d}_{0})\) are provided in Table 1 (all angular parameters are in degrees and all linear in millimeters). Ground truth (GT) parameters used in simulations were defined as a sum of the defaults and deviations, for example \(\mathbf{\epsilon}_{GT}=\epsilon_{0}+\Delta\epsilon\). Deviations from the default DH parameters are provided in Table 2. Two sets of arbitrarily chosen deviations were used in simulations: small deviations \((\Delta\mathbf{\alpha}_{1},\Delta\mathbf{r}_{1},\Delta\mathbf{d}_{1})\) and large deviations \((\Delta\mathbf{\alpha}_{2},\Delta\mathbf{r}_{2},\Delta\mathbf{d}_{2})\). GT parameters were used to generate noisy sensor data \(\mathbf{G}_{k}\) from (7) and \(\mathbf{g}_{k}\) from (8)  
\[\mathbf{G}_{k}=\mathcal{N}_{k}\ \mathbf{\Omega}\ \mathbf{R}_{k}(\mathbf{\theta}_{k},\mathbf{ \kappa}_{GT},\mathbf{\epsilon}_{GT}) \tag{20}\]  
and  
\[\mathbf{g}_{k}=\mathbf{\Omega}\mathbf{t}_{k}(\mathbf{\theta}_{k},\mathbf{\kappa}_{GT},\mathbf{ \epsilon}_{GT},\mathbf{r}_{GT},\mathbf{d}_{GT})+\mathbf{\tau}+\mathbf{\zeta}_{k} \tag{21}\]  
where \((\mathbf{\Omega},\mathbf{\tau})\) is arbitrarily selected transformation between robot and sensor frame, \(\mathbf{\zeta}_{k}\) is 3D positional Gaussian noise with standard deviation \(\sigma_{p}\), and \(\mathbf{\zeta}_{k}\) is 3D angular Gaussian noise with standard deviation \(\sigma_{a}\), which was used to generate small random rotations. \[\mathcal{N}_{k}=\mathbf{R}_{ZYX}(\mathbf{\zeta}_{k}). \tag{22}\]In Figure 1a, examples of histograms for \(x\) component of vectors \(\mathbf{\zeta}_{k}\) are shown (histograms for \(y\) and \(z\) components look similar). In Figure 1b, histograms of corresponding angles of rotation \(\beta\) of small random rotations \(\mathcal{N}_{k}\) are plotted. Note that histograms of \(\mathbf{\zeta}_{k}\) are well approximated by a Gaussian distribution while non-symmetric histograms of \(\beta\) are well approximated by a Fisher-Bingham-Kent (FBK) distribution [32]. Similar histograms of angles were observed for experimental data acquired with a marker-based pose measuring system, see Figures 1 and 3 in [33]. and the transformation \((\mathbf{\Omega},\mathbf{\tau})\) was appropriate for each of the three calibration procedures and (for Method 2 and 3) the appropriate Registration 1 or 2. Both calculated means \(\langle\eta_{j}\rangle\) and \(\langle q_{j}\rangle\) were used as metrics to gauge a performance of tested procedures. These steps were repeated for each of the selected noise level \(m=1,\ldots,M_{n}\) and both sets of GT parameters corresponding to two deviation vectors: small \((\Delta\mathbf{\kappa}_{1},\Delta\mathbf{r}_{1},\Delta\mathbf{d}_{1})\) and large \((\Delta\mathbf{\kappa}_{2},\Delta\mathbf{r}_{2},\Delta\mathbf{d}_{2})\), as shown in Table 2. \(M_{n}=16\) noise levels were equally spaced between zero and 0.15 (degrees for \(\sigma_{a}\) and millimeters for \(\sigma_{p}\)). In order to estimate a variability of the calculated metrics, all the above calculations were repeated for \(N_{rep}=25\) different realizations of noise (different sequences of pseudo-numbers). Thus, for each \(i\)-th instance of noise and each \(m\)-th pair of noise levels \(\left(\sigma_{a},\sigma_{p}\right)_{m}\), the end-effector errors were calculated: \(v_{m,i}=\langle q_{j}\rangle\) for positional error and \(\rho_{m,i}=\langle\eta_{j}\rangle\) for angular error.