ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Have you checked which transforms are published at which time with rosrun tf tf_monitor? When you call waitForTransform, I believe it waits for all of the transforms to be republished and this introduces some unnecessary delay.
You probably want to update E when even one of the transforms is new, so using ros::Time(0) is preferable until one of the transforms stops arriving. You should be able to check with waitForTransform("A", "D", ros::Time::now()-0.5, ros::Duration(3.0))
, which should return false if the necessary transforms have been missing for more than 0.5 seconds. I'm not sure about the syntax though.