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

tf negative time change messages

asked 2014-01-29 06:00:32 -0500

updated 2014-01-29 06:24:58 -0500

I suddenly started getting a lot of messages like these

Saw a negative time change of -0.000165 seconds, clearing the tf buffer.

and am not surprisingly having a lot of trouble with code that relies on tf now. I can't think of anything that changed, and am at a bit of a loss. There's a ros-users message about this from a while ago, but no real solution.

EDIT:

tf_monitor is also showing that all my static_transform_publishers have negative average delays.

Also, all nodes are running on the same machine, so there are no issues with clocks not being synced. This is all with live data, no bags.

edit retag flag offensive close merge delete

Comments

Are you using bag files or live data? For live data: One single computer or multiple ones?

dornhege gravatar image dornhege  ( 2014-01-29 06:21:44 -0500 )edit

Updated the question.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2014-01-29 06:25:21 -0500 )edit

Are you using a haswell machine? I've heard a report that this is a problem on haswell machines.

tfoote gravatar image tfoote  ( 2014-01-29 08:06:16 -0500 )edit

Nope, Ivy Bridge (i7-3820QM).

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2014-01-29 08:23:58 -0500 )edit

I have a similar issue (i7-3740QM) on hydro as well.

bchr gravatar image bchr  ( 2014-01-30 00:50:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-01-29 09:31:30 -0500

tfoote gravatar image

It's a very weird issues. Somehow time is not being monotonic. There's a patch here which should prevent this from happening. https://github.com/ros/geometry/commi...

I'd really like to know the root cause. It must be something like floating point issues.

Could you try changing it to:

ros_dt = (rospy.Time.now() - self.last_update_ros_time)
if ros_dt.to_sec() < 0.0:

And see if that helps?

edit flag offensive delete link more

Comments

In my case, the patch "solves" the problem, but your suggested test doesn't.

bchr gravatar image bchr  ( 2014-01-30 00:59:56 -0500 )edit

Same here.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2014-01-30 05:12:10 -0500 )edit
1

Wrapping a RLock around anything that touches last_update_ros_time fixes it, but I don't know that's because it's actually a threading issue, or because it just adds a few CPU cycles which makes the time differences longer.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2014-01-30 05:23:57 -0500 )edit
1

I've opened a pull request to patch this in hydro-devel. https://github.com/ros/geometry/pull/53 There is a fairly extensive write up, and I concur with Dan that the real problem is a threading issue.

fergs gravatar image fergs  ( 2014-01-31 13:30:57 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-01-29 06:00:32 -0500

Seen: 727 times

Last updated: Jan 29 '14