-
Notifications
You must be signed in to change notification settings - Fork 103
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
InspectSDFElement should allow duplicate plugin names #712
Comments
Here's the helper function that we use to detect if we have unique child names: https://github.com/ignitionrobotics/sdformat/blob/sdf11/src/Element.cc#L825 So potentially, we could modify this function for ignoring plugins. |
As of version 1.7 of SDFormat, all sibling elements must have unique names. It is absolutely necessary for frame semantics that sibling If you think the specification is too restrictive, feel free to retitle this issue accordingly. |
Thank you for this response. I don't feel the specification is too restrictive (I don't have an opinion either way), but I don't think it's possible to fix the problem by re-titling the plugin names as you suggest. The reason is that if I have a nested model that includes two red buoys (which is the case), I will still get the error unless there is some way to override the plugin name of the child model when including it into the parent model. Put another way, if the policy is as you describe, it seems that the implementation of the "include" tag should rewrite the plugin names in the same way that it rewrites the link names. That would also resolve the issue. |
Related: #294 |
Fixed in Fortress, needs backport to Citadel |
Backported to Citadel in |
Environment
Binary: 9.6.1
Description
If an element in the SDF contains multiple child plugin elements with the same name:
recursiveSameTypeUniqueNames
function and therecursiveSiblingUniqueNames
function inparser.cc
(called by Gazebo) output an error message containing the entire element followed by the messageModel.cc also produces a warning:
Steps to reproduce
Output
Using a version of the example above with only two buoys, we see:
Additional Notes
I haven't yet found documentation confirming that duplicate plugin names are allowed, but the comment on line 1476 of
parser.cc
insdformat
suggests this is the case.Additionally, the sdformat implementation of the
<include>
tag does not rename plugins to avoid name conflicts, as it does with other elements, and plugin names also can't be overridden when a model is invoked. As illustrated in the above example, this means that whenever a model definition includes a plugin and that model is used more than once in a nested model, Gazebo will report that the SDF is invalid.The text was updated successfully, but these errors were encountered: