hdl_localization icon indicating copy to clipboard operation
hdl_localization copied to clipboard

what is invert_imu

Open HaoyunXu opened this issue 7 years ago • 5 comments

On default, the invert_imu is enabled but the localization just failed when the car turns. Then I turned it off, and everything works perfectly fine. Could you give me a hint of what this invert_imu does?

HaoyunXu avatar Feb 09 '19 01:02 HaoyunXu

Hi @HaoyunXu , If it is enabled, all IMU data will be inverted (multiplied by -1). It was made for backward compatibility with a specific sensor. I think I will make it disable by default. Thanks for reporting.

koide3 avatar Mar 15 '19 13:03 koide3

I did a test, it seems that when using hdl_400.bag.tar.gz with imu, the imu's acc and gyro in the bag, we should enable invert_imu_acc and invert_imu_gyro. Note: imu's orientation is not used.
Before using imu, we should firstly transform imu's data into laser, if they are not aligned. Am i correct @koide3 :)?

narutojxl avatar Feb 25 '21 10:02 narutojxl

Yes, the acc and gyro in the bag are inverted, and thus invert_imu_acc and invert_imu_gyro need to be enabled. plot_status.py is useful to validate the IMU directions that plots prediction errors with/without IMU. If the errors with IMU are smaller than without IMU, your IMU configuration should be fine.

Screenshot_20210122_114421

In case the LIDAR and IMU have different coordinate systems, it's better to change odom_child_frame_id to the imu frame. Then, input point cloud is transformed in the IMU frame, and localization should be done without problems.

koide3 avatar Mar 01 '21 03:03 koide3

Thanks for koide3's detailed reply. :+1:

narutojxl avatar Mar 01 '21 03:03 narutojxl