rmw icon indicating copy to clipboard operation
rmw copied to clipboard

make writer_guid uint8_t[] instead of int8_t[] for consistency with rmw_gid_t

Open ihasdapie opened this issue 3 years ago • 3 comments

This PR address another inconsistency I noticed with with gids in rmw, namely that rmw_gid_t is an uint8_t array and rmw_request_id_t.writer_guid is a int8_t array. Changing this would silence some rcl compilation warnings introduced by the service introspection feature (https://github.com/ros2/ros2/issues/1285).

Reference:

https://github.com/ros2/rmw/blob/2259c3f6f3de8c479a9d5c74cdcd03d0010413cd/rmw/include/rmw/types.h#L356-L363

https://github.com/ros2/rmw/blob/2259c3f6f3de8c479a9d5c74cdcd03d0010413cd/rmw/include/rmw/types.h#L620-L627

I'm going to keep this PR as draft until I review the rmw implementations to check if any notable assumptions are made about the signedness of writer_guid, but I don't expect it to be an issue.

Signed-off-by: Brian Chen [email protected]

ihasdapie avatar Aug 23 '22 21:08 ihasdapie

AFAIK, Fast-DDS takes it just byte code, either int8_t or uint8_t during copy.

https://github.com/ros2/rmw_fastrtps/blob/1dcfe806874956158e1d93a77034c740e8790e19/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/guid_utils.hpp#L34-L36

fujitatomoya avatar Aug 24 '22 18:08 fujitatomoya

AFAIK, Fast-DDS takes it just byte code, either int8_t or uint8_t during copy.

I've dug through a number of rmw implementations and all of them take it bytecode as well. I doubt making this change will break anything for "unofficial" rmws and we can run CI for the official impls

See: https://github.com/ros2/rmw/pull/328#issuecomment-1229149183

ihasdapie avatar Aug 27 '22 08:08 ihasdapie

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

ihasdapie avatar Aug 27 '22 08:08 ihasdapie

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status
  • Windows Debug Build Status

clalancette avatar Jan 31 '23 15:01 clalancette