Software
FAST-LIO2
By MaRS Lab, The University of Hong Kong, Hong Kong SAR China (checked on github.com/hku-mars (opens in a new tab)), from github.com/hku-mars/FAST_LIO (opens in a new tab)
- Navigation and mapping
- Library
- GPL-2.0-only
FAST-LIO2 is a LiDAR-inertial odometry package that fuses LiDAR points with IMU data for robot navigation in fast-motion or cluttered environments.
- Stale. No commit in 12 months: the newest is from 23 Jul 2024.
Facts
- GitHub stars
- 5,427read on 28 Nov 2026
- Last update
- 23 Jul 2024Newest commit on main
- Maintenance
- Staleno commit in 12 months
- Difficulty
- Advanced
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- GPL-2.0-only (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (GPL-2.0-only) at commit 7cc4175 (opens in a new tab), on 16 Oct 2026.
- Commercial use
- Yes
Copyleft: Modified source must be published.
At a glance
- What it is
- Fuses LiDAR feature points with IMU data using a tightly-coupled iterated extended Kalman filter.
- Runs direct scan-to-map odometry on raw LiDAR points, with feature extraction optional.
- Supports spinning LiDARs such as Velodyne and Ouster, and solid-state Livox LiDARs such as Avia, Horizon and MID-70.
- Supports external IMUs and can save the accumulated scans as a PCD file.
- Includes launch files and examples for Livox Avia, Velodyne HDL-32E rosbags, and the MARSIM simulator.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- GPL-2.0-only. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Stale, last commit on 23 Jul 2024.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/hku-mars/FAST_LIO (opens in a new tab)
- The version Robotheca read7cc4175 (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by MaRS Lab, The University of Hong Kong, at commit 7cc4175, under GPL-2.0-only (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
Related Works and Extended Application
SLAM:
- ikd-Tree (opens in a new tab): A state-of-art dynamic KD-Tree for 3D kNN search.
- R2LIVE (opens in a new tab): A high-precision LiDAR-inertial-Vision fusion work using FAST-LIO as LiDAR-inertial front-end.
- LI_Init (opens in a new tab): A robust, real-time LiDAR-IMU extrinsic initialization and synchronization package..
- FAST-LIO-LOCALIZATION (opens in a new tab): The integration of FAST-LIO with Re-localization function module.
- FAST-LIVO (opens in a new tab) | FAST-LIVO2 (opens in a new tab): A state-of-art LiDAR-inertial-visual odometry (LIVO) system with high computational efficiency, robustness, and pixel-level accuracy.
Control and Plan:
- IKFOM (opens in a new tab): A Toolbox for fast and high-precision on-manifold Kalman filter.
- UAV Avoiding Dynamic Obstacles (opens in a new tab): One of the implementation of FAST-LIO in robot's planning.
- UGV Demo (opens in a new tab): Model Predictive Control for Trajectory Tracking on Differentiable Manifolds.
- Bubble Planner (opens in a new tab): Planning High-speed Smooth Quadrotor Trajectories using Receding Corridors.
FAST-LIO
FAST-LIO (Fast LiDAR-Inertial Odometry) is a computationally efficient and robust LiDAR-inertial odometry package. It fuses LiDAR feature points with IMU data using a tightly-coupled iterated extended Kalman filter to allow robust navigation in fast-motion, noisy or cluttered environments where degeneration occurs. Our package address many key issues:
- Fast iterated Kalman filter for odometry optimization;
- Automaticaly initialized at most steady environments;
- Parallel KD-Tree Search to decrease the computation;
FAST-LIO 2.0 (2021-07-05 Update)

Related video: FAST-LIO2 (opens in a new tab), FAST-LIO1 (opens in a new tab)
Pipeline:
New Features:
- Incremental mapping using ikd-Tree (opens in a new tab), achieve faster speed and over 100Hz LiDAR rate.
- Direct odometry (scan to map) on Raw LiDAR points (feature extraction can be disabled), achieving better accuracy.
- Since no requirements for feature extraction, FAST-LIO2 can support many types of LiDAR including spinning (Velodyne, Ouster) and solid-state (Livox Avia, Horizon, MID-70) LiDARs, and can be easily extended to support more LiDARs.
- Support external IMU.
- Support ARM-based platforms including Khadas VIM3, Nivida TX2, Raspberry Pi 4B(8G RAM).
Related papers:
FAST-LIO2: Fast Direct LiDAR-inertial Odometry (opens in a new tab)
Contributors
Wei Xu 徐威 (opens in a new tab),Yixi Cai 蔡逸熙 (opens in a new tab),Dongjiao He 贺东娇 (opens in a new tab),Fangcheng Zhu 朱方程 (opens in a new tab),Jiarong Lin 林家荣 (opens in a new tab),Zheng Liu 刘政 (opens in a new tab), Borong Yuan (opens in a new tab)
1. Prerequisites
1.1 Ubuntu and ROS
Ubuntu >= 16.04
For Ubuntu 18.04 or higher, the default PCL and Eigen is enough for FAST-LIO to work normally.
ROS >= Melodic. ROS Installation (opens in a new tab)
1.2. PCL && Eigen
PCL >= 1.8, Follow PCL Installation (opens in a new tab).
Eigen >= 3.3.4, Follow Eigen Installation (opens in a new tab).
1.3. livox_ros_driver
Follow livox_ros_driver Installation (opens in a new tab).
Remarks:
- Since the FAST-LIO must support Livox serials LiDAR firstly, so the livox_ros_driver must be installed and sourced before run any FAST-LIO luanch file.
- How to source? The easiest way is add the line
source $Livox_ros_driver_dir$/devel/setup.bashto the end of file~/.bashrc, where$Livox_ros_driver_dir$is the directory of the livox ros driver workspace (should be thews_livoxdirectory if you completely followed the livox official document).
2. Build
If you want to use docker conatiner to run fastlio2, please install the docker on you machine. Follow Docker Installation (opens in a new tab).
2.1 Docker Container
User can create a new script with anyname by the following command in linux:
touch <your_custom_name>.sh
Place the following code inside the <your_custom_name>.sh script.
#!/bin/bash
mkdir docker_ws
# Script to run ROS Kinetic with GUI support in Docker
# Allow X server to be accessed from the local machine
xhost +local:
# Container name
CONTAINER_NAME="fastlio2"
# Run the Docker container
docker run -itd \
--name=$CONTAINER_NAME \
--user mars_ugv \
--network host \
--ipc=host \
-v /home/$USER/docker_ws:/home/mars_ugv/docker_ws \
--privileged \
--env="QT_X11_NO_MITSHM=1" \
--volume="/etc/localtime:/etc/localtime:ro" \
-v /dev/bus/usb:/dev/bus/usb \
--device=/dev/dri \
--group-add video \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--env="DISPLAY=$DISPLAY" \
kenny0407/marslab_fastlio2:latest \
/bin/bash
execute the following command to grant execute permissions to the script, making it runnable:
sudo chmod +x <your_custom_name>.sh
execute the following command to download the image and create the container.
./<your_custom_name>.sh
Script explanation:
- The docker run command provided below creates a container with a tag, using an image from Docker Hub. The download duration for this image can differ depending on the user's network speed.
- This command also establishes a new workspace called
docker_ws, which serves as a shared folder between the Docker container and the host machine. This means that if users wish to run the rosbag example, they need to download the rosbag file and place it in thedocker_wsdirectory on their host machine. - Subsequently, a folder with the same name inside the Docker container will receive this file. Users can then easily play the file within Docker.
- In this example, we've shared the network of the host machine with the Docker container. Consequently, if users execute the
rostopic listcommand, they will observe identical output whether they run it on the host machine or inside the Docker container."
2.2 Build from source
Clone the repository and catkin_make:
cd ~/$A_ROS_DIR$/src
git clone https://github.com/hku-mars/FAST_LIO.git
cd FAST_LIO
git submodule update --init
cd ../..
catkin_make
source devel/setup.bash
- Remember to source the livox_ros_driver before build (follow 1.3 livox_ros_driver)
- If you want to use a custom build of PCL, add the following line to ~/.bashrc
export PCL_ROOT={CUSTOM_PCL_PATH}
3. Directly run
Noted:
A. Please make sure the IMU and LiDAR are Synchronized, that's important.
B. The warning message "Failed to find match for field 'time'." means the timestamps of each LiDAR points are missed in the rosbag file. That is important for the forward propagation and backwark propagation.
C. We recommend to set the extrinsic_est_en to false if the extrinsic is give. As for the extrinsic initiallization, please refer to our recent work: Robust Real-time LiDAR-inertial Initialization (opens in a new tab).
3.1 For Avia
Connect to your PC to Livox Avia LiDAR by following Livox-ros-driver installation (opens in a new tab), then
cd ~/$FAST_LIO_ROS_DIR$
source devel/setup.bash
roslaunch fast_lio mapping_avia.launch
roslaunch livox_ros_driver livox_lidar_msg.launch
- For livox serials, FAST-LIO only support the data collected by the
livox_lidar_msg.launchsince only itslivox_ros_driver/CustomMsgdata structure produces the timestamp of each LiDAR point which is very important for the motion undistortion.livox_lidar.launchcan not produce it right now. - If you want to change the frame rate, please modify the publish_freq parameter in the livox_lidar_msg.launch (opens in a new tab) of Livox-ros-driver (opens in a new tab) before make the livox_ros_driver pakage.
3.2 For Livox serials with external IMU
mapping_avia.launch theratically supports mid-70, mid-40 or other livox serial LiDAR, but need to setup some parameters befor run:
Edit config/avia.yaml to set the below parameters:
- LiDAR point cloud topic name:
lid_topic - IMU topic name:
imu_topic - Translational extrinsic:
extrinsic_T - Rotational extrinsic:
extrinsic_R(only support rotation matrix)
- The extrinsic parameters in FAST-LIO is defined as the LiDAR's pose (position and rotation matrix) in IMU body frame (i.e. the IMU is the base frame). They can be found in the official manual.
- FAST-LIO produces a very simple software time sync for livox LiDAR, set parameter
time_sync_ento ture to turn on. But turn on ONLY IF external time synchronization is really not possible, since the software time sync cannot make sure accuracy.
3.3 For Velodyne or Ouster (Velodyne as an example)
Step A: Setup before run
Edit config/velodyne.yaml to set the below parameters:
- LiDAR point cloud topic name:
lid_topic - IMU topic name:
imu_topic(both internal and external, 6-aixes or 9-axies are fine) - Set the parameter
timestamp_unitbased on the unit of time (Velodyne) or t (Ouster) field in PoindCloud2 rostopic - Line number (we tested 16, 32 and 64 line, but not tested 128 or above):
scan_line - Translational extrinsic:
extrinsic_T - Rotational extrinsic:
extrinsic_R(only support rotation matrix)
- The extrinsic parameters in FAST-LIO is defined as the LiDAR's pose (position and rotation matrix) in IMU body frame (i.e. the IMU is the base frame).
Step B: Run below
cd ~/$FAST_LIO_ROS_DIR$
source devel/setup.bash
roslaunch fast_lio mapping_velodyne.launch
Step C: Run LiDAR's ros driver or play rosbag.
3.4 For MARSIM Simulator
Install MARSIM: https://github.com/hku-mars/MARSIM (opens in a new tab) and run MARSIM as below
cd ~/$MARSIM_ROS_DIR$
roslaunch test_interface single_drone_avia.launch
Then Run FAST-LIO:
roslaunch fast_lio mapping_marsim.launch
3.5 PCD file save
Set pcd_save_enable in launchfile to 1. All the scans (in global frame) will be accumulated and saved to the file FAST_LIO/PCD/scans.pcd after the FAST-LIO is terminated. pcl_viewer scans.pcd can visualize the point clouds.
Tips for pcl_viewer:
- change what to visualize/color by pressing keyboard 1,2,3,4,5 when pcl_viewer is running.
1 is all random
2 is X values
3 is Y values
4 is Z values
5 is intensity
4. Rosbag Example
4.1 Livox Avia Rosbag
Files: Can be downloaded from google drive (opens in a new tab)
Run:
roslaunch fast_lio mapping_avia.launch
rosbag play YOUR_DOWNLOADED.bag
4.2 Velodyne HDL-32E Rosbag
NCLT Dataset: Original bin file can be found here (opens in a new tab).
We produce Rosbag Files (opens in a new tab) and a python script (opens in a new tab) to generate Rosbag files: python3 sensordata_to_rosbag_fastlio.py bin_file_dir bag_name.bag
Run:
roslaunch fast_lio mapping_velodyne.launch
rosbag play YOUR_DOWNLOADED.bag
5.Implementation on UAV
In order to validate the robustness and computational efficiency of FAST-LIO in actual mobile robots, we build a small-scale quadrotor which can carry a Livox Avia LiDAR with 70 degree FoV and a DJI Manifold 2-C onboard computer with a 1.8 GHz Intel i7-8550U CPU and 8 G RAM, as shown in below.
The main structure of this UAV is 3d printed (Aluminum or PLA), the .stl file will be open-sourced in the future.
6.Acknowledgments
Thanks for LOAM(J. Zhang and S. Singh. LOAM: Lidar Odometry and Mapping in Real-time), Livox_Mapping (opens in a new tab), LINS (opens in a new tab) and Loam_Livox (opens in a new tab).
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.