robot_state_publisher design: multiple publishers on /joint_states ok?
Is robot_state_publisher designed to handle multiple sources of /joint_state information? For example, let's say I have the R2D2-like robot from this tutorial.
If I have one node publishing the state of the 'periscope' on /joint_states
, and another node publishing the rest of the joints, also on /joint_states
, will robot_state_publisher
do the right thing? (i.e., 'merge' the /joint_state
messages?).
I'm currently studying the source code to definitively figure this out, but I see that others have asked this in the past, so I figured I'd raise the issue again.
I think this will work but I'm not certain.
After looking at the source, I think so, too. I'll post my result after I get it working (or don't) :)
Yes. This is designed to work like this afaik.
An alternative could be to use
joint_state_publisher
with thesource_list
argument. It will merge allJointState
msgs on the specified topics and publish a single representative one.