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

Expose rendering teardown event #1539

Merged
merged 4 commits into from
Jun 21, 2022

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Jun 15, 2022

🎉 New feature

Follow-up after #1475. Turns out rendering sensor destruction must also occur in the rendering thread.

Summary

This patch adds a rendering::RenderTeardown event for downstream users to perform cleanup upon the rendering thread stopping.

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)

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.

@hidmic hidmic added MBARI-LRAUV Sponsored by MBARI-LRAUV project: https:/osrf/lrauv 🌱 garden Ignition Garden labels Jun 15, 2022
@hidmic hidmic force-pushed the hidmic/rendering-teardown-event branch from 64a147e to 2bc0931 Compare June 15, 2022 22:07
@chapulina chapulina added the rendering Involves Ignition Rendering label Jun 15, 2022
@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #1539 (2bc0931) into main (a3cbd8c) will decrease coverage by 0.02%.
The diff coverage is 65.00%.

❗ Current head 2bc0931 differs from pull request most recent head 69ec120. Consider uploading reports for the commit 69ec120 to get more accurate results

@@            Coverage Diff             @@
##             main    #1539      +/-   ##
==========================================
- Coverage   63.62%   63.60%   -0.03%     
==========================================
  Files         330      330              
  Lines       25787    25847      +60     
==========================================
+ Hits        16408    16439      +31     
- Misses       9379     9408      +29     
Impacted Files Coverage Δ
include/gz/sim/Link.hh 100.00% <ø> (ø)
include/gz/sim/ServerConfig.hh 100.00% <ø> (ø)
include/gz/sim/Util.hh 100.00% <ø> (ø)
include/gz/sim/rendering/SceneManager.hh 100.00% <ø> (ø)
src/Link.cc 94.77% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.cc 5.49% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.hh 28.57% <ø> (ø)
src/rendering/MarkerManager.cc 13.02% <ø> (ø)
src/systems/physics/Physics.cc 64.52% <0.00%> (-0.33%) ⬇️
src/systems/thruster/Thruster.cc 91.77% <ø> (ø)
... and 13 more

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 f5f753e...69ec120. Read the comment docs.

Copy link
Contributor

@arjo129 arjo129 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Michel Hidalgo <[email protected]>
@hidmic hidmic force-pushed the hidmic/rendering-teardown-event branch from 2bc0931 to 35ffc53 Compare June 16, 2022 13:54
@hidmic
Copy link
Contributor Author

hidmic commented Jun 16, 2022

@arjo129 small change to ensure custom rendering sensors that depend on builtin rendering sensors get destroyed first (not an issue right now, might become for someone else in the future).

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

just one minor comment otherwise looks good to me.

include/gz/sim/rendering/Events.hh Outdated Show resolved Hide resolved
@hidmic
Copy link
Contributor Author

hidmic commented Jun 21, 2022

@iche033 @arjo129 CI failures have nothing to do with this patch. How shall we go about this?

@chapulina
Copy link
Contributor

CI failures have nothing to do with this patch. How shall we go about this?

Agreed. Feel free to merge, CI is unstable for this branch right now, no need to block this PR.

@hidmic hidmic merged commit 171e486 into gazebosim:main Jun 21, 2022
@hidmic hidmic deleted the hidmic/rendering-teardown-event branch June 21, 2022 16:52
@j-rivero j-rivero mentioned this pull request Sep 16, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden MBARI-LRAUV Sponsored by MBARI-LRAUV project: https:/osrf/lrauv rendering Involves Ignition Rendering
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants