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

sdf 1.12: rename state subelements with _state suffix #1377

Closed
wants to merge 3 commits into from

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Mar 1, 2024

🎉 New feature

Part of #632

Summary

There is some overlap in the names used for elements in the //world/state specification and elsewhere, for example the model_state.sdf file included in state.sdf defines an element named model. This has caused challenges with aliasing in XSD (see #632 and #643), and it would be simpler if some of these elements had different names (for example by appending a _state suffix). This pull request is a work-in-progress to append this suffix to the relevant state tags in SDFormat 1.12 with automatic conversion of state elements defined in earlier versions of the spec. I have the conversion partially working, but have run into an issue with the Converter class, which does not act on all sibling elements, but only to the first child element for a given <move> conversion.

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Update some existing tests to verify conversion logic.

Signed-off-by: Steve Peters <[email protected]>
The Converter currently only acts on the first child
element it finds; it doesn't act on all sibling elements.
I've added example SDFormat files and tests to illustrate
the issue.

Signed-off-by: Steve Peters <[email protected]>
@scpeters
Copy link
Member Author

scpeters commented Jul 8, 2024

as an alternative to the partial support for backwards compatibility in this pull request, I've opened a pull request in #1455 that renames the state subelements as a breaking change

@scpeters
Copy link
Member Author

see #1455 instead

@scpeters scpeters closed this Jul 19, 2024
@scpeters scpeters deleted the scpeters/rename_state_subelements branch July 19, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant