Determining number of subscribers to a TransformBroadcaster
How do I determine the number of subscribers to my TransformBroadcaster?
Usually when you do a Publisher, you can call Publisher::getNumSubscribers() to determine if you want to publish that message. The nice thing about it is, if there is no one subscribed, you don't have to go through the effort of building and publishing the message.
Looking at the code, the underlying publisher used by TransformBroadcaster is private and there appears to be no way to access it. Plus it appears to never check number of subscribers before building and publishing the transform. Am I missing something? Is there another way to do this?