ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

IMU and Wheel Encoder Calibration

asked 2020-08-25 09:55:47 -0500

hoang khac gravatar image

Hi, I am trying to do localization based on Wheel Odometry, IMU, GNSS and LiDAR. I figured that i first need to do calibration for all the sensors, i.e all of them to be reference from the same frame base_link. I am stuck at trying to do calibration for IMU and Wheel Odometry. From what i found on a couple of papers, what people normally do is to perform IMU Odometry and Wheel Odometry, gets the trajectories and solve the hand-eye calibration problem (AX =XB).

  1. I am afraid that the solution from the IMU Odometry and Wheel Odometry will not be closely related, as in there will not be a matrix X that satisfy AX = XB, due to the difference in the trajectories computed. What can i do should this problem occurs? I am thinking of performing odometry in a shorter distance to avoid odometry.

  2. Is there a different way to do the calibration? So far I have only found the hand-eye calibration as the only mean to calibration these sensors.

If you have any information with me that you would like to share, all are welcome. Thank you very much.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-08-27 01:43:46 -0500

Nitesh_j gravatar image

Hello there,

Am not sure about how to calibrate the IMU, but you can go through [link text] this link which is from ROS Navigation Tunning , where you use it for checking your the Odom (

edit flag offensive delete link more


Thank you very much. I will take a look at the link.

hoang khac gravatar image hoang khac  ( 2020-08-27 03:45:19 -0500 )edit

answered 2020-08-26 04:10:21 -0500

Ahmed_Desoky gravatar image

updated 2020-08-27 00:28:27 -0500

I think this links will help you

these liks for IMU calibration"

link text

link text

link text

link text

and this link for Odometry Errors"

link text

Edit 1 From the static_transform_publisher:

static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms

Publish a static coordinate transform to tf using an x/y/z offset in meters and yaw/pitch/roll in radians. (yaw is rotation about Z, pitch is rotation about Y, and roll is rotation about X). The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value.

The General Form:

     <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1 100" />

In your launch file (for example)
    <node pkg="tf" type="static_transform_publisher" name="imu_to_base" 
    args="0 0 .1 0 0 0 base_link imu_link 50" />    
    <node pkg="i2c_imu" type="i2c_imu_node" name="i2c_imu" output="screen" >
    <rosparam file="$(find i2c_imu)/param/imu.yaml"/>       

Summery: To align the imu to the vehicle, you should modify the six value of the previous "static_transform_publisher"

edit flag offensive delete link more


Can you please update your answer with the relevant information? Link-only answers are discouraged.

jayess gravatar image jayess  ( 2020-08-26 13:47:31 -0500 )edit

Hi, Thank you very much for your answer. Unfortunately, I might have been not too clear with my questions. I have an IMU module on a vehicle. I want to align the frame of reference of the IMU to the frame of reference of the car. The IMU has been intrinsically calibrated, but i am looking for a method of extrinsic calibration.

hoang khac gravatar image hoang khac  ( 2020-08-26 21:32:35 -0500 )edit

Hi, the answer is edited

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-08-27 00:29:30 -0500 )edit

Hi, Thank you very much. Your answer is what i need for the launch file. I am looking for the correct x y z yaw pitch roll values. Do you know how to get it from the IMU data and Wheel odometry data? My imu message is in the format of sensor_msgs/Imu and the wheel odometry is nav_msgs/Odometry.

hoang khac gravatar image hoang khac  ( 2020-08-27 03:45:05 -0500 )edit

I can't understand your problem till now. Where your urdf file?

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-08-27 03:50:41 -0500 )edit

Thank you so much for trying to help me out. I will try to explain the question more clearly. I don't have a urdf file for now.

I have an IMU which is fixed on a car. I am trying to get the transformation between the IMU frame and the wheel odometry frame. For example, let the x-axis of the wheel odometry be the forward facing of the vehicle. if the y axis of the IMU frame is on the x axis on the wheel odometry frame, then when the car moves forwards the IMU will report that the car is moving side way.

hoang khac gravatar image hoang khac  ( 2020-08-28 02:30:26 -0500 )edit

So, To solve your problem, you must generate a urdf file. The answer has been edited.

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-08-28 04:06:54 -0500 )edit

I understand that i need a transformation from the IMU to the Wheel Odometry frame from the tf libraty. I an looking for a method of determining what the values of the elements in the tf.

hoang khac gravatar image hoang khac  ( 2020-08-28 04:19:12 -0500 )edit

Question Tools



Asked: 2020-08-25 09:55:47 -0500

Seen: 1,122 times

Last updated: Aug 27 '20