Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support verbose option for ros2 service info #877

Open
fujitatomoya opened this issue Jan 19, 2024 · 4 comments
Open

support verbose option for ros2 service info #877

fujitatomoya opened this issue Jan 19, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@fujitatomoya
Copy link
Collaborator

Feature request

Feature description

ros2 service info is supported with #771.

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 service info /add_two_ints
Type: example_interfaces/srv/AddTwoInts
Clients count: 0
Services count: 1

this new feature provides more detailed information for the service endpoint, similar with ros2 topic info -v.

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 topic info -v /chatter
Type: std_msgs/msg/String

Publisher count: 1

Node name: talker
Node namespace: /
Topic type: std_msgs/msg/String
Topic type hash: RIHS01_df668c740482bbd48fb39d76a70dfd4bd59db1288021743503259e948f6b1a18
Endpoint type: PUBLISHER
GID: 01.0f.98.8a.17.fd.e4.3f.00.00.00.00.00.00.14.03
QoS profile:
  Reliability: RELIABLE
  History (Depth): UNKNOWN
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Subscription count: 0

Implementation considerations

  • RMW interface and implementation
    • rmw_get_clients_info_by_service and rmw_get_servers_info_by_service need to be supported. in rmw implementation, it can internally convert the service type into topic type based on the prefixes, and then call graph_cache interface for Reader and Writer endpoints.
  • rcl, rclcpp and rclpy
    • expose rmw interfaces accordingly to be called by application (ros2cli).
  • ros2_documentation needs to be update accordingly.
@Ryanf55
Copy link

Ryanf55 commented Jan 19, 2024

Could we also somehow get it to print the unmangled topic type?

It's quite difficult to get this right when connecting ROS implementation to bare DDS, because

  1. It's hard to find documentation as the design doc never documented the decision; it only has the potential approaches
  2. ROS has changed behavior (removing dds_ at some release), so some posts about it are incorrect: msg2idl.py generates incorrect idl rosidl#706
  3. If the topic type doesn't match up, it's hard to realize it's wrong and there aren't always errors printed, especially if you forget to bind the callbacks in the bare DDS code.

For more reference, the interop I did with ArduPilot is here:
https://github.com/ArduPilot/ardupilot/blob/fb26452b8db27bca2591968eae79c8f0d2b61c48/libraries/AP_DDS/README.md?plain=1#L341

And, the mangling can be seen here:
https://github.com/ArduPilot/ardupilot/blob/fb26452b8db27bca2591968eae79c8f0d2b61c48/libraries/AP_DDS/dds_xrce_profile.xml#L275

The above is working with FastDDS on humble.

For example, for maximum detail, one could implement ros2 service info -v it to show:

$ ros2 service info ap/arm_motors

...
Request Topic Type (DDS): ardupilot_msgs::srv::dds_::ArmMotors_Request_
Request Topic Name (DDS): rq/ap/arm_motorsRequest

Response Topic Type (DDS): ardupilot_msgs::srv::dds_::ArmMotors_Response_
Response Topic Type (DDS): rr/ap/arm_motorsReply

Topic Type (ROS): ardupilot_msgs/srv/ArmMotors

@mjcarroll mjcarroll added the help wanted Extra attention is needed label Feb 2, 2024
@leeminju531
Copy link
Contributor

who is progressing these?
I am willing to take care of these if nobody else is working on them.

@Ryanf55
Copy link

Ryanf55 commented Feb 29, 2024

It's all you! Help is much appreciated.

@fujitatomoya
Copy link
Collaborator Author

Not directly related but ros2/rclcpp#2406 (comment) is worth to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants