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

Yes, you can use a single NodeHandle to subscribe (and publish) to multiple topics.

Only when the NodeHandle instance goes out of scope will your subscriptions (and any publishers) be taken down.

Yes, you can use a single NodeHandle to subscribe (and publish) to multiple topics.

Only when the NodeHandle instance goes out of scope will your subscriptions (and any publishers) be taken down.


Edit: note that this has been asked multiple times already, as a quick search reveals: see question about the nodehandle for subscribing and publishing and roscpp node handles convention fi.