Skip to content
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

Plugin name attributes should be unique #399

Open
scpeters opened this issue Oct 8, 2020 · 2 comments
Open

Plugin name attributes should be unique #399

scpeters opened this issue Oct 8, 2020 · 2 comments
Labels
enhancement New feature or request help wanted We accept pull requests!

Comments

@scpeters
Copy link
Member

scpeters commented Oct 8, 2020

I think the //plugin/@name attribute is currently being misused by ign-gazebo, since it currently contains an ignition::gazebo::systems::SystemName and might not be unique among its sibling elements. This is a violation of the SDFormat 1.7 spec, which requires that sibling elements of any type should have unique names. It even violates the convention of earlier versions of the SDFormat spec, which required sibling elements of the same type to have unique names.

I think it would be more suitable to use a custom namespaced attribute to store the system name and give a unique name in the name attribute instead:

<plugin name='unique_name' filename='...' ignition:system='ignition::gazebo::systems::SystemName' />
@chapulina
Copy link
Contributor

the //plugin/@name attribute is currently being misused by ign-gazebo

Agreed

use a custom namespaced attribute

Is this already supported by SDFormat? If so, I suggest we:

  • add support for it on Citadel
  • convert all our examples to use the new syntax
  • deprecate the use of name as the class name on Edifice
  • remove the use of name as the class name on Ign-F

@scpeters
Copy link
Member Author

Is this already supported by SDFormat? If so, I suggest we:

  • add support for it on Citadel
  • convert all our examples to use the new syntax
  • deprecate the use of name as the class name on Edifice
  • remove the use of name as the class name on Ign-F

Well, we currently accept all unrecognized attributes and elements, which includes the namespaced ones; we need to re-enable warnings / errors for unrecognized fields. Some discussion here: gazebosim/sdformat#327

@chapulina chapulina added help wanted We accept pull requests! enhancement New feature or request labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted We accept pull requests!
Projects
None yet
Development

No branches or pull requests

2 participants