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

Revision history [back]

You can use this version of advertise where you can specify a connect and a disconnect callback. The callbacks get executed when a node subscribes and disconnects. You can just set a flag to start processing on connect and clear the flag when you stop processing.

You can use this version of advertise where you can specify a connect and a disconnect callback. The callbacks get executed when a node subscribes and disconnects. You can just set a flag to start processing on connect and clear the flag when you at disconnect to stop processing.