How to support standard messages with zero-copy transports
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the rosidl code and the available RMW zero-copy implementations mentioned in the issue. Compare the proposed runtime and build-time bounds and fallback mechanisms, then check the discussion for a settled direction. Done requires an agreed design and implementation path for standard messages with variable-length fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100