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

Why use joint_state_publisher?

asked 2015-04-23 15:12:05 -0500

aak2166 gravatar image

Hi all,

I was looking through the documentation for the joint_state_publisher package. I can see the use case for wanting so publish and set joint states via the GUI, but what is the purpose of having the node subscribe to incoming sensor_msgs/JointState messages?

It seems to me that if you are working in hardware, there is no reason to do that. The node will just subscribe via:

source_list (list of strings, default: [])
A list of topics to listen on for sensor_msgs/JointState messages.

and spit them back out again.

Does anybody have any insights on this? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-23 15:40:09 -0500

thebyohazard gravatar image

joint_state_publisher acts as an aggregate. The robot_state_publisher node takes a single message with the state of all joints in your robot. So if you have, for example, multiple nodes each publishing a single joint state, the joint_state_publisher subscribes to all the individual topics and combines them.

edit flag offensive delete link more



Great, thanks for the answer! That makes sense. Can I then assume it will aggregate all the JointState messages within it's output publish rate? So if I set it to 10Hz it will aggregate all the JointState messages in that 1/10th of a second before it publishes next?

aak2166 gravatar image aak2166  ( 2015-04-23 15:49:17 -0500 )edit

Question Tools



Asked: 2015-04-23 15:12:05 -0500

Seen: 4,389 times

Last updated: Apr 23 '15