Skip to content

How to support standard messages with zero-copy transports #2201

Description

@alsora

Most of the available RMW implementations now support some sort of zero-copy transport for multiple processes in the same machine.
However, to use this feature, there's an important limitation: the size of the messages must be known at compile time, so they can't contain variable-length sequences.

This effectively makes it impossible to use the vast majority of ROS 2 standard messages: indeed, the presence of a header (with its string frame_id field) doesn't respect the requirement.

We are working with eProsima to find a solution to this problem.
Our plan is to modify the rosidl code and allow to automatically bound the unbounded elements.

For example: assume that all strings are capped at X characters.
This approach wouldn't affect the application code, that would still work with strings.
It would work under the hood when a message with a string would need to be published via shared memory.

We are discussing different implementations, with an upper bound that can be defined either at runtime or at build time and with different possible fallback mechanisms (i.e. what to do if the string exceeds the upper bound?).

We would like to gather feedbacks from the community about this, which in our opinion is a required feature in order to enable multi-process ROS 2 applications.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions