diff --git a/ros2cli/ros2cli/daemon/__init__.py b/ros2cli/ros2cli/daemon/__init__.py index 50f6d57e4..3841d8cba 100644 --- a/ros2cli/ros2cli/daemon/__init__.py +++ b/ros2cli/ros2cli/daemon/__init__.py @@ -69,6 +69,8 @@ def main(*, script_name='_ros2_daemon', argv=None): _print_invoked_function_name(node.get_topic_names_and_types)) server.register_function( _print_invoked_function_name(node.get_service_names_and_types)) + server.register_function(node.count_publishers) + server.register_function(node.count_subscribers) shutdown = False diff --git a/ros2topic/ros2topic/verb/list.py b/ros2topic/ros2topic/verb/list.py index fa07816aa..b7731f891 100644 --- a/ros2topic/ros2topic/verb/list.py +++ b/ros2topic/ros2topic/verb/list.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ros2cli.node.direct import DirectNode from ros2cli.node.strategy import add_arguments +from ros2cli.node.strategy import NodeStrategy from ros2topic.api import get_topic_names_and_types from ros2topic.verb import VerbExtension @@ -51,7 +51,7 @@ def add_arguments(self, parser, cli_name): def main(self, *, args): topic_info = [] - with DirectNode(args) as node: + with NodeStrategy(args) as node: topic_names_and_types = get_topic_names_and_types( node=node, include_hidden_topics=args.include_hidden_topics)