ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The easiest method I can think of off the top of my head is to check the publisher's get_subscription_count()
method before publishing, and skip publishing (or even preparing to publish) if the count is zero. You might also need to check get_intra_process_subscription_count()
as well.