rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

Lifecycle Publishers and Subscriptions should not be Discovered by the ROS 2 Network until Configured

Open Amronos opened this issue 9 months ago • 1 comments

Description

Lifecycle Publishers and Subscriptions (being implemented with #2715) should not be discovered by the ROS 2 network until the Lifecycle Node has entered the inactive state (meaning it is configured)

This was originally brought up by @fujitatomoya in https://github.com/ros2/rclcpp/pull/2715#discussion_r1909639354.

Motivation

This will allow one to determine whether a node is actually publishing/subscribing to a particular topic. It doesn't make sense to list lifecycle nodes as publishing/subscribing to a specific topic when they haven't even been configured.

Design / Implementation Considerations

The following way to implement this has been suggested by @fujitatomoya in https://github.com/ros2/rclcpp/pull/2715#discussion_r1909639354:

for doing that, probably we need to have state control (configured, inactive) in SubscriberBase class and underlying implementations, and then on_configure callback, we can configure the subscription to be discovered.

Additional Information

No response

Amronos avatar Apr 11 '25 11:04 Amronos