ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I believe that your problem is that you are picking a timestamp which is approximately at the startup time of your program, however you have not given the tf buffer time to fill prior to your query.
If you were to implement a loop with retrying you would find it would likely work. Or if you initialized the Listener long enough for the tf data to arrive it would likely work as well. Time zero works because it will return as soon as a set of transforms exists.
waitForTransform is only useful if your data is newer than the information in the buffer. You have the other case that your data is older than the buffer. Since old tf data is not republished waiting into the future is never going to work if your timestamp is older than the earliest data in the buffer.