# tf interpolation

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 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.

( 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?

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

Sort by ยป oldest newest most voted

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.

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.

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