ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
1

tf2::Buffer forgetting transforms?

asked 2015-08-14 08:38:00 -0600

peci1 gravatar image

I have a tf2::Buffer with cache time set to 60 seconds. I launch my node, wait for 2 seconds after connecting TransformListener to the buffer (to allow it to gather all transforms).

Then I call buffer->canTransform("base_link", "laser", scan_time, ros::Duration(0.1)), and sometimes it ends with Extrapolation exception:

Requested time 1439458371.795563147 but the earliest data is at time 1439458372.276928710

However, I'm pretty sure the transforms are published, I checked it with tf_monitor and it shows a publishing frequency of 1500 Hz between base_link and laser.

What's more, the "earliest time" for this transform grows from time to time after a few seconds (I'd expect it to only grow after 60 seconds, which is the buffer size).

The data come from a bag file played with the --clock option, and /use_sim_time is true.

How could I debug what's going on here?

edit retag flag offensive close merge delete

Comments

Ok, I found the cause of this behavior. We subtract a small amount of time of the laser scan time, so that the first scan's time is always earlier than the first TF received at the same moment. And the waiting had no effect, because the old scans got buffered in message queue.

peci1 gravatar image peci1  ( 2015-08-18 03:15:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-01 12:38:06 -0600

peci1 gravatar image

Ok, I found the cause of this behavior. We subtract a small amount of time of the laser scan time, so that the first scan's time is always earlier than the first TF received at the same moment. And the waiting had no effect, because the old scans got buffered in message queue.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-14 08:38:00 -0600

Seen: 170 times

Last updated: Nov 01