Skip to content

Conversation

leeminju531
Copy link
Contributor

Add get clients, servers info

Refer to ros2/ros2cli#916

@leeminju531
Copy link
Contributor Author

self,
service_name: str,
no_mangle: bool = False
) -> List[TopicEndpointInfo]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead we could return ServiceEndpointInfo?

I think we can introduce EndpointInfo base class then TopicEndpointInfo and ServiceEndpointInfo can inherit EndpointInfo base class. this is more appropriate implementation since TopicEndpointInfo for services does not have topic type, topic type hash. this requires the bit of refactoring for classes, but i think that is the right path we can take here.

@clalancette @sloretz what do you think?

name, otherwise it should be a valid ROS service name. Defaults to ``False``.
:return: A list of TopicEndpointInfo for all the clients on this service.
"""
return self._get_info_by_topic(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about having EndpointTypeEnum instead of TopicEndpointTypeEnum, and this function can take an argument with EndpointTypeEnum, and callback function together? i think this refactoring would be useful when we support the action endpoints in rclpy.

Suggested change
return self._get_info_by_topic(
return self._get_info_by_endpoint(

@ahcorde
Copy link
Contributor

ahcorde commented Jul 21, 2025

Pulls: ros2/rmw#371, ros2/rmw_implementation#238, ros2/rcl#1161, ros2/rclcpp#2569, #1307, ros2/rmw_zenoh#679, ros2/rmw_fastrtps#771, ros2/rmw_cyclonedds#499, ros2/rmw_connextdds#154, ros2/ros2cli#916
Gist: https://gist.githubusercontent.com/ahcorde/302c3652a6220b1c87e62745e9f9afff/raw/742f65fffc9bfec58f851df6062324b9d1a85a3c/ros2.repos
BUILD args: --packages-above-and-dependencies rmw rmw_implementation rcl rclcpp rclpy ros2cli ros2service
TEST args: --packages-above rmw rmw_implementation rcl rclcpp rclpy ros2cli ros2service
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16548

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants