ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

robots_localization:Transform from gyro_link to base_footprint was unavailable for the time requested. Using latest instead.

asked 2022-02-22 06:16:25 -0500

miku54 gravatar image

updated 2022-02-25 06:30:48 -0500

Hello everyone, when I use the robots_localization function package to fuse odom, imu, and gps data, the navsat_transform_node node will always flash the following alarms: "Transform from base_footprint to map was unavailable for the time requested. Using latest instead." The frequency of my /odom and /imu topics are both 50hz (but I don't think it has anything to do with the topic's frequency), the frequency of /gps/fix is 100hz, and the running files and parameters are in this repository: link text

here is a sample of sensor output: IMU:


header:
  seq: 18463
  stamp:
    secs: 1640865037
    nsecs: 422120658
  frame_id: "gyro_link"
orientation:
  x: 0.00215925741941
  y: 0.0136082665995
  z: 0.0671876072884
  w: 0.995954573154
orientation_covariance: [1000000.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 1e-06]
angular_velocity:
  x: -0.0770011618733
  y: 0.0367687195539
  z: -0.0532880015671
angular_velocity_covariance: [1000000.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 1e-06]
linear_acceleration:
  x: -0.026318307966
  y: -0.346923172474
  z: 8.07015037537
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

from the GPS:

    header:
  seq: 15480
  stamp:
    secs: 1640865044
    nsecs: 650466853
  frame_id: "navsat_link"
status:
  status: 0
  service: 0
latitude: 22.969099335
longitude: 113.904337186
altitude: 23.2730484009
position_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
position_covariance_type: 0

from the odom:

header:
  seq: 18809
  stamp:
    secs: 1640865054
    nsecs: 970831849
  frame_id: "odom_combined"
child_frame_id: "base_footprint"
pose:
  pose:
    position:
      x: 9.72226047516
      y: 0.114874176681
      z: 5.24148702621
    orientation:
      x: -0.0
      y: 0.0
      z: 0.497616859017
      w: -0.867396945822
  covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000.0]
twist:
  twist:
    linear:
      x: 0.603999972343
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: -0.00700000021607
  covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000.0]

My robot_localization_package launch file is:

<?xml version="1.0"?>
<launch>

  <rosparam command="load" file="$(find outdoor_waypoint_nav)/params/ekf_params.yaml" />
  <rosparam command="load" file="$(find outdoor_waypoint_nav)/params/navsat_params.yaml" />

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_odom" clear_params="true"/>

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se_map" clear_params="true">
    <remap from ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2022-02-25 04:28:55 -0500

Tom Moore gravatar image

updated 2022-04-07 04:25:33 -0500

You need to include a sample message from every sensor input, as well as your full EKF and navsat_transform config. Edit the original question instead of adding a new answer (this isn't a thread format) and paste the config and message samples directly in there.

If you are getting warnings about transforms, it means that either that transform is not being broadcast, or the sensor data that requires that transform is newer than the most recent published transform. But it's impossible to say without more information.

EDIT in response to update and comments.

I think you should explain what you are trying to do. You mentioned gmapping below, and given that you are using GPS data, I have a feeling you are trying to do something that might not work well.

First, the warning in question isn't a huge deal. It's just that navsat_transform_node is looking up a transform at some moment in time, but the most recent EKF publication was earlier than that. It might be a matter of milliseconds.

Second, your navsat_transform_node instance is set to run at 30 Hz, but both of your EKFs are only set to run at 10 Hz. So it's easy to see how navsat_transform_node would execute a cycle and not have a transform from the EKF available at that time.

Unrelated, but you also have a few other issues:

  • You have two_d_mode enabled, but you are fusing a bunch of 3D variables from your sensors. Won't hurt anything (they'll be ignored), but wanted to make sure your intention wasn't to operate in 3D.
  • Your orientation and angular velocity covariances in your IMU data are astronomical. Those readings would effectively be ignored in your EKF instances.
  • You mentioned something about gmapping in here. I'm not sure what the use case is there, but gmapping will also be publishing a transform from map to odom (or map to base_footprint, I'm not sure how gmapping works offhand). You need to make sure it's not publishing transforms. But then I am not sure what the point of gmapping is in this instance.
edit flag offensive delete link more

Comments

Thank you very much for taking the time to look at my question, I've been stuck for a week now, if I ignore this alert, I'll get an exception when using gmapping (tf coordinates drift like crazy), I've edited my question Please take a look at the content. BTW:The debugged TF-Tree with the node graph is in this link:#729

miku54 gravatar image miku54  ( 2022-02-25 06:33:30 -0500 )edit
0

answered 2022-02-22 09:46:47 -0500

VineetPandey gravatar image

This warning wouldn't necessarily cause any harm, but one way to get rid of it is to offset the transform time by certain amount of time. Try setting transform_time_offset in the parameter file (for both local and global instances. The value may be 0.05 or higher (0.1 has worked for me). Check this answer for a detailed explanation.

edit flag offensive delete link more

Comments

Hello, thank you for your reply! When I set the transform_time_offset parameter to 0.05 or 0.1, the above alarm phenomenon still exists, and the navsat_transform_node node does not appear map->utm tf

miku54 gravatar image miku54  ( 2022-02-22 19:31:47 -0500 )edit

Is the warning for the gyro_link to base_footprint or base_footprint to map? Because it seems different in the question and the title. One approach (if base_footprint to map) could be raising the transform_timeout to some high value (default value is 0).

VineetPandey gravatar image VineetPandey  ( 2022-02-23 12:20:59 -0500 )edit

Both alarms are flashing

miku54 gravatar image miku54  ( 2022-02-23 20:06:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-02-22 06:16:25 -0500

Seen: 155 times

Last updated: Apr 07 '22