5 sec delay in yaw rate fusing radar and IMU Robot Localization [closed]
I am using a ground robot and trying to fuse x velocity from the radar and angular z velocity from the IMU in Robot Localization to estimate odometry. I have a consistent 5 sec delay between the angular rate of the IMU vs the angular rate of the odometry message. This obviously make my robot do the turns 5 seconds later than it should.
IMU message
header:
seq: 6420
stamp:
secs: 1583884429
nsecs: 8326609
frame_id: "imu_link"
orientation:
x: -0.00182108255529
y: -0.0154610365419
z: -0.592995859678
w: 0.805054998377
orientation_covariance: [1e-05, 0.0, 0.0, 0.0, 1e-05, 0.0, 0.0, 0.0, 1e-05]
angular_velocity:
x: -0.0146767685242
y: -0.00264796876277
z: 0.00796559285187
angular_velocity_covariance: [1.218467815533586e-07, 0.0, 0.0, 0.0, 1.218467815533586e-07, 0.0, 0.0, 0.0, 1.218467815533586e-07]
linear_acceleration:
x: 0.262929823748
y: 0.0700912966914
z: 9.64307111704
linear_acceleration_covariance: [8.661248102725949e-06, 0.0, 0.0, 0.0, 8.661248102725949e-06, 0.0, 0.0, 0.0, 8.661248102725949e-06]
Radar velocity message
header:
seq: 908
stamp:
secs: 1583884414
nsecs: 817418000
frame_id: "base_radar_link"
twist:
twist:
linear:
x: 0.955666473669
y: 0.0772511278807
z: -0.179226648605
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.015, 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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Params
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false
map_frame: map # Defaults to "map" if unspecified
odom_frame: odom # Defaults to "odom" if unspecified
base_link_frame: base_link # Defaults to "base_link" if unspecified
world_frame: odom # Defaults to the value of odom_frame if unspecified
twist0: /mmWaveDataHdl/velocity
twist0_config: [false, false, false,
false, false, false,
true, false, false,
false, false, false,
false, false, false]
twist0_queue_size: 3
twist0_nodelay: false
# Jackal's IMU is in ENU frame so it conforms to REP-103
imu0: /imu/data_added_cov
imu0_config: [false, false, false,
false, false, false,
false, false, false,
false,false, true,
false, false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 5
My robot cannot move laterally and it is in 2D mode that is why only the x component of the linear velocity is fused in. Here is a plot in Matlab of a part of the bagfile. You can see how the radar velocity vs odom velocity are both synchronized. However, the angular rate in the odometry is 5 seconds delayed compared to its respective IMU rate (which should be the same since it is the only input for angular rate).
There is something a bit weird with the covariance. It starts ramping up until 5 seconds and then it goes back down again. The value of ...