# Pose Estimation Utilizing a Gated Recurrent Unit Network for Visual Localization
## 3 Simulation
### Evaluation
Assuming that the sequence of spatial poses from the estimated trajectory is \(P_{i}\) and the sequence of spatial poses from the ground truth is \(Q_{i}\) and \(S\) is the rigid body transformation, the absolute trajectory error matrix at time \(i\) is given as follows  
\[e_{i}=Q_{i}{}^{-1}SP_{i}. \tag{19}\]  
Then, the ATE is defined as follows  
\[ATE=\sqrt{(\frac{1}{n}\sum_{i=1}^{n}\|trans(e_{i})\|^{2})} \tag{20}\]  
Figure 12: Trajectory of KITTI sequences 00 to 10 about ground truth (GT), MVO, MVO with the proposed method (00 to 10 sequence in alphabetical order (**a–k**)). where \(trans\)(\(\left[ \begin{array}{cc}R&t\\ 0&1\end{array} \right]\)) = \(t\). The function \(trans\)(\(\cdot\)) extracts \(t\) using \(T=\left[ \begin{array}{cc}R&t\\ 0&1\end{array} \right]\) as an input parameter. In addition, the relative pose error matrix at time \(i\) over a fixed time interval \(\vartriangle\) is given as follows  
\[F_{i}^{\vartriangle}=(Q_{i}{}^{-1}Q_{i+\vartriangle})^{-1}\Big{(}P_{i}{}^{-1}P_ {i+\vartriangle}\Big{)}. \tag{21}\]  
The RPE for translation \(RPE_{trans}\) and rotation \(RPE_{rot}\) are defined as follows  
\[RPE_{trans}^{i,\vartriangle}=\sqrt{(\frac{1}{m}\sum_{i=1}^{m}||trans(F_{i})||^{ 2})}, \tag{22}\]  
\[RPE_{rot}^{i,\vartriangle}=\frac{1}{m}\sum_{i=1}^{m}\vartriangle\Big{(}rot \Big{(}F_{i}{}^{\vartriangle}\Big{)}\Big{)} \tag{23}\]  
where \(rot\)(\(\left[ \begin{array}{cc}R&t\\ 0&1\end{array} \right]\)) = \(R\). The function \(rot\)(\(\cdot\)) extracts \(R\) using \(T=\left[ \begin{array}{cc}R&t\\ 0&1\end{array} \right]\) as an input parameter and \(\vartriangle R=arccos(\frac{trace(R)-1}{2})\) where \(trace(\cdot)\) is the sum of components on main diagonal of square matrix. Table 1 shows the simulation results obtained for the KITTI sequences 00 to 10. The values corresponding to 'Diff' in Table 1 are the values obtained by subtracting the error value of the MVO from the error value obtained with the proposed method. The value marked in red is the amount of improvement. With the proposed method, the translation error is decreased with KITTI sequences 00, 02, 03, 05, 08, 10 as compared to the MVO. The rotation error is decreased with KITTI sequences 00, 02, 05, 06, 08, 10. The ATE (m) is decreased with KITTI sequences 00, 01, 02, 04, 05, 06, 07, 08, 10. The RPE (m) is decreased with KITTI sequences 07, 08, and unchanged with KITTI sequences 02, 03, 04, 05, 06, 09. The RPE (deg) is decreased with KITTI sequences 00, 02, 05, 06, 08, 09, 10. On average, errors of all metrics except the RPE (m) are reduced. For the RPE (m) metric, the performance obtained with the proposed method is similar to the classical MVO. On average, the translation error is reduced as much as 1.426% and the rotation error is decreased as much as 0.805 deg/100 m and the ATE is reduced as much as 12.752 m, and the RPE is decreased as much as 0.014 deg. Using the hybrid method for yaw correction, the DPC-Net [27] combining learning-based VO with the classical VO, for the KITTI 00, 02, and 05 sequences, 30.06% improvement of translation error and 24.98% enhancement of rotation error can be achieved as compared to the classical VO. Comparing proposed method with the DPC-Net, the proposed method for the KITTI 00, 02, and 05 sequences demonstrates 34.64% improvement of translation error and 43.75% enhancement of rotation error as compared to the classical VO. However, the RPE (deg) for KITTI sequence 01 is slightly increased as much as 0.007 deg. This is due to incorrect estimation with the GRU network in the timestep when the estimated value by the classical VO is significantly different from the previous rotation tendency. The increment of RPE can be solved by fine-tuning the GRU network and adjusting the parameters \(\alpha,\gamma\). In Table 1, the comparison with the Deep VO [23], that is one of the learning-based VO methods, is presented. The results shown in Table 1 are indicative of the better performance of the classical VO than the Deep VO.