Rosanswers logo

I am using the package robot_localization with an IMU. In the docs, the Preparing Your Data for Use with robot_localization, it says

Adherence to specifications: As with odometry, be sure your data adheres to REP-103 and the sensor_msgs/Imu specification. Double-check the signs of your data, and make sure the frame_id values are correct.

REP-103 says the axes should be oriented in the following fashion:

  • x forward
  • y left
  • z up

Which means when an IMU is placed in its neutral position (flat on the surface), the axes should look like this:

So for acceleration due to gravity, it should measure - (minus) 9.8 meters per second squared for the Z axis. However the docs say:

Acceleration: Be careful with acceleration data. The state estimation nodes in robot_localization assume that an IMU that is placed in its neutral right-side-up position on a flat surface will:

  • Measure +9.81 meters per second squared for the Z axis.
  • If the sensor is rolled +90 degrees (left side up), the acceleration should be +9.81 meters per second squared for the Y axis.
  • If the sensor is pitched +90 degrees (front side down), it should read -9.81 meters per second squared for the X axis.

This would mean the axes are oriented in the following manner, implying left handed coordinate system:

I am definitely missing something here. Can anyone help?

Originally posted by Subodh Malgonde on ROS Answers with karma: 512 on 2018-07-24

Post score: 2

Original comments

Comment by Subodh Malgonde on 2018-07-24:
@Tom Moore I avoided posting an issue in the robot_localization repository since most recent issues have been directed towards answers.ros.org. Please help.


1 Answer 1


Rosanswers logo

I found the answer to my question. See these 2 posts:

  1. IMU convention for robot_localization
  2. Why do 3-axis accelerometers seemingly have a left-handed coordinate system?

To summarize, in static condition the IMU measures the opposite of gravity acceleration.

Originally posted by Subodh Malgonde with karma: 512 on 2018-07-24

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Martin Günther on 2018-07-24:
That's the perfect answer to the question. Thanks for taking the time to answer your own question and helping others! :)

Comment by Tom Moore on 2018-07-30:
Apologies for not responding in a timely fashion, but I'm glad you were able to track down the correct answer!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.