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

direction of arrows in TF explanations

asked 2017-12-20 07:37:07 -0600

geervw gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-12-20 14:13:32 -0600

tfoote gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-20 07:37:07 -0600

Seen: 846 times

Last updated: Dec 20 '17