failed to deserialize ROS message: Fast CDR exception deserializing message of type std_srvs::srv::dds_::Empty_Response_.
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?
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
Hi,
Is there any update regarding this issue? The same problem happens to me with std_srvs/Trigger.srv when I call a service from Unity to ROS2.
rclpy._rclpy_pybind11.RMWError: failed to deserialize ROS message: Fast CDR exception deserializing message of type std_srvs::srv::dds_::Trigger_Request_., at ./src/type_support_common.cpp:118
Regards.