-
Notifications
You must be signed in to change notification settings - Fork 276
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
GUI for adjusting FOV #1499
GUI for adjusting FOV #1499
Conversation
Signed-off-by: youhy <haoyuan2019@outlook.com>
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I'm getting crashes sometimes, I think it's related to some combination of the window current size / aspect ratio, and the current FOV. You can try changing the FOV a few times, then resizing the window and changing the FOV again a few times.
The backtrace points to gz-rendering
. It would be interesting to find out what conditions cause the crash, to see if we can prevent it from here, or fix it there.
crash backtrace
#15 Object "/home/chapulina/dev_focal/ws_fortress/install/lib/ign-gui-6/plugins/libMinimalScene.so", at 0x7fa34c899905, in ignition::gui::plugins::RenderThread::RenderNext(ignition::gui::plugins::RenderSync*)
#14 Object "/home/chapulina/dev_focal/ws_fortress/install/lib/ign-gui-6/plugins/libMinimalScene.so", at 0x7fa34c897cd3, in ignition::gui::plugins::IgnRenderer::Render(ignition::gui::plugins::RenderSync*)
#13 Object "/home/chapulina/dev_focal/ws_fortress/install/lib/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fa333e4654d, in ignition::rendering::v6::BaseCamera<ignition::rendering::v6::Ogre2Sensor>::Update()
#12 Object "/home/chapulina/dev_focal/ws_fortress/install/lib/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fa333ec7e65, in ignition::rendering::v6::Ogre2RenderTarget::Render()
#11 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa333b157fa, in Ogre::CompositorWorkspace::_update(bool)
#10 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa333b15527, in Ogre::CompositorWorkspace::_update(bool)
#9 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa333b02bb4, in Ogre::CompositorNode::_update(Ogre::Camera const*, Ogre::SceneManager*)
#8 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa333b2ed68, in Ogre::CompositorPassScene::execute(Ogre::Camera const*)
#7 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa3339e88c9, in Ogre::SceneManager::updateAllLods(Ogre::Camera const*, float, unsigned char, unsigned char)
#6 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa333846dd0, in Ogre::Frustum::getFrustumPlanes() const
#5 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa33384381a, in Ogre::Frustum::updateFrustumPlanes() const
#4 Object "/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fa33384373e, in Ogre::Frustum::updateFrustumImpl() const
Signed-off-by: youhy <haoyuan2019@outlook.com>
Signed-off-by: youhy <haoyuan2019@outlook.com>
Thanks @ahcorde for taking a look. I was playing around during the sim meeting and in: If you change |
Signed-off-by: youhy <haoyuan2019@outlook.com>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM unfortunately there is another crash that occurs but it also occurs without this PR.
The crash happens when you move the gui camera off of the main scene. With this PR with HFOV left at 90
and without this PR, it takes much longer for it to crash (continually move the camera around) and sometimes it doesn't crash at all but after a few tries (closing and restarting) it will eventually crash. With this PR, if you set HFOV to high then it crashes almost right away:
crash backtrace
libEGL warning: DRI2: failed to create dri screen
libEGL warning: Not allowed to force software rendering when API explicitly selects a hardware device.
libEGL warning: DRI2: failed to create dri screen
ign gazebo gui: /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/OgreMain/include/OgreAxisAlignedBox.h:251: void Ogre::AxisAlignedBox::setExtents(const Ogre::Vector3&, const Ogre::Vector3&): Assertion (min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"' failed.
Stack trace (most recent call last) in thread 5410:
#31 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd8117278d9, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#30 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd81178285e, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#29 Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd80d0d37fb, in g_main_context_iteration
#28 Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd80d0d376f, in
#27 Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd80d0d3536, in g_main_context_dispatch
#26 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd811783232, in
#25 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd81172c01c, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#24 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd8117298a7, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#23 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd810b14103, in QApplication::notify(QObject*, QEvent*)
#22 Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd810b0c83b, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#21 Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd811759091, in QObject::event(QEvent*)
#20 Object "/home/tuila/Workspaces/ignFortress/install/lib/ign-gui-6/plugins/libMinimalScene.so", at 0x7fd7cbb86b4f, in ignition::gui::plugins::RenderThread::RenderNext(ignition::gui::plugins::RenderSync*)
#19 Object "/home/tuila/Workspaces/ignFortress/install/lib/ign-gui-6/plugins/libMinimalScene.so", at 0x7fd7cbb8698f, in ignition::gui::plugins::IgnRenderer::Render(ignition::gui::plugins::RenderSync*)
#18 Object "/home/tuila/Workspaces/ignFortress/install/lib/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fd7a25c9242, in ignition::rendering::v6::BaseCamera<ignition::rendering::v6::Ogre2Sensor>::Update()
#17 Object "/home/tuila/Workspaces/ignFortress/install/lib/ign-rendering-6/engine-plugins/libignition-rendering-ogre2.so", at 0x7fd7a263f0c1, in ignition::rendering::v6::Ogre2RenderTarget::Render()
#16 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a204fdf2, in Ogre::CompositorWorkspace::_update(bool)
#15 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a204fb21, in Ogre::CompositorWorkspace::_update(bool)
#14 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a203eb35, in Ogre::CompositorNode::_update(Ogre::Camera const*, Ogre::SceneManager*)
#13 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a20649bc, in Ogre::CompositorPassScene::execute(Ogre::Camera const*)
#12 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a20491d6, in Ogre::CompositorShadowNode::_update(Ogre::Camera*, Ogre::Camera const*, Ogre::SceneManager*)
#11 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a203eb35, in Ogre::CompositorNode::_update(Ogre::Camera const*, Ogre::SceneManager*)
#10 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a2064ac8, in Ogre::CompositorPassScene::execute(Ogre::Camera const*)
#9 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a1d3e27e, in Ogre::Camera::_cullScenePhase01(Ogre::Camera*, Ogre::Camera const*, Ogre::Viewport*, unsigned char, unsigned char, bool)
#8 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a1f27d38, in Ogre::SceneManager::_cullPhase01(Ogre::Camera*, Ogre::Camera*, Ogre::Camera const*, unsigned char, unsigned char, bool)
#7 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a1ee4d89, in Ogre::RenderQueue::renderPassPrepare(bool, bool)
#6 Object "/usr/lib/x86_64-linux-gnu/libOgreHlmsPbs.so.2.2.6", at 0x7fd7a198b217, in Ogre::HlmsPbs::preparePassHash(Ogre::CompositorShadowNode const*, bool, bool, Ogre::SceneManager*)
#5 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a1d82669, in Ogre::Frustum::getProjectionMatrixWithRSDepth() const
#4 Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.2.6", at 0x7fd7a1d835fe, in Ogre::Frustum::updateFrustumImpl() const
#3 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fd817fa6471, in __assert_fail
#2 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fd817fa63f9, in
#1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fd817fb67f0, in abort
#0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fd817fb4e87, in gsignal
I've seen this issue ign gazebo gui: /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/OgreMain/include/OgreAxisAlignedBox.h:251: void Ogre::AxisAlignedBox::setExtents(const Ogre::Vector3&, const Ogre::Vector3&): Assertion (min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"' failed.
before in #1072
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? |
Unfortunately, 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:
So with that setup, I was able to fix the warnings with the following PR: 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 gazebosim/gz-rendering#710 is resolved |
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
codecheck
passed (See contributing)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.