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

failed to deserialize ROS message: Fast CDR exception deserializing message of type std_srvs::srv::dds_::Empty_Response_. #169

Open
theksg opened this issue Nov 1, 2023 · 1 comment

Comments

@theksg
Copy link

theksg commented Nov 1, 2023

Hi,

I am creating a ROS Service in Unity Simulator of type std_srvs/Empty.

I am able to call the service, service is doing the intended work.

But when I return the empty response, I get the following error:

The following exception was never retrieved: failed to deserialize ROS message: Fast CDR exception deserializing message of type std_srvs::srv::dds_::Empty_Response_., at /home/user/ros2_humble/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/type_support_common.cpp:118

can anyone help me with what could be going wrong?

@justinberi
Copy link

justinberi commented Aug 1, 2024

This is still and issue on ros2/jazzy.

In my case it was using a service with an empty request field. For example the service definition was

# ExampleWithEmpty.srv
---
bool foo

The work-around was to place a non-empty in the request. For example

# ExampleWithNonEmpty.srv
bool ignore_this_field
---
bool foo

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

No branches or pull requests

2 participants