A Probabilistic-based Drift Correction Module for Visual Inertial SLAMs

Positioning is a prominent field of study, notably focusing on Visual Inertial Odometry (VIO) and Simultaneous Localization and Mapping (SLAM) methods. Despite their advancements, these methods often encounter dead-reckoning errors that leads to considerable drift in estimated platform motion especially during long traverses. In such cases, the drift error is not negligible and should be rectified. Our proposed approach minimizes the drift error by correcting the estimated motion generated by any SLAM method at each epoch. Our methodology treats positioning measurements rendered by the SLAM solution as random variables formulated jointly in a multivariate distribution. In this setting, The correction of the drift becomes equivalent to finding the mode of this multivariate distribution which jointly maximizes the likelihood of a set of relevant geo-spatial priors about the platform motion and environment. Our method is integrable into any SLAM/VIO method as an correction module. Our experimental results shows the effectiveness of our approach in minimizing the drift error by 10x in long treverses.


Introduction
Positioning plays a crucial role across a diverse array of applications within the realm of robotics and platform autonomy.At its core, dead reckoning stands out as a leading solution for determining the position of a mobile platform in environments where GPS signals are unavailable or unreliable.This method relies on Markovian state estimation principles, wherein the current position is inferred based on the previous state.However, due to the incremental nature of positioning updates and the inherent noise present in sensor measurements, dead reckoningbased techniques, including both inertial and visual odometry, are susceptible to accumulating errors over time.Consequently, while dead reckoning offers a valuable means of navigation in GPS-denied scenarios, mitigating error accumulation remains a significant challenge in enhancing the accuracy and reliability of such positioning methods.
Various techniques, including sensor fusion and Bayesian filtering such as the Kalman filter Bresson et al. (2015), have been employed to mitigate drift errors.Earlier vision-based methods like those proposed by Horn and Schmidt (1995); Srinivasan et al. (1997) address dead-reckoning errors, while ORB-SLAM Mur-Artal et al. (2015) offers real-time monocular SLAM functionality for both indoor and outdoor settings.VINS- MONO Qin et al. (2018), integrates images with inertial measurements for relative positioning.Despite incorporating heuristics like loop closure Williams et al. (2009) to reduce errors such as drift, reliability diminishes when errors accumulate excessively over time, leading to trajectory drift from the true position.This challenge persists, particularly in large-scale environments, due to the accumulative nature of Markovian estimation Kerl et al. (2013).There are also some research papaers that study the effect of using GPS in SLAM or VIO setting to improve the positioning accuracy.For example, Kiss-Illés et al. (2019) proposes an augmented version of ORB-SLAM which fuses GPS and inertial data to make the algorithm capable of dealing with low frame rate datasets.Schleicher et al. (2009) studied a realtime hierarchical (topological/metric) SLAM system that is exclusively based on the information provided by both a low-cost, wide-angle stereo camera and a low-cost GPS in large-scale outdoor urban environments.Alsayed et al. (2018) used a Ensemble Multi Layer Perceptron (EMLP) model designed specifically for 2D likelihood SLAM methods.The EMLP model estimates the erors based on the liklihood distribution which makes it independent of the sensor used.This paper introduces a probabilistic drift correction module tailored for real-time positioning applications.It can easily be plugged in into various relative positioning methodologies.The module operates under the premise that location estimates obtained from the positioning pipeline are inherently uncertain and thus treated as stochastic variables.At each epoch, we define probability density function over the SLAM's estimates to eventually build a unified multivariate distribution.The module incorporates geospatial priors , as probability distribution, about the characteristic of the platform's motion such as heading, and the surrounding environment into this multivariate framework.Estimating the mode of the multivariate distribution is equivalent to minimizing the accumulated drift error in the SLAM estimate.Section 3 discusses our methodology in detail and section 4 evaluates our proposed method in different scenarios.This differential representation removes the dependency on the reference frame selection but contains the drift effect.The geometric differential representation introduces the requirement for a known initial position and orientation as initial conditions to set up a differential system of equations introduced later in the discussion.Using two consecutive epochs from ∆Γ, we convert the motion vectors into polar coordinates ϕt = arctan2(dyt, dxt),

Related Work
(1) and define angular motion at t as αt = ϕt − ϕt−1 ∈ [−π, π].mt ∈ R in this representation becomes the motion magnitude at t. Due to measurement uncertainty, we assume that at t, platform angular velocity, X1, and true magnitude, X2 are random variables with Gaussian distributions X1 ∼ N (µ1 = αt, σ 2 1 ) and X2 ∼ N (µ2 = mt, σ 2 2 ) respectively.These two distributions represent observables in our module.Spatial knowledge of the environment or object motion, represented by additional random variables, can significantly aid in reducing drift error when integrated into our module.Traversable regions within the spatial coverage, such as roads or walkways, are particularly useful for correcting drift errors and is obtained from sources like OpenStreetMap contributors (2017).These regions are typically represented as vectors in Geospatial Information Systems (GIS), which is rasterized for analysis.However, due to the complexity of the vector shapes, using an explicit function for parametric distribution isn't always feasible.To address this, in our paper, we convert rasterized paths into an implicit function, akin to those used in fluid dynamics Sussman and Fatemi (1999) for analyzing moving fronts.This implicit function, depicted in Figure 1, is based on the distance function (D), yielding a distribution where X3 ∼ N (µ3 = 0, σ 2 3 ) where σ3 modeling positioning uncertainty in the GIS map.Another example of a useful assumption is motion constraints, such as the heading preservation, H, that is added to the random variable set.This constraint assures that the current heading direction does not change radically between consecutive epochs.The random variable associated with this constraint is defined to follow normal distribution like the previous motion-related random variables X4 ∼ N (µ4 = 0, σ 2 4 ), and it shares the same calculation procedure as in (1).
In our multivariate recipe, each distribution discussed above contains useful beliefs about the environment and the traversed trajectory at time t, providing a practical utility to exploit these priors simultaneously.Considering independence between random variables, the multivariate distribution can be written as: where each term in this equation generates a spatial distribution that is visualized in Fig. 2. Having formed the joint prior distribution, recursive filtering is applied to yield a posterior probability density function.This procedure is statistically equivalent to estimating the position as the distribution mode.Considering the model in 3, the maximization is more tractable when a negative log-likelihood approach converts the problem to a minimization problem.Therefore, (3) becomes: where wi ∈ (0, 1] is used to weigh the contribution of each constraint depending on their reliability in obtaining the corrected position estimate.The solution to this equation is computed by gradient descent.

Experiments
The experiments in this section use VINS-MONO, a visual and inertial SLAM for the relative positioning pipeline, to generate Γ.The data is recorded on a smartphone using the MarsLogger tool Huai et al. (2019) that records images at 30Hz and IMU measurements at 100Hz synced to the same clock source.We collected three scenarios containing trajectories with sharp turns, long straight traverses, and loop closures to test the proposed drift correction module to SLAM.
To resolve for the mode of the proposed multivariate distribution depicted in 4, we used PyTorch Paszke et al. (2017) to perform Stochastic Gradient Decent Bottou et al. (1991) optimization with learning rate of 0.01.For taking the derivative of the distance transform grid depicted in 1, bilinear interpolation is used to estimate the derivatives for non-discrete coordinates where derivative is not directly available from the grid.
The proposed trajectories in Fig. 3 qualitatively follow the ground truth in all testing scenarios.However, the instability in the proposed trajectories occurs due to the competing effect of having different terms in the mixture model.One can perform an ablation study to choose the correct distribution weights wi and the model's uncertainty parameters σi.
Table 1 compares the closing distances between the estimated trajectories, using our module and SLAM only, and the reference trajectory generated from the GPS readings.The labels in the first column of the table respectively correspond to the labels in Fig. 3.We can see that the drift correction module successfully overcomes the drift error by ten to twenty times for long traverses.For the loop closure example, the results are similar, yet as observed from the qualitative results, the maximum error is higher.

Conclusion
This paper proposes a differential geometric correction module for the drift error in localization and navigation pipelines, such as SLAM or VIO.The drift error results in significant deviation, especially when the platform traverses large-scale environments.The proposed drift correction module formulates the platform positioning problem as a mode seeking of a multivariate probability distribution generated from differential geometric observations.This strategy and the independence of the module from the SLAM approach make the proposed drift correction to be used by most SLAM algorithms without difficulty.
The results for various scenarios show the module successfully corrects the drift.
Positioning systems such as VIOQin et al. (2018); Forster et al. (2014) and SLAM techniquesMur-Artal et al. (2015); Zhou et al. (2021); Behley and Stachniss (2018); Keitaanniemi et al. (2023) usually use camera, Inertial Measurement Unit (IMU)Bai et al. (2020) or other sensor configuration Rivard et al. (2008) to estimate the location.For example, VINS-MonoQin et al. (2018) is a real-time optimization-based sliding window SLAM framework that leverages from IMU pre-integration with bias correction and loop detection.Usually, these methods suffer greatly from drift error mainly because their estimation approach is based on Markovian assumption Nobre et al. (2017); Li et al. (2020); Liu and Meng (2020); Li et al. (2022); Zhao et al. (2020).For instance Botterill et al. (2012) overcomes accumulating scale drift problem by recognizing certain objects through the envrionment to and learning their scales to minimize the scale drift issue.There are also positioning systems that uses Global Navigation Satellite System (GNSS), that are very robust to the drift problem, such as GPS which can perform highly accurate positioning stand-alone or in conjunction with SLAMSchleicher et al. (2009); Kiss-Illés et al. (2019).For instance, Hening et al. (2017) introduces a data fusion method employing an Adaptive Extended Kalman filter (AFK) to estimate the velocity and position of a UAV.It combines data from a LIDAR sensor for local position updates via SLAM, corrected by GPS upon the avialability of the GPS signal, and incorporates input from an Inertial Navigation System (INS) into the Extended Kalman filter.While GPS offers precise positioning, its signal can be significantly degraded or be denied in obstructed settings which creates Non-Line-Of-Sight (NLOS) or multipath effect for GPS commonly seen in scenarios such as outdoors environment with thick tree canopies, indoor environment or high altitudeWeiss et al. (2011); Øvstedal (2002); Chen and Zhu (2018).

Figure 1 .
Figure 1.Implicit function representation of vector data through the inverse of the Distance Transform, depicting traversable paths with probabilities favoring center paths and lower values off-center.Maximum allowed distances are truncated akin to road width constraints in GIS-defined traversable paths.

Figure 2 .
Figure 2. Spatial probabilities at Γ(t) where red and blue denote high and low probability values, respectively.Random variables (a) motion magnitude X2, (b) motion angle X1 (c) heading preservation X4.

Figure 3 .
Figure 3.Comparison of reference, proposed, and SLAM trajectories (blue, red, and green) with start and end points highlighted (orange and black), alongside spatial distributions generated by the proposed method on the right had side.

Table 1 .
Computed trajectory's closing distance to reference trajectory, reported in meters up to decimeter error, accounting for GPS sensor reliability based on specifications.