HPRM: High-Performance Robotic Middleware for Intelligent Autonomous Systems

Jacky Kwok,Shulu Li,Marten Lohstroh,Edward A. Lee
2024-12-03
Abstract:The rise of intelligent autonomous systems, especially in robotics and autonomous agents, has created a critical need for robust communication middleware that can ensure real-time processing of extensive sensor data. Current robotics middleware like Robot Operating System (ROS) 2 faces challenges with nondeterminism and high communication latency when dealing with large data across multiple subscribers on a multi-core compute platform. To address these issues, we present High-Performance Robotic Middleware (HPRM), built on top of the deterministic coordination language Lingua Franca (LF). HPRM employs optimizations including an in-memory object store for efficient zero-copy transfer of large payloads, adaptive serialization to minimize serialization overhead, and an eager protocol with real-time sockets to reduce handshake latency. Benchmarks show HPRM achieves up to 173x lower latency than ROS2 when broadcasting large messages to multiple nodes. We then demonstrate the benefits of HPRM by integrating it with the CARLA simulator and running reinforcement learning agents along with object detection workloads. In the CARLA autonomous driving application, HPRM attains 91.1% lower latency than ROS2. The deterministic coordination semantics of HPRM, combined with its optimized IPC mechanisms, enable efficient and predictable real-time communication for intelligent autonomous systems.
Robotics,Artificial Intelligence,Distributed, Parallel, and Cluster Computing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the non - determinism and high communication latency issues faced by existing robotic middleware (such as ROS2) when processing large amounts of sensor data. Specifically, these problems include: 1. **Non - determinism**: Existing middleware such as ROS2 introduces non - determinism when processing messages, resulting in an unpredictable message processing order, which is a major hidden danger in environments requiring real - time responses (such as autonomous driving). 2. **High communication latency**: When processing large amounts of data (such as data from high - resolution cameras or LiDAR sensors) and distributing it to multiple subscribers, middleware such as ROS2 will face significant communication latency. For example, when transmitting a 4 - MB message, the median latency of ROS2 is approximately 10 ms; when distributing 1 - MB of data to five subscribers, the median latency of ROS2 is close to 80 ms. To solve these problems, the author proposes the High - Performance Robotic Middleware (HPRM). HPRM is based on the deterministic coordination language Lingua Franca (LF) and uses the following optimization techniques to reduce communication latency and improve determinism: - **Memory object storage**: Use memory object storage for efficient zero - copy transfer, reducing memory usage and improving performance. - **Adaptive serialization**: Dynamically adjust the serialization method according to the data type, separate metadata and the actual data buffer, and avoid unnecessary memory copies. - **Eager protocol and real - time socket**: By pre - allocating a fixed - size buffer and disabling the Nagle algorithm, reduce handshake latency and ensure that small messages can be sent immediately. Through these optimizations, when broadcasting large messages to multiple nodes, HPRM can achieve up to 173 times lower latency compared to ROS2. In addition, the author also demonstrates the advantages of HPRM in reinforcement learning agents and object detection workloads by integrating the CARLA simulator. In particular, in autonomous driving applications, the latency of HPRM is 91.1% lower than that of ROS2. In summary, this paper aims to solve the non - determinism and high communication latency problems of existing robotic middleware when processing large - scale sensor data by developing HPRM, thereby improving the real - time performance and reliability of intelligent autonomous systems.