Ask Your Question
0

What is the difference between static_transform_publisher and tf_echo command?

asked 2020-02-27 06:00:31 -0500

askkvn gravatar image

updated 2020-02-27 06:01:08 -0500

I just started learning tf that is one of the most useful package of ROS. I came across two command-line tool 1)tf_echo and 2) static_transform_publisher.

1) rosrun tf tf_echo <source-frame> <target-frame>

2) rosrun tf2_ros static_transform_publisher <X Y Z qX qY qZ qW> <source-frame> <target-frame>

tf_echo gives a transformation between source and target link. While static_transform_publisher also gives a transform between two links.

Then why we have two command-line tool for same thing. If I mistaken understanding of these comand-line tool, please correct me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-02-27 06:03:06 -0500

gvdhoorn gravatar image

updated 2020-02-27 13:33:28 -0500

If I mistaken understanding of these comand-line tool

I believe so.

tf_echo merely prints the value of the transform <source-frame> -> <target-frame>. From its wiki page:

Print information about a particular transformation between a source_frame and a target_frame.

So this doesn't alter the TF tree, just prints information retrieved from it.

static_transform_publisher actually publishes (ie: broadcasts) a TF transform. Again, the wiki page:

Publish a static coordinate transform to tf2

This adds new transforms to the TF tree.


Edit:

So tf_echo is like subset of static_transform_publisher? (output wise).

No, I would not say this is correct.

tf_echo is for humans. It displays information about the TF tree.

static_transform_publisher is for broadcasting a new TF frame and adds it to the TF tree.

Those are two fundamentally different operations.

in addition to transformation between two frames, static_transform_publisher also creates a new node. ok got it.

If with "new node" you mean "it creates a ROS node (temporarily)", then yes, that would be correct, but only to be able to create a tf2_ros::TransformBroadcaster.

Can you please explain what is usage/application of adding new transforms to the TF tree?

This would seem to come down to a basic understanding of what TF is and how it's used. Perhaps reading the wiki page would help here. Adding new information to the TF tree is an essential operation for any TF producer and consumer.

edit flag offensive delete link more

Comments

So tf_echo is like subset of static_transform_publisher? (output wise). in addition to transformation between two frames, static_transform_publisher also creates a new node. ok got it.

Can you please explain what is usage/application of adding new transforms to the TF tree?

askkvn gravatar image askkvn  ( 2020-02-27 09:03:40 -0500 )edit

Perhaps you should read the TF documentation. It will explain.

stevemacenski gravatar image stevemacenski  ( 2020-02-27 11:03:43 -0500 )edit

There can be many TF broadcasters in your system, broadcasting different parts/frames of your robot. Going through the TF documentation or watching some movies about it is really the first step.

Wilco Bonestroo gravatar image Wilco Bonestroo  ( 2020-02-27 14:25:08 -0500 )edit
1

thanks, @gvdhoorn for the explanation. I read the full tf2 wiki page. Now, I have a better understanding of tf2 package. and thanks @Wilco Bonestroo for tf2 videos link.

askkvn gravatar image askkvn  ( 2020-02-28 04:40:31 -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: 2020-02-27 06:00:31 -0500

Seen: 36 times

Last updated: Feb 27