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

tf interpolation

asked 2017-05-18 14:09:21 -0600

chukcha2 gravatar image

Hello, I have a question about tf interpolation. if I understand it correctly, tf will interpolate when it is asked for a transform between two published transform values. So If I published tf1 for time 5 and tf2 for time 10 and then ask for transform for time 7, I am going to be returned a transform that is somewhere in between tf2 and tf3.

Question: can I ask tf not to interpolate if the requested timestamp is too far away from a known transform? For example in my example above, can I ask tf to interpolate only if I am within 1s from a given transform. So for example above if I ask for transform at time 7 I don't get anything but if I ask for a transform at time 5.5 or 4.5 I do get it?

Or is there a way to find out what two transforms (along with their timestamps) the interpolation was made?

edit retag flag offensive close merge delete


There could be any number of transforms that bracket an interpolation for a tf tree- you would have to traverse the entire tf path between the two frames and get the before and after tf times for each link- only if there was only a single link between two frames then there would be just one set.

lucasw gravatar image lucasw  ( 2017-05-22 11:37:58 -0600 )edit

Let's assume we only have a single link. I ask tf for a transform for time t and it returns it to me. Is there a way to know that the transform was interpolated? Is there a way to know between which times it was interpolated?

chukcha2 gravatar image chukcha2  ( 2017-05-22 14:06:37 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-22 14:15:53 -0600

tfoote gravatar image

For any given query it can be expected that data is interpolated. The odds of a specific query being exactly at the same timestamp of all the frames in the system is very unlikely in an asynchronous system with ns precision.

The interpolation logic does not have support for limiting the range of interpolation, nor does it have a way to tell you what the neighboring points used are.

Those are features that could be added. However in general the trasforms are expected to be provided in a continuous manner that is fast enough to approximate the natural bandwidth of the system.

Note that there's an implicit limit with the maximum cache size of 10s by default. It cannot interpolate outside of the cache history. Though you run the risk of incurring extrapolation limits based on your system.

edit flag offensive delete link more


Thank you for answering my question. I think that a feature that allows specifying the maximum interpolation "distance" from neighboring points would be useful in cases where it is known that interpolation for time that is too far away from a known point will not yield good results.

chukcha2 gravatar image chukcha2  ( 2017-05-22 14:41:13 -0600 )edit

Question Tools



Asked: 2017-05-18 14:09:21 -0600

Seen: 1,123 times

Last updated: May 22 '17