ROS-2 communication optimisation
using Zenoh ROS2 Bridge
ROSConDE 2023 - November, 24th 2023 - Karlsruhe

Phani Gangula, MSc.
Senior Solutions Architect
Phani@zettascale.tech

Challenges“The most dangerous phrase in the language is, ‘We’ve always done it this way.’” - Rear Admiral Grace Hopper

Why DDS Cannot
Scale?
There are some fundamental aspects ofthe DDS protocol that don’t make it
scalable nor suitable for open systems
These relates to its:
- Discovery Protocol — O(T*R*W*P^2)(Topics, Readers, Writers, Participants)- Reliability protocol (resource usage linear
in the number of matching readers)- Liveliness Protocol- Semantics exposed to application w.r.t.
what you can know about your system, e.g.
liveliness, number of matchingreaders/writers, finding topics, etc.

RPC over DDS

Source: https://www.omg.org/spec/DDS-RPC/1.0/PDF

Intrinsics / Open Robotics in 2023
2023-09 ROS 2 RMW alternate

Zenoh selected as the first non
DDS protocol to be natively
supported
Intrinsic implementing Zenoh
RMW as the major
contribution for next ROS2release
Very insightful report, worthreadingAbstract........................................................................................................................................ 1User Challenges with DDS..........................................................................................................2DDS has a fully-connected graph of participants.....................................................................2DDS uses UDP multicast for discovery................................................................................... 3
DDS can have difficulty transferring large data....................................................................... 3
DDS can struggle on some WiFi networks.............................................................................. 4
DDS tends to have complex tuning parameters...................................................................... 4Vendor specific non-standard DDS extensions....................................................................... 4
Next Steps............................................................................................................................... 5Requirements gathering............................................................................................................. 5User Survey............................................................................................................................. 5Demographics.............................................................................................................. 6Technical Data............................................................................................................. 6
Alternative middleware options.................................................................................... 8Requirements.......................................................................................................................... 9Comparative analysis of currently available middlewares.................................................... 11
Complete list of investigated middlewares....................................................................... 11
Performance.................................................................................................................... 13
Middlewares X Requirements................................................................................................13Conclusion................................................................................................................................. 14
Appendix A.................................................................................................................................15

ZenohDistribute, compute, and s t o r e d a t a a t t h e m o s t convenient lo catio n a t any timePub/Sub/Query protocol that Unifies data inmotion, data at rest and computations fromembedded microcontrollers up the datacentre
Provides location-transparent abstractions
for high performance pub/sub anddistributed queries across heterogeneous
systems
Provides universal abstractions for cloud-todevice data-flow programming

Dragons teach us that if we want to climb high we have to do it against the wind.

Any Topology
Clique

Mesh

Peer
Peer

Peer-to-peer
Clique and mesh topologies

Peer

Peer

PeerPeerPeer

Peer

Peer

Any Topology

ClientClique

Mesh

Peer

ClientPeer

Peer-to-peer

ClientPeer

Clique and mesh topologies

Peer

Peer

Peer

Peer

Peer

PeerBrokered
Clients communicate througha router or a peer
RouterClientClientBrokered

RouterClientRouterClientClientRoutedAny Topology

ClientClique

Mesh

Peer

ClientPeer

Peer-to-peer

ClientPeer

Clique and mesh topologies

Peer

Peer

Peer

RouterRouterRouterRouterRouterRouterRoutedRouters forward data to andfrom peers and clients

Peer

Peer

Brokered
Clients communicate througha router or a peer

Peer

ClientClientBrokeredRouter

ClientRouterClientClientRoutedRuns Everywhere
Written in Rust for security, safety and performance…

Native libraries and API bindings for many programming
languages, e.g., Rust, C/C++, Python, JS, REST, C# and Kotlin
Supports network technologies from transport layer down-to
the data link. Currently runs on, TCP/IP, UDP/IP, QUIC, Serial,Bluetooth, OpenThreadX, Unix Sockets.
Available on embedded and extremely constrained devices andnetworks — 5 bytes minimal overheadTransport
NetworkData Link
PhysicalZenoh on MCUs
We provide a MISRA-C
implementation of the Zenoh
protocol targeting extremely
embedded targets
Working on a no-std Rust version
for bare-metal micro-controllers
The reference for usability andperformance see this blog

Extensible…

Enhance zenoh with plugins
Interact with other technologies
SSE…

Zenoh plugin for ROS 2 over DDS

ROS 2 over aDDS
/tf

PubW

rt/tf

/cmd_vel

SubR

rt/cmd_vel/stop_motors/dock

ROS NodeW
InfoService RServer W

rq/stop_motorsRequest
rr/stop_motorsReply

RW

rq/dock/_action/send_goalRequest
rr/dock/_action/send_goalReplyRW

rq/dock/_action/cancel_goalRequest
rr/dock/_action/cancel_goalReply

ActionServer RW

rq/dock/_action/get_resultRequest
rr/dock/_action/get_resultReplyW

rt/dock/_action/feedbackW

rt/dock/_action/status
ros_discovery_info20

Mapping to Zenoh
zenoh-bridgeros2dds
/tf

Pub

Pub

tf

/cmd_vel

SubSub

cmd_velServiceServer

Queryablestop_motor

Queryable

dock/_action/send_goal

Queryable

dock/_action/cancel_goal

Queryable

dock/_action/get_result

Pub

dock/_action/feedback

Pub

dock/_action/status/stop_motors/dock

ROS NodeInfo

ActionServerros_discovery_info

ROS Graph21

ROS-to-ROS via Zenoh Bridge
zenohbridgeros2dds

Pub

Sub
ServiceServer/tf/cmd_vel/stop_motors

Pub

Sub
Queryable/dockActionServerzenohbridgeros2dds
tf

cmd_velSub

Pub

stop_motor/tf/cmd_vel/stop_motors
Get

dock

Sub

Pub

Service
Client/dock

Queryable

Get

Queryable

Get

Queryable

Get

Pub

Sub

Pub

Sub

ActionClientNamespace on the bridge

Pub

Sub

Pub

Sub

/tf

/cmd_vel/tf/cmd_vel

BridgeBridge"bot1""bot1"

Pub

bot1/tfSub

bot1/cmd_vel

Sub

Pub

BridgeBridge"bot2""bot2"

Pub

bot2/tfSubbot2/cmd_vel

Sub

Pub/tf/cmd_vel/tf/cmd_velSub

PubSubPub

Multi-robots via namespaces

Pub

Sub/tf/cmd_vel

BridgeBridge"bot1"""

Pub

bot1/tfSub

bot1/cmd_vel

Sub

Pub

Fleet
Manager/bot1/tf/bot1/cmd_vel

Sub

Pub

Bridge"bot2"
Pub

Sub/tf/cmd_vel

Pub

bot2/tfSubbot2/cmd_vel

Sub

Pub

/bot2/tf/bot2/cmd_vel

Sub

Pub

New Zenoh Bridge for ROS 2
https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds• Better integration of the ROS graph(all ROS topics/services/actions can be seen across bridges)• Better support of ROS toolings(ros2, rviz2…)• Configuration of a ROS namespace on the bridge(instead of on each ROS Nodes)• Services and Action as Zenoh Queryables• Even more compact discovery information between the bridges

Use cases
Zenohrouter

Fleet
Manager

Bridge"bot1"

ReplayBridge"Bot2"

Fleet Management

Bridge"Simulation"

Bridge"real_bot"

Pub/Sub with MCUs

SSE

BridgeRecord / Replay

Integrations
Zenohrouterpico
BridgeZenohrouterBridgeNAT

NAT

Cross-WAN bridging (routed or direct)

Bridge26

DemoZetta PaaS
• Provision Zenoh Routers in Cloud oron Premises• Generate configurations and TLS
certificates• Monitor the full Zenohinfrastructure and connected
peers/clients28

ZenohTLS

ZenohRouterZenoh
RouterREST
PluginREST
PluginLocal RouterHTTP

paas.zettascale.tech
Zenoh
TLS

Zenoh
TLS

zenoh-bridge-ros2dds

http://roscon.zenoh.io

Andriod Phone
Zenoh Kotlin

29

Don’t forget to visit
Zenoh’s website…

https://zenoh.io/…Zenoh’s GitHub …

https://github.com/e clips e -ze noh/ze noh…and t o join Zenoh’s
Discord server!

htt ps://dis c o rd.gg/
2GJ958VuHs

Thank You
Patience, persistence andperspiration make an unbeatablecombination for success.