Closed shvass closed 1 month ago
After debugging for a while, it was discovered that during de-serialization here, there is a 16 bytes of offset required to gather correct data of the message. (The first 16 bytes being some random gibberish, I've no idea about ).
My crude attempt to add a 16 bytes offset during ucdr_init_buffer worked, and data corruption was fixed.
No idea on what a proper fix would be.
Which ROS 2 distro are you using in the computer side?
I've installed ros2-humble on the system. The micro-ros agent is running in a docker container build for humble.
Are you using Fast DDS as middleware in the ROS 2 side?
No, I'm on eclipse-cyclonedds.
Cyclone DDS is not compatible with micro-ROS. Please switch to Fast DDS.
Thank you. It fixed the issue.
Somehow it never affected topics, they were working just fine. Only services were affected.
Hello @shvass, it is a well-known issue that services do not interoperate between Cyclone DDS and Fast DDS even in its ROS 2 versions without micro-ROS. So this issue in micro-ROS is inherited from its ROS 2 "parent" distros. That's why topics are not affected.
For reference: https://github.com/ros2/rmw_cyclonedds/issues/184
Issue template
Steps to reproduce the issue
esp successfully discovers the agent and registers the services. On calling the service
Expected behavior
The service callback is called with a = 0 and b = 0.
The ESP controller sends the response with result = 0
Actual behavior
The service callback prints
Additional information
Discovered this issue while working on another project with parameter server where underlying services failed.