With the development of IoT and edge computing, there is a need for efficient and reliable middleware to handle the communication among Edge devices or between Edge and Cloud. Meanwhile, ROS\,2 is more commonly used in robotic systems, but there is no comparison study of middleware using ROS Messages. In this study, we compared the middlewares that are commonly used in ROS\,2 systems, including DDS, Zenoh, and MQTT. In order to evaluate the performance of the middleware in Edge-to-Edge and Edge-to-Cloud scenarios, we conducted the experiments in a multi-host environment and compared the latency and throughput of the middlewares with different types and sizes of ROS Messages in three network setups including Ethernet, Wi-Fi, and 4G. Additionally, we implemented different middlewares on a real robot platform, TurtleBot 4, and sent commands from a host to the robot to run a square-shaped trajectory. With the Optitrack Motion Capture system, we recorded the robot trajectories and analyzed the drift error. The results showed that CycloneDDS performs better under Ethernet, and Zenoh performs better under Wifi and 4G. In the actual robot test, Zenoh's trajectory drift error was the smallest.
翻译:随着物联网和边缘计算的快速发展,需要高效可靠的中间件来支持边缘设备之间或边缘与云之间的通信。与此同时,ROS 2更常用于机器人系统,但目前尚缺乏基于ROS消息的中间件对比研究。本研究对ROS 2系统中常用的中间件(包括DDS、Zenoh和MQTT)进行了比较。为评估中间件在边端-边端和边端-云端场景中的性能,我们在多主机环境中进行了实验,在以太网、Wi-Fi和4G三种网络配置下,对比了不同ROS消息类型和大小所对应的时延与吞吐量。此外,我们还在真实机器人平台TurtleBot 4上部署了不同中间件,由主机向机器人发送指令,使其沿方形轨迹运动。借助Optitrack运动捕捉系统,我们记录了机器人轨迹并分析了漂移误差。结果表明:在以太网环境下CycloneDDS性能更优,而在Wi-Fi和4G环境下Zenoh表现更佳。在实际机器人测试中,Zenoh的轨迹漂移误差最小。