Git Product home page Git Product logo

lidar_imu_init's Introduction

Robust Real-time LiDAR-inertial Initialization

LI-Init is a robust, real-time initialization method for LiDAR-inertial system. The proposed method calibrates the temporal offset and extrinsic parameter between LiDARs and IMUs, and also the gravity vector and IMU bias. Our method does not require any target or extra sensor, specific structured environment, prior environment point map or initial values of extrinsic and time offset. Our package address following key issues:

  1. A robust LiDAR odometry (FAST-LO) modified from FAST-LIO2.
  2. Fast and robust temporal offset and extrinsic parameter calibration between LiDAR and IMU without any hardware setup.
  3. Support multiple LiDAR types: both mechanical spinning LiDAR (Hesai, Velodyne, Ouster) and solid-state LiDAR ( Livox Avia/Mid360)
  4. Seamlessly merged into FAST-LIO2, as a robust initialization module.

Contributors: Fangcheng Zhu 朱方程Yunfan Ren 任云帆Wei Xu 徐威Yixi Cai 蔡逸熙

Pipeline

Excite the Sensors

Related Paper

our related papers are now available: Robust Real-time LiDAR-inertial Initialization

If our code is used in your project, please cite our paper following the bibtex below:

@inproceedings{zhu2022robust,
  title={Robust real-time lidar-inertial initialization},
  author={Zhu, Fangcheng and Ren, Yunfan and Zhang, Fu},
  booktitle={2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages={3948--3955},
  year={2022},
  organization={IEEE}
}

Related Video:

our accompanying videos are now available on YouTube (click below images to open) and Bilibili.

1. Prerequisites

1.1 Ubuntu and ROS

Ubuntu >= 18.04.

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:

  • Since the LI_Init must support Livox serials LiDAR firstly, so the livox_ros_driver must be installed and sourced before run any LI_Init luanch 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).

1.4. ceres-solver

Our code has been tested on ceres-solver-2.0.0. Please download ceres-solver following the instructions.

1.5. Getting start with Docker

When you use Docker, you could solve the prerequisites above at once.
For more information, you can check docker_start.md.

2. Build

Clone the repository and catkin_make:

cd ~/catkin_ws/src
git clone https://github.com/hku-mars/LiDAR_IMU_Init.git
cd ..
catkin_make -j
source devel/setup.bash

3. Run Your Own Data

Please make sure the unit of your input angular velocity is rad/s. If it is degree/s, please refer to #43.

Please make sure the parameters in config/xxx.yaml are correct before running the project.

It is highly recommended to stay still for more than 5 seconds after launch the algorithm, for accumulating dense initial map.

It is highly recommended to run LI-Init and record your own data simultaneously, because our algorithm is able to automatically detect the degree of excitation and instruct users how to give sufficient excitation (e.g. rotate or move along which direction).

Theoretically livox_avia.launch supports mid-70, mid-40 LiDARs.

Note: The code of LI-Init contains the initialization module and sequential FAST-LIO. If you run the code of LI-Init, it will first do initialization (if suffienct excitation is given, it will tell you the extrinsic transformation and temporal offset) and then it will switch into FAST-LIO. Thus, if you want to run FAST-LIO on your own data but unfortunately the LiDAR and IMU are not synchronized or calibrated before, you can directly run LI-Init. As for R3LIVE, you can write the extrinsic and temporal offset between LiDAR and IMU obtained by LI-Init into the config file of R3LIVE.

Important parameters

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

  • lid_topic: Topic name of LiDAR pointcloud.

  • imu_topic: Topic name of IMU measurements.

  • cut_frame_num: Split one frame into sub-frames, to improve the odom frequency. Must be positive integers.

  • orig_odom_freq (Hz): Original LiDAR input frequency. For most LiDARs, the input frequency is 10 Hz. It is recommended that cut_frame_num * orig_odom_freq = 30 for mechinical spinning LiDAR, cut_frame_num * orig_odom_freq = 50 for livox LiDARs.

  • mean_acc_norm (m/s^2): The acceleration norm when IMU is stationary. Usually, 9.805 for normal IMU, 1 for livox built-in IMU.

  • data_accum_length: A threshold to assess if the data is enough for initialization. Too small may lead to bad-quality results.

  • online_refine_time (second): The time of extrinsic refinement with FAST-LIO2. About 15~30 seconds of refinement is recommended.

  • filter_size_surf (meter): It is recommended that filter_size_surf = 0.05~0.15 for indoor scenes, filter_size_surf = 0.5 for outdoor scenes.

  • filter_size_map (meter): It is recommended that filter_size_map = 0.15~0.25 for indoor scenes, filter_size_map = 0.5 for outdoor scenes.

After setting the correct topic name and parameters, you can directly run LI-Init with your own data..

cd catkin_ws
source devel/setup.bash
roslaunch lidar_imu_init xxx.launch

After initialization and refinement finished, the result would be written into catkin_ws/src/LiDAR_IMU_Init/result/Initialization_result.txt

4. Rosbag Example

Download our test bags here: Lidar IMU Initialization Datasets.

Use rosbag info xxx.bag to get the correct topic name.

Please note: if the tested IMU is Livox built-in IMU, mean_acc_norm should be 1. If the IMU is Pixhawk IMU, mean_acc_norm should be 9.805.

Here are the pointcloud map constructed by our LiDAR odometry (FAST-LO).

5. Acknowledgments

Thanks for HKU MaRS Lab, Fast-LIO2 (Fast Direct LiDAR-inertial Odometry) and ikd-tree.

Thanks for Livox Technology for equipment support.

6. Run FAST-LIO2 with LI-Init Results

The most important parameters for FAST-LIO are the extrinsic rotation and translation matrix, and the time offset.

For the same device setup (the relative pose between IMU and LiDAR is fixed), you can just write the extrinsic into FAST-LIO's configuration file.

As for time offset, it depends on the synchronization mechanism of the lidar and IMU. For pixhawk IMU, as far as I know, the timestamp is PC time. If the lidar's timestamp is also PC time, then the time offset might be the same. You can bypass temporal initialization next time. But for some lidars like Livox avia/horizon, the timestamp origin is the moment when the lidar is powered on. So, if you power it off and power it on again, the timestamp counts from 0. In this condition, temporal initialization is necessary at each time the lidar is powered on. So, you can run LI-Init once, record the time offset; then power off the lidar and IMU for minutes, then power on them and calibrate time offset again. If the time offset are close, it means you may bypass time offset initialization next time. Just write down the time offset into time_diff_lidar_to_imu of FAST-LIO's configuration file.

As for IMU bias and gravity, FAST-LIO can refine them online. You don't need to write these prameters.

7. License

The source code is released under GPLv2 license.

We are still working on improving the performance and reliability of our codes. For any technical issues, please contact us via email [email protected]. For commercial use, please contact Dr. Fu Zhang [email protected].

lidar_imu_init's People

Contributors

taeyoung96 avatar uavlover avatar zfc-zfc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lidar_imu_init's Issues

关于镭神C16雷达和IMU的标定问题

大佬,请问我在镭神雷达与IMU标定时,出现Failed to find match for field 'time'. 同时出现Compute offset time using constant rotation model问题,请问怎么回事,谢谢

code release

Hi,

Great jobs.

Is there any approximate code release date?

Is it possible to disable the time / temporal calibration?

We are using a hardware syncronised Lidar & IMU setup. I'd like to use this tool to estimate extrinsic rotation & translation but assume that time syncronisation is accurate.

Is there an easy way to disable the time sync estimation in the initialisation stage?

Avia lidar ,Data accumulation finished, but ”Max Cross-correlation: IMU lag wtr Lidar : 47 corrupted size vs. prev_size [laserMapping-1] process has died“

I use avia lidar , but dose not get initialization result .
263d2f690ff238d39ef8f3b4ecbbf8c

[Initialization] Rotation around Lidar X Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Rotation around Lidar Y Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Rotation around Lidar Z Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Data accumulation finished, Lidar IMU initialization begins.

============================================================ 

Max Cross-correlation: IMU lag wtr Lidar : 47
corrupted size vs. prev_size
[laserMapping-1] process has died [pid 16581, exit code -6, cmd /mnt/hgfs/Share/20.lidar_imu_calib/03.hku/devel/lib/lidar_imu_init/li_init __name:=laserMapping __log:=/home/fcy/.ros/log/f030c314-55bd-11ed-98c1-000c29a5b58f/laserMapping-1.log].
log file: /home/fcy/.ros/log/f030c314-55bd-11ed-98c1-000c29a5b58f/laserMapping-1*.log
^C[rviz-2] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

时间偏移实验

我复现了一下时间偏移的实验,对每个订阅的imu做了0.25s的偏移,虽然时间偏移回来了,但是旋转外参仿佛变大了许多。我使用的livox horizon激光雷达
[Final Result] Rotation LiDAR to IMU = -0.981229 -0.377143 -0.491367 deg
[Final Result] Translation LiDAR to IMU = 0.017507 -0.007343 0.015338 m
[Final Result] Time Lag IMU to LiDAR = -0.00506889 s
[Final Result] Bias of Gyroscope = -0.001044 0.000209 -0.001608 rad/s
[Final Result] Bias of Accelerometer = 0.020279 -0.007703 -0.039088 m/s^2
[Final Result] Gravity in World Frame = 0.449729 0.477563 -9.780474 m/s^2
image

Fails build

...src/LiDAR_IMU_Init/src/laserMapping.cpp:1278:1: error: expected ‘}’ at end of input
1278 | }
| ^
...src/LiDAR_IMU_Init/src/laserMapping.cpp:772:33: note: to match this ‘{’

ceres error

i get the following error when building from source, it is related to ceres. i couldnt find a reason or a solution for it. Any suggestions?

93%] Built target normal_filter_comparison_demo
[ 94%] Built target octomap_to_gridmap_demo
[ 97%] Built target filters_demo
[ 97%] Built target grid_map_to_image_demo
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp: In member function ‘void LI_Init::solve_Rotation_only()’:
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:324:51: error: expected type-specifier
  324 |     ceres::LocalParameterization *quatParam = new ceres::QuaternionParameterization();
      |                                                   ^~~~~
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:326:58: error: no matching function for call to ‘ceres::Problem::AddParameterBlock(double [4], int, ceres::LocalParameterization*&)’
  326 |     problem_rot.AddParameterBlock(R_LI_quat, 4, quatParam);
      |                                                          ^
In file included from /usr/local/include/ceres/ceres.h:64,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.h:15,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:1:
/usr/local/include/ceres/problem.h:261:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int)’
  261 |   void AddParameterBlock(double* values, int size);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:261:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ceres/problem.h:274:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int, ceres::Manifold*)’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:274:62: note:   no known conversion for argument 3 from ‘ceres::LocalParameterization*’ to ‘ceres::Manifold*’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |                                                    ~~~~~~~~~~^~~~~~~~
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp: In member function ‘void LI_Init::solve_Rot_bias_gyro(double&)’:
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:360:51: error: expected type-specifier
  360 |     ceres::LocalParameterization *quatParam = new ceres::QuaternionParameterization();
      |                                                   ^~~~~
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:363:62: error: no matching function for call to ‘ceres::Problem::AddParameterBlock(double [4], int, ceres::LocalParameterization*&)’
  363 |     problem_ang_vel.AddParameterBlock(R_LI_quat, 4, quatParam);
      |                                                              ^
In file included from /usr/local/include/ceres/ceres.h:64,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.h:15,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:1:
/usr/local/include/ceres/problem.h:261:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int)’
  261 |   void AddParameterBlock(double* values, int size);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:261:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ceres/problem.h:274:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int, ceres::Manifold*)’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:274:62: note:   no known conversion for argument 3 from ‘ceres::LocalParameterization*’ to ‘ceres::Manifold*’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |                                                    ~~~~~~~~~~^~~~~~~~
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp: In member function ‘void LI_Init::solve_trans_biasacc_grav()’:
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:424:51: error: expected type-specifier
  424 |     ceres::LocalParameterization *quatParam = new ceres::QuaternionParameterization();
      |                                                   ^~~~~
/home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:427:59: error: no matching function for call to ‘ceres::Problem::AddParameterBlock(double [4], int, ceres::LocalParameterization*&)’
  427 |     problem_acc.AddParameterBlock(R_GL0_quat, 4, quatParam);
      |                                                           ^
In file included from /usr/local/include/ceres/ceres.h:64,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.h:15,
                 from /home/ahmad/workspace/catkin_ws/src/LiDAR_IMU_Init/include/LI_init/LI_init.cpp:1:
/usr/local/include/ceres/problem.h:261:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int)’
  261 |   void AddParameterBlock(double* values, int size);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:261:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ceres/problem.h:274:8: note: candidate: ‘void ceres::Problem::AddParameterBlock(double*, int, ceres::Manifold*)’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/problem.h:274:62: note:   no known conversion for argument 3 from ‘ceres::LocalParameterization*’ to ‘ceres::Manifold*’
  274 |   void AddParameterBlock(double* values, int size, Manifold* manifold);
      |                                                    ~~~~~~~~~~^~~~~~~~
make[2]: *** [LiDAR_IMU_Init/CMakeFiles/li_init.dir/build.make:89: LiDAR_IMU_Init/CMakeFiles/li_init.dir/include/LI_init/LI_init.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:9866: LiDAR_IMU_Init/CMakeFiles/li_init.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make" failed

Issue with vlp 16

Hello,
Thanks for sharing amazing work. I am able smoothly with livox and pixhawk imu. But whenever I connect vlp 16 it's takes data in 1 2 secs and starts drifting during online refinement phase.

Please let me know if I had to do some code changes to make it run.

Thank you

Question on example dataset consistency

Hi, I would like to ask about the consistency of the results between two of the example datasets (hesai_apartment and hesai_library). I ran the example datasets with the hesai_pandarXT.launch (and pandar.yaml) without any modifications, and below are the results I got.

hesai_library

[Refinement]  Online Refinement 100% [||||||||||||||||||||||||||||||]

[Final Result] Rotation LiDAR to IMU    =   -0.247517   -1.941298 -179.701625 deg
[Final Result] Translation LiDAR to IMU = -0.129982 -0.026843  0.151303 m
[Final Result] Time Lag IMU to LiDAR    = 50161533.97495390 s 
[Final Result] Bias of Gyroscope        =  0.004215  0.000774 -0.001765 rad/s
[Final Result] Bias of Accelerometer    =  0.009421  0.002030 -0.007149 m/s^2
[Final Result] Gravity in World Frame   =  0.137945  0.046071 -9.809406 m/s^2

hesai_apartment

[Refinement]  Online Refinement 100% [||||||||||||||||||||||||||||||]

[Final Result] Rotation LiDAR to IMU    =    0.084913   -1.454845 -179.244912 deg
[Final Result] Translation LiDAR to IMU =  0.131225 -0.038163  0.283481 m
[Final Result] Time Lag IMU to LiDAR    = 50574455.96220298 s 
[Final Result] Bias of Gyroscope        = 0.002488 0.000104 0.001526 rad/s
[Final Result] Bias of Accelerometer    =  0.018897 -0.015838 -0.008524 m/s^2
[Final Result] Gravity in World Frame   = -0.041820 -0.083658 -9.808701 m/s^2

As can be seen, there is about a 13cm difference in the Z-axis translation, and the time lag looks wrong as well. Is there something I'm doing wrong? Like maybe there is something that should be changed in the config files? Thanks in advance!

车载雷达和imu

您好,请问下雷达和imu放在小车上的是不是没法标定?小车基本是平面上移动

[laserMapping-1] process has finished cleanly

We are using a ouster lidar and voxl-imu to run LIO and to estimate extrinsic parameters we are using "roslaunch lidar_imu_init ouster.launch" but it terminates with the message "process has finished cleanly"

basically the Lidar and IMU buffer is zero in laserMapping node before this termination occurs.
Can you please let us the cause of the error and the way to solve this problem.

LOGS AS DISPLAYED ON THE TERMINAL

root@qrb5165-rb5:~/ws_livox# roslaunch lidar_imu_init ouster.launch
... logging to /root/.ros/log/15dc4692-6cbb-11ed-9c1c-000ec6817901/roslaunch-qrb5165-rb5-20158.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://qrb5165-rb5:35381/

SUMMARY

PARAMETERS

  • /common/imu_topic: /ouster/imu
  • /common/lid_topic: /ouster/points
  • /cube_side_length: 2000.0
  • /initialization/Rot_LI_cov: [5e-05, 5e-05, 5e...
  • /initialization/Trans_LI_cov: [0.0001, 0.0001, ...
  • /initialization/cut_frame: True
  • /initialization/cut_frame_num: 3
  • /initialization/data_accum_length: 300
  • /initialization/mean_acc_norm: 9.805
  • /initialization/online_refine_time: 15
  • /initialization/orig_odom_freq: 10
  • /mapping/acc_cov: 2
  • /mapping/b_acc_cov: 0.0001
  • /mapping/b_gyr_cov: 0.0001
  • /mapping/det_range: 150.0
  • /mapping/filter_size_map: 0.15
  • /mapping/filter_size_surf: 0.05
  • /mapping/gyr_cov: 50
  • /max_iteration: 5
  • /pcd_save/interval: -1
  • /pcd_save/pcd_save_en: False
  • /point_filter_num: 1
  • /preprocess/blind: 1
  • /preprocess/feature_extract_en: False
  • /preprocess/lidar_type: 3
  • /preprocess/scan_line: 32
  • /publish/dense_publish_en: True
  • /publish/path_en: True
  • /publish/scan_bodyframe_pub_en: True
  • /publish/scan_publish_en: True
  • /rosdistro: melodic
  • /rosversion: 1.14.13

NODES
/
laserMapping (lidar_imu_init/li_init)

ROS_MASTER_URI=http://localhost:11311

process[laserMapping-1]: started with pid [20268]
Multi thread started
lidar_type: 3
LiDAR-only odometry starts.


[Exit]: Exit the process.
[WARN]: Online refinement not finished yet.
[Final Result] Rotation LiDAR to IMU    =  0.000000 -0.000000  0.000000 deg
[Final Result] Translation LiDAR to IMU = 0.000000 0.000000 0.000000 m
[Final Result] Time Lag IMU to LiDAR    = 0.00000000 s 
[Final Result] Bias of Gyroscope        = 0.000000 0.000000 0.000000 rad/s
[Final Result] Bias of Accelerometer    = 0.000000 0.000000 0.000000 m/s^2
[Final Result] Gravity in World Frame   = 0.000000 0.000000 0.000000 m/s^2
Rebuild thread terminated normally
[laserMapping-1] process has finished cleanly
log file: /root/.ros/log/15dc4692-6cbb-11ed-9c1c-000ec6817901/laserMapping-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete

Questions and a error in the readme

I now have the Livox Horizon working with your package. Very nice so far. Next up the Velodyne when I get some time in a few days. I have a couple questions in the mean time.
Are there any plans to add loop closure to the package like scan context?
Have you tried rotating your lidar unit so that it is 90 degrees to ground with Y up for example and then spinning your lidar unit and imu around in the axis? It would be similar to how the Geoslam, Kaarta and Green valley scanners work. It seems one could get a very good scan this way. Lots of data and continuous motion in the rotation axis.

There may be an error in the readme for startup of launch file. Seems you call roslaunch twice in one line.

cd catkin_ws
source devel/setup.bash
roslaunch lidar_imu_init roslaunch lidar_imu_init xxx.launch

标定效果良好,应用到fast-lio是漂移(使用标定时的数据包也漂移)

您好,我的IMU是MTI-300,雷达是velodyne16,下面是标定过程和应用到fast-lio2的截图,第一张图是应用到fast-lio2,第二张图是标定过程(效果很好),我录制的bag包的链接如下
链接: https://pan.baidu.com/s/1jT_9axsTvxiLaaURQb1AEA 提取码: 1234 复制这段内容后打开百度网盘手机App,操作更方便哦
2022-11-04 08-37-43 的屏幕截图
2022-11-04 08-39-26 的屏幕截图
/media/wyw/8660E1BB60E1B25B/2022-11-04-08-43-24.bag

Wt901C imu

Hi. Is it enough wt901c 9dof imu for accurate positioning? I can not get stable continious scan.

错误:double free or corruption (!prev)

@zfc-zfc Max Cross-correlation: IMU lag wtr Lidar : 7
Total time delay (IMU wtr Lidar): -9.94719 s
Using LIO: SUBTRACT this value from IMU timestamp
or ADD this value to LiDAR timestamp.

double free or corruption (!prev)
[laserMapping-2] process has died [pid 25144, exit code -6, cmd /home/hqc/catkin_ts/devel/lib/lidar_imu_init/fastlio_mapping __name:=laserMapping __log:=/home/hqc/.ros/log/af93858c-fc0b-11ec-b4bc-9822ef00c7d8/laserMapping-2.log].
log file: /home/hqc/.ros/log/af93858c-fc0b-11ec-b4bc-9822ef00c7d8/laserMapping-2*.log

having issues with velodyne and livox horizon topics. They both work in other packages just not Lidar_imu_int

I have a Velodyne VLP-16 and a XSens MTI-7dk IMU. (/velodyne_points) (/imu/data). Using Fast_Lio I can see points in Rvis and says IMU connected. I have verified the Points and IMU data is streaming and published. But for some reason with the same settings in LiDAR_IMU_Init nothing is found. Does this package currently only work with Livox? Any suggestions?
I have a Horizon Livox unit I tried to get working with this package with no luck. The livox driver works the points show up in Rvis via :roslaunch livox_ros_driver livox_lidar_rviz.launch
If I run close that and run roslaunch lidar_imu_init livox_horizon.launch I get no points. The lidar and imu topics are not started via that launch file. in the config file lidar_type is 1 the comment say Avia. Is 1 correct for horizon?

Question about the error result on same dataset

Hi,I would like to ask about the error result happened on the same example,with only the pandar.yaml cut_frame_num changed from 3 to 5,and i ran the example datasets Hesai_apartment .bag four times,half of them are similarity but the other got greater error,is this normal or it is just i got misoperation on it?

test_1

Rotation LiDAR to IMU (degree) = -0.241604 -1.687440 -179.091635
Translation LiDAR to IMU (meter) = 0.145349 -0.008220 0.090981
Time Lag IMU to LiDAR (second) = 50574455.968229
Bias of Gyroscope (rad/s) = 0.000944 0.000996 -0.009290
Bias of Accelerometer (meters/s^2) = -0.011033 -0.002588 0.006981
Gravity in World Frame(meters/s^2) = -0.005756 -0.149470 -9.813815

test_2

Rotation LiDAR to IMU (degree) = -0.249946 -1.651366 -178.979471
Translation LiDAR to IMU (meter) = 0.150331 0.009933 0.127421
Time Lag IMU to LiDAR (second) = 50574455.967223
Bias of Gyroscope (rad/s) = 0.002463 0.002442 -0.009575
Bias of Accelerometer (meters/s^2) = -0.009360 -0.007472 0.012774
Gravity in World Frame(meters/s^2) = -0.002329 -0.141623 -9.812926

test_3

Rotation LiDAR to IMU (degree) = -0.259932 -1.650320 -178.974883
Translation LiDAR to IMU (meter) = 0.151692 0.009458 0.126087
Time Lag IMU to LiDAR (second) = 50574455.967253
Bias of Gyroscope (rad/s) = 0.002455 0.002393 -0.009571
Bias of Accelerometer (meters/s^2) = -0.009517 -0.007391 0.012698
Gravity in World Frame(meters/s^2) = -0.002563 -0.140811 -9.812829

test_4

Rotation LiDAR to IMU (degree) = -0.241604 -1.687440 -179.091635
Translation LiDAR to IMU (meter) = 0.145349 -0.008220 0.090981
Time Lag IMU to LiDAR (second) = 50574455.968229
Bias of Gyroscope (rad/s) = 0.000944 0.000996 -0.009290
Bias of Accelerometer (meters/s^2) = -0.011033 -0.002588 0.006981
Gravity in World Frame(meters/s^2) = -0.005756 -0.149470 -9.813815

What is the 360 LiDAR used?

What is the Mid-360 LiDAR you use?? Is there some link to this or is it pre-release from Livox?

Can you share any links or spec. such as max range and point density?

horizon标定地图混乱

作者您好,感谢您的工作,我运行的horizon.launch,但是标定的地图构建很乱,请问下这个框架是否适用horizon

In LI_init.cpp line 533

请问关于Rot_percent这个变量的确定,它的数学依据是什么,为什么每个方向上要选择另外两个方向上的特征值相乘。
看代码的时候不太明白,感谢作者。
V3D Rot_percent(Scaled_Eigen[1] * Scaled_Eigen[2],
Scaled_Eigen[0] * Scaled_Eigen[2],
Scaled_Eigen[0] * Scaled_Eigen[1]);

有关mid-70的配置文件的问题。

您好,请问一下,对于livox mid-70,怎么确定.yaml文件中的以下参数:
lidar_type: 1 # Livox series LiDAR feature_extract_en: false scan_line: 6 blind: 2
如能抽空帮我解答一下,万分感谢!!!!

datatype/md5sum error

[ERROR] [1661737358.718783357]: Client [/laserMapping] wants topic /livox/lidar to have datatype/md5sum [livox_ros_driver/CustomMsg/e4d6829bdfe657cb6c21a746c86b21a6], but our version has [sensor_msgs/PointCloud2/1158d486dd51d683ce2f1be655c3c181]. Dropping connection.

When I finish compiling and running Livox-mid360. launch and play my bag,the above error occurred.How to solve this problem?thanks!

Livox config explanation

Hello guys,

I would like to ask if there is an explanation about all parameters, which are included in avia.yaml. I have a livox mid 40 and I would like to convert the avia.yaml file to a mid 40 compatible file .

Thanks in advance.

Question about constant velocity model

F_x.block<3, 3>(0, 15) = Eye3d * dt;

/** 匀角速度 **/ M3D Exp_f = Exp(state_inout.bias_g, dt); //用bias_g代表全程不变的角速度 F_x.block<3, 3>(0, 0) = Exp(state_inout.bias_g, -dt); F_x.block<3, 3>(0, 15) = Eye3d * dt;

why "F_x.block<3, 3>(0, 15) = Eye3d * dt;" in constant velocity model, but "F_x.block<3,3>(0,15) = - Eye3d * dt;" in IMU model?

When my program was running, it was stuck in this log

[Initialization] Rotation around Lidar X Axis: 0% [ ]
[Initialization] Rotation around Lidar Y Axis: 0% [ ]
[Initialization] Rotation around Lidar Z Axis: 0% [ ]

When my program was running, it was stuck in this log. How should I troubleshoot the problem?

Question about implementation of `Forward_propagation_without_imu` function

@zfc-zfc @Joanna-HE
Thanks for your wonderful works!

I want to apply the initialization method presented in LiDAR_IMU_Init directly to FAST-LIO algorithm.

But I was confused because the implementation is a little bit different. 😢

To express the state vector, LiDAR_IMU_Init used struct StatesGroup but FAST-LIO used IKFoM_toolkit.

I'm not familiar with IKFoM, so I don't have an idea to implement ImuProcess::Forward_propagation_without_imu() function to FAST-LIO.

Would you mind giving me some tips?

In LiDAR_IMU_Init, StateGroup &state_inout and
in FAST-LIO esekform::esekf<state_ikfom, 12, input_ikfom> &kf_state represent the same state vector?

What does the variable in kf_state correspond to the .cov of StateGroup?

I'd appreciate your help. 🙇

Thanks,

"No IMU, use constant velocity model."

Hello,

i've tried the package but when i run it the screen is black
riz

and on cmd windows says "No IMU, use constant velocity model."
Screenshot from 2022-08-25 15-14-27

I tested every unit individual (livox mid 40 and xsens mti g 710 gnss/ins) throught their softwares and ros drivers and they are working properly.

in my yaml i just changed the imu topic as you can see below.

yaml

Edit1;

when i run the livox_avia.launch file it shouldnt start recording from lidar? cause when i rostopic echo /livox/lidar i dont have measurements. Further more if i try to run livox_ros_driver it closed automatically when i run the livox_avia.launch file, brcause its the same node. I run xsens_mti_ros_driver and i have measurements on rostopic echo /imu/data but on LI_Init cmd window says "No IMU, use constant velocity model."

Thanks in advance.

Tips for improving result accuracy

Hi there,

Thank you for releasing this great tool for calibration.

I was able to record a calibration sequence and run it through the application with not much trouble.

Here are the results I got, however, the extrinsics deviate by about 6mm in the x-translation (forward/backward) from what we would expect from our CAD model.

Are there any tips or gotchas when recording the calibration sequence? I have also also attached the rosbag and the config file we used. Dropbox Link

Thank you in advance.

image

LiDAR-only odometry is failed with M2DGR dataset

@zfc-zfc
Thanks for your great work.
When I use LiDAR-IMU init with my custom data, LiDAR-only odometry is failed.

I use the M2DGR dataset (Velodnye VLP-32 and handsfree IMU)

My custom m2dgr yaml file is like below.

common:
    lid_topic:  "/velodyne_points"
    imu_topic:  "/handsfree/imu"

preprocess:
    lidar_type: 2                # Velodyne LiDAR
    scan_line: 32
    blind: 2
    feature_extract_en: true

initialization:
    cut_frame: true # false: do not cut input pointcloud
    cut_frame_num: 3 # must be positive integer
    orig_odom_freq: 10
    mean_acc_norm: 9.81 # 1: for livox built-in IMU
    online_refine_time: 15.0
    data_accum_length: 200
    Rot_LI_cov: [ 0.00005, 0.00005, 0.00005 ]
    Trans_LI_cov: [ 0.0001, 0.0001, 0.0001 ]

mapping:
    filter_size_surf: 0.5
    filter_size_map: 0.5
    gyr_cov: 10
    acc_cov: 2
    b_acc_cov: 0.0001
    b_gyr_cov: 0.0001
    det_range: 200.0

publish:
    path_en:  true
    scan_publish_en:  false       # false: close all the point cloud output
    dense_publish_en: false       # false: low down the points number in a global-frame point clouds scan.
    scan_bodyframe_pub_en: true  # true: output the point cloud scans in IMU-body-frame

pcd_save:
    pcd_save_en: false
    interval: -1                 # how many LiDAR frames saved in each pcd file; 
                                 # -1 : all frames will be saved in ONE pcd file, may lead to memory crash when having too much frames.

And the result looks like this, I used the door_02 sequence. (outdoor scene)
Screenshot from 2022-08-19 17-09-52

LiDAR-only odometry is failed so online refinement is inaccurate.

Can you tell me what caused this?
Do I need to modify the config file?
I saw this issue #11 , is it impossible to calculate lidar-only odometry measured by Ground robot?

I'd appreciate it if you give me an answer.
Thanks,

when online refinement start working, the lidar lost direction

Thanks your nice work. I get some confused thing when I try myself IMU.

I try run this code with Avia Lidar with internal IMU. That is works fine.
When I change imu topic to my external IMU. It seems works well when Init and move around Lidar. When the online refinement Or switch to FastLIO, it jusr break up. There is a video and result image:
Kazam_screenshot_00002

1.mp4

How it work for rslidar16?

报错如下:
Compute offset time using constant rotation model.
Compute offset time using constant rotation model.
[Initialization] Movement detected, data accumulation starts.

QObject::connect: Cannot queue arguments of type 'QVector'
(Make sure 'QVector' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QVector'
(Make sure 'QVector' is registered using qRegisterMetaType().)

[Initialization] Rotation around Lidar X Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Rotation around Lidar Y Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Rotation around Lidar Z Axis: 100% [||||||||||||||||||||||||||||||]
[Initialization] Data accumulation finished, Lidar IMU initialization begins.

============================================================

[laserMapping-1] process has died [pid 18438, exit code -11, cmd /home/yzw/catkin_li_calib/devel/lib/lidar_imu_init/li_init __name:=laserMapping __log:=/home/yzw/.ros/log/16d18caa-2f4a-11ed-adb7-5405db29cc01/laserMapping-1.log].
log file: /home/yzw/.ros/log/16d18caa-2f4a-11ed-adb7-5405db29cc01/laserMapping-1*.log

我的是速腾16线的雷达,使用了rs_to_velodyne转成velodyne消息格式。但刚打开lidar和imu,各轴的旋转度就直接拉满了。请问这样应该怎么解决呢?

Question about Extrinsic Translation algorithm.

@zfc-zfc
Thanks for your great work.
I have a question because the code is different from equation (23) in the paper.

The equation (23) shown in the paper is as follows.

And I understood the code that implemented this as LI_Init::solve_trans_biasacc_grav().
Looking at the residual function Linear_acc_Cost, I find that the variable R_LL0_T(the estimated attitude (rotation matrix) at the end lidar point), which is not mentioned in the paper, continues to be used.

Eigen::Matrix<T, 3, 1> resi = R_LL0_T * R_LI_T_transpose * IMU_linear_acc_T - R_LL0_T * bias_aL
                                      + R_GL0 * STD_GRAV - Lidar_linear_acc_T - R_LL0_T * Jacob_trans_T * T_IL;

Why does this variable continue to be used?
I'd appreciate it if you could give me an answer.

有关远程配置使用激光雷达的问题

首先非常感谢您的工作!!!!
想请问您一个问题,我测试时使用网线连接nuc和激光雷达,能成功驱动雷达后,就无法使用我的pc远程ssh到nuc上了,这个有线网卡和无线网卡有没有什么设置问题?
请问您遇到过这个问题么?

如何判断结果的好坏?

您好,感谢您的工作给我雷达和imu的标定工作带来了便捷,我想请问一下,得到标定后的结果,我怎么去判断标定的精度呢,尤其是旋转的精度好坏。

Build Error

I'm using ROS Noetic and catkin tools. When I clone the repository and run catkin build, it gives me a compilation error saying that I'm missing a curly bracket at line 1251, saying it expected '}' at the end of input:

..../src/LiDAR_IMU_Init/src/laserMapping.cpp:1251:1: error: expected ‘}’ at end of input 1251 | }

How can I go about fixing this issue? Thanks.

Wheel Robot

Hi,

Thanks for this great work. I was wondering would this initialization method work on a wheeled robot where the sensors are already mounted? We can only do the Z-axis excitation by rotating the robot on Z. X and Y axes rotations are not possible. Thanks!

LaserMapping-cpp:1283:1: ERROR

Hello. I have the following error when compiling Lidar-IMU-Init.
I am running 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz. Virtual Box - Ubuntu 18.04
IMU-init ERROR-01

I have tried to apply the fix on Issue #7
But then I get this error below. Not sure if I applied the fix correctly since I am not a coder.

IMU-int-ERROR-02

Can some one help with this? Thank you in advance.

标定建图后地面有很大的倾斜角度

您好,感谢您出色的工作。有个问题想要咨询下您,我用LI-Init标定后,用FAST-LIO建图,整个地面是倾斜的,轨迹在z轴方向持续上扬,并且这个问题在其他slam算法中也存在,请问这是lidar与imu没有标定好的原因吗,还是有其他的原因,这个问题困扰我很久了,我尝试过各种方法,但一直没有解决,非常非常期待您的回复。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.