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

Added Root mutable accessors, and Root::Clone function #841

Merged
merged 16 commits into from
Feb 16, 2022

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Feb 2, 2022

🎉 New feature

Summary

Similar to #838. This adds non-const accessors to the Root class.

Also adds a Root::Clone function so that one sdf::Root can copy another sdf::Root

Test it

Run the tests

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • 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.

Nate Koenig added 2 commits February 2, 2022 08:14
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Feb 2, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

Merging #841 (12c614e) into sdf12 (8e89865) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head 12c614e differs from pull request most recent head fc1c211. Consider uploading reports for the commit fc1c211 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##            sdf12     #841      +/-   ##
==========================================
+ Coverage   90.80%   90.85%   +0.05%     
==========================================
  Files          78       78              
  Lines       12555    12583      +28     
==========================================
+ Hits        11400    11432      +32     
+ Misses       1155     1151       -4     
Impacted Files Coverage Δ
src/FrameSemantics.cc 84.41% <ø> (+0.37%) ⬆️
src/Root.cc 94.53% <100.00%> (+1.33%) ⬆️

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 9272cb6...fc1c211. Read the comment docs.

include/sdf/Root.hh Outdated Show resolved Hide resolved
Nate Koenig and others added 2 commits February 2, 2022 13:07
Nate Koenig added 2 commits February 7, 2022 11:36
Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Nate Koenig <[email protected]>
@nkoenig nkoenig mentioned this pull request Feb 10, 2022
6 tasks
@nkoenig
Copy link
Contributor Author

nkoenig commented Feb 10, 2022

I've merged in the work done in #843, and extended the tests.

@nkoenig nkoenig requested a review from adlarkin February 10, 2022 23:14
@nkoenig nkoenig changed the title Root mutable accessors Added Root mutable accessors, and Root::Clone function Feb 10, 2022
Signed-off-by: Nate Koenig <[email protected]>
include/sdf/Root.hh Show resolved Hide resolved
src/Root_TEST.cc Outdated Show resolved Hide resolved
src/Root_TEST.cc Show resolved Hide resolved
EXPECT_EQ("M1::L", body);
});

testFunc(root);
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO, even though it might cause test code duplication, a test for sdf::Root::Clone and sdf::Root::UpdateGraphs belongs in it's own test case in test/integration/root_dom.cc. Putting these expectations here limits their discoverability as this test is meant for checking the loading of <frame> tags in by the sdf::World.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this test modification in ab3d64d

@@ -1332,3 +1348,104 @@ TEST(Frame, IncludeFrameWithSubmodel)
EXPECT_EQ(submodelPose.Inverse(),
ignition::math::Pose3d(5, 5, 0, 0, 0, 0));
}

/////////////////////////////////////////////////
TEST(DOMFrame, CreateMulipleWorlds)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this test belongs in test/integraiton/root_dom.

Copy link
Contributor Author

@nkoenig nkoenig Feb 16, 2022

Choose a reason for hiding this comment

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

Moved in ab3d64d

include/sdf/Root.hh Outdated Show resolved Hide resolved
include/sdf/Root.hh Show resolved Hide resolved
Nate Koenig and others added 3 commits February 16, 2022 08:24
@nkoenig nkoenig requested a review from azeey February 16, 2022 17:21
src/Root_TEST.cc Outdated Show resolved Hide resolved
Signed-off-by: Nate Koenig <[email protected]>
@nkoenig nkoenig merged commit ae3655f into sdf12 Feb 16, 2022
@nkoenig nkoenig deleted the root_mutable_accessors branch February 16, 2022 20:13
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1

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

Successfully merging this pull request may close these issues.

5 participants