ros2 / ros2/ros2cli

`ros2 service call` waits forever if QoS is incompatible with concerned server

Open
#818 2 comments 0 reactions 1 assignee View on GitHub

@fujitatomoya is already working on this.

Since Apr 8, 2023.

enhancement
Dominant language
Python
Stars
262
Forks
228
Avg merge
23h 15m
Merged PRs (30d)
12

Description

Bug report

Required Info:

Steps to reproduce issue
  • create service with the following QoS setting
        self.srv = self.create_service(
            AddTwoInts, 'my_add_two_ints', self.add_two_ints_callback, qos_profile=qos_profile_sensor_data)
  • then call the service via ros2cli service call
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 service list
/my_add_two_ints
/parameter_blackboard/describe_parameters
/parameter_blackboard/get_parameter_types
/parameter_blackboard/get_parameters
/parameter_blackboard/list_parameters
/parameter_blackboard/set_parameters
/parameter_blackboard/set_parameters_atomically
/service_provider/describe_parameters
/service_provider/get_parameter_types
/service_provider/get_parameters
/service_provider/list_parameters
/service_provider/set_parameters
/service_provider/set_parameters_atomically
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 service call /my_add_two_ints example_interfaces/srv/AddTwoInts "a: 1
b: 2"
waiting for service to become available...
...

This does not work because internally incompatible QoS setting are detected in rmw, so that hidden topics construct services will not be able to communicate each other.

Expected behavior
  • User can set the QoS via ros2 service call
Actual behavior
  • User cannot set the QoS via ros2 service call
Additional information

In addition to this fundamental argument extension, it requires that user needs to be able to know what QoS setting is set on the service. So that user can set the appropriate QoS parameter to ros2 service call, but there is no such interface like get_servers_info_by_service nor get_clients_info_by_service. this could be considered as new feature and interfaces.
besides, incompatible events are implemented on publisher and subscription, not for services or clients. that said, there will be not incompatible events for QoS with services.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.