Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose matched subscriber count for publishers #623

Closed
paulbovbel opened this issue Jan 30, 2019 · 6 comments
Closed

Expose matched subscriber count for publishers #623

paulbovbel opened this issue Jan 30, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@paulbovbel
Copy link

paulbovbel commented Jan 30, 2019

Feature request

Feature description

Please expose a mechanism for getting matched pub/sub counts (rcl_publisher_get_subscription_count).

Implementation considerations

I was catching up on https://answers.ros.org/question/286069/implementing-subscriberstatuscallback-within-ros2/ and noticed that Expose matched publisher / subscriber count (rather than only based on the topic name) is no longer in the roadmap! It looks like rcl_publisher_get_subscription_count was imlemented in rcl/rmw but never plumbed out to the client libraries. Is there any (technical) reason for that?

Also would it be feasible to get that data in a callback/async fashion, rather than by polling?

@mjcarroll
Copy link
Member

Yes, it didn't quite get all the way up into the rclcpp library, but it hasn't been completely dropped. It has been partially rolled in to: ros2/ros2#649

As far as callback/async, it is possible, just currently not implemented. It would work similar to how incoming messages work in rcl, with a corresponding mapping in rclcpp.

@mjcarroll mjcarroll self-assigned this Jan 30, 2019
@mjcarroll mjcarroll added enhancement New feature or request ready Work is about to start (Kanban column) labels Jan 30, 2019
@paulbovbel
Copy link
Author

Thanks, I'll use the rcl handle for now!

Providing an async mechanism would go a long way for ROS1-style lazy pub/sub pipelines (see pcl_ros). An application-side pattern using a timer or something is the alternative that comes to mind.

@mjcarroll
Copy link
Member

Agreed.

The approach would be to use another guard condition (or perhaps piggy-back off an existing one) to trigger when publisher and subscriber counts change. This could then be used at the rclcpp-layer to provide the behavior you describe.

@ivanpauno
Copy link
Member

This was solve in #628, I forgot referencing this

@paulbovbel
Copy link
Author

paulbovbel commented Mar 13, 2019

Thanks @ivanpauno!

Is adding an async mechanism for notifying the application regarding new subscribers still on the roadmap for rclcpp, to enable lazy pub/sub pipelines?

@dirk-thomas
Copy link
Member

dirk-thomas commented Mar 13, 2019

This was solve in #628

Closing...

Is adding an async mechanism for notifying the application regarding new subscribers still on the roadmap for rclcpp

It is mentioned as a desired feature on the roadmap but it is not planned to be worked on by Dashing.

@dirk-thomas dirk-thomas removed the ready Work is about to start (Kanban column) label Mar 13, 2019
nnmm pushed a commit to ApexAI/rclcpp that referenced this issue Jul 9, 2022
* Save allocator when setting uninitialized clock
* Add tests for clock types init/fini
* Remove extra calls to set clock allocator
* Remove tests not related to this PR
* Replace test to make it clearer what is tested in the PR

Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants