# A Real-Time Map Restoration Algorithm Based on ORB-SLAM3
## 3 Simulation Results and Performance Analysis
### Quantitative Analysis  
This paper first provides the number of the pose and trajectory length of the map generated after running on a Euroc dataset before and after the improvement of the ORB-SLAM3 algorithm, and according to Equations (13) and (14), the effect of the number of Pose and trajectory length recovery by the algorithm in this paper compared with ORB-SLAM3. \[\sigma_{Pose}=(\frac{\beta}{\alpha}-1)\times 100\% \tag{13}\]  
\[\sigma_{Traj}=(\frac{\gamma}{\mu}-1)\times 100\% \tag{14}\]  
where \(\sigma_{Pose}\) is the effect of the Pose recovery, \(\sigma_{Traj}\) is the effect of trajectory recovery, \(\alpha\) and \(\beta\), \(\mu\) and \(\gamma\) are the number of the Pose and the total length of map trajectory before and after the algorithm improvement. In order to eliminate interference as much as possible and ensure the rationality of the experimental data, the experimental data are the result of taking the median value after running the Euroc dataset ten times, such as Table 1.  
A more complete map can be generated when there are more Poses or fewer discarded frames. The length difference of map trajectory can also intuitively reflect the effect of mapping and the distance consumed by the algorithm initialization. Due to the recovery tracking and mapping of discarded frames during initialization, this algorithm must have a longer map trajectory than ORB-SLAM3. However, in the initialization, due to different motion modes of different datasets, the effect of map restoration in this paper is different. The initialization of the visual-inertial SLAM system needs to meet the following conditions at the same time: the perspective changes slowly, the tracking thread works normally, and the IMU excitation is stable and sufficient. For example, in the MH02 sequence, the initialization of the system can be divided into three stages, namely the vertical reciprocating motion, horizontal reciprocating motion, and horizontal circular motion. Visual-inertial SLAM systems face different challenges at each stage. In the first stage, the local map tracking fails due to the rapid change of perspective, so that the SLAM system cannot create the map. In the second stage, the map cannot be created and the IMU cannot be initialized because the tracking thread is still not working properly. In the third stage, the three conditions for initialization are satisfied, thus completing the computation of the IMU residual, bias and BA optimization of the first part. However, the MAV then landed on the take-off platform, and the lack of excitation of the IMU caused the initialization to fail again. In these three stages, the current ORB-SLAM3 algorithm cannot complete the initialization and loses a lot of initialization information. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Sequence**} & \multicolumn{2}{c}{**Number of Pose**} & \multicolumn{4}{c}{**Trajectory**} & \multirow{2}{*}{**Gains**} \\ \cline{2-2} \cline{4-7}  & **ORBSLAM3** & & & & **ORBSLAM3** & & **Ours** \\ \hline MH01 & 3548 & 3680 & 3.72\% & 78.826 & 83.253 & 5.62\% \\ MH02 & 2207 & 3037 & 41.36\% & 65.517 & 75.288 & 14.91\% \\ MH03 & 2282 & 2698 & 18.23\% & 128.725 & 141.722 & 10.11\% \\ MH04 & 1605 & 2032 & 26.60\% & 91.038 & 102.449 & 12.53\% \\ MH105 & 1789 & 2262 & 26.44\% & 95.522 & 110.080 & 15.24\% \\ V101 & 2800 & 2894 & 3.36\% & 58.413 & 58.828 & 0.71\% \\ V102 & 1592 & 1705 & 7.11\% & 75.478 & 78.727 & 4.30\% \\ V103 & 2000 & 2139 & 6.95\% & 79.127 & 79.935 & 1.02\% \\ V201 & 2183 & 2275 & 4.21\% & 37.368 & 37.721 & 0.94\% \\ V202 & 2269 & 2346 & 3.41\% & 83.744 & 84.165 & 0.50\% \\ V203 & 1810 & 1917 & 6.44\% & 87.076 & 87.570 & 0.57\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of ORB-SLAM3 and proposed algorithm. It includes the comparison and improvement of the number of the Pose and the trajectory length (unit in meters). The Pose is estimated by the SLAM system according to the video sequence, and its number is the same as the number of the Pose in the trajectory file.