ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
 Ask Your Question

# Order of transformations

Hi!

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 close merge delete

## Comments

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.

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

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

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

## 1 Answer

Sort by ยป oldest newest most voted

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.

more

## Comments

1

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.

( 2018-02-16 02:24:13 -0500 )edit

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

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

Seen: 726 times

Last updated: Feb 16 '18