-
Notifications
You must be signed in to change notification settings - Fork 108
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
adding IDs to geometry_msgs/Polygon, PolygonStamped #232
Conversation
Signed-off-by: stevemacenski <stevenmacenski@gmail.com>
99280b5
to
242a051
Compare
Is this really needed? Wouldn't it be better to add a And I'm strongly against adding ID to the non-stamped polygon. Can't you actually use Frame ID in the stamped polygon as ID? |
Polygons are used to represent numerous things that having some kind of ID would be useful for. Examples:
I disagree that this should be some navigation specific message type or particular to collision. I think the general polygon message is missing key information to be able to distinguish between polygons sharing the same Edit: I think that is one of the motivating reasons why visualization_msgs/Marker has an ID field: the desire to be able to distinguish multiple points from each other in the same global reference frame. I think Polygon as a message contains that same core need - in fact you run into precisely the same issue in that case representing a polygon with Marker messages. |
Ehh, really should this be supported by a core message type? This sounds to me like a cartesian version of geographic_msgs.
Sounds more like vision_msgs.
These two seem equivalent. Usually each robot/sensor will have its own topic or frame_id, so you could disambiguate based on that. If you're building a list part by part by listening for single elements on a topic, why couldn't the elements come in their original (unique) frame and you couldn't convert them inside the node?
But Marker is a special-purpose message type, while Polygon is a general-purpose message type. Marker's purpose dictates that having an id is essential. You can't say that generally about polygons. Regarding type of the id field:
Do you really want to introduce yet another id type? :) All the thinking around leads me to proposing a new message type instead of editing the existing one. I'm not sure about the name, but something along |
Not when they're already in the global frame (or base frame, etc). That's the exact need here, to disambiguate with many instances of similar / same polygons. The number of applications of that are numerous
I personally think that's overkill for what complexity we're talking about, but I wouldn't object to that. The biggest thing is that this is a generic problem that needs a generic How about |
These names sound good to me ;) |
Maintainers et al of this repository: Any objection to this course of action? |
We discussed this at the triage meeting this week, and we think this is a fine course of action. We do have a couple of comments and questions:
|
@clalancette
For any particular application, there's a way to do this. So if the polygons are robots, using a serial number seems reasonable. If this is the output of AI or some other thing, UUID generated from the tracking software seems reasonable. That to me is a potential argument for using a The difficulty would come if you had I leave that choice of |
I think uint64 is good enough; if we need the additional resolution that an e.g. string would give us, we can get that in different ways (separate topics, a higher-level message that includes this message + robot_id, etc). |
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
@clalancette done :-) |
It sounds like there's support for adding the ID to the message. I disagree a little about that. It seems like an id isn't needed to define a polygon. I would instead recommend a higher level message type for a robot footprint, or an obstacle, or an agent such that it has both an id and a polygon. |
What is a 'standard message' but a message that can be used to describe common and innumerable-situation things for many applications. I think a way to identify a shape against other shapes in the same global frame has enough independent applications that this is worthwhile. Especially when many different types of representations that can be generalized to this (agent, obstacle, footprint) have some relationship that some applications may want to ingest all of them and don't need to specifically differentiate between the semantics of each of those 3 example types, as much as it just needs to be able to disambiguate between instances as updates are made. I think strongly that this is very relevant and I have ~3 places within Nav2 and broader tooling around it that this would get use within a couple of months and one that would be used immediately. Polygon still exists, these are now new PolygonInstance messages in addition to. I don't think any other messages in geometry_msgs would benefit from IDs the way that Polygons specifically would |
I thought the consensus was to add a new PolygonInstance message type. |
It is/was. @clalancette @peci1 can you rereview? This is blocking a user ros-navigation/navigation2#3885 |
You might want to squash the commits so that unrelated files are not changed by this PR. Otherwise LGTM! |
Squash merge should handle :-) Great! |
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Done! |
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Failure looks like networking related, not PR related |
Co-authored-by: Michael Carroll <carroll.michael@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Quibble away, my friend 😉 |
I'm happy with this, it has been sufficiently bike-shedded. |
Got a few +1’s, can we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two really small changes to the wording, then I'll go ahead and run CI on this.
Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
I dont believe the windows linting is from this |
No, it's not. It timed out in rclcpp, which is likely due to ros2/rclcpp#2303 . We'll deal with that separately. |
* adding PolygonInstance msgs Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Michael Carroll <carroll.michael@gmail.com> Co-authored-by: Chris Lalancette <clalancette@gmail.com>
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-jazzy-jalisco-released/37862/1 |
Implementing #230
Polygons are often used to represent specific objects (e.g. robot footprints, obstacles in the scene, other agents) but are difficult to rectify currently without any kind of specific identification - especially when you have
N
of the same object resulting in several identical object instances.This PR adds an ID field analog to
visualization_msgs/Marker
to disambiguate polygons for use in thenav2_collision_monitor
and throughout futureCostmap2D
planned work. I strongly believe this is a good addition worth the change to a standard interface with both minimal overhead & not breaking any current users' behavior.