[ros-users] tf "Saw a negative time change" problem

mehmet dogar mdogar at andrew.cmu.edu
Wed Mar 23 15:28:00 UTC 2011


After we upgraded to diamondback we started seeing this problem where
our tf using nodes print out warnings like "Saw a negative time change
of -0.00019 seconds, clearing the tf buffer". And then the tf buffer
is emptied and so our transforms don't work.
This happens probably because we are using ntpdate synchronization
between our computers and the adjustments to the system time can be
negative on some computers.
Do you think the check for this negative time change (line 337 of
transform_listener.cpp) can be more flexible? Currently it checks to
see if the diff between two ros::Time::now() calls is smaller than
zero. We changed this to check if it is smaller than -0.001,
recompiled tf, and things seem to be fine now. Do you see anything
dangerous with doing this? Can this be changed in the actual tf code

Thank you,

More information about the ros-users mailing list