Ask Your Question

TransformListener Could not find a common time /base_link and /map

asked 2011-12-21 22:41:54 -0500

Benoit Larochelle gravatar image

updated 2014-01-28 17:11:01 -0500

ngrennan gravatar image

I recorded bags on different computers/robots during an experiment and now I'm trying to replay them. All computers were synchronized with chrony. Now, I play all bags with the same rosbag command.

However, when I call listener.lookupTransform("/map", "/base_link", ros::Time(0), transformStamped); from another node, I get the error Could not find a common time /base_link and /map.

Everything is fine when I look with RVIZ, same with roswtf. I ran tf view_frames and everything seems normal to me.

I also tried rosparam set /use_sim_time "True" and then rosbag play --clock, but it does not seem to make any difference.

One of my colleagues recommend that I always call waitForTransform before lookupTransform. Is this required, or should lookupTransform work on its own?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-22 00:14:40 -0500

Benoit Larochelle gravatar image

updated 2011-12-22 18:26:33 -0500

Adding a call to canTransform or waitForTransform before lookupTransform solves the problem. For example, listener.waitForTransform("/map", "/base_link", ros::Time(0),ros::Duration(1)); the line before lookupTransform makes everything work.

edit flag offensive delete link more


You will likely want to use waitForTransform documented in the tf tutorials or if you are performance limited the tf::MessageFilter will allow you to do it without blocking execution
tfoote gravatar image tfoote  ( 2011-12-22 01:37:08 -0500 )edit

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


Asked: 2011-12-21 22:41:54 -0500

Seen: 1,039 times

Last updated: Dec 22 '11