ROS Middleware Interface (RMW)
ROS 中间件接口RMWAdvancedThe ROS 2 abstraction layer that separates the upper-level API from the actual communication backend.
RMW is a C interface layer in ROS 2, sitting between the client libraries (rclcpp, rclpy, via rcl) and the actual communication middleware. ROS 2 communicates over DDS (Data Distribution Service, a publish/subscribe communication standard) by default, and since several vendors implement DDS, RMW lets each one plug in as a swappable backend — for example rmw_fastrtps_cpp (Fast DDS) or rmw_cyclonedds_cpp (Cyclone DDS); newer distributions have also added rmw_zenoh_cpp, based on Zenoh. User code doesn't need to change at all — switching backends is just a matter of setting the RMW_IMPLEMENTATION environment variable. When multi-machine discovery fails or large data transfers stutter, trying a different RMW implementation is a common troubleshooting step; nodes within the same system should generally all use the same one.
ExampleRun export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp before ros2 run, and the node switches to sending and receiving messages over Cyclone DDS.
- Also called
- rmw, RMW implementation
- Related
- Robot Operating System 2 · Middleware · Data Distribution Service · eProsima Fast DDS · Eclipse Cyclone DDS · Eclipse Zenoh
- Sources
- ROS 2 Docs: About different ROS 2 middleware vendors
ROS 2 Design: ROS 2 middleware interface