UUID in std_msgs

I’d like to see UUID (aka, GUID) added to std_msgs. We’ve been using this simple definition: uint8[16] data.

Has anyone else been using some other UUID definition or is there a better one?
Does it already exist somewhere else?

There’s a UniqueID message in the uuid_msgs package: http://wiki.ros.org/uuid_msgs that looks exactly like what you propose.

With a python module in the unique_id package.

1 Like

There is a uuid_msgs package in ROS1, would that meet your needs?
We could consider either adding it to std_msgs as you suggest of port this package and add it to the common_interfaces repository

Yes, let’s bring it in to std_msgs. I can’t think of a good reason to keep it in its own repository. It is very similar to integer keys. Do you want me to make a pull request?

One reason to not move it to std_msgs is to keep the message packages consistent between ROS1 and ROS2. Otherwise you would have to convert any code using it to change package name and define custom mapping rules for the bridge. So I think it would be better to keep the layout as it is in ROS1. I’d wait for feedback from the ROS team before going through the work of making the PR

It definitely should not be merged into std_msgs. That holds only simple wrappers of primative datatypes that are not recommended for general usage. You should simply use the underlying primitives and give them semantic meaning.

The place we could consider moving them to is common_msgs however there’s no significant advantage to moving them to the same repository. And it has a disadvantage that it adds cross coupling when checking out from source.

The main reason to consider integrating that package into common_msgs would be if we wanted to integrate UniqueId into a different message in common_msgs which would require the integration to avoid circular dependencies between repos. Otherwise I’d generally recommend leaving things as they are.

1 Like

I was a little confused by your reference to common_msgs, as I’m only concerned about ROS2. It seems that common_interfaces is the right place to include the uuid_msgs package in ROS2 (leaving the message type & name & package as unchanged as possible from ROS1). That way we don’t need a separate repository for one line of code.