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

Should name attribute restrictions apply to custom elements? #45

Open
scpeters opened this issue Oct 28, 2020 · 6 comments
Open

Should name attribute restrictions apply to custom elements? #45

scpeters opened this issue Oct 28, 2020 · 6 comments

Comments

@scpeters
Copy link
Member

The SDFormat 1.7 frame semantics proposal contains two restrictions on the contents of //@name attributes:

Should these restrictions apply to a name attribute in a custom namespaced element?

Moved from this comment thread: gazebosim/sdformat#381 (review)

@chapulina
Copy link
Contributor

I think it makes sense to relax these requirements when it comes to custom elements.

@EricCousineau-TRI
Copy link
Collaborator

Agreed. I dunno if I can come up with a real use case where you want @name to be non-unique, but ideally we do as little as possible when it comes to custom elements / attributes.

@scpeters
Copy link
Member Author

Agreed. I dunno if I can come up with a real use case where you want @name to be non-unique, but ideally we do as little as possible when it comes to custom elements / attributes.

what about //drake:joint from RobotLocomotion/drake#13824 ?

@EricCousineau-TRI
Copy link
Collaborator

EricCousineau-TRI commented Oct 29, 2020

I don't think that's an issue?

After reviewing: gazebosim/sdformat#288

  1. If it stays as //drake:joint, then it's Drake's responsibility to inject frames / test for conflicts, so libsdformat should have no duty there.
  2. If it does get implemented using //joint/@type="custom", then it's already handled.

If (1) happens, then yeah, we have to inject frames via some hook API (yuck), so I think it'd still fail fast in the right way, just with dumb error messages.

@scpeters
Copy link
Member Author

I don't think that's an issue?

After reviewing: osrf/sdformat#288

  1. If it stays as //drake:joint, then it's Drake's responsibility to inject frames / test for conflicts, so libsdformat should have no duty there.
  2. If it does get implemented using //joint/@type="custom", then it's already handled.

If (1) happens, then yeah, we have to inject frames via some hook API (yuck), so I think it'd still fail fast in the right way, just with dumb error messages.

I would like to see //joint/@type="custom" supported rather than encourage people to make custom joint elements for this reason, but i suppose it makes sense to still err on the side of not interfering with custom elements

@EricCousineau-TRI
Copy link
Collaborator

Agreed on that point! (//joint/@type="custom" smells wayyyyy better than the other alt.s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants