# A Research Platform for Autonomous Vehicles Technologies Research in the Insurance Sector
## 3 Software Architecture
### Localization  
Localization is a critical task for an autonomous vehicle. In order to navigate safely, the vehicle must be localized accurately and with robustness. For this reason, the proposed architecture exploits different sensors and algorithms to perform this task, which can be divided into two types: local and global localization. The local localization task, which is commonly known as vehicle odometry, computes the movement of the vehicle with respect to its origin position by measuring its translation and rotation. These methods are typically very accurate locally but may suffer from drift, so they are unsuitable for long-term localization. In the proposed platform, two different odometry methods are used:  
1. Wheel odometry: This method makes use of the velocity and the steering angle provided by the vehicle. By integrating these measurements, the wheel odometry algorithm is able to provide the translation and rotation of the vehicle. 2. LiDAR odometry: In addition to the wheel odometry method, the proposed approach also includes an exteroceptive odometry method based on LiDAR 3D point clouds. The LiDAR odometry method integrated in the platform is LOAM [7], which is able to produce very reliable odometry in real time while also generating a 3D map of the scenario. Although the proposed odometry methods have a fast update rate and a high local accuracy, they are insufficient for an autonomous vehicle. On the one hand, local methods suffer from drift because error is accumulated. On the other hand, the localization provided by local methods is referenced to the point at which the vehicle started to move, so they do not provide localization coordinates referenced to a global common frame or a digital map. This global reference is required to navigate in the real world. For this reason, two different global localization methods are also integrated, with the aim of providing the vehicle position with a global reference. 1. GNSS localization: GNSS sensors are currently the most common global localization sources in both autonomous and human-driven cars. This information is also combined with the data provided by the IMU in order to also estimate the orientation of the vehicle. The advantage of these sensors is that the received data do not require any significant processing, other than converting the latitude and longitude coordinates to UTM. However, the precision of the obtained position is often reduced by multi-path propagation effects caused by buildings, or even a loss of signal due to areas such as tunnels or urban canyons. For this reason, although GNSS-based localization provides global positioning, it is not sufficient alone to provide the robust and accurate positioning that an autonomous vehicle requires. 2. AMCL: The adaptive Monte Carlo localization (AMCL) algorithm [8] is capable of computing the global pose of the vehicle inside a reference map. This method, which is based on a particle filter, requires three different inputs: the global map of the area, the current LiDAR measurement and the local odometry of the vehicle. The localization process consists of updating the particle weights based on the cost of matching the LiDAR measurement with the map at the pose given byeach particle. Local odometry is used to propagate the particles in the prediction step. The final estimation is computed from the posterior represented by the particle set. Each of the different methods proposed for local and global localization has its own benefits and drawbacks. On the one hand, odometry methods are able to provide high local accuracy but suffer from drift, and the obtained pose is not referenced to a global frame. On the other hand, global localization methods are typically inferior in terms of precision and may suffer from jumps and inconsistent estimations. In this architecture, we propose a fusion algorithm based on the H infinite filter [9] to combine the multiple localization sources available in the vehicle, thus exploiting their strengths and compensating their weaknesses.