-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
Description
Feature request
Feature description
- RMW can notify the event that any subscriptions connect / disconnect on the topic to each publisher.
- Based on this capability, in
rclcppandrclpy, user application can register user callback that will be called when subscription connects or disconnects on the topic for publisher.
ROS 1 Similar function: https://docs.ros.org/en/noetic/api/roscpp/html/classros_1_1NodeHandle.html#ae4711ef282892176ba145d02f8f45f8d
Use case
On visualization node, to suppress unnecessary CPU utilization, enable its visualization process only when RViz is connected.
Related Information / Reference
- image_pipeline comment out subscription match for temporary
- ROS2 publisher callback on subscription match
- pointcloud_to_laserscan does polling to check on subscription match
Implementation considerations
Since all tier-1 rmw implementation is DDS implementation, we can support this feature with on_publication_matched of DataWriterListener Interface. (we confirmed the code of Fast-DDS.)
- rmw Add matched event support #331
- rmw_implementation Add tests for rmw matched event rmw_implementation#216
- rmw_fastrtps Implement matched event rmw_fastrtps#645
- rmw_connextdds Support matched/unmatched event rmw_connextdds#101
- rmw_cyclonedds Implement matched event rmw_cyclonedds#435
- rcl Implement matched event rcl#1033
- rclcpp Implement matched event rclcpp#2105
- rclpy Implement matched event rclpy#1083
- Add matched event demo for rclcpp and rclpy demos#607
- Topic add matched event description ros2_documentation#3406
- Matched events release note update. ros2_documentation#3420
Reactions are currently unavailable
