314282258 © Kumiko Hirama | Dreamstime.com
mobilerobot_dreamstime_l_314282258

ROS 2 Communication Stack: The Alternative Protocol

May 13, 2024
Discover how the ROS community is addressing the communication challenges posed by the rapid growth of mobile robots and gain insight into what some consider the best alternate RMW in ROS 2.

What you’ll learn:

  • The challenges faced by ROS 2 users due to the limitations of the DDS protocol in modern robotics platforms.
  • The process and findings of the systematic evaluation conducted by Intrinsic and Open Robotics to identify the best protocol for ROS 2's alternate RMW.
  • An overview of the Eclipse Zenoh protocol, its capabilities, and its performance compared to other protocols.

 

In the past few years, we’ve witnessed incredible growth in mobile robots. This was made possible by some of the advances and commoditization in navigation technologies, along with an increasing pull in domains spanning from warehousing to agriculture.

Besides “robotic” challenges, mobile robots have introduced some significant communication challenges. Some of these issues are caused by the transition from fixed to wireless networks, the increased need for coordination, the density of devices in some use cases, and the need, in many cases, for monitoring and teleoperation both on-prem as well as across the internet. 

In this article, we’ll discuss how the ROS community has faced these challenges and report the results of a systematic evaluation performed by Intrinsic and Open Robotics to identify the protocol that best addresses the needs of modern robotics platforms.

Addressing Communication Challenges in Modern Robotics

ROS 2 leverages a middleware abstraction layer, namely the RMW (ROS middleware), to abstract the underlying communication protocol. That said, all tier-1 RMW implementations are based on the Object Management Group Data Distribution Service (OMG DDS) standard, as this was the protocol selected when initially designing ROS almost a decade ago.

Over the years, ROS 2 users have been increasingly struggling with DDS, as documented in the report mentioned above. Specifically, DDS has proven to systematically impose scalability challenges because of its fully connected graph of participants and extremely verbose discovery protocol.

In addition, DDS discovery relies on multicast UDP (User Datagram Protocol), which often isn’t supported or allowed for commercial deployments. DDS has also been reported to systematically struggle with large messages, such as images and point clouds, that are fundamental to many robot software systems.

Finally, DDS struggles with Wi-Fi networks because of their heavy-weight discovery, their dependencies on multicast, and some other inherent features of communication protocols, such as the way in which reliability is implemented. The report touched on earlier provides an in-depth explanation of the DDS challenges faced by ROS 2 users.

As the severity of these challenges was increasingly creating problems for ROS 2 and its users, the ROS Technical Steering Committee decided to conduct a systematic review of requirements for next-generation robotics. Then they evaluated available protocols to identify the candidate to become the alternate RMW.

Zenoh: A New Protocol for Robotics Middleware

Open Robotics and Intrinsic made an extensive investigation to identify the requirements and shortlist the protocols to be considered. The resulting report provides insights on deployment platforms, networks, scale, and a detailed list of requirements to support ROS 2 users going forward.

This information was gathered through users' polls; the results are highly insightful and available as part of the report. ROS users were also asked which protocol they would have favored as an RMW alternate to DDS.

The result of this evaluation showed that the Eclipse Zenoh protocol, the Blue Dragon Protocol, was simultaneously the ROS 2 user's favorite and the protocol that scored the best in addressing identified requirements.

Zenoh Overview

Zenoh is a novel Pub/Sub/Query protocol that provides a set of unified abstractions to deal with data in motion, data at rest, and computations at an internet scale.

In other terms, Zenoh provides an orthogonal set of primitives that, when composed, are allowed to represent Publish/Subscribe, Distributed Queries, and Distributed Computation—all of this with three primitives and a deceivingly simple protocol (Fig. 1).

Zenoh is open source and was written entirely in Rust for safety, security, and performance. It’s designed to run efficiently in the cloud-to-microcontroller continuum. In other terms, it performs exceptionally well on server-grade hardware and networks as well as on microcontrollers and constrained networks.

As consistently reported by third-party evaluations, Zenoh performs better than the competition both in terms of throughput and latency. Specifically, it has proven to deliver as high as 67 Gb/s across 100-Gb/s Ethernet networks while delivering latencies of 7 µs. Zenoh also runs on a large class of microcontrollers and embedded OS, including Arduino, mbed, freeRTOS, Flipper, and ESP32, as well as WASM.

The protocol was designed to be able to run atop a data-link layer or higher. Technically, it doesn’t need an IP network—routing is built-in. Thus, it runs over the IP protocol stack with ease, supporting both TCP/IP, UDP/IP, and QUIC, along with Serial, Unix Sockets, WebSockets, and Shared Memory transport.

The protocol is highly efficient and has a minimal overhead of only 5 bytes! Zenoh supports peer-to-peer, routed, and brokered communication (Fig. 2), allowing for an optimal communication model at each stage of the system.

Getting ROS 2 Running with Zenoh

The Zenoh RMW is coming up, along with the next ROS 2 release, this month (May 2024). The development of the RMW has progressed quickly, and users can already take advantage of the platform.

Those who can’t wait to leverage the full power of Zenoh in their robotics applications may start by leveraging Zenoh’s ROS 2 plugin. This plugin makes it possible to constrain DDS communication within the robot and use Zenoh for communicating outside of it—in other words, using Zenoh for R2X inside a LAN or across the Internet.

Several users have consistently reported reductions in discovery traffic by 97% to 99% when compared to DDS. In other cases, users had difficulties getting their applications started when utilizing DDS to communicate with them. However, switching to Zenoh seems to have mitigated those issues.

Conclusion: Zenoh’s Impact and Future in Robotics

Despite its young age, Zenoh has been experiencing incredible growth in robotics, Web 3.0, and the IoT/edge, and it’s now rapidly expanding into the automotive. The reason for its success stems from its ease of use, efficiency, and flexibility. Programmers can use a single protocol across the board to deal with data in motion, data at rest, and computation in an entirely decentralized manner.  

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!