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

static_transform_publisher: tf vs tf2_ros

asked 2021-11-03 12:08:45 -0500

ticotico gravatar image

updated 2021-11-03 12:12:50 -0500

When adding a static_transform_publisher to the launch file, we have two options:

Version1: Old style with tf:

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1 100" />

Version2: New style with tf2_ros:

<node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1" />

It is probably advisable to use the tf2_ros version. Can someone explain, why we don't need to specify a frame rate for the new version? Are there any other benefits of the second version?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-11-03 13:14:21 -0500

gvdhoorn gravatar image

updated 2021-11-03 13:23:13 -0500

For a discussion about static transforms I would like to refer to #q346664, which goes into quite some detail (and links to the relevant wiki pages/documentation) and #q324820.

As to the difference in command line arguments: as explained in #q346664, static transforms are not broadcast periodically.

If there is no periodic broadcast, the period argument is no longer needed.

It is probably advisable to use the tf2_ros version

Yes, and for multiple reasons:

  1. it significantly reduces the traffic (ie: messages/sec) on the /tf topic for typical usage scenarios (where many frames are actually static), and
  2. tf is deprecated (and has been for a long time)
edit flag offensive delete link more

Comments

thank you very much!

ticotico gravatar image ticotico  ( 2021-11-03 13:43:28 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-11-03 12:08:45 -0500

Seen: 73 times

Last updated: Nov 03 '21