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

robot_localization gravity removal

asked 2015-03-10 10:04:12 -0500

I am using the last version of robot_localization.

I have a 3DM-GX3-5 OEM IMU sensor in my robot. I want to remove the effect of gravity in the EKF.

I have set the parameter in the launchfile so to do that. However, my results are not good because (I suppose) the EKF thinks there is some acceleration in Y axis.

I don't know exactcly how does it work, but I can imagine that the filter use the orientation given by the IMU topic to remove the acceleration due to gravity in the 3 axis. If I am right, the problem might be in the orientation calibration.

Any idea of what can be happening?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-10 15:51:29 -0500

Tom Moore gravatar image

updated 2015-03-10 15:56:21 -0500

What kind of IMU are you using? Does it conform to the ROS spec? See this page on the wiki, and make sure your IMU behaves as specified.

EDIT: as to how ekf_localization_node handles linear acceleration, it first uses the orientation as reported by that IMU to determine what an IMU at rest would read due to gravitational acceleration. It then removes the appropriate value from each axis.

edit flag offensive delete link more


I am using 3DM-GX3-5 OEM, which is supported in ROS (It has its own drivers). I think the problem is that the magnetometer is not well calibrated becasuse: 1. The gravity is completely removed in X axis. 2. In the EKF output, the Vy increases continously

arenillas gravatar image arenillas  ( 2015-03-10 17:50:41 -0500 )edit

Being supported by ROS might not be enough. I'd have to look at the driver, but the Microstrain IMUs report data in NED, and robot_localization assumes ENU. One quick test you can do is to set the IMU flat on a table, face up, and read the Z acceleration. If it's negative, you have a problem.

Tom Moore gravatar image Tom Moore  ( 2015-03-11 07:27:10 -0500 )edit

Which driver are you using?

Tom Moore gravatar image Tom Moore  ( 2015-03-11 07:29:57 -0500 )edit

It is positive, because it has the Z axis going down. I am using this driver:

arenillas gravatar image arenillas  ( 2015-03-12 08:48:28 -0500 )edit

I think that for an ENU sensor, the Z axis points up, and on a flat surface, the acceleration should read +Z. This is because when it's on the ground, the IMU is undergoing acceleration is the direction opposite the gravity vector.

Tom Moore gravatar image Tom Moore  ( 2015-03-13 05:05:59 -0500 )edit

Also, see this question, and the fork I created. Our GX-2s were not behaving as I expected, which may have been an issue with our sensors, but I had to make some changes.

Tom Moore gravatar image Tom Moore  ( 2015-03-13 05:13:59 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-10 10:04:12 -0500

Seen: 1,982 times

Last updated: Mar 10 '15