Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had a quick look at the bag file you posted (thanks for doing that). One thing I noticed is that you are not fusing any sources of absolute yaw orientation. In your first EKF (odom one), you do actually specify that the yaw should be fused from your imu, but by setting the imu_differential parameter to true, robot_localization will only look at the difference between yaw measurements. So what happens is the r_l nodes initialize the filter estimate with an orientation of unit quaternion (i.e., 0 deg yaw), and all subsequent imu data which impacts yaw is only changing it relative to the starting estimate of 0 degrees.

To fix this, you could include the imu yaw measurements without setting the differential parameter to true. I've used the GX5-25 before and can verify that if you set everything up correctly (e.g., magnetic calibration on robot, proper declination specified, proper base_link to imu_link transform, etc.), it can provide sufficiently accurate heading estimates.

There might be other issues with your setup, so if you're still having problems feel free to update your question with another bag file (a good test would be driving a 10 m x 10 m box so you know roughly what your odometry should look like).