The increased data transmission and number of devices involved in communications among distributed systems make it challenging yet significantly necessary to have an efficient and reliable networking middleware. In robotics and autonomous systems, the wide application of ROS\,2 brings the possibility of utilizing various networking middlewares together with DDS in ROS\,2 for better communication among edge devices or between edge devices and the cloud. However, there is a lack of comprehensive communication performance comparison of integrating these networking middlewares with ROS\,2. In this study, we provide a quantitative analysis for the communication performance of utilized networking middlewares including MQTT and Zenoh alongside DDS in ROS\,2 among a multiple host system. For a complete and reliable comparison, we calculate the latency and throughput of these middlewares by sending distinct amounts and types of data through different network setups including Ethernet, Wi-Fi, and 4G. To further extend the evaluation to real-world application scenarios, we assess the drift error (the position changes) over time caused by these networking middlewares with the robot moving in an identical square-shaped path. Our results show that CycloneDDS performs better under Ethernet while Zenoh performs better under Wi-Fi and 4G. In the actual robot test, the robot moving trajectory drift error over time (96\,s) via Zenoh is the smallest. It is worth noting we have a discussion of the CPU utilization of these networking middlewares and the performance impact caused by enabling the security feature in ROS\,2 at the end of the paper.
翻译:随着分布式系统间通信涉及的数据传输量及设备数量持续增长,高效可靠的网络中间件变得既具挑战性又至关重要。在机器人及自主系统领域,ROS 2的广泛应用使得结合其内置DDS(数据分发服务)与多种网络中间件成为可能,从而提升边缘设备之间或边缘设备与云端之间的通信质量。然而,目前尚缺乏将这些网络中间件集成至ROS 2后的综合通信性能对比研究。本研究针对多主机系统,对MQTT、Zenoh以及DDS三种网络中间件在ROS 2环境下的通信性能进行了量化分析。为保证对比的完整性与可靠性,我们通过以太网、Wi-Fi及4G三种不同网络配置,发送不同数量和类型的数据,计算了各中间件的延迟与吞吐量。为将评估延伸至真实应用场景,我们进一步评估了当机器人沿相同方形路径运动时,不同网络中间件随时间累积的漂移误差(位置变化)。结果表明:在以太网条件下CycloneDDS性能最优,而在Wi-Fi及4G条件下Zenoh表现更佳。在实际机器人测试中,经96秒运动后,采用Zenoh的机器人运动轨迹漂移误差最小。值得关注的是,本文末尾还讨论了各网络中间件的CPU利用率以及ROS 2安全功能启用后对性能的影响。