ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I would have expected that once a transform has been published, canTransform() and lookupTransform() should never fail if you are asking for the latest available transform using TimePointZero.

This expectation is generally true if the information is within the local buffer that you're looking up. However as @Mike Scheutzow mentions there are edge cases that you can hit such as very high latency or synchronization errors which is longer than the buffer causing failure to match.

But the main problem with your stated assumption is that you assume that data being published means that it's guarenteed to have arrived in the buffer that you're querying. In a distributed system there is inherently latency in delivery. And depending on how the network is configured and potentially loaded delivery is not guaranteed. The most common place the people run into this problem is creating a new instance of a Transform Buffer and expecting it to have data available immediately even before connections could have been established to the publishers.

To understand you're problem further please put together an minimum self contained example. It's likely while generating that you'll identify what's different from your test case and be able to answer your own solution. But if not please edit your question and we'll try to help more.