-
Notifications
You must be signed in to change notification settings - Fork 352
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
How to use cyclonedds cdrstream #1963
Comments
we can also have a discussion at eclipse-zenoh/zenoh-plugin-ros2dds#70 |
The serialized payload generated by the above code is My first thought is that cdrstream inserts payload size(16bytes) at the first 4 bytes. If I replace the first 4 bytes with |
@eboasson please correct me if I'm wrong: Looking at your generated
|
@JEnoch you're right, but I would additionally expect that a request header needs to be prepended as well. The RMW layer does this in a weird way, see https://github.com/ros2/rmw_cyclonedds/blob/26773ea459d115d85b026fec5b528f86b85471e4/rmw_cyclonedds_cpp/src/serdata.cpp#L380C35-L380C56 and https://github.com/ros2/rmw_cyclonedds/blob/26773ea459d115d85b026fec5b528f86b85471e4/rmw_cyclonedds_cpp/src/TypeSupport_impl.hpp#L449 The request/response headers don't show up in the message format (nor in the IDL generated by the ROS toolchain), but they need to be sent somehow and the only possibility in DDS is have it in the data. So, once upon a time, when I needed a solution without understanding the details of the ROS 2 ecosystem, I put this "prefix" thing, it worked and it stuck. It means you have a 16 bytes prefix to the request contents and the type isn't really:
but rather
the GUID is here just a random number, I'm afraid. And, @uupks :
am I correct in assuming you call
|
That's the job of |
Nice! 😀 |
Thanks @JEnoch and @eboasson, sorry for the late reply. The zenoh pico examples are working fine now, i'll close this issue. |
I want to use zenoh-pico application to communicate with ROS 2 nodes based on zenoh-bridge-ros2dds, but I encountered some problems. There is the zenoh-pico-example.
It looks like there is something wrong with cdrstream serialization.
The text was updated successfully, but these errors were encountered: