Easier Protobuf and ROS 2 Integration

For anyone integrating ROS 2 with Protobuf-based systems, we at the RAI Institute want to highlight one of our open-source tools: proto2ros!

proto2ros generates ROS 2 message definitions and bi-directional conversion code directly from .proto files, reducing boilerplate and simplifying integration between Protobuf-based systems and ROS 2 nodes.

Some highlights:

  • Automatic ROS 2 message generation from Protobuf

  • C++ and Python conversion utilities

  • Supports Protobuf v2 and v3

It is currently available for both Humble and Jazzy and can be installed with
apt install ros-<distro>-proto2ros

Check out the full repo here: https://github.com/bdaiinstitute/proto2ros

Thanks to everyone who has contributed to this project including @hidmic @khughes1 @jbarry !
As always, feedback and contributions are welcome!

The RAI Institute

12 Likes

this repo points to make proto file the single truth of idl of the ros2 system

but for now, the inner communication serdes are still cdr, because the protos are transfered to rosidl.

any plan about typeadapter(REP-2007) utility to enable rmw_vendor_protobuf_cpp can use typesupport_protobuf_cpp, just like what rosidl_typesupport_protobuf did New rosidl typesupport based on Google Protobuf

but rosidl_typesupport_protobuf make rosidl first class, and presume user will use msg file, which did not match proto2msg’s need.

so, if typeadapter added to proto2msg, rmw_iceoryx2_proto_cpp(a fork of rmw_iceoryx2_cpp) may use the proto as first class serdes, and cdr when other rmw nodes join the graph, and POD if supported zero copy happens.

the issue has been created [FEA] add typeadapter(REP2007) to make inner serdes protobuf rather than cdr. · Issue #20 · rai-opensource/proto2ros