Robotics StackExchange | Archived questions

How does tf2_ros::BufferInterface::transform work?

Hello, If I have a frame called "Frame1" and an object called "Object1" inside the "world" frame and I need to express the position of "Object1" with respect to "Frame1". To do that I am using the following method:

tf2_ros::Buffer buffer_;
buffer_.transform(Object1's position with respect to the "world", output, "Frame1" )

A publisher node is continuously publishing the Object1's position with respect to the "world" through a topic and a subscriber node is receiving the streamed messages, but the system cannot know that this position is with respect to the "world". A tf2_ros::TransformBroadcaster is broadcasting the transforms between the "world" and "Frame1". So, how does the transform method work? Does it automatically assume that the streamed position messages are with respect to the "world" and performs the necessary calculation based on this assumption?

Asked by aaa on 2020-11-02 15:40:05 UTC

Comments

Answers

Please read through the documentation for tf2: http://wiki.ros.org/tf2

There's a paper on it: http://wiki.ros.org/Papers/TePRA2013_Foote

And several tutorials: http://wiki.ros.org/tf2/Tutorials which should help you too.

Asked by tfoote on 2020-11-03 20:48:31 UTC

Comments