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

Add ROS1 support for calling server-advertised services #136

Merged
merged 5 commits into from
Feb 7, 2023

Conversation

achim-k
Copy link
Collaborator

@achim-k achim-k commented Jan 24, 2023

Public-Facing Changes

  • Add ROS1 support for calling server-advertised services

Description

Implementation details:

  • The service type is unfortunately not stored on the ROS master, so for every new service, a connection to the service server has to be opened to fetch the service type from the connection header
  • For ROS1, one can call services with a custom type (here GenericService) when one defines the ros::service_traits and ros::serialization traits

Fixes #10 (together with #142)

@achim-k achim-k force-pushed the achim/services branch 3 times, most recently from fc7123f to d6c13cc Compare January 26, 2023 12:44
@achim-k achim-k changed the title [DRAFT] Add support for calling server-advertised services Add support for calling server-advertised services Jan 26, 2023
@achim-k achim-k changed the title Add support for calling server-advertised services Add ROS1 support for calling server-advertised services Jan 26, 2023
@achim-k achim-k merged commit b9b2b15 into main Feb 7, 2023
@achim-k achim-k deleted the achim/services branch February 7, 2023 17:33
achim-k added a commit that referenced this pull request Feb 7, 2023
**Public-Facing Changes**
- Add ROS2 support for calling server-advertised services

**Description**
Based on #136 

- Adds experimental ROS2 support for advertising/unadvertising services
and allowing clients to call them
- Implements the services spec that was added in
foxglove/ws-protocol#344

Implementation details:

The main problem is, that symbols from getting the service type support
are missing from the `rosidl_typesupport_cpp` libraries that are
generated for each msg/srv package (see
ros2/rosidl_typesupport#122). There is an open
pull request (ros2/rosidl_typesupport#114) to
fix that, but so far it hasn't been merged.

I found a working, yet little bit hacky, workaround for this problem
which is described more in detail here:

https://github.com/foxglove/ros-foxglove-bridge/blob/f978c182185e5deda93a6518132b6d3c339dcaeb/ros2_foxglove_bridge/src/generic_client.cpp#L59-L89

All in all, the implementation is working, but I would consider it as
experimental for now. I am not sure if this approach would work on
windows / mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Services: list, call, response
2 participants