Correctly map byte[] AKA IDL type sequence<octet> to Python type bytes - #142
Correctly map byte[] AKA IDL type sequence<octet> to Python type bytes#142aprotyas wants to merge 1 commit into
byte[] AKA IDL type sequence<octet> to Python type bytes#142Conversation
The tests for `Arrays`, `BoundedSequences`, and `UnboundedSequences` are modified to reflect the correct mapping from IDL type `sequence<octet>` to Python type `bytes`, rather than Python type `list`. Signed-off-by: aprotyas <aprotyas@u.rochester.edu>
|
Hi @aprotyas did this get anywhere? |
|
@russkel no, I didn't look into this much further than what's in the PR. Feel free to work on it if you want! |
Yeah I might have a go. Seems a good first ticket on this |
|
Yeah, unfortunately I can't give time to this PR anymore, but I'd be happy to review and move forward things if you write some code. |
|
I haven't checked all of the related PRs and issues, but this seems like a much needed change. It took me some time to realise |
|
Almost reaching its 3rd cake day! I'd be very happy if someone could take over this PR. |
|
Is |
|
Confirming this is still present on ROS 2 Jazzy (ros-jazzy-rclpy 7.1.11, official ros:jazzy Docker image), with a comparison that isolates it to Publishing So Quantified impact from a pub/sub micro-benchmark we ran while evaluating alternatives (rclpy 7.1.11, same machine): a subscriber consuming 64 B ByteMultiArray messages tops out near ~11k msg/s against a publisher offering ~150k msg/s; per-message callback dispatch of these list-of-bytes payloads is a significant contributor alongside executor overhead. Happy to help test a fix that maps |
As reported in #134, the message type
byte[]AKA IDL typesequence<octet>is mapped to a sequence ofbytes, rather than a singlebytesinstance - which is the mapped type documented in the design doc.The goal of this (draft, for now) PR is to rectify that behavior.
In 14969f2, I've modified the interface tests for
Arrays,BoundedSequences, andUnboundedSequencesto reflect the correct mapping from IDL typesequence<octet>to Python typebytes, rather than Python typelist. As expected, these changes will cause test failures in the build job.Signed-off-by: Abrar Rahman Protyasha aprotyas@u.rochester.edu