šŸŽ‰ rmw_zenoh binaries for Rolling, Jazzy and Humble

I see the UDP transport cargo feature is disabled.

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.

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.

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:

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:

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!

Did you mean ā€œBy default, Zenoh publisher and subscribers are best-effortā€?

I don’t see that in the code:

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.

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 !

Thank you for your PR ! It indeed fixes the usage of BEST_EFFORT.

1 Like

Has anyone managed to get these binaries working with shared_memory?

If someone did, i’d be very surprised since we have not merged in support for shared memory yet :slight_smile:

5 Likes

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:
{
  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:

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).


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?

2 Likes

4 posts were split to a new topic: Rmw_zenoh router configuration