ros2/rmw_zenoh
RMW for ROS 2 using Zenoh as the middleware
What it solves
rmw_zenoh provides a ROS 2 Middleware (RMW) implementation based on Zenoh, offering an alternative to the default DDS-based communication layers. It simplifies discovery and communication across different hosts, containers, and networks, while providing high-performance options for local communication.
How it works
It uses the zenoh-cpp bindings to implement the ROS 2 RMW interface. The system relies on Zenoh sessions and an optional Zenoh router to manage discovery and message routing.
Key mechanisms include:
- Zenoh Router: Acts as a central point for discovery and gossip, allowing nodes to find each other without relying on multicast discovery (which is disabled by default).
- Shared Memory (SHM): Provides implicit optimization for messages passing between local nodes, reducing latency and CPU usage for large payloads by writing data to a shared memory segment instead of using the network stack.
- Serialization Buffer Pool: Recycles buffers during transmission to bound memory usage and improve efficiency.
- Configuration: Uses
.json5configuration files and environment variable overrides to manage session behavior, router endpoints, and security settings.
Who it’s for
Robotics developers using ROS 2 who need a flexible, high-performance communication middleware, particularly those operating across multiple hosts or within Docker containers.
Highlights
- Implicit Shared Memory: Transparently optimizes local communication for large payloads without requiring specific API calls.
- Flexible Discovery: Supports both router-based discovery and multicast scouting for peer-to-peer discovery.
- Cross-Host Bridging: Simplifies connecting ROS 2 nodes across different machines via Zenoh routers.
- Integrated Security: Supports access control, authentication, and encryption through
zenoh_security_tools. - Memory Efficiency: Implements a buffer pool to recycle serialization buffers and prevent uncontrolled memory growth.
Related
- Project
- Project
- Project
- Project
- Project