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

What is the timestamp returned by tf2 lookup_transform

asked 2022-11-15 08:32:02 -0500

Sharath93 gravatar image

Consider I have 3 co-ordinate systems eg: A, B and X

I am currently try to do lookup_transform between two frames eg: Source as A and Destination as B.

In /tf topic I have the transforms of A -> X and X ->B. I wanted to know what timestamp does the lookup_transform provide for the resultant transform when I do a transformation from A -> B

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-11-23 13:58:12 -0500

RFRIEDM_Trimble gravatar image

It depends on what you pass in for the time to lookup. A good reference is here

Thus, it depends on the value supply to the time parameter.

https://github.com/ros/geometry2/blob...

If you want the latest available, supply 0. This will be slightly in the past from your current ROS wall time.

If you want the transform at now time, supply the current wall time, but you need to supply a timeout, since that transform is in the future of where the current buffer is. If you don't then you will get an ExtrapolationException.

Finally, if you want a timestamp at some arbitrary time in the past, just supply that to the call.

edit flag offensive delete link more

Comments

First of all, thanks for the answer :)

Currently I am doing lookup for latest possible time i.e. 0. But when I see the timestamp of the resultant transform i.e. A -> B, I see the timestamps of either A -> X or X -> B in the header of the resultant transform A -> B. This is a big problem for me, because I want to rely on A -> X timestamps, therefore I want to see the same timestamps as A -> X for the resultant transform.

Do you know how can I achieve this?

Sharath93 gravatar image Sharath93  ( 2022-11-24 10:25:19 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-11-15 08:32:02 -0500

Seen: 243 times

Last updated: Nov 23 '22