ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Why do you need that information?
The usual ROS practice is to distinguish topics, but decouple subscribers from worrying about which node published each message.
To work around that: add a source
field to your message (or wrap some standard message in a custom message containing one), and define constants for the message sources you wish to distinguish. Then clients can tell the source without needing to worry about other nodes coming, going and restarting.
2 | link to observation message |
Why do you need that information?
The usual ROS practice is to distinguish topics, but decouple subscribers from worrying about which node published each message.
To work around that: add a source
field to your message (or wrap some standard message in a custom message containing one), and define constants for the message sources you wish to distinguish. Then clients can tell the source without needing to worry about other nodes coming, going and restarting.
I did something similar in this custom message.