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

Add support for merge-includes in worlds #1233

Merged
merged 6 commits into from
Feb 17, 2023

Conversation

azeey
Copy link
Collaborator

@azeey azeey commented Feb 8, 2023

🎉 New feature

Summary

Implements merge-includes for worlds as discussed in gazebosim/sdf_tutorials#86. This required very few changes since it uses the same merge mechanism used for models.

Test it

Two tests were added in test/integration/includes.cc.

IncludeTest.WorldMergeInclude: Checks the proper merging of elements and their poses.
`IncludeTest.WorldMergeIncludeInvalidElements. Checks that merging models that contain links into the world emits an error.

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.

@azeey azeey requested a review from scpeters as a code owner February 8, 2023 22:06
@azeey azeey self-assigned this Feb 8, 2023
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Feb 8, 2023
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #1233 (6d2d68a) into sdf13 (baa1e9f) will increase coverage by 0.00%.
The diff coverage is 90.90%.

❗ Current head 6d2d68a differs from pull request most recent head 2198aee. Consider uploading reports for the commit 2198aee to get more accurate results

@@           Coverage Diff           @@
##            sdf13    #1233   +/-   ##
=======================================
  Coverage   87.51%   87.51%           
=======================================
  Files         126      126           
  Lines       16239    16248    +9     
=======================================
+ Hits        14211    14219    +8     
- Misses       2028     2029    +1     
Impacted Files Coverage Δ
src/parser.cc 87.00% <90.90%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! I only have 2 small comments, but otherwise LGTM!

Migration.md Outdated Show resolved Hide resolved
test/integration/includes.cc Show resolved Hide resolved
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Copy link
Collaborator

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Migration.md Outdated
@@ -558,6 +558,7 @@ ABI was broken for `sdf::Element`, and restored on version 11.2.1.
### Additions

1. **world.sdf**: A joint can be specified directly in a world.
1. **world.sdf**: Merge-includes are now allowed in worlds. The included models must not contain links or grippers.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit Consider qualifying:

"The included models must not contain top-level links or grippers."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f6a9752

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

{
Error unsupportedError(
ErrorCode::MERGE_INCLUDE_UNSUPPORTED,
"Merge-include for <world> does not support element of type " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird that coverage doesn't detect this because I see that it is tested

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think coverage struggles with multiline code.

@scpeters
Copy link
Member

I think the homebrew CI errors will be fixed by the gz-math7 bottle rebuild in osrf/homebrew-simulation#2213

@scpeters
Copy link
Member

I think the homebrew CI errors will be fixed by the gz-math7 bottle rebuild in osrf/homebrew-simulation#2213

rerunning homebrew CI since osrf/homebrew-simulation#2213 has been merged

@scpeters
Copy link
Member

green CI! I just merged with upstream and will leave it to @azeey to merge

@azeey azeey merged commit ef76fef into gazebosim:sdf13 Feb 17, 2023
@azeey azeey deleted the world_merge_include branch February 17, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants