# Fusion-Based Localization System Integrating UWB, IMU, and Vision
## 3 Tightly Coupled UWB/IMU Fusion Localization Based on Sliding-Window Factor Graph
### UIWB/IMU Fusion Localization
The system was developed under the Robot Operating System (ROS) framework using Visual Studio Code v. 1.100.2 as the primary development tool. The ROS is an open-source meta-operating system designed specifically for robotics software development, featuring strong modularity and cross-platform compatibility. It provides hardware abstraction and device driver support for low-level robotic components, and integrates an efficient message-passing mechanism with a comprehensive toolchain and extensive open-source libraries for software retrieval, building, development, and execution. For multi-sensor fusion localization tasks, ROS offers unified data encapsulation and high-precision timestamp management for heterogeneous sensor inputs, enabling effective data alignment and temporal synchronization across different sensors. Based on this, the ROS built-in timestamp mechanism was employed to achieve time synchronization between monocular VIO and UWB measurements during fusion. In addition, the ROS integrates a powerful 3D visualization toolkit, RViz, which enables real-time 3D visualization of localization results by subscribing to trajectory topics published by the VIO module. This provides intuitive and effective support for system debugging and performance evaluation. ### Experiment and Analysis

#### 5.2.1 Experimental Scenario

To evaluate the positioning accuracy of the stereo VIO/UWB fusion system, the experiment was conducted in an underground parking garage, which is a common indoor localization environment, as shown in Figure 5. The environment is relatively open with good line-of-sight conditions, making it suitable for validating the system's localization performance. As shown in Figure 6, the test subject walked along a rectangular path measuring 30 m in length and 4 m in width. Figure 4: Integration demonstration. Four UWB modules were used in total, with three serving as fixed anchors and one mounted on the test subject as a mobile tag. The test subject moved at an approximately constant speed in a clockwise direction while collecting data. #### 5.2.2 Localization Accuracy Evaluation Criteria

Localization accuracy is typically evaluated using the root mean square error (RMSE), which quantifies the average deviation between the estimated trajectory and the ground

Figure 5: Underground garage environment. Figure 6: True trajectory of the underground garage. truth. It reflects the overall error magnitude and provides a clear indication of the average trend in localization deviations. It is defined as follows:

\[RMSE=\sqrt{\sum_{i=1}^{n}\left(x_{i}-\hat{x}_{i}\right)^{2}+\left(y_{i}-\hat{y}_{ i}\right)^{2}} \tag{27}\]

Here, \(\left(x_{i},\,y_{i}\right)\) denotes the ground-truth position at time step \(i\), and \(\left(\hat{x}_{i},\,\hat{y}_{i}\right)\) represents the corresponding estimated position. \[CDF(y)=P(e\leq Y) \tag{28}\]

#### 5.2.3 Results and Analysis

To evaluate the effectiveness of the proposed method, four comparative experiments were designed: (1) UWB-only localization, (2) UWB/IMU fusion localization, (3) stereo VIO-based localization, and (4) stereo VIO/UWB fusion localization. The UWB data collected during the experiment were processed and compared against the ground-truth trajectory, as illustrated in Figure 7a. It can be observed that the UWB system provides higher localization accuracy when the user is close to the anchor nodes, but as the distance from the anchors increases, the trajectory begins to drift, which is particularly evident along the longer sides of the walking path. The maximum localization error in this scenario reaches 0.8446 m.

Figure 7: (**a**) The UWB-only localization results and the ground-truth trajectory; (**b**) the stereo VIO localization results and the ground-truth trajectory. Using the stereo VIO model, estimated positions were obtained and compared with the actual walking trajectory, as shown in Figure 7b.