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

Do not create wirebox with empty AABB (ogre) #1083

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Nov 5, 2024

🦟 Bug fix

Fixes #1000

Summary

Prevent creating a wirebox with empty AABB in ogre.

A gz::math::AxisAlignedBox initializes the bounds to MAX_D and LOW_D which results in an inf AABB in ogre as it uses floats for AABB instead of doubles. This then leads to a crash when ogre tries to render the scene.

See #1000 for a description on how to reproduce the crash with gz-sim. You can launch gazebo with ogre render engine by running:

gz sim -v 4 shapes.sdf  --render-engine ogre

Expand the sun item in the Entity Tree and click on sunVisual to see the crash.

The changes in this PR only prevent the crash - it does not actually display the wirebox for the light visual, which is the same as the original behavior.

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (gz-rendering9@1f4def6). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             gz-rendering9    #1083   +/-   ##
================================================
  Coverage                 ?   75.75%           
================================================
  Files                    ?      177           
  Lines                    ?    17053           
  Branches                 ?        0           
================================================
  Hits                     ?    12919           
  Misses                   ?     4134           
  Partials                 ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iche033 iche033 added the ogre1.x label Nov 6, 2024
@iche033 iche033 merged commit 9e874c0 into gz-rendering9 Nov 6, 2024
12 of 13 checks passed
@iche033 iche033 deleted the wirebox_bbox_ogre branch November 6, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty ogre1.x
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Ogre crash when selecting "sunVisual"
2 participants