How to fuse odometry and AR slam using robot_localization?
I am trying to use robot_localization to fuse wheel odometry and fiducial_slam and I am a little confused by the transforms.
In the current system, we have the wheel odometry publishing odom->base_link, and fiducials publishing map->odom.
When I run the EKF in this system (with publish_tf: false) and look at the /odom/filtered topic in rviz, it looks great, the kalman filter pose seems to track the robot pose in the real world very well.
The problem comes when I turn off the map->odom publishing from fiducials, and turn on publish_tf for robot_localization. This causes the position of the robot to fly off wildly every time we move.
I think this is because the wheel odometry data is published relative to the /odom frame, but there is no way to transform this into the /map frame without the kalman filter using it's own output, and this cyclical flow is causing wild instability.
How should I go about trying to solve this issue? How do you fuse map relative and odom relative pose measurements.
Edit: localization config
frequency: 10
two_d_mode: true
map_frame: map
odom_frame: odom
base_link_frame: base_footprint
world_frame: map
publish_tf: true
# x, y, z,
# roll, pitch, yaw,
# vx, vy, vz,
# vroll, vpitch, vyaw,
# ax, ay, az
odom0: /odom
odom0_config: [true, true, false,
false, false, true,
false, false, false,
false, false, true,
false, false, false]
odom0_differential: false
odom0_relative: true
#imu0: /imu
#imu0_config: [false, false, false,
# false, false, true,
# false, false, false,
# false, false, true,
# false, false, false]
#imu0_differential: true
#imu0_relative: true
pose0: /fiducial_pose
pose0_config: [true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
pose0_rejection_threshold: 3
# x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az
process_noise_covariance: [0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.000, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.000, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00, 0, 0,
0, 0, 0 ...