RMW-RMW bridge - is it possible, has anyone done it?

We’re more and more thinking that there should be a RMW-RMW bridge for ROS 2.

Our specific use-case is simple - a microcontroller with MicroROS (thus FastDDS) and the rest would be better with Zenoh RMW. But we can’t use Zenoh in the rest of the system because DDS and Zenoh don’t talk to each other.

I know (or guess) that between DDS-based RMWs, there is the possibility to interoperate on the DDS level (through it’s incomplete for some combinations AFAIU).

But if you need to connect a non-DDS RMW, there’s currently no option.

I haven’t dived into RMW details too much yet, but I guess in principle, creating such bridge at the RMW level should be possible, right?

Has anyone tried that? Is it achievable to create something that is “RMW-agnostic”, meaning one generic bridge for any pair (or n-tuple) of RMWs to connect?

Of course, such solution would hinder performance (all messages would have to be brokered by the bridge), but in our case, we only have a uC feeding one IMU stream, odometry, some state and diagnostics, and receieving only cmd_vel and a few other commands. So performance should not be a problem at least in these simpler cases.

1 Like

For your specific use case you might be interested in GitHub - eclipse-zenoh/zenoh-plugin-ros2dds: A Zenoh plug-in for ROS2 with a DDS RMW. See https://discourse.ros.org/t/ros-2-alternative-middleware-report/ for the advantages of using this plugin over other DDS RMW implementations. (caveat, I haven’t used it myself).

It seems like it should be possible to create an rmw-rmw bridge. I would expect a single process could initialize two RMW in separate rmw_context_t instances, and then bridge stuff across them.

1 Like

I think this is a good example where it does not work :slightly_smiling_face:. This only works with cyclone dds: Support Fast DDS for ROS 2 in zenoh-plugin-ros2dds · Issue #492 · eclipse-zenoh/zenoh-plugin-ros2dds · GitHub

@peci1 s request for a RMW-RMW bridge would actually solve that issue as well, as you could bridge the cyclone-fastrtps gap:

fastrtps DDS → RMW-RMW bridge → cyclone DDS → ROS2DDS-Zenoh bridge → zenoh.

Note that the last item is not rmw_zenoh as they do not communicate: Integrating ROS 2 RMW DDS with RMW Zenoh · eclipse-zenoh/roadmap · Discussion #182 · GitHub .

But then again, having such a bridge would solve that as well :smiling_face_with_sunglasses: . Dropping the need for the ROS2DDS-Zenoh bridge.

any DDS → RMW-RMW bridge → rmw_zenoh

(Any performance optimizations in any of the implementations aside of course).

2 Likes

@peci1 have you considered using zenoh on the micro as demoed in picoROS?

1 Like

Thanks, I knew about zenoh-pico, but not about Pico-ROS. It looks interesting and could solve our particular problem

But still, it is not a way to achieve generic RMW-RMW comms.

Although they don’t exactly meet your requirements,
I know of two products with similar concepts.

  1. rmw_zenoh_pico

This product has been left unbuildable for a long time, but I hear it will be done soon.

The next update will include the following:

  • M5Stack core + Arduino support
  • PlatformIO support
  • Zenoh-Pico 1.4.0 support

However, while rmw_zenoh_pico has similar capabilities to microros, it is not exactly the same.
If you have made modifications to the microros client, the transition will be difficult.

  1. custom from fork zenoh_plugin_ros2dds

This product was created by the same developer as rmw_zenoh_pico for the purpose of operating in conjunction with it.
Change the format of the zenoh_plugin_ros2dds’s unique liveliness/topic key to the rmw_zenoh format, and recognize the rmw_zenoh node as a remote zenoh_plugin_ros2dds to communicate.

I’ve heard that basic testing of this program has been completed and they are planning to release it as open source.
But, Like rmw_zenoh_pico, the projects on this site have a very long internal release process, so I don’t know when it will be released.

cyclone DDS → custom fork zenoh_plugin_ros2dds → rmw_zenoh

However, this product is modified from a fork of zenoh_plugin_ros2dds, so the dds side is fixed to cyclonedds. If your program only has sub/pub, it may work, but server/client communication may not be possible.

In the early stages of this product, there were plans to replace DDS, but this was deprioritized as developers began other plans.

2 Likes