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

How important is order of frames in odom->base_link transform?

asked 2020-04-17 21:28:27 -0500

skros gravatar image

updated 2020-04-18 03:43:08 -0500

gvdhoorn gravatar image

As per the ROS conventions: https://www.ros.org/reps/rep-0105.htm..., the 'odom' frame should be the parent of 'base_link' frame. This means the transform between these two frames is 'odom->base_link'

However, while I was going through some of the existing code (that is developed using ROS) on GitHub, I came across a couple of instances in which the transform being published has the reversed frame order: 'base_link->odom', where <>.header.frame_id is 'base_link and <>.child_frame_id is 'odom'.

The two examples are:

So, I have a couple of questions:

1) Is the transform in the above examples correct (or acceptable)?

2) How important is it to follow the frame order suggested by the REP 105 in the tf tree? Should it always be followed? If yes, why? If no, why?

Would really appreciate if someone could help me to understand the tf tree order.

Thank you!

edit retag flag offensive close merge delete

Comments

Just a comment:

while I was going through some of the existing code (that is developed using ROS) on GitHub

the wording here makes it sound like you have analysed the TF/TF2 implementation (ie: the libraries themselves) or some other piece of code part of the code (which would imply it's part of some official distribution and has been specially vetted).

From the rest of your question text it appears that's not the case; you've come across two community contributed packages where the authors seem to have made a mistake (and also note: the first package hasn't been touched since 2013 and the second is from 2015).

I realise these are still valid examples of where authors of nodes may have implemented this transform incorrectly, so valid examples of what you'd be interested in when applying static analysis to this sort of code. But ...(more)

gvdhoorn gravatar image gvdhoorn  ( 2020-04-18 03:38:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-12 08:56:05 -0500

fergs gravatar image

Those two examples are wrong with reference to REP-105.

Does it matter to the authors of those packages? Possibly not. However, if you want to use things like Navigation2 or robot_localization, it matters a great deal. Basically, while you can go against the REPs, your code won't interact properly with other portions of the ROS ecosystem that followed the REPs (which is most of the bigger and well maintained packages).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-04-17 21:28:27 -0500

Seen: 490 times

Last updated: Jun 12 '20