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

Order of transformations

asked 2018-02-15 07:07:42 -0500

JayDe gravatar image

updated 2018-02-16 02:22:55 -0500


I am confused about in which order to multiply transformations. Suppose I want to create a transformation that transfers a point from the WORLD frame to a frame called GOAL. I do have the transformations from WORLD to another frame TMP, and from TMP to GOAL (could for example be transformations obtained via a tflistener).

My intuition tells me that the transformation I want is (TMP->GOAL)*(WORLD->TMP), because that would first apply WORLD to TMP and then TMP to GOAL to a point. It however seems that (WORLD->TMP) * (TMP->GOAL) is correct in order to be published. This would make sense to me if ROS pre-multiplied points (i.e., p * M instead of M * p). Is that the case? If not, why else would that be?

Edit: I know that the tf package handels most of these things. However, I believe that there are cases where one should be able to do these transformations himself and I want to understand how this chaining works. I'd also be happy with hints to a good article or similar.

edit retag flag offensive close merge delete


Does something preclude a tf lookup from world to goal? It would be useful to know what your tf lookups for the transforms you have are- which frame is which argument especially.

lucasw gravatar image lucasw  ( 2018-02-15 11:58:03 -0500 )edit

HI lucasw! Sure, that would mostly work too. But suppose I do have a camera consisting of a RGB and IR camera and I do have RGB->IR. I calibrate the camera to world using the IR frame, then I have WORLD->IR. If I wanted to calculate WORLD->RGB to include it into my tf tree, I would need to calc.

JayDe gravatar image JayDe  ( 2018-02-16 02:13:56 -0500 )edit

You can invert the RGB->IR transform and then put it into the tf tree as IR->RGB.

lucasw gravatar image lucasw  ( 2018-02-16 07:46:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-15 13:01:32 -0500

Gayan Brahmanage gravatar image

Homogeneous transformations always follow the order of the frames. But ROS tf package handles all those things. You just need to publish correct relative transformations for every topics. You can check them using

rosrun tf view_frames

If all the topics are connected in the tf tree, you can get the transformation between your reference frame to target frame using tf listener.

edit flag offensive delete link more



Could you elaborate on the sentence "Homogeneous transformations always follow the order of the frames."? Other than that I know that tf handles most of this - please see my edit and the reply to lucasw comment.

JayDe gravatar image JayDe  ( 2018-02-16 02:24:13 -0500 )edit

Question Tools



Asked: 2018-02-15 07:07:42 -0500

Seen: 1,152 times

Last updated: Feb 16 '18