0
$\begingroup$

Rosanswers logo

Hello all,

I'm running ROS melodic on Ubuntu 18.04. I need help relative to the tf package

I have two frames in my /tf that I update with transformations for a few minutes. After a while, I want to look up one of the past transformations that I added. However, I don't want the need to declare the exact nsec but something close to it.

For example, let us say I have entrees at nsec= [912339188], [923085185] and [932359819]. Then, I want to run the following:

tf::TransformListener::waitForTransform( target_frame, source_frame, time, transform);

with time.nsec == 923085200

As you can see that is not the exact nsec as the ones in /tf but is very close to the second entree. Is there a way to get it? (I would prefer to avoid using tf2 if possible but will do it if needed)

p.s.

Currently, when ever I run tf::TransformListener::canTransform(...), with the above input information, it returns false.


Originally posted by Metalzero2 on ROS Answers with karma: 293 on 2018-08-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

So I found an other question on this forum that answers my question. It can be found here: https://answers.ros.org/question/10285/how-does-tf-do-interpolation/

I was not aware of the concept of "interpolation" of data points. It seems I do not need to have the exact time stamp in the tf for the transformation to be found, as long as my requested transformation is inside the buffer of the tf map.


Originally posted by Metalzero2 with karma: 293 on 2018-08-22

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Metalzero2 on 2018-08-22:
p.s. although this question can be considered a duplicate, I would suggest not to delete it because there may be other people not familiar with the concept of interpolation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.