ROS2 interoperability with native DDS
I'm using cyclonedds and ROS2 Galactic, but I am open to anyone sharing their experiences with this problem using any DDS vendor.
Has anyone successfully been able to subscribe to a DDS topic from ROS2? Here's what I've found when trying to pass all the hurdles:
- At first you discover that to get DDS topics to appear in ROS you need to prepend
rt/
to the name. - Then you discover that ROS does not recognize the message type (
The message type 'sensor_msgs::msg::Imu' is invalid
) if you use the idl files from here: /opt/ros/DISTRO/share/... and you have to use the mangled messages from f.e. here - Next, I got invalid QOS error, that got fixed when I used similar QOS settings from this part in rmw_cyclonedds
My final stage where I am stuck:
ros2 topic echo /imu
runs without error but no messages are printed.ros2 topic info --verbose
gives:Type: sensor_msgs/msg/Imu Publisher count: 1 Node name: _CREATED_BY_BARE_DDS_APP_ Node namespace: _CREATED_BY_BARE_DDS_APP_ Topic type: sensor_msgs/msg/Imu Endpoint type: PUBLISHER GID: 01.10.58.04.56.00.a3.13.e6.11.ad.97.00.00.02.03.00.00.00.00.00.00.00.00 QoS profile: Reliability: BEST_EFFORT Durability: VOLATILE Lifespan: 9223372036854775807 nanoseconds Deadline: 9223372036854775807 nanoseconds Liveliness: AUTOMATIC Liveliness lease duration: 9223372036854775807 nanoseconds Subscription count: 0
There's a lot of scattered info about this across the web, like as if many people tried to do this, but there is no concrete working sample. It also feels like the ROS2 is not intended to be used like this aka no guarantees. Users of some RTI software tool seem to be able to do what i am doing. So I still wonder if this is possible to do using a self written CycloneDDS publisher?
I'm also trying to archieve Communication between ROS2 (Humble) and CycloneDDS. I used the Hello World Example of Cyclone and gave it the String.ide from here. I opened an issue in the Cyclone Github here. The dev is also willing to help out. You could hop onto the issue. Right now I'm still at the point of getting the QoS-Settings to fit.