Persistent Transform Warning in robot_localization
I am fusing odometry, imu, and ultrasonic beacon data using two robot_localization Kalman filters - one creating a fused odometry measurement and publishing the /odom frame, and a second fusing a world pose gathered from Marvelmind Ultrasonic Beacons.
We have used the setup for a number of years with no real issues, but it seems that recently something has changed which is now triggering a stream of warnings from our map kalman filter. It is not obvious when this change was introduced, or if it is detrimental (switching from kinetic to melodic, building ros for python 3, switching hardware platforms)
While our localization runs, we get a stream of messages like this:
Node: /ekf_map
Time: 11:46:05.217432323 (2020-01-24)
Severity: Warn
Published Topics: /diagnostics, /odom_map, /rosout, /tf
Transform from odom to map was unavailable for the time requested. Using latest instead.
Also including warning such as:
[ WARN] [1579896201.631471320]: Transform from beacon_frame to map was unavailable for the time requested. Using latest instead.
[ WARN] [1579896203.627275704]: Transform from imu to base_footprint was unavailable for the time requested. Using latest instead.
I have looked through all the other posts that address this, which are largely centered around navsattransform nodes, where time lag is the root of the issue. Our beacons are emitting measurements at around 4hz, so it makes sense to me that it could be a related problem. However, I have tried all the methods suggested for people having those issues (adjusting transformtimeoffset, predict to current time, sensor_timeout values, etc) with no luck.
All of my relevant frames are publishing, and I have verified they are current at the time that the warnings are being generated. I am ultimately at a loss for what the issue may be.
If you are able to provide any additional insight, it would be much appreciated. Find attached the frames, configurations for each kalman filter, and a 60s ros bag of sensor data, fused odometry, and tf output.
I don't have enough karma to upload files directly it seems, so find the files in this shared folder: https://drive.google.com/open?id=1RsLdp-203cd4ZU27ywfnmMz-Oja5F28e
A few notes on the tf tree - we have static transforms defining:
map -> beacon_frame
base_footprint -> base_link
base_link -> imu
base_link -> hedge_link
Odometry EKF (fusing imu and wheel encoder data):
frequency: 24
sensor_timeout: 0.05
two_d_mode: true
transform_time_offset: 0
transform_timeout: 0.0
publish_tf: true
publish_acceleration: false
odom_frame: odom
base_link_frame: base_footprint
world_frame: odom
odom0: odom_wheels
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, false,
false, false, false]
odom0_queue_size: 2
imu0: imu/data
imu0_config: [false, false, false,
false, false, false,
false, false, false,
true, true, true,
false, false, false]
imu0_relative: true
imu0_queue_size: 20
imu0_remove_gravitational_acceleration: true
use_control: false
stamped_control: false
control_timeout: 0.2
control_config: [true, false, false, false, false, true]
acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]
deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]
acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]
deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
Map EKF (fusing ultrasonic beacon data with odometry fused by the Odom EKF):
frequency: 16
two_d_mode: true
smooth_lagged_data: false
history_length: 0.0
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: odom
base_link_frame: base_footprint
world_frame: map
odom0: odom_combined
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, true,
false, false, false]
odom0_queue_size: 2
odom1: beacon_position
odom1_config: [true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
odom1_queue_size: 1
use_control: false
stamped_control: false
control_timeout: 0.2
control_config: [true, false, false, false, false, true]
acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]
deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]
acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]
deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
Noise and covariance omitted for space.
Sensor Message samples:
/odom_wheels:
header:
seq: 19040
stamp:
secs: 1579891290
nsecs: 464721624
frame_id: "odom_wheels"
child_frame_id: "base_footprint"
pose:
pose:
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
covariance: [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]
---
/imu/data:
header:
seq: 403501
stamp:
secs: 1579891414
nsecs: 101664760
frame_id: "imu"
orientation:
x: -0.786742403261
y: 0.612473567531
z: 0.00977750887993
w: -0.0762687374111
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
x: 0.000915425192671
y: 0.00085730572858
z: -0.00861861037927
angular_velocity_covariance: [2.7491722135750453e-06, 0.0, 0.0, 0.0, 2.7491722135750453e-06, 0.0, 0.0, 0.0, 2.7491722135750453e-06]
linear_acceleration:
x: 0.763055449085
y: 1.3033038065
z: -9.69750214544
linear_acceleration_covariance: [1.674436, 0.0, 0.0, 0.0, 1.674436, 0.0, 0.0, 0.0, 1.674436]
---
/beacon_position:
header:
seq: 19199
stamp:
secs: 1579891473
nsecs: 693391323
frame_id: "beacon_frame"
child_frame_id: "hedge_link"
pose:
pose:
position:
x: 6.1475
y: 2.6615
z: 3.5525
orientation:
x: 0.0
y: 0.0
z: -0.772037800083
w: 0.635576616344
covariance: [0.005, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.005, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.005, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.005, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.005, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [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, 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]
---
/odom_combined:
header:
seq: 31308
stamp:
secs: 1579891578
nsecs: 257664680
frame_id: "odom"
child_frame_id: "base_footprint"
pose:
pose:
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.62573114327
w: 0.780038804382
covariance: [85.67556506616424, 2.103009670226379e-18, 0.0, 0.0, 0.0, 0.0, 1.8558686446597542e-18, 85.67556506616424, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.958676455387317e-07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.918026251114548e-07, 3.450719817404216e-31, 0.0, 0.0, 0.0, 0.0, -3.0591936385091643e-31, 9.918026251114548e-07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 78.27656137363587]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.000374842022831
covariance: [0.027805935166442152, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.027805935166442152, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.938268473526647e-07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.761766708898828e-07, 2.9363719935312074e-39, 0.0, 0.0, 0.0, 0.0, -2.5927429991194726e-39, 9.761766708898828e-07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.6606807955833276e-06]
---
Additional Platform Info: * Nvidia Xavier (ARM64) * ROS Melodic * robot_localization - ros-melodic-robot-localization/bionic 2.6.5-1bionic.20191211.234535
Prior Questions referenced: - https://answers.ros.org/question/285601/robot_localization-asking-for-map-to-odom-transform/ - https://answers.ros.org/question/300345/robot-localization-package-transform-from-base_link-to-odom-was-unavailable-for-the-time-requested-using-latest-instead-imugps/ - https://answers.ros.org/question/302843/robot-localization-package-transform-was-unavailable-for-the-time-requested-using-latest-instead/ - https://answers.ros.org/question/330024/robot_localization-transform-from-base_link-to-map-was-unavailable-for-the-time-requested-using-latest-instead/
Thanks in advance,
Hal
Asked by haljarrett on 2020-01-24 12:34:01 UTC
Answers
Rather than uploading files, just paste your EKF configs in the question (please remove the boilerplate comments first), and format them as code (the little 101 icon). Also, please include a sample input message from every sensor input.
Anyway, that warning comes from here.
The message you are seeing means that you requested a transform with a target frame of map and a source frame of odom. That means that you are trying to fuse pose data in your map-frame EKF that has a source frame of odom. If you post messages of your sensor inputs, I can comment further.
The tf2
exception type is being hidden from you, but you can always modify the code to get more information about why it's failing, i.e., if it's too old or too new. At the very least, you should print out the requested time stamp and timeout value (the package should really do this by default).
Asked by Tom Moore on 2020-02-11 04:47:47 UTC
Comments
Hey Tom - thanks for the feedback. I've revised the original question to include data source sample, configs, and additional related warnings. I will poke around and see if I can capture the original exception as well.
Asked by haljarrett on 2020-02-12 11:58:28 UTC
Comments