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

Revision history [back]

I'll jump in here because I think exactly how the TF system works needs to be clarified.

TF doesn't look for a transform with exactly the right time stamp when you lookup a transform, it almost always interpolates the two nearest TF samples. It can also extrapolate into the future a short time based on previous data but this is not recommended.

Are you getting the Lookup would require extrapolation at time X error? In this case adding a timeout Duration to the lookupTransform call would be the preferred method of solving this.

But as @gvdhoorn says, it would be helpful to know the actual problem you're trying to solve before we can suggest the best solution for you.

I'll jump in here because I think exactly how the TF system works needs to be clarified.

TF doesn't look for a transform with exactly the right time stamp when you lookup a transform, it almost always interpolates the two nearest TF samples. It can also extrapolate into the future a short time based on previous data but this is not recommended.

Are you getting the Lookup would require extrapolation at time X error? In this case adding a timeout Duration to the lookupTransform call would be the preferred method of solving this.

But as @gvdhoorn says, it would be helpful to know the actual problem you're trying to solve before we can suggest the best solution for you.

Update:

Thanks for clarifying the problem you're trying to solve, I see two possible solutions you can look into.

  1. Use message filters to synchronise the messages as @tfoote has suggested

  2. You could request the most recent data when looking up the transform by setting the time to zero. This achieves exactly what you suggested initially via a different mechanism.

Hope this helps.