-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
collision filter reporting from parser does not play nice with RenameModelInstance workflow #21316
Comments
Proposal: just remove the assertion, and document that renaming workflows that reuse the Parser object may lose information, as later groups with conflicting names will overwrite earlier ones in the report. The advice to avoid loss is the same as the workaround above; reduce the scope of the Parser object. |
Our forward-looking architecture is RobotDiagramBuilder which will always have a single long-lived Parser. I suspect that filter group names need to be scoped by model instance name. We need each robot model instance to have distinct filtering, and the group name in the file we load will always be the same. Therefore, just like links and joints and everything else, filter group names must be instance-scoped. |
Of course filter group names are scoped; otherwise, none of it would work. The deeper gremlin is in the way auto-renaming and rename-model-instance workflows work: the auto-renaming name chooser uses the plant as state, and always finds the "lowest" unoccupied name. So, as you load and then rename (in the plant) models, you will keep finding the same auto-generated name over and over. There are many options, as always. We can give the auto-renamer some state, so that it doesn't reuse names within a Parser lifetime. We could make the collision-filter reporting computation plant-aware in some way. Or... |
Huh, maybe I don't understand the problem, then. Is it maybe that |
That's what I first proposed. In the presence of renaming, scoped names are not durable, but model instance indexes are. That's a place to start. |
I've moved this up in priority, with the most urgent question being, does the contract for the new function |
To decouple this effort from release schedules, #21562 does the API deprecation only, while the fix continues to wind its way through review, and mac compatibility issues. |
Fixed in #21529 (review) -- the comment wasn't in the overview so didn't auto-close. |
What happened?
Found during work on RobotLocomotion/drake-ros#340 . A workflow like this (pseudo-code):
crashes. It hits an assertion in the recently added collision filter reporting code. This clearly breaks code that used to work.
The workaround is fairly easy; just move construction of the Parser object inside the loop.
Version
1.28.0
What operating system are you using?
Ubuntu 22.04
What installation option are you using?
Unknown / Other
Relevant log output
The text was updated successfully, but these errors were encountered: