**5. New Localization Module: GNSS/SLAM Fusion**

One of the research lines that our group wants to develop in the future is the fusion of SLAM algorithms with GNSS-based systems. The motivation for this fusion is the complementarity of both localization systems since SLAM algorithms need relatively close landmarks to extract positional information—which can cause occlusions and multi-path problems to GNSS positioning—while GNSS systems work better in clear areas that are challenging for SLAM algorithms because of landmark scarcity. As a starting point for our future research and in order to demonstrate the versatility of our framework, we developed a new localization system based on GNSS/SLAM fusion. Figure 7 shows the ROS nodes scheme of our new localization module, and Figure 8 details its connection with the rest of the system. In our solution, we fuse the positions obtained by the two systems using a Kalman filter in which these positions will be considered asynchronous observations and the odometry is used as a control signal in the prediction phase of the filter. This module allows off-map localization, so it would be difficult to integrate it with the navigation stack but its integration is straightforward using our framework. We next describe each subsystem shown in Figure 7.

**Figure 7.** ROS nodes scheme that shows the combination of subsystems that make up the new localization module that will be tested using our framework. This scheme corresponds to the "global navigation satellite system (GNSS)-a Monte Carlo localization (AMCL) fusion" node shown in Figure 8. The "Kalman filter" node uses odometry as a control action, and odometry-GNSS and pose AMCL as observations.

**Figure 8.** *ROS nodes* scheme that shows the second implementation of our framework which incorporates our novel GNSS fusion localization algorithm. This new implementation has been completed just substituting the previous localization module and adding the GNSS sensor driver. We show these modifications with solid fill in the nodes added or replaced with respect to Figure 3.

#### *5.1. AMCL Subsystem*

One of these subsystems is AMCL described in the previous section. To properly implement the fusion, we need to pay attention to the variances that this subsystem provides, associated to each estimated pose (Section 4.2.1) because they provide information about the confidence of the solution. This information will be used by the Kalman filter in the correction step, and it also will be useful for the integrity monitoring system.

#### *5.2. GNSS Subsystem*

The GNSS system provides geolocalization in world coordinates (world frame) but to perform the fusion with the subsystem described above we need to convert the global coordinates to map coordinates. For this we use the navsat node available in the ROS robot localization package [41]. In the initialization step, this node receives a position expressed in the frame we want to use as reference—in our case the position calculated through AMCL depicted as a green dotted line in Figure 7—and generates a *T* transformation between the pose in world frame to the map frame. Then *T* is applied to all the measurements made by the GNSS. By using only the navsat node, we could only read the GNSS fix and generate a 2D position in the map frame, but without orientation. To overcome this issue we generated a new ROS node called odometry GPS (Figure 7) in which we receive the velocity fix provided by the GNSS and the position and the *T* calculated by navsat. The output of this node is the orientation in the map frame, obtained using the velocity vector (provided by GNSS velocity fix) and the transform between the global frame and the map frame given by the navsat node.
