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

Revision history [back]

click to hide/show revision 1
initial version

Having more than one publisher on /joint_states is totally fine as long as there is only one source of information for a particular joint. It's very common for the /joint_states topic to have one message containing information about joints 1-3 followed by another message containing joints 4-6. So it shouldn't be necessary to do this, unless you have a case where you have more than one node publishing about the same joint (in which case that's a different problem) or you have more than one robot in your setup and so there needs to be some differentiation by topic (in which case you should be using namespacing).

Either way, the easiest way to get namespacing going here will be in your launch files. You can also remap topics in the same file. Take a look at the wiki here.

Having more than one publisher on /joint_states is totally fine as long as there is only one source of information for a particular joint. It's very common for the /joint_states topic to have one message containing information about joints 1-3 followed by another message containing joints 4-6. So it shouldn't be necessary to do this, unless you have a case where you have more than one node publishing about the same joint (in which case that's a different problem) or you have more than one robot in your setup and so there needs to be some differentiation by topic (in which case you should be using namespacing).

Either way, the easiest way to get namespacing going here will be in your launch files. You can also remap topics in the same file. Take a look at the wiki herehere for ROS1 or here for ROS 2.