Real-time LIO-SAM fuses lidar scans with IMU data in ROS using factor-graph optimization for odometry, mapping, and optional GPS.
Overview
LIO-SAM performs tightly coupled lidar-inertial odometry and smoothing-based mapping for mobile robots and mapping platforms. It maintains separate factor graphs for map optimization and high-rate IMU preintegration so odometry can run at IMU frequency while the map graph stays consistent.
The original distribution targets ROS1; a ROS2 branch exists. You compile the package in a catkin workspace and run it via launch files against recorded or live sensor bags. Docker images based on ROS Kinetic are documented for containerized builds.
Lidar input must include per-point timestamps within each scan and ring indices for mechanical spinning sensors, with deskewing driven by IMU motion. IMU data must be extrinsically calibrated into the lidar frame per REP-105; misaligned extrinsics are a common source of unstable motion estimates.
The stack supports Velodyne and Ouster configurations, Livox and KITTI-style datasets with parameter tweaks, loop closure, GPS factors, and a service to save maps as PCD. It builds on LOAM-style lidar odometry ideas and GTSAM for optimization.
Key features
- Dual factor-graph LIO architecture
- IMU preintegration at sensor rate
- Lidar scan deskew with per-point time
- GPS factor optional fusion
- Loop closure configuration flag
- Save map PCD via ROS service
- Velodyne and Ouster sensor profiles
- ROS1 package with ROS2 branch
Use cases
- Outdoor mobile robot SLAM
- Lidar-inertial mapping with rosbag replay
- Autonomous vehicle odometry research
- KITTI or park dataset benchmarking