gz-sim: Instant crash on start (ARM64 Ubuntu 22.04 Virtual Machine)
Environment
- OS Version: Ubuntu 22.04 ARM64 (VM on M1 Macbook)
- Binary: gz-garden
Description
Literally installed Gazebo Garden on a brand new Ubuntu virtual machine. Was trying to test the new gazebo since I only used the classic version before.
Did the command to start the demo: gz gazebo shapes.sdf
And got the error on the terminal:
terminate called after throwing an instance of 'Ogre::UnimplementedException'
what(): OGRE EXCEPTION(9:UnimplementedException): in GL3PlusTextureGpu::copyTo at ./RenderSystems/GL3Plus/src/OgreGL3PlusTextureGpu.cpp (line 685)
Stack trace (most recent call last):
#31 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa550b06b, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#30 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa556b523, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#29 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffa4382f13, in g_main_context_iteration
#28 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffa43db79b, in
#27 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffa4385a6f, in g_main_context_dispatch
#26 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa556c057, in
#25 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa550ff87, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#24 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa550cb8f, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#23 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffa69b2abf, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#22 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffa553cfd3, in QObject::event(QEvent*)
#21 Object "/usr/lib/aarch64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0xffff6c817237, in gz::gui::plugins::RenderWindowItem::Ready()
#20 Object "/usr/lib/aarch64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0xffff6c816d6b, in gz::gui::plugins::RenderThread::Initialize[abi:cxx11]()
#19 Object "/usr/lib/aarch64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0xffff6c81f97b, in gz::gui::plugins::RenderThreadRhiOpenGL::Initialize[abi:cxx11]()
#18 Object "/usr/lib/aarch64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0xffff6c818d33, in gz::gui::plugins::GzRenderer::Initialize[abi:cxx11]()
#17 Object "/lib/aarch64-linux-gnu/libgz-rendering7.so.7", at 0xffff6c673d23, in gz::rendering::v7::BaseRenderEngine::CreateScene(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#16 Object "/lib/aarch64-linux-gnu/libgz-rendering7.so.7", at 0xffff6c67b74f, in gz::rendering::v7::BaseRenderEngine::CreateScene(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#15 Object "/lib/aarch64-linux-gnu/libgz-rendering7.so.7", at 0xffff6c6871e7, in gz::rendering::v7::BaseScene::CreateMaterials()
#14 Object "/usr/lib/aarch64-linux-gnu/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at 0xffff47fe1533, in gz::rendering::v7::Ogre2Material::SetTextureMapImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::PbsTextureTypes)
#13 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0xffff47c1b46b, in Ogre::TextureGpuManager::_waitFor(Ogre::TextureGpu*, bool)
#12 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0xffff47c1b0af, in Ogre::TextureGpuManager::_update(bool)
#11 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0xffff47afebaf, in Ogre::ObjCmdBuffer::execute()
#10 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0xffff47afcf37, in Ogre::ObjCmdBuffer::NotifyDataIsReady::execute()
#9 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0xffff47c0cef3, in Ogre::TextureFilter::GenerateHwMipmaps::_executeSerial(Ogre::TextureGpu*)
#8 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/OGRE/RenderSystem_GL3Plus.so", at 0xffff47592633, in Ogre::GL3PlusTextureGpu::copyTo(Ogre::TextureGpu*, Ogre::TextureBox const&, unsigned char, Ogre::TextureBox const&, unsigned char, bool, Ogre::CopyEncTransitionMode::CopyEncTransitionMode, Ogre::CopyEncTransitionMode::CopyEncTransitionMode)
#7 Object "/usr/lib/aarch64-linux-gnu/OGRE-2.3/OGRE/RenderSystem_GL3Plus.so", at 0xffff47554997, in
#6 Object "/lib/aarch64-linux-gnu/libstdc++.so.6", at 0xffffa86f2d23, in __cxa_throw
#5 Object "/lib/aarch64-linux-gnu/libstdc++.so.6", at 0xffffa86f2a3f, in std::terminate()
#4 Object "/lib/aarch64-linux-gnu/libstdc++.so.6", at 0xffffa86f29db, in
#3 Object "/lib/aarch64-linux-gnu/libstdc++.so.6", at 0xffffa86f51fb, in __gnu_cxx::__verbose_terminate_handler()
#2 Object "/lib/aarch64-linux-gnu/libc.so.6", at 0xffffac45712f, in abort
#1 Object "/lib/aarch64-linux-gnu/libc.so.6", at 0xffffac46a67b, in raise
#0 Object "/lib/aarch64-linux-gnu/libc.so.6", at 0xffffac4af200, in
Aborted (Signal sent by tkill() 12810 1000)
Also tried opening the gazebo from the app selector. It loads, and I click on one of the environments such as the empty one and it loads and crashes a few seconds later.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 41 (15 by maintainers)
@bertaveira I’ve tried various VMs (UTM, Parallels, VMware Fusion, Virtual Box) on macOS (Intel and M1) and none of them have good enough support for OpenGL 4.3+ to run accelerated graphics for Gazebo Sim after the upgrade of ogre2 to 2.2. Same outcome for docker.
The most promising candidate so far is VMware Fusion 13 which claims to have support for OpenGL 4.3 (https://docs.vmware.com/en/VMware-Fusion/13.0/rn/vmware-fusion-130-release-notes/index.html). I have installed Gazebo Garden from source on Ubuntu Jammy (upgraded to 22.10 to get the latest mesa drivers). Unfortunately the hardware acceleration is still not there. The mesa drivers appear to support a suitable version of OpenGL:
However the rendering window on
gz sim
is grey, and the rendering examples (for examplesimple_demo ogre2
) are not working. I have not done a full OpenGL debug yet, so there may be a combination of mesa environment flags that will get it working.If you’re on mac, M1 or Intel, the Metal rendering for
gz sim
running natively works well.Edit
Disabling DRI3 gets the
simple_demo
andogre2_demo
examples running withogre2
:The latter is encouraging as it uses PBS in the render.
No luck yet with the main application.
Edit2
Progress: I pulled the latest source for the Garden branches, rebuilt and ran a marine project which is very demanding on graphics:
Gazebo Garden running with acceleration on this system:
System: macOS Monterey 12.6 Machine: Mac Pro (2019) VM App: VMware Fusion 13.0.0 VM: Ubuntu 22.10
Hi, As an exclusive ros2 user, I do not use Humble and gz-sim natively, using instead Parallels 19 VM configured with Ubuntu 22.04 & ROS 2 Humble Desktop Full. I usually disable Graphics Acceleration in Desktop Control and rviz and ign gazebo run ok. Parallels seems to have made some changes in this ver 19 that works better. I should add that I cannot install the new gz harmony or iron in the UB22 VM as arm64 binary install packages are not yet release and the compile from source don’t work.
@devashishRaj Please take a look at the build commands used in https://github.com/gazebosim/gazebo_test_cases/issues/804. M1 (ARM) machines are not fully supported yet, so we don’t have any official documentaiton.
I ran
ign gazebo --render-engine ogre
and this worked for me on Gazebo Fortress. Thanks, really performantThe unlinking qt (=qt@6) is an extra step. You still need to follow the instructions to install qt@5.
My oversight as I should request to have the instructions updated to include the unlink step if a conflict is observed.
Correcting my previous post, on Ubuntu 22.04 and Lubuntu 22.04, ~/gz sim works with the line “LIBGL_ALWAYS_SOFTWARE=1” in ~/.bashrc file, remembering to “$ source .bashrc” . In my case this environment variable does not appear in /etc/environment, though it is displayed in $ printenv|grep ALWAYS.