SLAM:
Control and Plan:
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:
Related video: FAST-LIO2, FAST-LIO1
Pipeline:
New Features:
Related papers:
FAST-LIO2: Fast Direct LiDAR-inertial Odometry
FAST-LIO: A Fast, Robust LiDAR-inertial Odometry Package by Tightly-Coupled Iterated Kalman Filter
Contributors
Wei Xu 徐威,Yixi Cai 蔡逸熙,Dongjiao He 贺东娇,Fangcheng Zhu 朱方程,Jiarong Lin 林家荣,Zheng Liu 刘政, Borong Yuan
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
PCL >= 1.8, Follow PCL Installation.
Eigen >= 3.3.4, Follow Eigen Installation.
Follow livox_ros_driver Installation.
Remarks:
source $Livox_ros_driver_dir$/devel/setup.bash
to the end of file ~/.bashrc
, where $Livox_ros_driver_dir$
is the directory of the livox ros driver workspace (should be the ws_livox
directory if you completely followed the livox official document).If you want to use docker conatiner to run fastlio2, please install the docker on you machine. Follow Docker Installation.
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:
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 the docker_ws
directory on their host machine.rostopic list
command, they will observe identical output whether they run it on the host machine or inside the Docker container."
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
export PCL_ROOT={CUSTOM_PCL_PATH}
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.
Connect to your PC to Livox Avia LiDAR by following Livox-ros-driver installation, then
cd ~/$FAST_LIO_ROS_DIR$
source devel/setup.bash
roslaunch fast_lio mapping_avia.launch
roslaunch livox_ros_driver livox_lidar_msg.launch
livox_lidar_msg.launch
since only its livox_ros_driver/CustomMsg
data structure produces the timestamp of each LiDAR point which is very important for the motion undistortion. livox_lidar.launch
can not produce it right now.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:
lid_topic
imu_topic
extrinsic_T
extrinsic_R
(only support rotation matrix)
time_sync_en
to 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.Step A: Setup before run
Edit config/velodyne.yaml
to set the below parameters:
lid_topic
imu_topic
(both internal and external, 6-aixes or 9-axies are fine)timestamp_unit
based on the unit of time (Velodyne) or t (Ouster) field in PoindCloud2 rostopicscan_line
extrinsic_T
extrinsic_R
(only support rotation matrix)
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.
Install MARSIM: https://github.com/hku-mars/MARSIM 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
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:
1 is all random
2 is X values
3 is Y values
4 is Z values
5 is intensity