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 non-const accessors for Model child objects #839

Merged
merged 10 commits into from
Feb 18, 2022

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Feb 2, 2022

Signed-off-by: Nate Koenig nate@openrobotics.org

🎉 New feature

Summary

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

Test it

Run 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.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@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 #839 (cf74751) into sdf12 (eed1aa9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##            sdf12     #839   +/-   ##
=======================================
  Coverage   90.76%   90.77%           
=======================================
  Files          78       78           
  Lines       12535    12547   +12     
=======================================
+ Hits        11378    11390   +12     
  Misses       1157     1157           
Impacted Files Coverage Δ
src/Model.cc 92.23% <100.00%> (+0.24%) ⬆️

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 eed1aa9...cf74751. Read the comment docs.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig changed the title Added non-const accessors for child objects Added non-const accessors for Model child objects Feb 7, 2022
Copy link
Collaborator

@azeey azeey 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 overall. I noticed that you didn't add a mutatable version of Model::FrameByIndex and Model::FrameByName. Is that intentional?

@nkoenig
Copy link
Contributor Author

nkoenig commented Feb 16, 2022

that you did

Yeah, I'm not as familiar with Frames, and wasn't sure if it was safe to add mutable versions of these. If it is, then I can add them.

@azeey
Copy link
Collaborator

azeey commented Feb 16, 2022

that you did

Yeah, I'm not as familiar with Frames, and wasn't sure if it was safe to add mutable versions of these. If it is, then I can add them.

Mutating them is just safe/unsafe is everything else. The frame graph has to be updated (now with Root::UpdateGraphs) for pose/frame resolution to work properly after any mutation of DOM objects that affects their name, pose, or frame attachment/kinematics.

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig
Copy link
Contributor Author

nkoenig commented Feb 17, 2022

Frame mutators have been added in 4acd1eb

@nkoenig nkoenig requested a review from azeey February 17, 2022 16:47
Copy link
Collaborator

@azeey azeey left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few minor comments

src/Model_TEST.cc Outdated Show resolved Hide resolved
src/Model_TEST.cc Show resolved Hide resolved
Nate Koenig added 2 commits February 18, 2022 10:57
Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig enabled auto-merge (squash) February 18, 2022 18:58
@nkoenig nkoenig merged commit 424ef80 into sdf12 Feb 18, 2022
@nkoenig nkoenig deleted the model_mutable_accessors branch February 18, 2022 20:08
@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.

4 participants