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:
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.
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.
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?