APRIL-ZJU / lidar_IMU_calib

[IROS 2020] Targetless Calibration of LiDAR-IMU System Based on Continuous-time Batch Estimation
GNU General Public License v3.0
942 stars 224 forks source link

How to use my own data? #1

Open qian5683 opened 4 years ago

qian5683 commented 4 years ago

Thanks for your good job. But I have some questions about how to use my own data. My lidar device is RoboSense Lidar-16. and there is a error:

Load dataset from /home/qian/rosbag/lidarimu0903.bag /rslidar_packets: 300 /imu/data: 5999 [li_calib_gui-2] process has died [pid 2424, exit code -11, cmd /home/qian/catkin_li_calib/devel/lib/li_calib/li_calib_gui name:=li_calib_gui log:=/home/qian/.ros/log/1caebfe4-ecf3-11ea-b9b2-244bfe93b8c4/li_calib_gui-2.log]. log file: /home/qian/.ros/log/1caebfe4-ecf3-11ea-b9b2-244bfe93b8c4/li_calib_gui-2*.log

icameling commented 4 years ago

@qian5683

  1. Currently, the LI-Calib toolkit only supports VLP-16.
  2. If you want to use the other LiDARs, there are two main functions that need to be modified :
qian5683 commented 4 years ago

hi~, I've modified the code and used it for my own data. However, there is a problem. The translation I calibrated is very large and does not meet the expectation. I want to know:

  1. What maybe causes this error.
  2. Are there any requirements for recording rosbag. For example, what are the requirements for motion trajectory
jayjayhee commented 4 years ago

Hi,

I think I've modified the two functions you mentioned above properly and the initialization step has been done without errors, But it looks like the toolkit only supports organized pointcloud (currently with a height of 16 using VLP-16), and the lidar I'm using only generates pointcloud data unorganized with a height of 1. So I was wondering if there are any functions I need to modify before I can use this toolkit? I've tried to modify those functions requiring two parameters (width and height) such that they take only one (width), but it doesn't seem to work very well. The data association function returns:

Plane type :0 0 0; Plane number: 0 [ WARN] [1599639840.190547592]: [DataAssociation] fails. Please let me know if there's anything I can do to make it work. Thanks!! XXD

Best regards Jay

noodlles commented 4 years ago

hi~, I've modified the code and used it for my own data. However, there is a problem. The translation I calibrated is very large and does not meet the expectation. I want to know:

  1. What maybe causes this error.
  2. Are there any requirements for recording rosbag. For example, what are the requirements for motion trajectory

hi,you use the toolkit on your own car(much bigger than the paper)?It can almost only perform plane motion,which cannot ensure imu have sufficient linear acceleration and rotational velocity in x,y,z axis?

icameling commented 4 years ago

hi~, I've modified the code and used it for my own data. However, there is a problem. The translation I calibrated is very large and does not meet the expectation. I want to know:

  1. What maybe causes this error.
  2. Are there any requirements for recording rosbag. For example, what are the requirements for motion trajectory

@qian5683

Data requirements

[1] LIC-Fusion 2.0 https://arxiv.org/pdf/2008.07196.pdf (Section IV. OBSERVABILITY ANALYSIS) [2] Hesch, Joel. (2016). Consistency Analysis and Improvement for Vision-aided Inertial Navigation. Retrieved from the University of Minnesota Digital Conservancy, http://hdl.handle.net/11299/180208. (Section 2.6 IMU-Laser Scanner Extrinsic Calibration)

narutojxl commented 4 years ago

Hi author, I don't have a hardware to do time synchronization, use rqt_bag it seems msgs distribute evenly. image

The NDT_target_map.pcd basically meets the environmental scene, but the refined_map.pcd is mess. image image

icameling commented 3 years ago

@narutojxl

Please check out the surfels map after the first Association, and make sure there are enough surfels in the direction of x-axis, y-axis and z-axis. It's better to collect calibration sequence in a structured environment with big planes.

narutojxl commented 3 years ago

@icameling, thanks for your advise, I will find a place meets this requirements to do experiment :)

narutojxl commented 3 years ago

@icameling, hi author, Following your advice, I do the experiment in a small room surrounded by walls. I move imu and laser around and along X,Y, Z axis separately to sample data. After first Association finished, there are many planes fit the walls: data_association when first refine finished, the result is something wrong. The result has not improved, even if refine is continuously executed. My param is as following(time offset got from rqt_bag, by manual observation). The bag data is here,,

<arg name="time_offset_padding" default="0.001" /> <!--0.015-->
<arg name="show_ui"    default="true" />

The terminal result is: Note: Although the terminal display has converged, the result is completely wrong.

Load dataset from /home/jxl/Documents/lidar_imu_calib_result/C1_11F_lidar_imu_sampledata/2020-09-16-15-59-39_big_house.bag /velodyne_packets: 910 /imu/data: 5000 Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts.

Ceres Solver Report: Iterations: 51, Initial cost: 6.906546e+05, Final cost: 3.015079e+02, Termination: NO_CONVERGENCE
[Initialization] Done. Euler_ItoL initial degree:  178.244  -177.28 -172.971

[Association] start ....
Plane type  :148 103 180; Plane number: 431
Surfel point number: 81558
[Association] 67809.2 ms

================ Iteration 0 ==================
Ceres Solver Report: Iterations: 121, Initial cost: 1.197994e+07, Final cost: 5.879937e+05, Termination: CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585;  0.134748  0.133536 0.0563047
[Accel] Error size, average: 4585;  0.0783432 0.0432497 0.0950025
[LiDAR] Error size, average: 81558; 0.184476

P_LinI      :  0.0096321 -0.0583626   -1.15264
euler_LtoI  :  2.99366 0.706655  58.5238
P_IinL      : 0.0886249 0.0821533   1.14781
euler_ItoL  : 177.834 177.816 121.499
time offset : 0
gravity     :   -1.8447 -0.335032   9.60879
acce bias   :  0.250138 -0.192866 0.0372121
gyro bias   :   0.0103923 -0.00936599 -0.00503104
[BatchOptimization] 163356 ms

================ Iteration 1 ==================
[Association] start ....
Plane type  :5 1 7; Plane number: 13
Surfel point number: 1000
[Association] 18330.9 ms
Ceres Solver Report: Iterations: 201, Initial cost: 1.993042e+05, Final cost: 3.300348e+04, Termination: NO_CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585; 0.0514282 0.0520165 0.0321376
[Accel] Error size, average: 4585;  0.0208095 0.0155759 0.0465463
[LiDAR] Error size, average: 1000; 0.197449

P_LinI      : -2.32769 -3.49175   2.3051
euler_LtoI  :   177.47 -163.953 -168.067
P_IinL      : 2.34987 3.17279 -2.7084
euler_ItoL  :  5.96376  15.1328 -13.0828
time offset : 0
gravity     : -6.19972 -3.13915  6.89589
acce bias   :  3.84131  1.39964 0.670884
gyro bias   :  0.0160932 0.00051557 0.00186257
[Refinement] 44252.6 ms

================ Iteration 2 ==================
[Association] start ....
Plane type  :25 16 57; Plane number: 98
Surfel point number: 536
[Association] 18385.8 ms
Ceres Solver Report: Iterations: 123, Initial cost: 2.843387e+04, Final cost: 2.425103e+04, Termination: CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585; 0.0504337 0.0472536  0.029875
[Accel] Error size, average: 4585;   0.020195 0.0135573 0.0399376
[LiDAR] Error size, average: 536; 0.0970633

P_LinI      : -3.20017 -4.12333  1.94568
euler_LtoI  :  6.96212 -17.4698  10.3303
P_IinL      : 2.97674 3.37805 -3.2797
euler_ItoL  : 176.024 161.645 171.383
time offset : 0
gravity     : -6.33728 -2.79176  6.92019
acce bias   :  4.37851  1.51152 0.888586
gyro bias   :    0.0139098 -0.000735396   0.00314523
[Refinement] 21040.2 ms

================ Iteration 3 ==================
[Association] start ....
Plane type  : 13  15 122; Plane number: 150
Surfel point number: 800
[Association] 18593.7 ms
Ceres Solver Report: Iterations: 26, Initial cost: 2.345097e+04, Final cost: 2.334657e+04, Termination: CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585; 0.0502834 0.0469197  0.029966
[Accel] Error size, average: 4585;  0.0202703 0.0135586  0.039756
[LiDAR] Error size, average: 800; 0.0125079

P_LinI      : -3.22242 -4.10098  1.93203
euler_LtoI  :  6.99051 -17.1054  9.75836
P_IinL      :  2.98483  3.37833 -3.25768
euler_ItoL  : 175.752  162.04 171.966
time offset : 0
gravity     : -6.34575 -2.80172   6.9084
acce bias   :   4.3993  1.51087 0.897642
gyro bias   :     0.013666 -0.000854228   0.00302885
[Refinement] 4626.24 ms

================ Iteration 4 ==================
[Association] start ....
Plane type  : 16  17 133; Plane number: 166
Surfel point number: 884
[Association] 18639.6 ms
Ceres Solver Report: Iterations: 31, Initial cost: 2.334325e+04, Final cost: 2.329166e+04, Termination: CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585; 0.0501724 0.0468462 0.0299202
[Accel] Error size, average: 4585;  0.0203146 0.0135702 0.0396821
[LiDAR] Error size, average: 884; 0.012153

P_LinI      : -3.22564 -4.09614   1.9202
euler_LtoI  :  7.24535 -16.8125  9.45732
P_IinL      :  2.98282  3.37704 -3.25095
euler_ItoL  : 175.349 162.317 172.339
time offset : 0
gravity     : -6.34777 -2.80218  6.90635
acce bias   : 4.41002 1.51142 0.90247
gyro bias   :    0.0135861 -0.000874201   0.00295927
[Refinement] 5458.55 ms

================ Iteration 5 ==================
[Association] start ....
Plane type  : 18  12 142; Plane number: 172
Surfel point number: 901
[Association] 19696.2 ms
Ceres Solver Report: Iterations: 29, Initial cost: 2.328773e+04, Final cost: 2.326717e+04, Termination: CONVERGENCE

============== After optimization ================
[Gyro]  Error size, average: 4585; 0.0501242 0.0468216 0.0299117
[Accel] Error size, average: 4585;  0.0203191 0.0135803 0.0396618
[LiDAR] Error size, average: 901; 0.0112675

P_LinI      : -3.22544 -4.09933  1.91412
euler_LtoI  :  7.43774 -16.6043  9.36238
P_IinL      : 2.98595 3.37628 -3.2491
euler_ItoL  :  175.09 162.504  172.48
time offset : 0
gravity     : -6.34759 -2.80068  6.90713
acce bias   :  4.41377  1.51216 0.904278
gyro bias   :   0.0135546 -0.00086725  0.00291006
[Refinement] 5377.06 ms

Any help and suggestion will be very appreciated a lot ~

zhangfan950304 commented 3 years ago

Hello, the lidar I used is not vpl-16. The horizontal angle of lidar I used can only take 210 degree point cloud data, and the remaining 150 degree point cloud data is Nan. In this case, can I still use this program to calibrate?

In addition, since the radar used is not vpl-16, the two files mentioned above have been modified in the program.

I also want to ask if it can be used for calibration, do I need to modify other contents of the program?

goktugyildirim commented 3 years ago

Hi author, I don't have a hardware to do time synchronization, use rqt_bag it seems msgs distribute evenly. image

  • When Initialization finished, the initial value of rotation seems correct. My imu basically aligins with laser(rotation approximate identity)

[Initialization] Done. Euler_ItoL initial degree: 3.78477 0.405341 -1.24306

  • Association shows that we have got Plane type :65 1 55; Plane number: 121.
  • When Batch finished, the result is different from the initial value. It seems thant it converges to the wrong solution.

euler_ItoL : 57.4901 5.51252 -8.14225

  • When Refine finished, plane number decrease, not increase.

Plane type :16 8 11; Plane number: 25 ... refine refine ...

The NDT_target_map.pcd basically meets the environmental scene, but the refined_map.pcd is mess. image image

could you identify why tool behaves like this?

guo-zixuan commented 3 years ago

@goktugyildirim Hello, have you Completed lidar-imu calibration? I have a try by this work,but I failed.Do you have any suggestions else?

Chrislzy1993 commented 3 years ago

hi~, I've modified the code and used it for my own data. However, there is a problem. The translation I calibrated is very large and does not meet the expectation. I want to know:

  1. What maybe causes this error.
  2. Are there any requirements for recording rosbag. For example, what are the requirements for motion trajectory

@qian5683 , hello, i use plane motion imu data to do this calibration, it fail on init part with a NAN fault happend on ceres solver, i check my imu raw data, there is no nan value, and i am confuse and helpless. did you calib with plane motion data as metion below, and how is the result?

af-doom commented 1 year ago

@goktugyildirim Hello, have you Completed lidar-imu calibration? I have a try by this work,but I failed.Do you have any suggestions else?