2
$\begingroup$

I recently came across 'ros::SingleSubscriberPubliser' class. The documentation describes it as 'Allows publication of a message to a single subscriber. Only available inside subscriber connection callbacks'.

What does 'subscriber connection callbacks' mean?

Also, when does it make sense to use this class?

$\endgroup$

1 Answer 1

2
$\begingroup$

The subscriber connection callback is triggered when there's a new subscriber connected to a publisher.

There's documentation of how you can use that function in the Node Handle Documentation

It's not a commonly used feature. I don't know what your use case is but would gess that it is not something that you want to try to leverage.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.