ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The question being how do I distinguish/separate the two joysticks from each other in the joy topic
You can't. The Joy message has no field for that (theoretically header.frame_id
could be used, but no consumer checks that).
I thought one solution would be to make each
joy_node
publish to a different topic namespace
Yes, that would be one way to make sure they don't publish to the same topic.
but couldn't find any solutions or tutorials for this
So "topic namespace[s]" don't exist. Perhaps that is why you couldn't find something.
You have two options:
joy_node
instance publish to a different topicjoy_node
s in a different namespace (either directly on the node or via a group)Which one would be more convenient depends on whether you already are using .launch
files or not.
2 | No.2 Revision |
The question being how do I distinguish/separate the two joysticks from each other in the joy topic
You can't. The Joy message has no field for that (theoretically header.frame_id
could be used, but no consumer checks that).
I thought one solution would be to make each
joy_node
publish to a different topic namespace
Yes, that would be one way to make sure they don't publish to the same topic.
but couldn't find any solutions or tutorials for this
So Well, "topic namespace[s]" don't exist. Perhaps that is why you couldn't find something.
You have two options:
joy_node
instance publish to a different topicjoy_node
s in a different namespace (either directly on the node or via a group)Which one would be more convenient depends on whether you already are using .launch
files or not.