Skip to content

a SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on LIO-SAM paper

License

Notifications You must be signed in to change notification settings

engcang/FAST-LIO-SAM

Repository files navigation

FAST-LIO-SAM

  • This repository is a SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on LIO-SAM paper
    • Loop-detection is based on radius search and ICP is used to calc matching
  • Note: similar repositories already exist
  • Note2: main code (PGO) is modularized and hence can be combined with any other LIO / LO


KITTI seq 05 top view - (left): FAST-LIO2 (right): FAST-LIO-SAM


KITTI seq 05 side view - (top): FAST-LIO2 (bottom): FAST-LIO-SAM


KITTI seq 05 trajectories - (blue): FAST-LIO2 (green): FAST-LIO-SAM


Note

  • For better loop-detection and transform calculation, FAST-LIO-SAM-QN is also coded and opened.
    • It adopts Quatro - fast, accurate and robust global registration which provides great initial guess of transform
    • and Nano-GICP - fast and accurate ICP combining FastGICP + NanoFLANN

Dependencies

  • ROS (it comes with Eigen and PCL)
  • GTSAM
    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

How to build

  • Get the code and build
    cd ~/your_workspace/src
    git clone https://github.com/engcang/FAST-LIO-SAM --recursive
    
    cd ..
    catkin build -DCMAKE_BUILD_TYPE=Release
    . devel/setup.bash

How to run

  • Then run (change config files in third_party/FAST_LIO)
    roslaunch fast_lio_sam run.launch lidar:=ouster
    roslaunch fast_lio_sam run.launch lidar:=velodyne
    roslaunch fast_lio_sam run.launch lidar:=livox
  • In particular, we provide a preset launch option for specific datasets:
    roslaunch fast_lio_sam run.launch lidar:=kitti
    roslaunch fast_lio_sam run.launch lidar:=mulran
    roslaunch fast_lio_sam 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.)

License

Creative Commons License

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

About

a SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on LIO-SAM paper

Topics

Resources

License

Stars

Watchers

Forks