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 nested model support for World's *ByName and *NameExists functions #518

Merged
merged 5 commits into from
Mar 22, 2021

Conversation

aaronchongth
Copy link
Collaborator

@aaronchongth aaronchongth commented Mar 18, 2021

Signed-off-by: Aaron Chong aaronchongth@gmail.com

🎉 New feature

Closes #412

Summary

This adds nested model support to *ByName and *NameExists functions in World, specifically for Model and Frame. The implementation is the same as the one used in Model.

Notes:

  • Added 2 new .sdf integration test sdf files, world_nested_frame.sdf and world_nested_model.sdf.
  • Additional tests were added for Model's API as well, since these functions will call them.

Test it

source ws/install/setup.bash
./ws/build/sdformat11/src/UNIT_World_TEST
./ws/build/sdformat11/test/integration/INTEGRATION_model_dom
./ws/build/sdformat11/test/integration/INTEGRATION_world_dom

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Code check passed (In source directory, run sh tools/code_check.sh)
  • 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

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@github-actions github-actions bot added the 🏢 edifice Ignition Edifice label Mar 18, 2021
@azeey azeey self-requested a review March 18, 2021 01:53
@chapulina chapulina added the beta Targeting beta release of upcoming collection label Mar 18, 2021
@aaronchongth aaronchongth changed the title Changing documentation in API to describe what needs to be implemented World's ModelByName and ModelNameExists finds nested models too Mar 18, 2021
…d, added tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth aaronchongth changed the title World's ModelByName and ModelNameExists finds nested models too Add nested model support for World's *ByName and *NameExists functions Mar 18, 2021
@azeey azeey requested a review from jennuine March 18, 2021 23:22
@codecov-io
Copy link

Codecov Report

Merging #518 (7bc1893) into master (2031028) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #518      +/-   ##
==========================================
+ Coverage   87.97%   87.99%   +0.01%     
==========================================
  Files          66       66              
  Lines        9546     9551       +5     
==========================================
+ Hits         8398     8404       +6     
+ Misses       1148     1147       -1     
Impacted Files Coverage Δ
src/World.cc 96.20% <100.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2031028...7bc1893. Read the comment docs.

Copy link
Collaborator

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

Looks good! Just one minor fix

include/sdf/World.hh Outdated Show resolved Hide resolved
Co-authored-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Copy link
Collaborator

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

LGTM!

@jennuine jennuine merged commit deb1421 into master Mar 22, 2021
@jennuine jennuine deleted the aaron/world_find_nested_models branch March 22, 2021 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection 🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Root::*ByName and World::ByName should find objects in nested models
4 participants