gz-sim
gz-sim copied to clipboard
GUI for adjusting FOV
New feature
Add a GUI for adjusting FOV
Summary
Test it
Change value in horizontal_fov
and the FOV of the scene should change as well.
Checklist
- [x] Signed all commits for DCO
- [x] 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)
- [ ] 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.
Codecov Report
Merging #1499 (0ce21a7) into ign-gazebo6 (d6e69d0) will decrease coverage by
0.02%
. The diff coverage is100.00%
.
:exclamation: Current head 0ce21a7 differs from pull request most recent head 113f1c7. Consider uploading reports for the commit 113f1c7 to get more accurate results
@@ Coverage Diff @@
## ign-gazebo6 #1499 +/- ##
===============================================
- Coverage 64.02% 64.00% -0.03%
===============================================
Files 317 317
Lines 25649 25649
===============================================
- Hits 16422 16416 -6
- Misses 9227 9233 +6
Impacted Files | Coverage Δ | |
---|---|---|
src/Util.cc | 92.53% <100.00%> (ø) |
|
src/SimulationRunner.cc | 90.93% <0.00%> (-0.96%) |
:arrow_down: |
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 44406a9...113f1c7. Read the comment docs.
Thanks @ahcorde for taking a look. I was playing around during the sim meeting and in: https://github.com/gazebosim/gz-rendering/blob/1481bf8e2856a2e29fa2592bd4c32951e09166e9/ogre2/src/Ogre2Camera.cc#L79
If you change this->aspect
to this->AspectRatio()
the crash no longer happens for me but requires some more testing
unfortunately there is another crash that occurs but it also occurs without this PR
I'm not able to reproduce the crash, I'm on Focal. But I got several error messages saying I was trying to set NaN node poses. I added more guards against NaNs in the following PR, maybe it helps with your crash?
- https://github.com/gazebosim/gz-rendering/pull/655
I added more guards against NaNs in the following PR, maybe it helps with your crash? https://github.com/gazebosim/gz-rendering/pull/655
Unfortunately, I'm still getting the crash on Focal and Bionic :confused:
I'm still getting the crash on Focal and Bionic
I was able to reproduce the crash on Bionic. Then I built https://github.com/gazebo-forks/ogre-2.2-release from source into my workspace to debug further, and with the source build it doesn't crash anymore. Instead, I see lots of errors and warnings printed:
[GUI] [Err] [OrbitViewController.cc:140] Camera world position isn't finite [-nan -nan -nan]
...
[GUI] [Wrn] [Ogre2RayQuery.cc:89] Attempted to set non-finite origin from camera [scene::Camera(65527)]
[GUI] [Wrn] [Ogre2RayQuery.cc:100] Attempted to set non-finite direction from camera [scene::Camera(65527)]
...
So with that setup, I was able to fix the warnings with the following PR:
- https://github.com/gazebosim/gz-rendering/pull/676
I'd appreciate it if someone could check if that solves the crashes for them.
I'd appreciate it if someone could check if that solves the crashes for them.
Thanks for the attempt but unfortunately I'm still getting crashes :(
Closing until https://github.com/gazebosim/gz-rendering/issues/710 is resolved