# Oscillating Saw Calibration for mandibular Osteotomy Robots
## 4 Results
### Simulation Experiment  
#### 4.1.1 Data Acquisition Method and Error Evaluation Standard  
Randomly generate 100 groups of data \({}^{E}\!T^{k}_{B}(k=1,2,\cdots,100)\) according to the DH parameters of the manipulator. The first 50 groups of data represent the pose of the manipulator required for head-eye calibration, and the last 50 groups of data represent the pose of the manipulator required for TSPP calibration. The real value of the transformation matrix of the target frame relative to the manipulator's end-effector frame during head-eye calibration is randomly generated as \({}^{E}\!T_{O}\). The real value of the transformation matrix of the vision frame relative to the manipulator's base frame during head-eye calibration is randomly generated as \({}^{B}\!T_{C}\). The real value of the transformation matrix of the tool frame relative to the manipulator's end-effector frame during the TSPP calibration is randomly generated as \({}^{E}\!T_{tool}\). After that, the transformation matrix of the target frame relative to the vision frame in the process of head-eye calibration can be generated as \({}^{C}\!T^{k}_{O}(k=1,2,\cdots,50)\) and the transformation matrix of the tool frame relative to the vision frame in the process of the TSPP calibration can be generated as \({}^{C}\!T^{k}_{tool}(k=51,52,\cdots,100)\). Let \((r,t)\) represent the axis angle and translation vector of \({}^{C}\!T^{k}_{O}(k=1,2,\cdots,50)\) and \({}^{C}\!T^{k}_{tool}(k=51,52,\cdots,100)\). Let \((r^{\prime},t^{\prime})\) represent the result after adding Gaussian noise. \[r^{\prime}=r+d\Delta r,t^{\prime}=t+d\Delta t \tag{14}\]where \(d\) is the noise gain, \(\Delta r\) follows a Gaussian distribution with a mean value of 0 and a variance of \((1^{2},1^{2},1^{2})\), and \(\Delta t\) follows a Gaussian distribution with a mean value of 0 and a variance of \((20^{2},20^{2},20^{2})\). The error calculation method follows two principles. The first principle is that the error has clear physical significance. The second principle is that when there is no position error in the result of the head-eye calibration, the error between the original method and the improved method for TSPP calibration should be the same. To this end, this paper defines the error in the following way. As shown in Figure 5, let \(p_{a}\) and \(p_{b}\) represent two different states during the process of obtaining the point position. \({}^{B}\!p_{tool}^{a}\) and \({}^{B}\!p_{tool}^{b}\), respectively, represent the position of the tool frame origin point relative to the manipulator's base frame in two different states. \({}^{C}\!p_{tool}^{a}\) and \({}^{C}\!p_{tool}^{b}\), respectively, represent the position of the tool frame origin point relative to the vision frame in two different states. \({}^{B}\!R_{E}^{a}\) and \({}^{B}\!R_{E}^{b}\), respectively, represent the rotation matrix of the manipulator's end-effector frame relative to the manipulator's base frame in two different states. \({}^{B}\!p_{E}^{a}\) and \({}^{B}\!p_{E}^{b}\), respectively, represent the position of the manipulator's end-effector frame relative to the manipulator's base frame in two different states. \({}^{B}\!R_{C}\) and \({}^{B}\!p_{C}\), respectively, represent the rotation matrix and translation matrix of the result obtained by head-eye calibration. \[{}^{B}\!p_{tool}^{a}={}^{B}\!R_{E}^{a}\!P_{tool}+{}^{B}\!p_{E}^{a}={}^{B}\!R_{C} {}^{C}\!p_{tool}^{a}+{}^{B}\!p_{C},\] \[{}^{B}\!p_{tool}^{b}={}^{B}\!R_{E}^{b}\!P_{tool}+{}^{B}\!p_{E}^{b}={ }^{B}\!R_{C}{}^{C}\!P_{tool}^{b}+{}^{B}\!p_{C} \tag{15}\]  
then  
\[{}^{B}\!p_{tool}^{a}-{}^{B}\!p_{tool}^{b}=\big{(}{}^{B}\!R_{E}^{a}-{}^{B}\!R_{ E}^{b}\big{)}\!E\!p_{tool}+{}^{B}\!p_{E}^{a}-{}^{B}\!p_{E}^{b}={}^{B}\!R_{C}({}^{C}\!p_{tool}^{a}-{ }^{C}\!p_{tool}^{b}) \tag{16}\]  
Theoretically, if there is no rotation error in head-eye calibration, the true value of \({}^{B}\!p_{tool}^{a}-{}^{B}\!p_{tool}^{b}\) can be obtained.