tf lookuptransform time lag problem

asked 2020-05-23 00:30:59 -0500

sean112 gravatar image

updated 2020-05-23 00:31:35 -0500

I am trying to use look up transform and tf broadcaster to log the robot position at the certain time. When I run the core for more than 20 mins, lookuptransform cannot receive a tf anymore. And what I observed is that lookuptransform actually lags what shows up in the rviz. I used rospy.Time() for lookuptransform, and rospy.Time().now for sendtransform. Is there any reason for this?

edit retag flag offensive close merge delete


When I run the core for more than 20 mins, lookuptransform cannot receive a tf anymore

Could you please provide more details?

Are you trying to lookup a transform from 20 minutes ago, or are you saying a TF listener appears to stop receiving new transforms after 20 minutes?

Is there any reason for this?

I'm not saying what you observe could not be true, but seeing as TF (and TF2) have been in continuous use for the past 10+ years and the severity of what you describe (it stops working after 20 minutes) I would have expected many more reports about this.

At this point I would be inclined to suspect something local to your setup, a configuration issue or something else not working as it should.

But we'll need more information to say something more useful.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-23 03:17:23 -0500 )edit

I totally agree with you on it shouldn't be an tf problem. Is there anything that I should look out for? For example, I do a rospy.sleep(1.5) every time after I setup a transform, and could that mess up the time somehow? Should I use time.sleep instead?

sean112 gravatar image sean112  ( 2020-05-26 18:48:15 -0500 )edit

Please answer my question and describe with some more detail what you observe:

  • you cannot lookup transforms from 20 minutes ago
  • the TF Listener appears to no longer receive any new updates after 20 minutes

those are two different things and your current question text could be interpreted to describe both of these.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-27 02:49:11 -0500 )edit