Stereo Visual Inertial LiDAR Simultaneous Localization and Mapping
Weizhao Shao Srinivasan Vijayarangan Cong Li George Kantor

CAMIRADA: Cancer microRNA association discovery algorithm, a case study on breast cancer
    [
    Accepted ??. Received ??; in original form ??
========================================================================================

empty
empty




Simultaneous Localization and Mapping (SLAM) is a fundamental task to mobile and aerial robotics. LiDAR based systems have proven to be superior compared to vision based systems due to its accuracy and robustness. In spite of its superiority, pure LiDAR based systems fail in certain degenerate cases like traveling through a tunnel. We propose Stereo Visual Inertial LiDAR (VIL) SLAM that performs better on these degenerate cases and has comparable performance on all other cases. VIL-SLAM accomplishes this by incorporating tightly-coupled stereo visual inertial odometry (VIO) with LiDAR mapping and LiDAR enhanced visual loop closure. The system generates loop-closure corrected 6-DOF LiDAR poses in real-time and 1cm  voxel dense maps near real-time. VIL-SLAM demonstrates improved accuracy and robustness compared to state-of-the-art LiDAR methods.




§ INTRODUCTION


SLAM solves the problem of mapping unknown environments while estimating robot state. Though SLAM is actively researched for the past few decades, Cadena et al. <cit.> note that there are still challenges in handling diverse environments and long-term continuous operations. SLAM systems operate on a wide range of sensor modalities each trying to exploit their benefits. In the past few years, LiDAR based SLAM systems have gained popularity over vision based systems due to their robustness to changes in the environment. However pure LiDAR based systems have their deficiencies. They fail in environments with repeating structures like tunnels or hallways. These environments are challenging to map and localize, and system which exploits the strengths of all the sensor modalities need to be deployed to succeed. We propose VIL-SLAM, which uses IMU, stereo cameras and LiDAR, and exploit their benefits collectively. Our experiments demonstrate that VIL-SLAM performs on par with pure LiDAR based systems in most cases and better on cases where pure LiDAR based systems simply fail. VIL-SLAM achieves this by integrating stereo VIO and LiDAR mapping with loop closure. To the best of our knowledge, this is the first work of this kind. In addition, we introduce a method to evaluate mapping results using a time-of-flight laser scanner (Faro). We also provide VIO validation results on the EuRoC MAV dataset.

VIL-SLAM uses a tightly-coupled stereo VIO that performs fixed-lag pose graph optimization, LiDAR mapping that uses sparse 3D features for map registration, and loop closure that integrates sparse point cloud alignment with visual loop detection. Loop closure optimizes a global pose graph using an incremental solver. VIL-SLAM is designed to operate long term and in different environments robustly. The high frequency IMU measurements produce estimates which are reasonable for the short interval but quickly drift. When constrained with stereo visual measurements, we can correct the biases and estimate accurate relative motion (referred to as VIO). The relative motion estimate is used to aid LiDAR scan matching which then accumulates the high-fidelity 3D point clouds to form an accurate map. The robot's state estimate accumulates drift during long traversals. Loop closure addresses this issue by recognizing the revisited sites using either visual or LiDAR methods. Visual methods involve using Bag-of-Words <cit.> to recognize the place and Perspective-n-Point (PnP) algorithm to estimate the pose correction. In LiDAR methods, the places are recognized using segment based algorithms like SegMatch <cit.>, and pose correction is estimated using Iterative Closest Point (ICP) <cit.> algorithm. While the Bag-of-Words method is fast and versatile, it lacks the accuracy of the slow but robust LiDAR method which uses ICP. VIL-SLAM uses a hybrid approach where it first finds the loop closure candidate using Bag-of-Words technique, generates a rough estimate of the pose correction using Perspective-n-Point (PnP) algorithm, and then refines the rough estimate using ICP. 















§ RELATED WORK

Current VIO literature introduces various formulations to integrate visual and inertial data. The literature characterizes different approaches into tightly-coupled system <cit.>, in which visual information and inertial measurements are jointly optimized, or loosely-coupled system <cit.>, in which IMU is a separate module and fused with a vision-only state estimator. The approaches could be further divided into either filtering-based <cit.> or graph-optimization based <cit.>. Tightly-coupled optimization-based approaches, taking the benefit of minimizing residuals iteratively, usually achieve better accuracy and robustness with a higher computation cost. In our work, we bound the computation cost by forming landmarks in a structureless fashion and only optimizing for a fixed-size pose graph to achieve the real-time performance. 

Current state-of-the-art SLAM systems using just laser scanner are <cit.>, in which a motion model is required, either a constant velocity model or a Gaussian process. Approach in <cit.> combines stereo cameras and a laser scanner. It has motion estimation generated from a visual odometry (VO) and refined by matching laser scans. The differences to our system are that they use multi-resolution grid map representation and ours uses sparse point cloud to localize and outputs dense point cloud. Also, VIO is usually more robust and accurate compared to a VO <cit.>. VLOAM <cit.>, which uses an IMU, a monocular camera, and a laser scanner is the most similar existing system to ours. One difference is that we use a tightly-coupled VIO as the motion model to initialize the LiDAR mapping algorithm whereas VLOAM uses loosely-coupled IMU and camera. Though our VIO is more robust, VLOAM has a more interactive system where information from both camera and LiDAR module could be used for IMU biases correction. One addition that VIL-SLAM has is the LiDAR enhanced loop closure.



§ SYSTEM OVERVIEW

The system has four modules as shown in Fig. <ref>. The visual frontend takes stereo pairs from the stereo cameras. It performs frame to frame tracking and stereo matching, and outputs stereo matches as visual measurements. The stereo VIO takes stereo matches and IMU measurements, performs IMU pre-integration and tightly-coupled fixed-lag smoothing over a pose graph. This module outputs VIO pose at IMU rate and camera rate. LiDAR mapping module uses the motion estimate from the VIO and performs LiDAR points dewarping and scan to map registration. The loop closure module conducts visual loop detection and initial loop constraint estimation, which is further refined by a sparse point cloud ICP alignment. A global pose graph constraining all LiDAR poses is optimized incrementally to obtain a globally corrected trajectory and a LiDAR pose correction in real-time. They are sent back to LiDAR mapping module for map update and re-localization. In post processing, we stitch the dewarped LiDAR scans with the best estimated LiDAR poses to have the dense mapping results (Fig. <ref>).



§ VISUAL FRONTEND

Visual frontend accepts a stereo pair, and performs frame to frame tracking and stereo matching for the generation of a set of stereo-matched sparse feature points, namely, stereo matches. A stereo match could either be one tracked from previous stereo pair, or a new one extracted in this pair. The frame to frame tracking performance directly affects the temporal constraints quality while the stereo matching helps constrain the scale. These two tasks are crucial for any stereo visual odometry. Direct methods show robust and efficient temporal tracking results in recent years <cit.>. Thus, we use Kanade Lucas Tomasi (KLT) feature tracker <cit.> to track all feature points in the previous stereo matches, either in the left or right image. Only when they are both tracked, we have a tracked stereo match and it is pushed into the output. Large stereo baseline helps scale estimation and reduces degeneracy issues caused by distant features. We use feature-based methods which are better suited to handle large baselines than KLT. If the number of tracked stereo matches is below a threshold, we perform feature extraction using Shi-Tomashi Corner detector <cit.>, followed by a feature elimination process in which features that have pixel coordinate distance to any existing features smaller than a threshold are deleted. ORB (Oriented FAST and Rotated BRIEF) <cit.> descriptors are then computed on all survived features, followed by a brute-force stereo matching to obtain new stereo matches. The system initializes by performing stereo matching on the first stereo pair.



§ STEREO VISUAL INERTIAL ODOMETRY

The goal of the stereo VIO is to provide real-time accurate state estimate at a relatively high frequency, serving as the motion model for the LiDAR mapping algorithm. A tightly-coupled fixed-lag smoother operating over a pose graph is a good trade-off between accuracy and efficiency. Optimization-based methods in general allow for multiple re-linearization to approach the global minimum. A fixed-lag pose graph optimizer further bounds the maximum number of variables, and hence the computation cost is bounded. Since bad visual measurements cause convergence issues, we enforce a strict outlier rejection mechanism on visual measurements. The system eliminates outliers by checking the average reprojection error, both stereo and temporal.

The VIO proposed has IMU Pre-integration Factor and Structureless Vision Factor as constraints. The graph representation is shown in Fig. <ref>. Variables to be optimized are the states inside the window. Denote S_t as the state variable at the stereo frame time t. S_t contains the 6 Degrees of Freedom (DoF) system pose ξ_t (IMU frame), the associated linear velocity v_t, accelerometer bias b^a_t, and gyroscope bias b^g_t. The window of state variables being estimated are of the most recent N stereo frames. Past state variables are marginalized, producing prior factors on related variables.






 §.§ IMU pre-integration factor


We follow the IMU pre-integration method <cit.><cit.> to generate relative IMU measurements between S_i and S_j. Using the pre-integration technique, re-linearization could be performed efficiently during optimization. The residual represented by the IMU pre-integration factor is r^I_ij, which consists of three terms: the residual of pose (r_Δξ ij), velocity (r_Δvij), and biases (r_Δbij).



 §.§ Structureless vision factor

Visual measurements are modeled in a structureless fashion, similar to <cit.><cit.><cit.>. Consider a landmark p, whose position in global frame is x_p∈ℝ^3, is observed by multiple states and denote the set of states observing p as {S}_p. For any state S_k in {S}_p, denote the residual formed by measuring p as in the left camera image as r^V_ξ_k,lc,p (ξ_k,lc is the left camera pose, obtained by applying a IMU-camera transformation to ξ_k):

    r^V_ξ_k,lc,p = z_ξ_k,lc,p-h(ξ_k,lc,x_p)

where z_ξ_k,lc,p is the pixel measurement of p in the image and h(ξ_k,lc,x_p) encodes a perspective projection. Same formulation is derived for the right camera image. Iterative methods are adopted for optimizing the pose graph, and hence linearization of the above residual is required. Equation (<ref>) shows the linearized residuals for landmark p.

    ∑_S_p||F_kpδξ_k + E_kpδx_p + b_kp||^2

where the Jacobians F_kp, E_kp and the residual error b_kp are results from the linearization and normalized by Σ^1/2_c, the visual measurement covariance. Stacking each individual component inside the sum into a matrix we have 

    ||r^V_p||^2_Σ_C = ||F_pδξ_k + E_pδ x_p + b_p||^2

To avoid optimizing over x_p, we project the residual into the null space of E_p: Premultiply each term by Q_p≐I-E_p(E_p^⊤E_p)^-1E_p^⊤, an orthogonal projector of E_p <cit.>. We thus have the Structureless Vision Factor, for landmark p as

    ||r^V_p||^2_Σ_C = ||Q_pF_pδξ_k + Q_p b_p||^2



 §.§ Optimization and marginalization

Given the residuals, the pose graph optimization is a maximum a posteriori (MAP) problem whose optimal solution is

    S^*_w = min_S^*_w(||r_0||^2_Σ_0 +∑_i∈ w ||r^I_i(i+1)||^2_Σ_I + ∑_p||r^V_p||^2_Σ_C)

where S^*_w is the set of state variables inside the window. r_0 and Σ_0 are prior factors and their associated covariance. Σ_I is the covariance of the IMU measurements. We use the Levenberg-Marquart optimizer to solve this nonlinear optimization problem. The most recent N state variables are maintained inside the optimizer. Schur-Complement marginalization <cit.> is performed on state variables getting out of the window. Prior factors are then added to related variables inside the window as in Fig. <ref>(b).





§ LIDAR MAPPING

LiDAR mapping uses high frequency IMU rate VIO poses as the motion prior to perform LiDAR points dewarping and scan to map registration. Denote a scan χ as the point cloud obtained from one complete LiDAR rotation. Geometric features including points on sharp edges and planar surfaces are extracted from χ before dewarping <cit.>. The registration is then based on feature points from current scan to the map (all previous feature points), solved as an optimization problem by minimizing Euclidean distance residuals formed by the feature points as in <cit.>.



 §.§ LiDAR scan dewarping


Dewarping is required as points from a LiDAR scan are timestamped differently. Denote any time within a scan as t_i. We dewarp all points to the time of end of scan t_k+1 based on IMU rate VIO poses. Denote a LiDAR point at t_i as P_i and the dewarped itself as P̃_i, we have  

    P̃_i=(T_k+1^L)^-1T_i^LP_i

where T_k+1^L, T_i^L are LiDAR frame poses transformed from the closest IMU rate VIO poses.



 §.§ Scan to map registration

Feature points from the dewarped scan χ̃ are registered to the map, optimizing for the LiDAR mapping pose at t_k+1 denoted as L_k+1. Denote the initial estimate of L_k+1 as L_k+1^*, we have:

    L_k+1^* = L_kT_trans^L

where L_k is the optimized previous LiDAR mapping pose and T_trans^L is the relative transformation obtained based on IMU rate VIO poses. All dewarped feature points are then transformed to world coordinate system by L_k+1^* for registration.

The residual r_E of an edge feature point in the current scan, is the Euclidean distance between itself and the line formed by the two closest edge points in the map. The residual r_U of a surface point in the current scan is the distance between itself and the planar patch formed by the three closest surface points in the map. <cit.> Incorporating L_k+1^*, we can rewrite the two residuals as:

    f_E( E_(c,i)^L, L_k+1^*) = r_E


    f_U( U_(c,i)^L, L_k+1^*) = r_U

where E_(c,i)^L and U_(c,i)^L are the 3D position of the ith dewarped feature point in the LiDAR coordinate system. Levenberg-Marquardt optimizer is used to solve this nonlinear optimization problem, formed by stacking the cost functions for all feature points.





§ LIDAR ENHANCED LOOP CLOSURE

Loop closure is critical to any SLAM system as long term operation introduces drift. The objective of loop closure is to eliminate drift by performing a global pose graph optimization which incorporates loop constraints and relative transformation information from LiDAR mapping. To better assist LiDAR mapping, the corrected LiDAR pose is sent back in real-time so that feature points from new scans are registered to the revisited map. We propose adding ICP alignment in addition to visual Bag-of-Words <cit.> loop detection and PnP loop constraint formulation. The system uses iSAM2 <cit.>, an incremental solver, to optimize the global pose graph, achieving real-time performance. 



 §.§ Loop detection

Stereo images and LiDAR scans are associated using their timestamps. Let us denote these as key images and key scans respectively. To prevent false loop detection we restrict candidates within a certain time threshold. Loop candidates are detected by testing the key images with the Bag-of-Words <cit.> database of previous key images. Furthermore, We match feature descriptors of the left key image with the loop candidates to filter out the false positives.



 §.§ Loop constraint


The system first obtains visual loop constraint as an initial estimate. Since we use a structureless formulation for visual landmarks, triangulation on all the stereo matched features in the loop candidate is performed to obtain their 3D location. Their associations to current key images are given by descriptor match. The visual loop constraint is then evaluated using EPNP <cit.>. To improve the accuracy of the visual loop constraint, we use ICP alignment on the feature points of the corresponding LiDAR key scans. With a bad initialization or a larger point count, ICP takes longer to converge and consumes more computation resources. However, the visual loop constraint provides a good initialization point and the ICP only uses sparse feature points (Section <ref>), which makes it converge faster.



 §.§ Global pose graph optimization


The graph representation of the global pose graph is shown in Fig. <ref>. It contains all the available LiDAR mapping poses as variables, constrained by the LiDAR Odometry Factor and the Loop Constraint Factor, both are measurements of the relative transformation: (L_u)^-1L_v where u and v stand for scan ID and L_u, L_v are the associated poses. For the LiDAR Odometry Factor, u is the previous scan ID. For the Loop Constraint Factor, u is the key scan ID found as loop. For both cases, v is the current scan ID. Poses are expressed in 6 DoF minimum form in the optimization. To realize real-time performance, we use iSAM2 <cit.> to incrementally optimize the global pose graph.



 §.§ Re-localization

Once a true loop closure candidate is found, LiDAR mapping buffers the feature points (without registering them to the map) until it receives loop correction. The loop correction contains globally optimized trajectory. LiDAR mapping updates its map, adds the buffered feature points to the map and then resumes its operation. We can afford to update the map in real-time because (a) loop closure has a real-time performance (b) the sparse feature map does not take much memory, and (c) scan to map registration is fast enough to catch up the LiDAR data rate.





§ EXPERIMENTAL RESULTS

We evaluate VIL-SLAM and compare it with the best real-time LiDAR based system, LOAM[This is the best implementation of LOAM we could find online https://github.com/laboshinl/loam_velodyne]<cit.> on custom datasets. We did not use KITTI odometry dataset <cit.> because their evaluation sequences do not have inertial measurements which are needed for VIO. Also, most KITTI sequences are not challenging. So they do not evaluate the robustness of these systems which is the main focus of our experiments. We also evaluate the stereo VIO submodule (VIL-VIO) using the EuRoC MAV dataset <cit.>.





 §.§ Platform and software

We built a platform (Fig. <ref>(a)) with two megapixel cameras, a 16 scan-line LiDAR, an IMU (400Hz), and a 4GHz computer (with 4 physical cores). We built a custom microcontroller based time synchronization circuit that synchronizes the cameras, LiDAR, IMU and computer by simulating GPS time signals. The software pipeline is implemented in C++ with ROS communication interface. We use GTSAM library <cit.> to build the fixed-lag smoother in the VIO. For loop closure, we use ICP module from  LibPointMatcher <cit.> to align point clouds, DBoW3 <cit.> to build the visual dictionary, and iSAM2 <cit.> implementation in GTSAM <cit.> to conduct global optimization. 





 §.§ Tests and results

We present results from five representative environments including featureless hallways, cluttered highbays, tunnels, and outdoor environments. The data collection started and ended at the same point for all these sequences. Odometry (LiDAR mapping pose) is evaluated based on the final drift error (FDE). Mapping results are evaluated in terms of mean registration error (MRE) using Faro scans as ground truth. We first align the map with the model (Faro scans), and then compute the Euclidean distance between a map point and its closest point in the model <cit.>. The odometry FDE and mapping results are shown in Table <ref> with the better ones in bold. The trajectories and cross-sectioned maps are shown in Fig. <ref>. The map comparisons are shown in Fig. <ref>.

The highbay is an indoor warehouse which is open, structured, and rich in features. However, frequent structural occlusions could be a challenge for the visual frontend and the LiDAR feature extraction part. Both VIL-SLAM and LOAM handle this environment pretty well. For VIL-SLAM, LiDAR mapping module registers most of its scan to map, largely reducing the odometry error. Loop closure recognizes the starting position and closes the loop. The map is generated using the globally refined poses, with the majority of map errors below 0.15m.

The hallway and tunnel tests are challenging environments because of lack of visual features and the degeneracy issue along traversal direction for LiDAR. LOAM accumulates large error in the hallway, and fails the tunnel test mainly due to the degeneracy issue. Aided by the stereo VIO module (VIL-VIO), VIL-SLAM succeeds both tests. In the hallway test, the visual frontend returns fewer reliable measurements because of the featureless walls, under-constraining the VIO. This corrupts the map as observed by wall misalignment, which is later corrected by loop closure as shown in Fig. <ref>(c-d). Loop closure detects the loop twice when approaching the endpoint, lowering FDE to 0.05% and generating a refined map. In the tunnel test, because of the degeneracy issue, VIL-SLAM struggles as well and accumulates some error in the traversal direction. However, loop closure detects the loop at about 3m from the end point, lowering the FDE down to 0.08% and correcting the map as shown in Fig. <ref>(a-b).

The huge loop test features challenges from both hallway and highbay environments. In addition, we end the trajectory by re-entering the highbay after traversing along a long narrow corridor. LOAM fails this test after re-entering the highbay, at the place labeled by a red cross in Fig. <ref>(d). We think this is because it fails to register new scans to the original highbay map caused by a large error in z-direction accumulated in the corridor. VIL-SLAM succeeds in this test. Without loop closure being triggered, it achieves 0.01% FDE in odometry. VIL-SLAM is robust and achieves this result by successfully registering new scans to the original highbay map at re-entry. The map generated with the odometry estimate of VIL-SLAM is compared with the map generated with LOAM before its failure. The boxed region is where LOAM accumulates errors leading to its failure.

The outdoor test features an outdoor trajectory which is 546m long and includes a gentle slope. Pedestrians and cars were observed which served as potential outliers. VIL-SLAM and LOAM have comparable results along the xy-plane. However, LOAM fails to capture the changes in the z-direction. The inaccuracy in z of LOAM is also observed in the previous tests.

Overall, VIL-SLAM generates more accurate mapping results and lower FDE compare to LOAM when they both finish. Also, VIL-SLAM succeeds the more challenging environments where LOAM fails with qualitatively good mapping and odometry results.





 §.§ EuRoC MAV Dataset test

VIL-VIO contributes to the robustness and accuracy of VIL-SLAM. We evaluate the VIO using the EuRoC MAV dataset <cit.> in terms of the absolute trajectory error (ATE) as in <cit.>. Fig. <ref>[A sequence is named in the first four letters and the difficulty level is encoded in the last letter (E:easy, M:medium, D:difficult)] shows the comparison results between VIL-VIO and three state-of-the-art methods. Results for VIL-VIO are deterministic, obtained in real-time on a desktop with 3.60GHz i7-4790 CPU. Results for the other methods are the better ones from experiments in <cit.> and <cit.>. VIL-VIO succeeds all sequences with accuracy comparable with the others, verifying its capability to handle aggressive motion, illumination changes, motion blur and textureless regions.



§ CONCLUSIONS


VIL-SLAM is a state-of-the-art odometry and mapping system designed to robustly operate long term in different environments. Current framework loosely couples VIL-VIO and LiDAR mapping. We are extending it to a tightly-coupled framework such that refined pose estimate from LiDAR mapping could be used for IMU biases correction. In loop closure, ICP refinement operates on sparse feature points between scans. We suspect that we would obtain a better loop constraint by matching a scan to map.

-12cm   
                                  
                                  
                                  
                                  
                                  



ieeetr
