GitPedia

FAST LIO SAM QN

A SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on Quatro and Nano-GICP

From engcang·Updated June 16, 2026·View on GitHub·

+ This repository is a SLAM implementation combining [FAST-LIO2](https://github.com/hku-mars/FAST_LIO) with pose graph optimization and loop closing based on [Quatro](https://quatro-plusplus.github.io/) and [Nano-GICP module](https://github.com/engcang/nano_gicp) + [Quatro](https://quatro-plusplus.github.io/) - fast, accurate and robust global registration which provides great initial guess of transform + [Quatro module](https://github.com/engcang/quatro) - `Quatro` as a module, can be easily us... The project is written primarily in C++, distributed under the Other license, first published in 2023. Key topics include: lidar-inertial-odometry, lidar-slam, loop-closure, odometry, pose-estimation.

FAST-LIO-SAM-QN

Video clip - https://youtu.be/MQ8XxRY472Y

<br>

Computational complexity <br>in KITTI seq. 05 with i9-10900k CPU

  • FAST-LIO-SAM: max 118% CPU usage, 125 times of ICP, 124.9ms consumption on average
  • FAST-LIO-SAM-N (only Nano-GICP): max 164% CPU usage, 130 times of ICP, 61.9ms consumption on average
  • FAST-LIO-SAM-QN:
    • Advanced matching - max 325% CPU usage, 85 times of ICP, 140ms consumption on average
    • Optimized matching (with max 200 correspondences downsampling) - max 569% CPU usage, 90 times of ICP, 128.6ms consumption on average
  • Note: loop_timer_func runs at fixed basic/loop_update_hz. So how many times of ICP occurred can be different depending on the speed of matching methods.
<p align="center"> <img src="imgs/fast1.png" height="250"/> <img src="imgs/sam1.png" height="250"/> <img src="imgs/qn.png" height="250"/> <br> <em>KITTI seq 05 top view - (left): FAST-LIO2 (middle): FAST-LIO-SAM (bottom): FAST-LIO-SAM-QN</em> </p> <p align="center"> <img src="imgs/fast2.png" width="500"/> <img src="imgs/sam2.png" width="500"/> <img src="imgs/qn_side.png" width="500"/> <br> <em>KITTI seq 05 side view - (top): FAST-LIO2 (middle): FAST-LIO-SAM (bottom): FAST-LIO-SAM-QN</em> </p> <br>

Dependencies

  • C++ >= 17, OpenMP >= 4.5, CMake >= 3.10.0, Eigen >= 3.2, Boost >= 1.54
  • ROS
  • GTSAM
    shell
    wget -O gtsam.zip https://github.com/borglab/gtsam/archive/refs/tags/4.1.1.zip unzip gtsam.zip cd gtsam-4.1.1/ mkdir build && cd build cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF -DGTSAM_USE_SYSTEM_EIGEN=ON .. sudo make install -j16
  • Teaser++
    shell
    git clone https://github.com/MIT-SPARK/TEASER-plusplus.git cd TEASER-plusplus && mkdir build && cd build cmake .. -DENABLE_DIAGNOSTIC_PRINT=OFF sudo make install -j16 sudo ldconfig
  • tbb (is used for faster Quatro)
    shell
    sudo apt install libtbb-dev

How to build

  • Get the code and then build the main code.
    shell
    cd ~/your_workspace/src git clone https://github.com/engcang/FAST-LIO-SAM-QN --recursive cd ~/your_workspace # nano_gicp, quatro first catkin build nano_gicp -DCMAKE_BUILD_TYPE=Release # Note the option! catkin build quatro -DCMAKE_BUILD_TYPE=Release -DQUATRO_TBB=ON -DQUATRO_DEBUG=OFF catkin build -DCMAKE_BUILD_TYPE=Release . devel/setup.bash

How to run

  • Then run (change config files in third_party/FAST_LIO)
    shell
    roslaunch fast_lio_sam_qn run.launch lidar:=ouster roslaunch fast_lio_sam_qn run.launch lidar:=velodyne roslaunch fast_lio_sam_qn run.launch lidar:=livox
  • In particular, we provide a preset launch option for specific datasets:
    shell
    roslaunch fast_lio_sam_qn run.launch lidar:=kitti roslaunch fast_lio_sam_qn run.launch lidar:=mulran roslaunch fast_lio_sam_qn run.launch lidar:=newer-college20

Structure

  • odomPcdCallback
    • pub realtime pose in corrected frame
    • keyframe detection -> if keyframe, add to pose graph + save to keyframe queue
    • pose graph optimization with iSAM2
  • loopTimerFunc
    • process a saved keyframe
      • detect loop -> if loop, add to pose graph
  • visTimerFunc
    • visualize all (Note: global map is only visualized once uncheck/check the mapped_pcd in rviz to save comp.)
<br>

Memo

  • Quatro module fixed for empty matches
  • Quatro module is updated with optimizedMatching which limits the number of correspondences and increased the speed
<br>

License

<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from engcang/FAST-LIO-SAM-QN via the GitHub API.Last fetched: 6/16/2026