Pose estimation with GNSS (RTK) + heading + IMU is drifting
I'm trying to use robot_localization to get a pose estimation for my Moving Base RTK Application. As Sensors I only use a GPS module which outputs position and world referenced heading information as well as a BNO055 IMU. I fuse GPS position and heading into navsat_transform and let it produce odometry messages. Position, Odometry and accelleration is fused into two ekf nodes to produce map->odom and odom->base_link tf. So far my tf tree looks promising, but when I watch my data via mapviz my estimated position drifts drastically and random over time even when I don't move.
My ekf param file for map->odom:
frequency: 5
two_d_mode: true
print_diagnostics: true
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: headingkit/base_link
world_frame: map
odom0: odometry/gps
odom0_config: [true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
imu0: ubxreader/navheading
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 5
imu1: imureader/imu
imu1_config: [false, false, false,
false, false, false,
false, false, false,
false, false, true,
true, true,false]
imu1_nodelay: false
imu1_differential: false
imu1_relative: false
imu1_queue_size: 5
My ekf param file for odom->base_link:
frequency: 5
two_d_mode: true
print_diagnostics: true
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: headingkit/base_link
world_frame: odom
imu0: ubxreader/navheading
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 5
imu1: imureader/imu
imu1_config: [false, false, false,
false, false, false,
false, false, false,
false, false, true,
true, true,false]
imu1_nodelay: false
imu1_differential: false
imu1_relative: false
imu1_queue_size: false
I double checked the coordinate frame of my IMU and it turns the same way as my GPS heading does. What did I do wrong?
EDIT1:
When removing /imureader/imu from both ekf I noticed 3 things: 1) While testing wihtout editing my files any further, the odometry & position estimate drift sothwards. (even with no motion) 2) When commenting out "magnetic declination radians" @ navsat node I get a reasonable result for my position estimation. BUT: Every Position seems to be displaced (by ~5-10° with respect to north probably). 3) My estimated position always starts at my map origin. And visualized odometry (mapviz) always point to the same heading (0).
Try removing the
imureader/imu
entirely from both nodes (if its not too hard) and observe if you get the same behavior please.I tried it out and edited my question.