A LiDAR-inertial SLAM system that integrates FAST-LIO2 as the high-frequency frontend with a LIO-SAM-style factor graph backend for global optimization, enhanced by hierarchical scene representation and ground-normal constraints, and compatible with both ROS1 and ROS2.
🔴 PGO
🟢 Odom (latest map→odom TF)
🟢 Odom (raw odometry)
Comparison of multi-floor trajectory and mapping results: our method enhanced with hierarchical scene representation, ground-normal constraints, and loop closure (top) versus FAST-LIO2 (bottom).
🔴 PGO
🟠 GNSS
🟢 Odom (latest map→odom TF)
🟢 Odom (raw odometry)
Comparison of outdoor trajectory and mapping results: our method enhanced with ground-normal constraints, GNSS position and heading constraints, and loop closure (top) versus FAST-LIO2 (bottom).
-
A SLAM system that integrates FAST-LIO2 with a LIO-SAM-style factor graph backend.
-
ROS1 and ROS2 adaptation
-
Hierarchical scene representation
-
Support ground-normal constraints in pose graph
-
Manual initial pose setting for relocalization
-
Support GNSS factors in the pose graph
-
Stationary detection and adaptive weight handling between LiDAR update scans and ZUPT
-
Support for RoboSense LiDARs, Unilidar LiDARs
-
The standard navigation TF tree: map → odom → base_link
-
Support localization mode: Online, Prior and Online+Prior localization
- gtsam (Georgia Tech Smoothing and Mapping library)
# Ubuntu 20.04
sudo add-apt-repository ppa:borglab/gtsam-release-4.0
# Ubuntu 22.04
sudo add-apt-repository ppa:borglab/gtsam-release-4.1
sudo apt install libgtsam-dev libgtsam-unstable-devmkdir fastlio_sam_ws
cd fastlio_sam_ws
mkdir src && cd src
git clone https://github.com/RightTr/FAST-LIO-SAM.git
cd src/FAST-LIO-SAM
# ROS1 build
./build.sh ROS1
# ROS2 build
./build.sh humblecd fastlio_ws
source devel/setup.bash
# e.g.
roslaunch fast_lio_sam mapping_airy.launchgroundEnableFlag enables ground-normal pose-graph constraints from ground observations.
sceneEnableFlag enables multi-floor switching and floor-aware loop filtering; when off, ground stays in floor0 and loop uses ordinary spatial search.
The system uses one global correction link and two local odometry outputs:
map -> odom: backend / relocalization correctionodom -> base_link: LiDAR-updated odometryodom -> base_link_hf: IMU high-frequency odometry
The modified system supports relocalization using manually set odometry poses. Once odometry poses are published to the /reloc_topic (according to the following .yaml file), the system will apply a pose correction and update the current state consistently.
common/mode:
1: online: Use only the online map for constraints.2: prior: Use only the prior map for constraints.3: online+prior: Use both the online map and the prior map for constraints.
prior_map/prior_init enables one-shot startup alignment in prior mode.
It uses the prior map to refine the initial pose before tracking starts.
You can generate a prior ikdtree snapshot from a PCD file with pcd_to_ikdtree_bin.
Enable lio_sam/keyframe_export_en to export each accepted keyframe as a full-resolution PCD built from feats_undistort, together with its pose, under ROOT_DIR/RESULTS/KEY_FRAMES/scans/ and ROOT_DIR/RESULTS/KEY_FRAMES/pose.txt.
Enable lio_sam/keyframe_global_pcd_en to additionally stitch all exported keyframes into one global PCD at ROOT_DIR/RESULTS/KEY_FRAMES/global.pcd.
result_save/feat_accum_save_ento accumulate each undistorted scan in the world frame. The merged feature cloud is maintained in memory during runtime and written toROOT_DIR/RESULTS/PCD/<lidar_time>.pcdwhen the system shuts down.result_save/imu_state_save_ensaves each IMU state toROOT_DIR/RESULTS/IMU_STATES/imu_state.txt.result_save/scan_frame_save_ensaves each undistorted scan in LiDAR body frame underROOT_DIR/RESULTS/SCAN_FRAMES/scans/<lidar_time>.pcd, saves the corresponding timestamped cloud underROOT_DIR/RESULTS/SCAN_FRAMES/scans_tstamp/<lidar_time>.pcd, and writes the pose toROOT_DIR/RESULTS/SCAN_FRAMES/scan_pose.txt.
The system will adjust the confidence of the ZUPT and LiDAR updates based on the detected motion state, using accelerometer and gyroscope variances as well as the EMA of velocity. When the system detects a stationary state, it will increase the confidence of the ZUPT update and decrease the confidence of the LiDAR update, and vice versa when in motion.
Check the related parameters in the .yaml files.
Now, FAST-LIO supports tracking and mapping using the RoboSense LiDARs (e.g., RoboSense Airy) and Unilidar LiDARs (e.g., Unilidar L2). Check the related files in ./config, ./launch_ROS1/odom, ./launch_ROS1/mapping, ./launch_ROS2/odom, and ./launch_ROS2/mapping.
# e.g.
roslaunch fast_lio_sam odom_airy.launch- GNSS fusion test
- Full situational_graphs adaptation
- ZUPT parameter tuning and test
- Prior localization test
FAST-LIO: A Fast, Robust LiDAR-inertial Odometry Package by Tightly-Coupled Iterated Kalman Filter