Skip to content

Connect/Disconnect notification/callback support #330

@fujitatomoya

Description

@fujitatomoya

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 rclcpp and rclpy, 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.

image

Related Information / Reference

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions