0
$\begingroup$

Rosanswers logo

It has come to my attention that the direction of arrows in TF-explaining text in the ROS wiki is not consistent. As far as my knowledge goes, there is a big difference between a TF from A to B (A → B) and from B to A (B → A)

In the rqt_tf_tree things look quite simple: parent → child. It would result in things like "base_link" → "left_wheel_link" etc. So the position and orientation of a child frame is descibed within the reference frame of it's parent. My odometry node broadcasts the position of the base in relation to a virtual 'odom' frame, so: odom → base In the wiki page for gmapping at 4.1.6 it notes: map → odom, which is consistent with the above I guess, because the total tree would be: map → odom → base

But in the wiki page for AMCL this becomes very confusing for me: quote: It... "publishes the transform from odom (which can be remapped via the ~odom_frame_id parameter) to map." And all images explaining the AMCL tranforms in this page point the other way: child → parent. I can understand why you would think this is better, but it's confusing and not consistent with rqt_tf_tree.

So what is the convention here? Or is there some sort of nuance I'm missing?


Originally posted by geervw on ROS Answers with karma: 11 on 2017-12-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In general transforms don't have direction so representing them with arrows is not standardized. The particular level of ambiguity is that the transform for coordinate frame A -> coordinate frame B is the inverse of what it would take to transform a point in A to be a point in B. This is why the API all use source and target frames to specify that the API is referring to changing a reference frame.

When computing the transforms to publish it's more common to think about the transforms between the coordinate frames themselves and thus think about the inverse of what a lookup call will return.

So long story short it would make sense to turn the arrows around on the amcl page to be consistent with most representations. But you should understand that the only important thing when you draw the graph is that it's a tree with the arrows in a consistent direction. It's a bit of a users preference which way to draw the arrows. Since most other usages are drawing them this way consistency is the main reason to pick a direction.


Originally posted by tfoote with karma: 58457 on 2017-12-20

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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