Why did ROS2 keep .msg interface definitions?

The .msg interface definitions are one of the largest downsides to ROS. The biggest downside to me being the lack of real enum support.

I wish ROS2 had switched over to protobuf so that the enuma would have generated tostring functions, optional fields, and of course the benefits that come along with using existing open source tools.

I read through the design decision a bit on this, but it was kind of unclear what happened exactly, and I wonder if this is something I could bring to ROS2. Adding support for protobuf message definitions and maybe eventually deprecating .msg formats.

2 Likes

ROS 2 uses OMG IDL , and all .msg, .srv, and .action get converted to .idl files at build time by the rosidl_adapter package. There’s more information in the articles under the “Interfaces” section on this page: Design . There’s been some work towards supporing enums in the idl format in Add enum support to ROSIDL by r7vme · Pull Request #685 · ros2/rosidl · GitHub

I think it was good to keep the option to use the old ROS format because there’s a lot of existing message definitions written in it.

3 Likes