# Visual-Inertial Navigation System Based on Virtual Inertial Sensors
## 4 Analysis and Experiments of Visual-Inertial Odometry Optimization
### Localization and Mapping Experiments in Degenerated Environments  
To assess the efficacy of the proposed visual-inertial SLAM system aided by the VIMU and VINS-Fusion, we conducted experiments using a JetBot 2.0 quadruped robot fitted with Realsense D435/435i cameras and GPS. GPS was used as the baseline path for our experiments. The collected data were processed and stored on a computer running the Ubuntu 20.04 ROS Melodic system. The experimental setting comprised both indoor and outdoor environments and involved trajectories with effective loop closures, which were designed to comprehensively evaluate and validate the proposed methodology [21]. In Experiment 1, we conducted a benchmark straight-line motion experiment in an indoor environment. The hallway was chosen as the test environment due to its rectangular  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Seq-**} & \multicolumn{2}{c}{**VINS-Fusion**} & \multicolumn{2}{c}{**VINS-Fusion**} & \multicolumn{2}{c}{**Error**} \\ \cline{2-7}  & \(\mathbf{t_{\text{rel}}}\) **(\%)** & \(\mathbf{r_{\text{rel}}}\) (\(\mathbf{\text{\text{\text{\textshape and simple scene with only one feature, which can be considered as a single-degree-of-freedom degenerate scene, as illustrated in Figure 8a. During the experiment, the JetBot robot was manually driven to approach a constant speed along a straight path using the walking gait, and the visual-inertial SLAM system using the VIMU and VINS-Fusion system was used to estimate the robot's position and orientation. The experiment was repeated with different levels of camera shake, induced by attaching weights of different magnitudes to the robot's camera system. The results were compared to those obtained from the VINS-Fusion system, which serve as Table 5 and Figure 8b. Figure 8: (**a**) Real scene of the indoor experimental environment. The red line is the experimental trajectory; (**b**) comparison of the localization performance between VINS and VINS-VIMU; (**c**) localization performance of VINS-VIMU; (**d**) localization performance of VINS-Fusion. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Error** & **VINS-VIMU** & **VINS** \\ \hline Max & 0.0009 & 0.0010 \\ \hline Mean & 0.0021 & 0.0037 \\ \hline Median & 0.0011 & 0.0019 \\ \hline RMSE & 0.007654 & 0.033183 \\ \hline std & 0.00702 & 0.03211 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Error comparison between VINS-VIMU and VINS-Fusion based on GPS baseline. In order to evaluate the accuracy of the SLAM system on the dataset, we used the open-source tool evo, and the absolute trajectory error (ATE) was selected as the evaluation standard to measure the error between the estimated and ground-truth trajectories after running the dataset sequence. The obtained results demonstrate that the proposed system achieved a significant improvement in accuracy. Specifically, the maximum error (Max) decreased on average by 74.3%, the mean error (Mean) decreased on average by 63.6%, the median error (Median) decreased on average by 17.8%, the root means square error (RMSE) decreased on average by 76.9%, and the standard deviation error (Std) decreased on average by 78.1%. These results indicate the effectiveness of the proposed approach in improving the accuracy of SLAM systems [22]. Figure 8c,d show that the VINS-Fusion system performs well in indoor environments, but its positioning error increases significantly when the camera experiences large movements. In comparison to VINS-Fusion, the system proposed in this paper exhibits greater stability and smaller trajectory deviations in dynamic scenarios, as evidenced by the trajectories being closer to the ground-truth straight line. This is because the proposed system can avoid highly distorted trajectories and effectively suppress filter drift by leveraging both the body IMU and VIMU data. In Experiment 2, the selected outdoor environment provided a more complex setting to test the proposed SLAM system. The ground truth is shown in Figure 9a-c.