ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Why should both use joint_states and transform

asked 2017-01-05 20:29:07 -0600

shawnysh gravatar image

I wonder now that both robot_state_publisher and transform_broadcaster send kinematics information to /tf topic, why should we use both? I think I must misunderstand sth, though I have gone through tf and urdf tutorial.

Here is the link where it makes r2d2 robot move with using robot_state_publisher and sendTransform Tutorial: using urdf with robot_state_publisher

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-06 02:48:46 -0600

rbbg gravatar image

Hi Shawnysh,

As I think you are aware, the robot_state_publisher is used to publish the state of the robot to tf. It publishes the transforms between the links as a function of the joint states.

The sendTransform is used to publish a transform from odom to axis, which happens to be the root frame of the robot. As you can see in the code, this is done such that axis performs a circular motion around odom. If you then choose odom as your fixed frame (as noted in the last step for the linked tutorial) you will see the robot move around the origin. As robot_state_publisher only publishes the transforms between the links, they are also updated for a moving 'base' frame (in this case: axis).

Alternatively, if you would select axis as your fixed frame, the robot will make the same motions, but not move in a circular pattern.

I hope that clears things up.

edit flag offensive delete link more


Thanks a lot. It helps!

shawnysh gravatar image shawnysh  ( 2017-01-06 06:10:43 -0600 )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


Asked: 2017-01-05 20:29:07 -0600

Seen: 130 times

Last updated: Jan 06 '17