TixiaoShan /LIO-SAM

LIO-SAM: Tightly-coupled Lidar Inertial Odometry via Smoothing and Mapping

★ 4,989⑂ 1,534👁 70⑃ 59● 527▤ 0
C++BSD-3-ClauseCreated 2020-07-01
+1
日增长
+6
周增长
4,989
stars
1,534
forks
70
watchers
59
prs
527
issues
0
releases

README

LIO-SAM

A real-time lidar-inertial odometry package. We strongly recommend the users read this document thoroughly and test the package with the provided dataset first. A video of the demonstration of the method can be found on YouTube.


    



    
    
    
    


 Menu

  - System architecture

  - Package dependency

  - Package install

  - Prepare lidar data (must read)

  - Prepare IMU data (must read)

  - Sample datasets

  - Run the package

  - Other notes

  - Issues

  - Paper

  - TODO

  - Related Package

  - Acknowledgement

 System architecture


    


We design a system that maintains two graphs and runs up to 10x faster than real-time.
  - The factor graph in "mapOptimization.cpp" optimizes lidar odometry factor and GPS factor. This factor graph is maintained consistently throughout the whole test.
  - The factor graph in "imuPreintegration.cpp" optimizes IMU and lidar odometry factor and estimates IMU bias. This factor graph is reset periodically and guarantees real-time odometry estimation at IMU frequency.

 Dependency

This is the original ROS1 implementation of LIO-SAM. For a ROS2 implementation see branch ros2.

- ROS (tested with Kinetic and Melodic. Refer to 206 for Noetic)
  
  sudo apt-get install -y ros-kinetic-navigation
  sudo apt-get install -y ros-kinetic-robot-localization
  sudo apt-get install -y ros-kinetic-robot-state-publisher
  
- gtsam (Georgia Tech Smoothing and Mapping library)
  
  sudo add-apt-repository ppa:borglab/gtsam-release-4.0
  sudo apt install libgtsam-dev libgtsam-unstable-dev
  

 Install

Use the following commands to download and compile the package.


cd ~/catkin_ws/src
git clone https://github.com/TixiaoShan/LIO-SAM.git
cd ..
catkin_make


 Using Docker
Build image (based on ROS1 Kinetic):

bash
docker build -t liosam-kinetic-xenial .


Once you have the image, start a container as follows:

bash
docker run --init -it -d \
  -v /etc/localtime:/etc/localtime:ro \
  -v /etc/timezone:/etc/timezone:ro \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -e DISPLAY=$DISPLAY \
  liosam-kinetic-xenial \
  bash



 Prepare lidar data

The user needs to prepare the point cloud data in the correct format for cloud deskewing, which is mainly done in "imageProjection.cpp". The two requirements are:
  - Provide point time stamp. LIO-SAM uses IMU data to perform point cloud deskew. Thus, the relative point time in a scan needs to be known. The up-to-date Velodyne ROS driver should output this information directly. Here, we assume the point time channel is called "time." The definition of the point type is located at the top of the "imageProjection.cpp." "deskewPoint()" function utilizes this relative time to obtain the transformation of this point relative to the beginning of the scan. When the lidar rotates at 10Hz, the timestamp of a point should vary between 0 and 0.1 seconds. If you are using other lidar sensors, you may need to change the name of this time channel and make sure that it is the relative 

Top issues

Snapshot: 2026-11-27T22:26:53Z · Data license Apache-2.0 · JSON