-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion about UUIDs #47
Comments
pedantic, but doesn't this depend on the needs of the human in question? Putting UUIDs as Human readability can certainly be positive, but it doesn't seem objective to state in general it's better -- machines would likely disagree (if they could, but then they might also be able to understand human readable fields ;) ). |
@gavanderhoorn Can you come up with a scenario where switching the |
BTW, I grant you the point that declaring something as "much more user friendly" wasn't very objective of me. :) |
that was mostly it. As I said: it was pedantic. I do believe it's important to keep in mind that human-readability doesn't seem like something which would be too important in an actual application. During development: certainly. Afterwards? Depending on what the application is, there may never be any human eyes looking at those messages. |
I absolutely agree. If somebody can convince me that requiring UUIDs has significant advantages in this use case, it might be worth sacrificing the advantages of permitting arbitrary strings. It's always a tradeoff. |
Agreed, though there's been an argument made in other
Where is that represented in the messages? I would think they should still have an ID field (of type whatever we decide for the On UUID for
Isn't that what the ID string is for in the actual
This is sending some alarm bells in my mind. Why is the
Agreed for classes of objects, but instances of tracks or instances of detections in an image have no physical or semantic meaning. If this is a "track" or image then there might be 20 of them per image frame and 100,000 image frames per run. There's no semantic or unique meaning that can be really gained here meaningfully. What seems like a more likely thing is that users are abusing this field that's supposed to uniquely identify the unique detection in an image frame with the class of that detection. It would be much better to simply offer a Regardless if we change tl;dr my position
|
TL; DR:
I think it's better to keep this a string. Incidentally, this field was an Also, what class a given integer corresponds to often evolves over time when you add/remove classes and retrain your network. This will lead to problems when the messages (e.g. from a months-old rosbag) and the remapping information stored elsewhere go out of sync. Putting the class as a string into the message avoids this (or at least makes it easier to detect, e.g. when the message contains a class that was renamed/removed in the meantime).
I'll respond to that below.
Ok, that's true. One could easily construct a "human-readable" string for logs or for an RViz text marker from the class ID plus (let's say) the last 4 chars of the UUID. My other argument (using an ID that's referenced elsewhere, like in an environment model) still holds.
Ok, perhaps the word "track" is not very well-chosen, so perhaps let's rename it to My view on this is the following: The If the ID had to be unique for every single detection and carried no semantic information at all, it would be pretty useless. What's the point in uniquely identifying "the third element of the Also, I believe that the purpose of a
My proposal: Require that the
As I said above: The detections within a
I don't see why it's there either. I believe that's because |
OK, so agreement on the
That seems that too nitty-gritty of a thing to require, the outputs of alot of systems don't promise that so you'd be forcing people to own a sorting step.
To what?
In which message,
UUIDs perfectly meet that need as well. And by your own comment |
A specific recommendation (minus comments):
I still feel that |
Yup.
Yeah, it sounds like something many people would mess up.
Sorry, I meant "remove the
Yes, I'm talking about
UUIDs guarantee global uniqueness, i.e., IDs from multiple nodes won't collide. With a string field, we'll still have local uniqueness, i.e., the IDs from a single node publishing on a specific topic won't collide. Can you come up with a scenario where it's necessary to have global uniqueness? Also note that UUIDs and strings are equal with regards to local uniqueness. If a publishing node is so buggy that it accidentally re-uses identifier strings, it's probably also buggy enough to re-use UUIDs (or not fill them at all). Anyhow, after giving this more thought, I think I'm okay with using UUIDs. To recap, my main arguments pro-string were:
I still don't really see the advantages of using UUIDs, but at least the disadvantages seem to be mitigated. So if you really feel so strongly about using UUIDs, go ahead and do it, if @Kukanani agrees with you. I assume he's still a co-maintainer of this repo?
If you can add message comments for I think the Another thing we should discuss is what happens if a node doesn't do tracking at all (which will probably be true in most cases)? If I think that's where the Last point: If we're pulling |
so...
Actually, maybe we should leave object hypothesis alone and just make
Easily. I have 3 cameras on a robot and I'm running CNNs on their images in 3 instances of a CNN node. I'm using those detections to tracking moving obstacles in the scene correlating AI detections to their 3D detections in the robot's environmental model. I want global uniqueness so that each detection output isn't mixed in with the others. This is actually an exact example of what we're doing right now in
Yes of course, I'm just getting the ball rolling So what are you using
... it then should be a uuid so its globally unique 😄
|
Not
I didn't get that. Are you proposing to rename
So that's the exact same scenario as I outlined in the body of this issue. The problem that track IDs from different detector nodes can collide can easily be solved by keeping the outputs of the 3 detectors separate in the aggregator node. You should probably do that anyway, because:
There's a huge difference between the following two scenarios:
In case (1), you know there are at least two distinct mugs, and you shouldn't try to match them. In case (2), it's possible that there are either one or two mugs, so matching should be possible. In short: Any implementation that just jumbles all object detections together is probably suboptimal. If we don't throw them all together, we don't need UUIDs. But also UUIDs don't hurt, so I'm okay with them.
Oh, now I get you. Yes, currently the IDs are just In one application, I have a node that takes in Detection3DArrays from an object detector, matches the objects with an existing environment model and then publishes a new Detection3DArray where the IDs are the object IDs from the environment model. But during our discussion I've come to realize that this is probably not the correct way to use the ID field; it should only contain tracking information. So I'm okay with UUIDs now.
Not an answer to my question. 😄 If no tracking is taking place, we don't need an ID at all. It might be useful information to an aggregator node if it should even attempt to match IDs to previous detections, or if that's pointless because the publishing node always assigns new random IDs.
Small nitpick: It can be all the classes in the detector, but it can also be just a subset (such as the ones with non-zero scores). If the detector only outputs a single class, it can also just be a single-element array.
Yes, I got that and I fully agree that it's useful to have direct access to the most likely class. All I'm saying is that it's equally useful to have direct access to the corresponding pose, otherwise you're iterating through the results array again. And continuing that thinking, maybe you also want to have the corresponding score. |
Thanks for hashing out the details of this issue. Given our running list of changes, as I understand them:
No objections. I have never used this field, and I've never seen of anyone else using it. If anything this should probably be metadata in
No objections.
Sorry, but I still object.
Complete with the merging of #48, so this can be dropped from discussion
I begrudgingly agree with this one...or at least the idea of it. I definitely understand the need to get the top class (what we are proposing as I propose a couple of options here (numbered for easy reference)
|
This field does not seem useful, and we are not aware of anyone using it at this time. `VisionInfo` is probably a better place for this information anyway, if it were needed. See #47 for earlier discussions.
I think we've settled that we're just going to leave it the same as it is with the new name. |
As requested by @SteveMacenski, here's a new issue for continuing the discussion around UUIDs. As a starter, I'm going to summarize my comment from here: #43 (comment)
Main Question
Should we change the type of
Detection*D/tracking_id
touuid_msgs/UniqueID
?Background
Previous discussion has happened in #25 and #43.
As a basis for this discussion, we'll use the ROS2 version of the messages from the
ros2
branch. In Noetic and ROS2, there are two ID fields (see below):ObjectHypothesisWithPose.id
: This is the detected class (human
,mug
, ...). I think we can all agree that this should remain a string.tracking_id
: This is the ID of the object when tracked across multiple frames. The discussion is whether we should make this a UUID.Detection*DArray
message and its array index within that message.Detection3D.msg
Pros and Cons
The arguments for and against UUIDs boil down to:
Pro UUID:
Detection*D
message has to ensure that thetracking_id
is locally unique.Contra UUID:
apple-3456
is easier on the eyes thanec1cf114-7aa0-4402-8bf9-eee858118b7d
when used in log outputs, RViz markers etc.Presumably, if you run multiple object detector nodes, they will all publish their results on separate topics. If you are worried about collisions, the aggregator node could simply prefix each
tracking_id
with the topic name, which would guarantee unique strings. In my view, this negates the only advantage of UUIDs. So I'm also opposed to changing this field to a UUID.The text was updated successfully, but these errors were encountered: