• Stars
    star
    361
  • Rank 117,957 (Top 3 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created over 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A probabilistic voxelmap-based LiDAR-Inertial Odometry.

PV-LIO

PV-LIO is a probabilistic voxelmap-based LiDAR-Inertial Odometry. It fuses LiDAR feature points with IMU data using IKFoM to allow robust navigation in fast-motion or narrow environments where degeneration occurs. PV-LIO also supports online LiDAR-IMU extrinsic estimation.

We utilize VoxelMap as the Local Map manager of PV-LIO, it calculates the covariance of each <LiDAR point,planar feature> correspondence according to the LiDAR ranging model and uses it as confidence ratio to guide the update of KF. This enables robust pose estimation in degenerated scenarios such as narrow staircases. We derive the covariance propagation incorporating the LiDAR-IMU extrinsic parameters, enabling state estimation with IMU and online LiDAR-IMU calibration. We also implement a parallel-optimized map update module, which allows for a more efficient map update than the original implementation of VoxelMap.

Some test results are shown below:

Visualization of voxelmap with uncertainty (Hilti 2022 exp11)

Narrow Environment Test

Left: Robosense RS16, staircase_crazy_rotation dataset

Right: Livox AVIA, long_tunnel dataset

Hilti 2022 exp11

Hilti 2022 exp15

Hilti 2022 exp03

Update

  • 2023.07.18: Fix eigen failed error for Ubuntu 20.04.

1. Prerequisites

1.1 Ubuntu and ROS

Ubuntu >= 16.04

For Ubuntu 18.04 or higher, the default PCL and Eigen is enough for PV-LIO to work normally.

ROS >= Melodic. ROS Installation

1.2. PCL && Eigen

PCL >= 1.8, Follow PCL Installation.

Eigen >= 3.3.4, Follow Eigen Installation.

1.3. livox_ros_driver

Follow livox_ros_driver Installation.

Remarks:

  • The livox_ros_driver must be installed and sourced before run any PV-LIO launch file.
  • How to source? The easiest way is add the line 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).

2. Build

Clone the repository and catkin_make:

    cd ~/$A_ROS_DIR$/src
    git clone https://github.com/hviktortsoi/PV_LIO.git
    cd PV_LIO
    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.

3.1 For Livox Avia

Connect to your PC to Livox Avia LiDAR by following Livox-ros-driver installation, then

    cd ~/$PV_LIO_ROS_DIR$
    source devel/setup.bash
    roslaunch pv_lio mapping_avia.launch
    roslaunch livox_ros_driver livox_lidar_msg.launch
  • For livox serials, PV-LIO only support the data collected by the 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.
  • If you want to change the frame rate, please modify the publish_freq parameter in the livox_lidar_msg.launch of Livox-ros-driver 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:

  1. LiDAR point cloud topic name: lid_topic
  2. IMU topic name: imu_topic
  3. Translational extrinsic: extrinsic_T
  4. Rotational extrinsic: extrinsic_R (only support rotation matrix)
  • The extrinsic parameters in PV-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.
  • PV-LIO produces a very simple software time sync for livox LiDAR, set parameter 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.

3.3 For Velodyne or Ouster (Velodyne as an example)

Step A: Setup before run

Edit config/velodyne.yaml to set the below parameters:

  1. LiDAR point cloud topic name: lid_topic
  2. IMU topic name: imu_topic (both internal and external, 6-aixes or 9-axies are fine)
  3. Line number (we tested 16, 32 and 64 line, but not tested 128 or above): scan_line
  4. Translational extrinsic: extrinsic_T
  5. Rotational extrinsic: extrinsic_R (only support rotation matrix)
  • The extrinsic parameters in PV-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 ~/$PV_LIO_ROS_DIR$
    source devel/setup.bash
    roslaunch pv_lio mapping_velodyne.launch

Step C: Run LiDAR's ros driver or play rosbag.

3.4 For Robosense, Hesai, etc. (Robosense as an example)

Step A: Setup before run

Edit launch/mapping_robosense.launch, find and modify the following line:

<remap from="/rslidar_points" to="/your_lidar_topic"/>

Fill /your_lidar_topic with your actual LiDAR topic name.

Step B: Edit config/robosense.yaml to set the below parameters:

  1. IMU topic name: imu_topic (both internal and external, 6-aixes or 9-axies are fine)
  2. Line number (we tested 16, 32 and 64 line, but not tested 128 or above): scan_line
  3. Translational extrinsic: extrinsic_T
  4. Rotational extrinsic: extrinsic_R (only support rotation matrix)
  • The extrinsic parameters in PV-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 C: Run below

    cd ~/$PV_LIO_ROS_DIR$
    source devel/setup.bash
    roslaunch pv_lio mapping_robosense.launch

Step C: Run LiDAR's ros driver or play rosbag.

4. Rosbag Example

4.1 Robosense 16 Rosbag

Files: Can be downloaded from Baidu Pan (password:4kpf) or Google Drive

Run:

roslaunch pv_lio mapping_robosense.launch
cd YOUR_BAG_DOWNLOADED_PATH
rosbag play *.bag

Important: The 3 bags are from the same dataset sequence, so they should be play sequentially, rather than be played alone.

Related Works

  1. VoxelMap: An efficient and probabilistic adaptive voxel mapping method for LiDAR odometry.
  2. FAST-LIO: A computationally efficient and robust LiDAR-inertial odometry (LIO) package
  3. FAST-LIO_LOCALIZATION: A simple localization framework that can re-localize in built point cloud maps.
  4. IKFoM: A computationally efficient and convenient toolkit of iterated Kalman filter.

Acknowledgments

Thanks a lot for the authors of VoxelMap, IKFoM and FAST-LIO;

Thanks to Xiaokai for his help with deriving the covariance propagation.

TBD

  1. Handle conditions where nMeasurements < nDof;
  2. Migrate constant velocity example from VoxelMap to support Pure LiDAR odometry;
  3. Optimize comments and docs, make them more readable;
  4. Improve the efficiency of voxel map visualization;
  5. Publish covariance of points for visualization;

More Repositories

1

FAST_LIO_LOCALIZATION

A simple localization framework that can re-localize in built maps based on FAST-LIO.
C++
589
star
2

ACSC

Automatic Calibration for Non-repetitive Scanning Solid-State LiDAR and Camera Systems
C++
308
star
3

rs_to_velodyne

A ros tool for converting Robosense pointcloud to Velodyne pointcloud format.
C++
177
star
4

pointcloud_ground_removal

RANSAC segmentation-based ground removal for 3D LiDAR point clouds.
C++
77
star
5

MultithreadingDownloader

基于python的多线程下载工具
Python
15
star
6

alpha_lidar

Official implementation of αLiDAR: An Adaptive High-Resolution Panoramic LiDAR System
13
star
7

yesense_ros_driver

ROS driver for yesense imu.
C
10
star
8

galaxy_camera_ros_driver

ROS driver for daheng(大恒) industrial camera.
C
10
star
9

gitnote

note
HTML
8
star
10

NonparametricEstimation

Nonparametric estimation for bayes classification
Python
7
star
11

PSMNet.tf

Tensorflow implementation for PSMNet
Python
7
star
12

tiny_mapping

Minimal implementation of point cloud mapping in Open3D.
Python
6
star
13

LidarUpsample

Upsampling method collection for non-uniform distributed LiDAR point cloud.  
C++
4
star
14

ToothBrushingQualityDetection

Java
3
star
15

STM32VirtualMouse

A Virtual STM32 USB HID Mouse
C
3
star
16

bottle_control

Python
3
star
17

sky_simulator

simulator form sky project
Python
2
star
18

WebSecureChattingTool

基于Vue和Nodjs的WEB前端加密工具
JavaScript
2
star
19

SLAM14

Code for the SLAM14 book.
C++
2
star
20

hd_map_storage

File storage for hd map.
2
star
21

OralDiseaseClassification

Python
2
star
22

sn_mdl

Python
2
star
23

Udacity-CS344-Projects

Code for Udacity CS344 CUDA assignment
Cuda
2
star
24

PaperReading

HTML
2
star
25

nlp_assignment_12

nlp_assignment12
Python
2
star
26

HVT_CS186_BPlusTree

Java
2
star
27

gitnote-image

gitnote图床
2
star
28

nme_front_end

NME网络演化模型的原型演示系统前端
JavaScript
2
star
29

kaggle_cat_dog

kaggle cat/dog recognization
Python
2
star
30

portable_detection.pytorch

X-Ray based portable detection.
Python
2
star
31

StyleGapDetection

lovedada
Python
2
star
32

Mybatis_Test

MyBatis测试
Java
2
star
33

carla_hdmap_visualization

Python
2
star
34

HViktorTsoi

1
star
35

HViktorTsoi.github.io

HTML
1
star
36

CUDA_interpolation

Cuda
1
star
37

electric_projector_screen

C++
1
star
38

ros_pcl_tools

A completion of ROS utilities for processing point clouds.
C++
1
star