Middleware interface

ROS 2 aims to support multiple DDS implementations. In order to abstract from the specifics, an interface is being introduced (the middleware interface) which can be implemented for different DDS implementations. This middleware interface defines the API between the ROS client library and any specific implementation.

|                   user land                   |
|              ROS 2 client library (rcl)       |
|             middleware interface (rmw)        |  <--
| DDS adapter 1 | DDS adapter 2 | DDS adapter 3 |  <--
|    DDS impl 1 |    DDS impl 2 |    DDS impl 3 |

Each implementation of the rmw interface will usually be a thin adapter which maps the generic middleware interface to the specific API of the DDS middleware implementation thereby DDS adapters are introduced for each one of the implementations supported.

Code of the ROS 2 middleware interface is available at https://github.com/ros2/rmw.

The API is designed to be implemented in C. A pure C interface can be used in ROS Client Libraries for most other languages including Python, Java, and C++ preventing the need to reimplement the core logic.

  • create_node() (defined here at the time of writing)
  • create_publisher() (defined here at the time of writing)
  • publish() (defined here)

  • create_node() (defined here at the time of writing)
  • create_subscription (defined here at the time of writing)
  • take() (defined here at the time of writing)

  • rmw: The ROS Middleware (rmw) Interface
  • rmw_implementation: CMake infrastructure and dependencies for rmw implementations
  • rmw_opensplice: Implementation of the ROS Middleware (rmw) interface using PrismTech's OpenSplice DDS.
  • rmw_connext: Implementation of the ROS Middleware (rmw) Interface using RTI's Connext DDS.
  • rmw_freertps: rmw implementation using freertps
  • rmw_fastrtps: eProsima FastRTPS (LGPL) middleware.

  • http://design.ros2.org/articles/ros_middleware_interface.html
  • https://github.com/ros2/rmw