# 🎉 rmw\_zenoh binaries for Rolling, Jazzy and Humble

**URL:** <https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395>\
**Category:** ROS General\
**Tags:** ros2, rolling, rmw, humble, jazzy\
**Created:** [January 3, 2025, 9:57pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395 "2025-01-03T21:57:27Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![JEnoch](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jenoch/32/9997_2.png) [@JEnoch](https://discourse.openrobotics.org/u/JEnoch)\
**Post date:** [February 27, 2025, 6:15pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/22 "2025-02-27T18:15:35Z")

</div>

> I see the UDP transport cargo feature is [disabled](https://github.com/ros2/rmw_zenoh/blob/4fc36b75606911c2bbd2467667827f04edc7254f/zenoh_cpp_vendor/CMakeLists.txt#L18).

Right, for the time being you have to enable it and build rmw\_zenoh by yourself.

> In addition, I don’t see the Z\_RELIABILITY\_BEST\_EFFORT flag used anywhere

By Zenoh publisher and subscribers are best-effort. Hence, only `Z_RELIABILITY_RELIABLE` is used to overwrite the default flag [when required](https://github.com/ros2/rmw_zenoh/blob/4fc36b75606911c2bbd2467667827f04edc7254f/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp#L124).

> In my application, I would like to make best\_effort topics use UDP, and reliable topic use TCP. This seems possible in “vanilla” zenoh if I believe [this piece of documentation](https://github.com/eclipse-zenoh/zenoh/blob/6655ed9df49f32af840ddbe9a5e6d4ff7eb17dd7/DEFAULT_CONFIG.json5#L73).

Yes, in addition to enabling the UDP transport feature, you have to configure your Nodes (`ZENOH_SESSION_CONFIG_URI`) to listen on both UDP and TCP:

```json5
listen: {
    endpoints: ["udp/localhost:0", "tcp/localhost:0"],
}

```

If you also want UDP+TCP outside the robot, apply a similar config change to the Router:

```json5
listen: {
    endpoints: ["udp/[::]:7447", "tcp/[::]:7447" ],
}

```

and configure both UDP and TCP for routers interconnectivity via `connect.endpoint` config.

> Is it planned to enable the UDP transport and enable best effort topics?

I don’t think it is, but feel free to open a PR to trigger the discussion!

---

<div class="post-metadata">

**Author:** ![Hugal31](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/hugal31/32/11454_2.png) [@Hugal31](https://discourse.openrobotics.org/u/Hugal31)\
**Post date:** [February 28, 2025, 8:17am UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/23 "2025-02-28T08:17:55Z")

</div>

> [@JEnoch](#):
>
> By Zenoh publisher and subscribers are best-effort. Hence, only `Z_RELIABILITY_RELIABLE` is used to overwrite the default flag [when required](https://github.com/ros2/rmw_zenoh/blob/4fc36b75606911c2bbd2467667827f04edc7254f/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp#L124).

Did you mean “By **default** , Zenoh publisher and subscribers are best-effort”?

I don’t see that in the code:

- In [zenoh-cpp](https://github.com/eclipse-zenoh/zenoh-cpp/blob/a9406fa3d3f433d38a45b3883287b39727bea354/include/zenoh/api/session.hxx#L652)
- In zenoh-c, [here](https://github.com/eclipse-zenoh/zenoh-c/blob/af53af345cf7263b13954b4553b654c1d9c5cfb5/include/zenoh_constants.h#L19) and [here](https://github.com/eclipse-zenoh/zenoh-c/blob/af53af345cf7263b13954b4553b654c1d9c5cfb5/src/commons.rs#L332)
- In [zenoh (rust)](https://github.com/eclipse-zenoh/zenoh/blob/2311334ebb82378e341d350a08d0667169c7f211/commons/zenoh-protocol/src/core/mod.rs#L463)

I fixed that, compile the code myself, and manage to have reliable topics use TCP and unreliable topics use UDP. It only works when there is a router, not in peer only mesh network but that’s ok. I’m still figuring out how to assign priorities to some topics.

---

<div class="post-metadata">

**Author:** ![JEnoch](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jenoch/32/9997_2.png) [@JEnoch](https://discourse.openrobotics.org/u/JEnoch)\
**Post date:** [February 28, 2025, 3:08pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/24 "2025-02-28T15:08:29Z")

</div>

My bad… you’re right, by default a Zenoh Publisher is set as reliable.  
I missed this change that was made in [eclipse-zenoh/zenoh#1305](https://github.com/eclipse-zenoh/zenoh/pull/1305) !

Thank you for [your PR](https://github.com/ros2/rmw_zenoh/pull/486) ! It indeed fixes the usage of BEST\_EFFORT.

---

<div class="post-metadata">

**Author:** ![MrBlenny](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mrblenny/32/10909_2.png) [@MrBlenny](https://discourse.openrobotics.org/u/MrBlenny)\
**Post date:** [March 7, 2025, 4:51am UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/25 "2025-03-07T04:51:46Z")

</div>

Has anyone managed to get these binaries working with shared\_memory?

---

<div class="post-metadata">

**Author:** ![Yadunund](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/yadunund/32/12700_2.png) [@Yadunund](https://discourse.openrobotics.org/u/Yadunund)\
**Post date:** [March 7, 2025, 7:04am UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/26 "2025-03-07T07:04:32Z")

</div>

If someone did, i’d be very surprised since we have not merged in support for shared memory yet 🙂  
[https://github.com/ros2/rmw\_zenoh/pull/363](https://github.com/ros2/rmw_zenoh/pull/363)

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [May 9, 2025, 5:17pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/27 "2025-05-09T17:17:44Z")

</div>

Could somebody please post a simple tutorial on what needs to be done to connect to a robot from my laptop?

I tried this (on Jazzy):

- the robot runs with a default config of zenohd router, `RMW_IMPLEMENTATION=rmw_zenoh_cpp`, `ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET`.
  - rmw\_zenohd is running on the robot

- on my laptop, I created this json:

```json
{
  connect: {
    endpoints: [
      "tcp/robot.local:7447"
    ],
  },
}

```

- then I started router on my laptop: `RMW_IMPLEMENTATION=rmw_zenoh_cpp ZENOH_ROUTER_CONFIG_URI=$(pwd)/robot.json5 ros2 run rmw_zenoh_cpp rmw_zenohd`
- and then `RMW_IMPLEMENTATION=rmw_zenoh_cpp ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET ros2 run rviz2 rviz2`
- ros2 daemon is not running

But the rviz doesn’t see any topics from the robot:

```auto
2025-05-09T17:06:12.726386Z WARN ThreadId(06) zenoh::net::runtime::orchestrator: Scouting delay elapsed before start conditions are met.
[WARN] [1746810372.726528318] [rmw_zenoh_cpp]: Unable to connect to a Zenoh router. Have you started a router with `ros2 run rmw_zenoh_cpp rmw_zenohd`?
[WARN] [1746810372.726577230] [rmw_zenoh_cpp]: Unable to connect to a Zenoh router after 1 attempt(s). Please ensure that a Zenoh router is running and can be reached. You may increase the number of attempts to check for a router by setting the ZENOH_ROUTER_CHECK_ATTEMPTS environment variable. Proceeding with initialization but other peers will not discover or receive data from peers in this session until a router is started.

```

Adding more connection attempts doesn’t work.

This seems to be a very common task so I’d expect it to be documented somewhere, but I haven’t found anything (maybe except [Support environment variables for dynamic discovery · Issue #241 · ros2/rmw\_zenoh · GitHub](https://github.com/ros2/rmw_zenoh/issues/241)).

* * *

I created the minimal JSON config based on my understanding of this line:

> /// Note that the values here are correctly typed, but may not be sensible, so copying this file to change only the parts that matter to you is not good practice.

Maybe I understand it wrong. I also tried copying the whole file and just adding the endpoint with the robot’s router.

This worked a bit better, at least RViz did not fail finding my local router. But even then, no topics from the robot shown up.

* * *

Or is there a way to directly connect to the robot’s router without running a local one? Would there be any downsides?

---

<div class="post-metadata">

**Author:** ![tfoote](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/tfoote/32/3813_2.png) [@tfoote](https://discourse.openrobotics.org/u/tfoote)\
**Post date:** [May 22, 2025, 4:55pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395/28 "2025-05-22T16:55:20Z")

</div>

4 posts were split to a new topic: [Rmw\_zenoh router configuration](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885)

[Previous page](https://discourse.openrobotics.org/t/rmw-zenoh-binaries-for-rolling-jazzy-and-humble/41395.md?page=1)
