## 4 Comprehensive Performance Evaluation
### Indoor Environment
#### 4.1.1 Localization  
Figure 4 displays the ground truth of the robot poses obtained from one of the indoor datasets (I3). Other datasets have similar trajectories. The absolute trajectory error (ATE) and relative pose error (RPE) are utilized to evaluate SLAM algorithms [26]. ATE measures the difference between the actual and estimated values of camera poses, directly showing the advantages and disadvantages of the algorithm. Relative pose error is a measure of the difference between the estimated pose and the ground truth pose at each point in time along the trajectory. In addition, SE(3) transformation parameters are calculated using the Umeyama algorithm [27] to align the two values.  
Four metrics are chosen to assess the algorithm, comprising the maximum value (MAX), mean value (MEAN), root mean square error (RMSE), and standard deviation (STD).  
The RMSE can quantify the accuracy of the constructed trajectory through the following mathematical expression  
\[RMSE=\sqrt{\frac{\sum_{t=1}^{n}\left(X_{t}-\widehat{X}_{t}\right)^{2}}{n}}, \tag{7}\]  
where \(\widehat{X}_{t}\) represents the ground truth of the localization of the mobile robot, \(X_{t}\) is the measured value, \(n\) is the total number of positions, and \(t\) stands for the serial number.  
The STD reflects the degree of stability of the build trajectory error and the mathematical expression is  
\[\sigma=\sqrt{\frac{\sum_{t=1}^{n}\left(X_{t}-\overline{X}_{t}\right)^{2}}{n-1 }}, \tag{8}\]  
where \(\overline{X}_{t}\) is the mean value.  
Additionally, Gmapping serves as an extra reference. However, given that Gmapping is a 2D LiDAR SLAM algorithm utilizing odometry as an additional input, its involvement is limited to the evaluation of localization.  
Figure 4: The ground truth of the robot poses obtained from one of the indoor datasets (I3).  
The results of the metrics ATE (with SE(3) Umeyama alignment) are shown in Table 1. It is obvious that in indoor environments, ORB-SLAM3 has smaller errors, highlighted in bold font, and outperforms other methods. Moreover, ORB-SLAM3 also demonstrates smaller standard deviation, indicating higher stability for localization. Due to the smooth surface of the indoor floor, the robot is susceptible to slipping, leading to inaccurate mileage counting values. Consequently, this issue adversely impacts the precision of the Gmapping algorithm.  
As illustrated in Figure 5, we conducted a comparison of RPE in an indoor environment (I3), unveiling the discernible impact of loop closure on ORB-SLAM3 and SC-LeGO-LOAM, respectively. Analysis of the four sub-figures allows us to draw the following conclusions. (1) In indoor environments, loop closure detection effectively corrects the results of the two SLAM algorithms, enhancing their accuracy and robustness. (2) The RPE of Visual SLAM is positively correlated with the robot's speed and changes in the field of view, with the most pronounced performance observed in Figure 5a. The local maximum values occur at corners, while the RPE approaches zero in the initial and final static states. (3) Conversely, the correlation of LiDAR SLAM's RPE is relatively inconspicuous. We attribute this to the LiDAR's 360-degree horizontal range, which scans the operator behind it, introducing a different dynamic.