TransformListener Could not find a common time /base_link and /map
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?