tf::waitForTransform() does not wait for transform ... [closed]
Hi all,
First I recorded a rosbag with "-a" , so that clock and tf's are included.
Then, I playback the rosbag with the "--clock" option. I asses that tf is ok and all links exist with tf_monitor.
In parallel (in the same launch file) I launch a node X that uses a TransformListener. In that node X, before any transformation, I would like to wait for transforms, just in case rosbag recording added some delay on weaking up tf. So, I put that :
tfListener.waitForTransform("base_link", myFrameName, ros::Time(0), ros::Duration(10.0),ros::Duration(0.1));
And the execution breaks after 3 seconds aprox, so it does not wait for 10 seconds.
However, If I put (please note I change polling rate but timeout remains the same)
tfListener.waitForTransform("base_link", myFrameName, ros::Time(0), ros::Duration(10.0),ros::Duration(1.0));
then the execution waits correctly up to tf is available.
Can anyone comment or answer this issue ?
Thank you very much !
best regards,
andreu