TixiaoShan / LIO-SAM

LIO-SAM: Tightly-coupled Lidar Inertial Odometry via Smoothing and Mapping
BSD 3-Clause "New" or "Revised" License
3.45k stars 1.26k forks source link

Catastrophic fail with simulation of mid360 #407

Closed fratopa closed 1 year ago

fratopa commented 1 year ago

Hi, I am currently testing your wonderful SLAM system and but I am having quite a few problems setting everything up. I believe the problems stem from an improper calibration between the IMU and LiDAR frames but I can't seem to make them work I ran some tests using these calibration tools obtaining the following results:

Refinement result:
Rotation LiDAR to IMU (degree)     = -4.190764 10.136540  0.457075
Translation LiDAR to IMU (meter)   =  0.019770 -0.021399  0.055599
Time Lag IMU to LiDAR (second)     = -0.080000
Bias of Gyroscope  (rad/s)         = -0.000881  0.005376 -0.002475
Bias of Accelerometer (meters/s^2) = 0.234154 0.052154 0.041102
Gravity in World Frame(meters/s^2) = -0.247655 -0.030846 -9.819398

Homogeneous Transformation Matrix from LiDAR to IMU: 
 0.984362 -0.020814  0.174923  0.019770
 0.007852  0.997192  0.074470 -0.021399
-0.175982 -0.071932  0.981762  0.055599
 0.000000  0.000000  0.000000  1.000000

However, since I have the sdf file of the robot I know where I placed the sensors, i.e.:

<link name = "lidar_link">
      <pose>0.05 0.0 0.3 0.0 0.0 0.0</pose>

and

<link name = "imu_link">
      <pose>-0.05 0.0 0.26 0.0 0.0 0.0</pose>

respectively.

If I use the geometrically accurate values for the extrinsic translation: extrinsicTrans: [-0.1, 0, -0.04] I obtain the following result: image

The only way to obtain a somewhat convincing result is to set the gravity to zero: image

I have no clue what else to try, if anyone has any idea I leave a bag here: https://drive.google.com/drive/folders/1tDSTUFa_cjk_xvQPDTZA-OYF0lj6Kwsk?usp=sharing

fratopa commented 1 year ago

Solved, you can read more here

TZECHIN6 commented 3 months ago

Hi I am trying to work with the MID360 livox lidar for LIO-SAM. I have several questions would like to ask:

  1. Do you use CustomMsg or PointCloud2Msg?
  2. For the IMU issue, current driver will set gravity to 1 which is converted. Do I have to comment out this conversion from the driver to make it works?

Thanks.

makanov001 commented 1 week ago

Hi I am trying to work with the MID360 livox lidar for LIO-SAM. I have several questions would like to ask:

  1. Do you use CustomMsg or PointCloud2Msg?
  2. For the IMU issue, current driver will set gravity to 1 which is converted. Do I have to comment out this conversion from the driver to make it works?

Thanks.

Hello, I am also trying to use mid360 to run lio-sam on ros2-humble. Have you solved the above problems? Can you share your experience? Thank you