Conversation
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
@mjcarroll before building anything, it'd be good to reach some consensus. This needs a PMC sponsor too IIUC (if the group agrees this is worthwhile, of course). |
|
I would like to put this under the responsibility of the newly formed accelerated memory transport working group, since we have been having discussions about the rcl::Buffer approach there as well. Can we plan on adding this to the first agenda there? We can rectify what is here against the proposed rcl::Buffer approach. |
|
Sure thing. |
MiguelCompany
left a comment
There was a problem hiding this comment.
A very sound proposal.
Leaving two minor comments
|
|
||
| - It is binary compatible. XCDRv1 serializes full sized data sequentially, and while big endian by default, it can be configured to operate in little endian like the vast majority of modern compute platforms. | ||
| - It is sufficiently descriptive. XCDRv1 serializes enough information (i.e. alignments, sizes) to recover the message if its structure is known. | ||
| - It ensures over-the-wire compatibility. At the time of writing of this REP, most RMW implementations, including all Tier 1 RMW implementations, use XCDRv1 as serialization format. Messages exchanged by processes using the proposed re-design and the original design will be mutually intelligible. TBD: should we be using XCDRv2? Append-only message extension would be easier to support. |
There was a problem hiding this comment.
Regarding XCDRv2, it would have the following caveats:
- The maximum field alignment is 4 bytes, which might make access to 64-bit data types slower in some architectures.
- There is a possibility os breaking backwards wire-compatibility
There was a problem hiding this comment.
Yeah, I saw the change in alignment. I get OMG was trying to reduce padding but I'm not that sure it was a smart move.
|
|
||
| For the reference implementation, [XCDRv1](https://www.omg.org/spec/DDS-XTypes/1.3/PDF) is chosen as the serialization format (and thus as the in-memory representation for message views) for a number of reasons: | ||
|
|
||
| - It is binary compatible. XCDRv1 serializes full sized data sequentially, and while big endian by default, it can be configured to operate in little endian like the vast majority of modern compute platforms. |
There was a problem hiding this comment.
Care should be taken when receiving a payload in an endianness that differs from the one in which the application is running
There was a problem hiding this comment.
Yes, this should be trivial. Endianness is specified in the payload. That said, I think we can switch to little endian everywhere with no consequences other than performance degradation for cross-distribution communication (which is not guaranteed to work anyways IIRC) if we have to deserialize. I honestly tried to find a rationale for big endian protocols and I couldn't find any other than that's how it has always been for network protocols.
There was a problem hiding this comment.
I honestly tried to find a rationale for big endian protocols and I couldn't find any other than that's how it has always been for network protocols.
My understanding is that "it's always been done that way", but it seems like the tides are shifting towards little endian for the same reason that we are considering it here: protobuf, flatbuffers, capnproto, parquet, arrow, can't all be wrong, right?
There was a problem hiding this comment.
My understanding is that "it's always been done that way", but it seems like the tides are shifting towards little endian for the same reason that we are considering it here: protobuf, flatbuffers, capnproto, parquet, arrow, can't all be wrong, right?
The TCP/IP protocol uses big-endian as "network byte order". My guess is that it was standardized by people using IBM machines back in the day, and ended up being the default endianness for other applications built on top of TCP/IP as well.
| @@ -0,0 +1,349 @@ | |||
| --- | |||
| layout: post | |||
| REP: 0157:2026 | |||
There was a problem hiding this comment.
Please rename the file to match: rep-0157:2026.md.
|
|
||
| `rosidl` is one the oldest subsystems of ROS 2. [Initial research](https://design.ros2.org/articles/serialization.html) dates back to 2013. C and C++ message generators were first released with Alpha 1, each with their own runtime representations. Language-specific, member-based interfaces were simple enough to implement and verifiably performant. The first few DDS based middlewares had their own vendor-specific IDL to comply with, for interoperability and full feature support, and their own wire formats, thus some data processing (ie. copy, conversion, serialization) cost had to be paid one way or another and it was deemed affordable. | ||
|
|
||
| `rosidl` design hasn't changed substantially since then. Unfortunately, even if well suited for ROS 2 systems distributed over many hosts in a network, its simplicity sacrifices performance for the fairly common single host topology. |
There was a problem hiding this comment.
| `rosidl` design hasn't changed substantially since then. Unfortunately, even if well suited for ROS 2 systems distributed over many hosts in a network, its simplicity sacrifices performance for the fairly common single host topology. | |
| `rosidl` design hasn't changed substantially since then. Unfortunately, even if well suited for ROS systems distributed over many hosts in a network, its simplicity sacrifices performance for the fairly common single host topology. |
Please change all instances of "ROS 2" to "ROS".
|
|
||
| # Motivation | ||
|
|
||
| `rosidl` is one the oldest subsystems of ROS 2. [Initial research](https://design.ros2.org/articles/serialization.html) dates back to 2013. C and C++ message generators were first released with Alpha 1, each with their own runtime representations. Language-specific, member-based interfaces were simple enough to implement and verifiably performant. The first few DDS based middlewares had their own vendor-specific IDL to comply with, for interoperability and full feature support, and their own wire formats, thus some data processing (ie. copy, conversion, serialization) cost had to be paid one way or another and it was deemed affordable. |
There was a problem hiding this comment.
Please leave this single instance of "ROS 2" as-is, as it is denoting historical information.
|
|
||
| # Motivation | ||
|
|
||
| `rosidl` is one the oldest subsystems of ROS 2. [Initial research](https://design.ros2.org/articles/serialization.html) dates back to 2013. C and C++ message generators were first released with Alpha 1, each with their own runtime representations. Language-specific, member-based interfaces were simple enough to implement and verifiably performant. The first few DDS based middlewares had their own vendor-specific IDL to comply with, for interoperability and full feature support, and their own wire formats, thus some data processing (ie. copy, conversion, serialization) cost had to be paid one way or another and it was deemed affordable. |
There was a problem hiding this comment.
Please reformat the document according to REP-0001:2025's "one sentence per line" rule.
| REP: 0157:2026 | ||
| title: Minimal Overhead Messaging Support | ||
| author: Michel Hidalgo | ||
| PMC Sponsor: TBD |
There was a problem hiding this comment.
You need to find a sponsor before this proposal can become a Draft REP.
|
|
||
| # Abstract | ||
|
|
||
| This REP proposes a re-design of the `rosidl` messaging system to broaden the scope of application of zero-copy transports, including those that deal with seggregated memory models. |
There was a problem hiding this comment.
Please add a little more information about what the REP is specifying.
| --- | ||
| layout: post | ||
| REP: 0157:2026 | ||
| title: Minimal Overhead Messaging Support |
There was a problem hiding this comment.
Please make the title more specific, e.g. "Minimal Overhead Messaging Support Using..."
Connected to https://discourse.openrobotics.org/t/is-it-time-to-discuss-rosidl/49867. Pending ROS PMC sponsor assignment, if the PMC is willing.
Reference implementation pending design discussion (and resolution of some TBDs).