Rosanswers logo

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.

Originally posted by aak2166 on ROS Answers with karma: 593 on 2015-04-23

Post score: 4


1 Answer 1


Rosanswers logo

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.

Originally posted by thebyohazard with karma: 3562 on 2015-04-23

This answer was ACCEPTED on the original site

Post score: 7

Original comments

Comment by aak2166 on 2015-04-23:
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?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.