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

Service generator does not create symbol name for rosidl_typesupport_cpp #122

Open
StefanFabian opened this issue Apr 9, 2021 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@StefanFabian
Copy link
Contributor

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • Binary
  • Version or commit hash:
    • 1.2.0-1
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Build a service definition

Expected behavior

There should be a symbol
rosidl_typesupport_cpp__get_service_type_support_handle__[package_name]__srv__[interface_name]

Actual behavior

There is no symbol
rosidl_typesupport_cpp__get_service_type_support_handle__[package_name]__srv__[interface_name]

Additional information

rosidl_typesupport_introspection_cpp contains the following:

#ifdef __cplusplus
extern "C"
{
#endif

ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, example_interfaces, srv, AddTwoInts)() {
  return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle<example_interfaces::srv::AddTwoInts>();
}

#ifdef __cplusplus
}
#endif

the same should probably be in rosidl_typesupport_cpp but is missing.

I don't know where exactly this is generated, hence, I can't make a PR for this.

@StefanFabian StefanFabian changed the title Service generator does not create symbol name for rosidl_type Service generator does not create symbol name for rosidl_typesupport_introspection_cpp Apr 9, 2021
@StefanFabian StefanFabian changed the title Service generator does not create symbol name for rosidl_typesupport_introspection_cpp Service generator does not create symbol name for rosidl_typesupport_cpp Apr 12, 2021
@hidmic hidmic transferred this issue from ros2/rosidl Feb 8, 2022
@hidmic
Copy link
Contributor

hidmic commented Feb 8, 2022

@StefanFabian good catch! The service typesupport symbol is missing from srv__type_support.cpp.em. A bugfix would be most welcome.

@hidmic hidmic added bug Something isn't working help wanted Extra attention is needed labels Feb 8, 2022
@StefanFabian
Copy link
Contributor Author

I actually did already create PRs to fix this for foxy and galactic.
See #114 and #115.

@StefanFabian
Copy link
Contributor Author

Any update on what's missing to get these PRs merged? @hidmic
I can't release two large projects until that happens and it's really not a lot of code.
I understand that you guys are busy and have to make sure nothing will break but it's been 9 months since I made that PR.

achim-k added a commit to foxglove/ros-foxglove-bridge that referenced this issue 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
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants