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

don't understand the specified imu frame in robot_localization package

asked 2021-09-20 11:12:20 -0600

implementor gravatar image

The document of robot_localization link text 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.

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

So, my question is:

if the imu body frame follows the REP-103, which means it follows x-forward y-left z-up, is the measurement supposed to be -9.81 for z-axis when the imu is placed on a flat surface?

if the imu sensor is rolled +90 degrees (left side up), the y-axis should be up. In this situation, is the measurement supposed to be -9.81 for y-axis?

If the sensor is pitched +90 degrees (front side down), the x-axis should be down. In this situation, is the measurement supposed to be +9.81 for x-axis?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-09-21 07:55:46 -0600

Mike Scheutzow gravatar image

updated 2021-09-22 06:13:10 -0600

No, the sign is reversed from what you are saying. The z-axis measurement is reported as +9.81 if the sensor's z-axis points upward (toward the sky.) See https://www.ros.org/reps/rep-0145.htm... which explicltly describes how to handle this case (because it is non-intuitive.)

Here's one way to think about it: imagine the robot is floating in space, with wheels touching a metal plate. The plate has to accelerate up the z-axis at 9.8 m/s^2 for the robot to experience the same forces it does on earth. Therefore both the plate and the robot are accelerating along z-axis at +9.8 m/s^2.

edit flag offensive delete link more

Comments

Thanks a lot! I get it!

implementor gravatar image implementor  ( 2021-09-23 01:01:15 -0600 )edit
0

answered 2023-05-20 02:17:36 -0600

gowtham128 gravatar image

The measurement in Z axis should be +9.81 if the Z axis points upwards, because an imu sensor does not measure the acceleration acting on it it measures the inertial force acts against the gravity. Example lets say your imu mounted on flat surface with x-forward y-left z-up the gravity acts downwards(-z axis) to resist that gravity there will be a inertial force acts equal and opposite to gravity in the upward direction (+zaxis). And thats why you get +9.81 in Z axis

edit flag offensive delete link more

Question Tools

Stats

Asked: 2021-09-20 11:12:20 -0600

Seen: 166 times

Last updated: May 20 '23