-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add Metal support to MinimalScene and Qt Applications #314
Comments
I added I can see this trace: Msg] Ignition Gazebo GUI v7.0.0~pre1
[Dbg] [Application.cc:87] Initializing application.
[Dbg] [Application.cc:105] Qt using Metal rendering interface
[GUI] [Dbg] [Application.cc:456] Create main window
[GUI] [Wrn] [Application.cc:698] [QT] Populating font family aliases took 655 ms. Replace uses of missing font family "Roboto" with one that exists to avoid this cost.
[GUI] [Wrn] [Application.cc:698] [QT] qrc:/qml/StyleDialog.qml:112:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] qrc:/qml/StyleDialog.qml:105:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] qrc:/qml/StyleDialog.qml:98:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] qrc:qml/Main.qml:83:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] qrc:/qml/PluginMenu.qml:27:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Dbg] [PathManager.cc:66] Requesting resource paths through [/gazebo/resource_paths/get]
[GUI] [Wrn] [Application.cc:698] [QT] file::/Gazebo/GazeboDrawer.qml:241:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Wrn] [Application.cc:698] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Dbg] [Gui.cc:149] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [PathManager.cc:55] Received resource paths.
[GUI] [Dbg] [Gui.cc:208] Requesting GUI from [/world/default/gui/info]...
[GUI] [Dbg] [GuiRunner.cc:110] Requesting initial state from [/world/default/state]...
[GUI] [Msg] Loading config [/Users/ahcorde/.ignition/gazebo/7/gui.config]
[GUI] [Dbg] [Application.cc:336] Loading plugin [MinimalScene]
[GUI] [Dbg] [Application.cc:692] [QT] Creating ign-renderering interface for OpenGL
[GUI] [Dbg] [Application.cc:692] [QT] Creating ign-renderering interface for OpenGL
[GUI] [Dbg] [Application.cc:692] [QT] Creating render thread interface for OpenGL
[GUI] [Dbg] [Application.cc:692] [QT] Creating ign-renderering interface for Metal
[GUI] [Dbg] [Application.cc:692] [QT] Creating render thread interface for Metal
[GUI] [Msg] Added plugin [3D View] to main window
[GUI] [Msg] Loaded plugin [MinimalScene] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libMinimalScene.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [EntityContextMenuPlugin]
[GUI] [Wrn] [Application.cc:698] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:33:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Added plugin [EntityContextMenu] to main window
[GUI] [Msg] Loaded plugin [EntityContextMenuPlugin] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libEntityContextMenuPlugin.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [GzSceneManager]
[GUI] [Msg] Added plugin [Scene Manager] to main window
[GUI] [Msg] Loaded plugin [GzSceneManager] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libGzSceneManager.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [InteractiveViewControl]
[GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[GUI] [Msg] Added plugin [] to main window
[GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libInteractiveViewControl.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [CameraTracking]
[GUI] [Msg] Added plugin [Camera tracking] to main window
[GUI] [Msg] Loaded plugin [CameraTracking] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libCameraTracking.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [MarkerManager]
[GUI] [Msg] Listening to stats on [/world/default/stats]
[GUI] [Msg] Added plugin [Marker Manager] to main window
[GUI] [Msg] Loaded plugin [MarkerManager] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libMarkerManager.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [SelectEntities]
[GUI] [Msg] Added plugin [Select entities] to main window
[GUI] [Msg] Loaded plugin [SelectEntities] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libSelectEntities.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [Spawn]
[GUI] [Wrn] [Application.cc:698] [QT] file::/Spawn/Spawn.qml:28:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Added plugin [Spawn] to main window
[GUI] [Msg] Loaded plugin [Spawn] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libSpawn.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [VisualizationCapabilities]
[GUI] [Msg] View as transparent service on [/gui/view/transparent]
[GUI] [Msg] View as wireframes service on [/gui/view/wireframes]
[GUI] [Msg] View center of mass service on [/gui/view/com]
[GUI] [Msg] View inertia service on [/gui/view/inertia]
[GUI] [Msg] View collisions service on [/gui/view/collisions]
[GUI] [Msg] View joints service on [/gui/view/joints]
[GUI] [Msg] Added plugin [VisualizationCapabilities] to main window
[GUI] [Msg] Loaded plugin [VisualizationCapabilities] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libVisualizationCapabilities.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [WorldControl]
[GUI] [Wrn] [Application.cc:698] [QT] file::/WorldControl/WorldControl.qml:30:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Using world control service [/world/default/control]
[GUI] [Msg] Listening to stats on [/world/default/stats]
[GUI] [Msg] Added plugin [World control] to main window
[GUI] [Msg] Loaded plugin [WorldControl] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libWorldControl.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [WorldStats]
[GUI] [Msg] Listening to stats on [/world/default/stats]
[GUI] [Msg] Added plugin [World stats] to main window
[GUI] [Msg] Loaded plugin [WorldStats] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libWorldStats.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [Shapes]
[GUI] [Msg] Added plugin [Shapes] to main window
[GUI] [Msg] Loaded plugin [Shapes] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libShapes.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [Lights]
[GUI] [Msg] Added plugin [Lights] to main window
[GUI] [Msg] Loaded plugin [Lights] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libLights.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [TransformControl]
[GUI] [Wrn] [Application.cc:698] [QT] file::/TransformControl/TransformControl.qml:104:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] file::/TransformControl/TransformControl.qml:99:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] file::/TransformControl/TransformControl.qml:94:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Wrn] [Application.cc:698] [QT] file::/TransformControl/TransformControl.qml:89:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Dbg] [TransformControl.cc:219] Legacy mode is disabled; this plugin must be used with MinimalScene.
[GUI] [Msg] Added plugin [Transform control] to main window
[GUI] [Msg] Loaded plugin [TransformControl] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libTransformControl.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [Screenshot]
[GUI] [Wrn] [Application.cc:698] [QT] file::/Screenshot/Screenshot.qml:33:3: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[GUI] [Msg] Screenshot service on [/gui/screenshot]
[GUI] [Msg] Added plugin [Screenshot] to main window
[GUI] [Msg] Loaded plugin [Screenshot] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gui-7/plugins/libScreenshot.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [ComponentInspector]
[GUI] [Msg] Added plugin [Component inspector] to main window
[GUI] [Msg] Loaded plugin [ComponentInspector] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libComponentInspector.dylib]
[GUI] [Dbg] [Application.cc:336] Loading plugin [EntityTree]
[GUI] [Msg] Added plugin [Entity tree] to main window
[GUI] [Msg] Loaded plugin [EntityTree] from path [/Users/ahcorde/ignition_fortress/install/lib/ign-gazebo-7/plugins/gui/libEntityTree.dylib]
[GUI] [Dbg] [Application.cc:289] Loading window config
[GUI] [Dbg] [Application.cc:470] Applying config
[GUI] [Wrn] [Application.cc:698] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[GUI] [Wrn] [Application.cc:698] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[GUI] [Dbg] [Application.cc:692] [QT] Creating ign-renderering interface for Metal
[GUI] [Dbg] [Application.cc:692] [QT] Creating render thread interface for Metal
[GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
Stack trace (most recent call last):
#31 Object "QtWidgets", at 0x1095392f6, in QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
#30 Object "QtQuick", at 0x108320a31, in QQuickWindow::event(QEvent*) + 241
#29 Object "QtGui", at 0x109b1b024, in QWindow::event(QEvent*) + 692
#28 Object "QtQuick", at 0x1082a2755, in QSGRenderLoop::handleContextCreationFailure(QQuickWindow*) + 8645
#27 Object "QtQuick", at 0x1082a1e94, in QSGRenderLoop::handleContextCreationFailure(QQuickWindow*) + 6404
#26 Object "QtQuick", at 0x1083189d9, in QQuickWindowPrivate::syncSceneGraph() + 361
#25 Object "QtQuick", at 0x108318d64, in QQuickWindowPrivate::updateDirtyNodes() + 356
#24 Object "QtQuick", at 0x10832afc5, in QQuickWindowPrivate::updateDirtyNode(QQuickItem*) + 2901
#23 Object "libMinimalScene.dylib", at 0x147b6a7df, in ignition::gui::plugins::RenderWindowItem::updatePaintNode(QSGNode*, QQuickItem::UpdatePaintNodeData*) + 1343
#22 Object "libMinimalScene.dylib", at 0x147b6a091, in ignition::gui::plugins::RenderWindowItem::Ready() + 225
#21 Object "libMinimalScene.dylib", at 0x147b68130, in ignition::gui::plugins::IgnRenderer::InitialiseOnMainThread() + 432
#20 Object "libignition-rendering7.7.0.0~pre1.d", at 0x147be83ec, in ignition::rendering::v7::RenderEngineManager::Engine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 156
#19 Object "libignition-rendering7.7.0.0~pre1.d", at 0x147be8534, in ignition::rendering::RenderEngineManagerPrivate::Engine(EngineInfo, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 196
#18 Object "libignition-rendering7.7.0.0~pre1.d", at 0x147bf92f4, in ignition::rendering::v7::BaseRenderEngine::Load(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&) + 260
#17 Object "libignition-rendering7-ogre2.7.0.0~", at 0x14a4f75fb, in ignition::rendering::v7::Ogre2RenderEngine::LoadImpl(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&) + 1179
#16 Object "libignition-rendering7-ogre2.7.0.0~", at 0x14a4f7ada, in ignition::rendering::v7::Ogre2RenderEngine::LoadAttempt() + 138
#15 Object "libignition-rendering7-ogre2.7.0.0~", at 0x14a4f91b3, in ignition::rendering::v7::Ogre2RenderEngine::CreateRenderWindow() + 67
#14 Object "libignition-rendering7-ogre2.7.0.0~", at 0x14a4fe87e, in ignition::rendering::v7::Ogre2RenderEngine::CreateRenderWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, double, unsigned int) + 2702
#13 Object "libOgreMain.2.2.6.dylib", at 0x149077cad, in Ogre::Root::createRenderWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::STLAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) + 45
#12 Object "RenderSystem_GL3Plus.2.2.6.dylib", at 0x14a89f869, in Ogre::GL3PlusRenderSystem::_createRenderWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::STLAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) + 809
#11 Object "RenderSystem_GL3Plus.2.2.6.dylib", at 0x14a8953b7, in Ogre::OSXGL3PlusSupport::newWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::STLAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) + 131
#10 Object "RenderSystem_GL3Plus.2.2.6.dylib", at 0x14a8904f6, in Ogre::CocoaWindow::CocoaWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::STLAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) + 164
#9 Object "RenderSystem_GL3Plus.2.2.6.dylib", at 0x14a890e90, in Ogre::CocoaWindow::_create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::STLAllocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) + 2268
#8 Object "RenderSystem_GL3Plus.2.2.6.dylib", at 0x14a8918fc, in Ogre::CocoaWindow::_createNewWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, unsigned int) + 416
#7 Object "RenderSystem_GL3Plus.2.2.6.dylib 0x000000014a8902e2", at 0x14a8902e2, in initWithGLOSXWindow:] + 25
#6 Object "libOgreMain.2.2.6.dylib", at 0x1491025cf, in Ogre::TextureGpu::getWidth() const + 5
#5 Object "libsystem_platform.dylib", at 0x7fff204a5d7c, in _sigtramp + 28
#4 Object "libignition-tools-backward.dylib", at 0x1058af242, in backward::SignalHandling::sig_handler(int, __siginfo*, void*) + 34
#3 Object "libignition-tools-backward.dylib", at 0x1058af48a, in backward::SignalHandling::handleSignal(int, __siginfo*, void*) + 106
#2 Object "libignition-tools-backward.dylib", at 0x1058af5a8, in backward::StackTraceImpl<backward::system_tag::darwin_tag>::load_from(void*, unsigned long, void*, void*) + 56
#1 Object "libignition-tools-backward.dylib", at 0x1058af701, in backward::StackTraceImpl<backward::system_tag::darwin_tag>::load_here(unsigned long, void*, void*) + 129
#0 Object "libignition-tools-backward.dylib", at 0x1058b0f60, in unsigned long backward::details::unwind<backward::StackTraceImpl<backward::system_tag::darwin_tag>::callback>(backward::StackTraceImpl<backward::system_tag::darwin_tag>::callback, unsigned long) + 32
Segmentation fault: 11 |
It's a bit odd. Something is still attempting to load the $ ign gazebo -v4 -s -r I always need to exclude the transform control, as there are issue with it on load that I have not yet resolved. Other plugins seem to load ok from start but eliminating them may help narrow down the problem. |
Still not working,
<?xml version="1.0"?>
<!-- Window -->
<window>
<width>1000</width>
<height>845</height>
<style
material_theme="Light"
material_primary="DeepOrange"
material_accent="LightBlue"
toolbar_color_light="#f3f3f3"
toolbar_text_color_light="#111111"
toolbar_color_dark="#414141"
toolbar_text_color_dark="#f3f3f3"
plugin_toolbar_color_light="#bbdefb"
plugin_toolbar_text_color_light="#111111"
plugin_toolbar_color_dark="#607d8b"
plugin_toolbar_text_color_dark="#eeeeee"
/>
<menus>
<drawer default="false">
</drawer>
</menus>
<dialog_on_exit>true</dialog_on_exit>
</window>
<!-- GUI plugins -->
<!-- 3D scene -->
<plugin filename="MinimalScene" name="3D View">
<ignition-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>
<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>0.4 0.4 0.4</ambient_light>
<background_color>0.8 0.8 0.8</background_color>
<camera_pose>-6 0 6 0 0.5 0</camera_pose>
<render_system>metal</render_system>
</plugin> Commands:
Trace of the error:
|
@ahcorde - thanks for your patience. I'm not sure what's going on so perhaps take a step back to check that ign-rendering with QML is working. Ah - I've just realised that you may not have all the metal dependencies if you are using ign-rendering/main (it has the changed interface to get the Metal GPU texture but not the changes from the render engine to use them). Here is the current list of libraries I am using to run Gazebo (ign-rendering and above):
$ colcon graph
ignition-cmake2 + ***************
ignition-tools + * *. ..**
ignition-math6 + *****.*******
ignition-utils1 +* *..**.*..**
ignition-common4 + ** *******
ignition-msgs8 + * * ****
sdformat12 + * **.
ignition-fuel_tools7 + *.
ignition-plugin1 + ****.**
ignition-transport11 + ****
ignition-physics5 + *.
ignition-rendering7 + ***.
ignition-tutorials +
ignition-gui7 + **
ignition-sensors6 +*.
ignition-gazebo7 +*
ignition-launch5 +
|
The problem was the rendering branch, with the branch that you mentioned the
|
That's better! (sort of). This might be the aliasing issue we were seeing before on your MacBook vs my MacPro. Try setting the AntiAliasing in
|
I tried with |
Ok - I'll need to see if I can replicate that on my MacBook. The only other thing I can think of at this stage is that your version of Ogre2.2 does not include the patch that actually makes the texture available (there is a default API in Ogre::TextureGPU that returns a null texture - so you wouldn't see a crash). |
My current Ogre2.2 version is this one (it's installed with brew): osrf/simulation/ogre2.2: stable 2.2.6+20211021~312bf40 (bottled), HEAD
Scene-oriented 3D engine written in c++
https://www.ogre3d.org/
/usr/local/Cellar/ogre2.2/2.2.6+20211021~312bf40 (839 files, 16.0MB) *
Poured from bottle on 2021-11-19 at 15:53:45
From: https://github.com/osrf/homebrew-simulation/blob/HEAD/Formula/ogre2.2.rb
License: MIT
==> Dependencies
Build: cmake ✘
Required: doxygen ✔, freeimage ✔, freetype ✔, libx11 ✔, libzzip ✔, rapidjson ✔, tbb ✔
==> Options
--HEAD
Install HEAD version By the way, thank you for your support and great work! I'm super excited to make it work! |
That might be the problem. This patch OGRECave/ogre-next@b7187a5 has been not been back-ported to the The There's two approaches - one would be to get the Ogre maintainers to backport the commit to |
Here you go: add these lines to the ogre2.2 Formula patch do
# implement override for MetalTextureGpu::getCustomAttribute
url "https://github.com/OGRECave/ogre-next/commit/b7187a55a9ad5ba65ed24d1c212d1749833923ac.patch?full_index=1"
sha256 "38975001bfa903194565ed0bf411cf29857cd5b2f0f71a651d64543f610c4ff6"
end Then reinstall brew install --build-from-source ogre2.2
==> Downloading https://github.com/scpeters/ogre-next/commit/3486b772b35b3e5f8cf
Already downloaded: /Users/rhys/Library/Caches/Homebrew/downloads/affb4b48e6407594691f192f9711a1e382e176e98aa910fb664db37e99f0006f--3486b772b35b3e5f8cf6da5b7a41e6c195408d7d.patch
==> Downloading https://github.com/OGRECave/ogre-next/commit/b7187a55a9ad5ba65ed
Already downloaded: /Users/rhys/Library/Caches/Homebrew/downloads/fac46ab2da55d1627a4d1d69ba571df022fca8345e84d24c467e0b53ef6ed3c3--b7187a55a9ad5ba65ed24d1c212d1749833923ac.patch
==> Downloading https://github.com/OGRECave/ogre-next/archive/312bf406a77244afe2
Already downloaded: /Users/rhys/Library/Caches/Homebrew/downloads/4601c24fe78df4d35670cfb87e9c879040c189c5a3c4a12a5c885a124826859c--ogre-next-312bf406a77244afe230930e67e3e5d52a119507.tar.gz
==> Installing ogre2.2 from osrf/simulation
==> Patching
==> Applying 3486b772b35b3e5f8cf6da5b7a41e6c195408d7d.patch
patching file CMake/Utils/OgreConfigTargets.cmake
patching file CMakeLists.txt
==> Applying b7187a55a9ad5ba65ed24d1c212d1749833923ac.patch
patching file RenderSystems/Metal/include/OgreMetalTextureGpu.h
Hunk #1 succeeded at 102 (offset -4 lines).
patching file RenderSystems/Metal/src/OgreMetalTextureGpu.mm
Hunk #1 succeeded at 385 (offset -13 lines).
==> cmake .. -DOGRE_LIB_DIRECTORY=lib/OGRE-2.2 -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=O
==> make install
🍺 /usr/local/Cellar/ogre2.2/2.2.6+20211021~312bf40: 840 files, 16.0MB, built in 1 minute Where we can see the Metal textures have been patched. For reference here is a copy of the updated Formula: I've rebuilt ign-rendering against this version of ogre2.2 (replacing my from source build), and it is working. @iche033 I think the patch we need for Metal support in ogre2.2 slipped through the last homebrew build. Could we get the bottles updated? |
sure let's see if the patch can be backported upstream. If not, we can add the patch to the ogre 2.2 formula. @darksylinc, can OGRECave/ogre-next@b7187a5 be backported to the |
@ahcorde thanks for forward porting ignition-rendering6 into main. I've added a wiki page to my fork of ignition-rendering documenting how to install ignition gazebo with Metal support (to save hunting through issues for the details). I see there are new instructions for installing ignition garden, so I'll check I've got the right dependencies and see if I can get the ign-gui and ign-gazebo changes into draft PRs for discussion. |
Is there a reason this ticket is still open? Is it not working? What's missing? I am developing the Vulkan backend and it's pretty much reusing @srmainwaring 's work for Metal. One huge gotcha I detected is that this call:
Needs to happen extremely early (before Qt has initialized its RHI) which makes it very hard to make an optional toggle in the XML because if I saw things correctly, the XML files are loaded too late. Supporting Metal/Vulkan toggles are at CLI level or environment variables are a no-brainer since However toggles living XML files are a different problem. I see that @srmainwaring 's work lacks a way of informing from the GUI to the MinimalScene plugin which backend is being used; which I am fixing via: Application::Application( ... )
{
....
this->dataPtr->mainWin->setProperty("renderEngineBackendApiName",
"vulkan");
} And then adding /////////////////////////////////////////////////
std::string gz::gui::renderEngineBackendApiName()
{
auto win = App()->findChild<MainWindow *>();
if (nullptr == win)
return {};
auto renderEngineNameVariant = win->property("renderEngineBackendApiName");
if (!renderEngineNameVariant.isValid())
return {};
return renderEngineNameVariant.toString().toStdString();
} To ign-gui/src/Helpers.cc Then using renderEngineBackendApiName() in MinimalScene.cc where appropiate to select the backends. There's a lot of things I have to do to complete the Vulkan backend (e.g. right now I'm sidetracked by #457) but I don't see major reasons the Metal backend shouldn't be working? (from code inspection only, I didn't try compiling & running it) |
@darksylinc #323 partially closed this and the updates to the ogre2.2 formula in osrf/simulation complete this this for gz-gui / garden. It's all running and I've been using Metal on amd64 and arm64 macs for Gazebo work since the changes were merged, so I'll close this issue. To use Metal with gz-sim we still need gazebosim/gz-sim#1225 (or at least a minimal version that updates the ruby launch scripts so the gui can be started). The command line change to select the backend would be a nice add - could this be factored out into a separate PR from the vulkan work? |
Right now I'm still figuring things out so I don't have time for. It's definitely not much work: diff --git a/src/Application.cc b/src/Application.cc
index 8de4ea58..94f1dd9e 100644
--- a/src/Application.cc
+++ b/src/Application.cc
@@ -118,8 +118,34 @@ Application::Application(int &_argc, char **_argv, const WindowType _type)
// format.setRenderableType(QSurfaceFormat::OpenGL);
// QSurfaceFormat::setDefaultFormat(format);
#else
- // Otherwise use OpenGL
- gzdbg << "Qt using OpenGL graphics interface" << std::endl;
+ // Otherwise use OpenGL (or Vulkan when supported and requested)
+
+ const bool useVulkan = false; // TODO(anyone)
+
+ if (useVulkan)
+ {
+ gzdbg << "Qt using Vulkan graphics interface" << std::endl;
+
+# ifdef GZ_USE_VULKAN_DEBUG_EXT
+ qputenv("QT_VULKAN_INSTANCE_EXTENSIONS",
+ "VK_EXT_debug_report;VK_EXT_debug_utils");
+# endif
+ qputenv("QT_VULKAN_DEVICE_EXTENSIONS",
+ "VK_KHR_maintenance2;VK_EXT_shader_subgroup_vote;"
+ "VK_EXT_shader_viewport_index_layer;"
+# ifdef GZ_USE_VULKAN_DEBUG_EXT
+ ";VK_EXT_debug_marker"
+# endif
+ );
+
+# if QT_VERSION >= QT_VERSION_CHECK(5, 15, 2)
+ QQuickWindow::setSceneGraphBackend(QSGRendererInterface::VulkanRhi);
+# endif
+ }
+ else
+ {
+ gzdbg << "Qt using OpenGL graphics interface" << std::endl;
+ }
#endif
// Configure console
@@ -149,7 +175,17 @@ Application::Application(int &_argc, char **_argv, const WindowType _type)
if (_type == WindowType::kMainWindow)
{
if (!this->InitializeMainWindow())
+ {
gzerr << "Failed to initialize main window." << std::endl;
+ }
+ else
+ {
+ if (useVulkan)
+ {
+ this->dataPtr->mainWin->setProperty("renderEngineBackendApiName",
+ "vulkan");
+ }
+ }
}
else if (_type == WindowType::kDialog)
{
diff --git a/src/Helpers.cc b/src/Helpers.cc
index 52c93a36..95b54a61 100644
--- a/src/Helpers.cc
+++ b/src/Helpers.cc
@@ -195,6 +195,20 @@ std::string gz::gui::renderEngineName()
return renderEngineNameVariant.toString().toStdString();
}
+/////////////////////////////////////////////////
+std::string gz::gui::renderEngineBackendApiName()
+{
+ auto win = App()->findChild<MainWindow *>();
+ if (nullptr == win)
+ return {};
+
+ auto renderEngineNameVariant = win->property("renderEngineBackendApiName");
+ if (!renderEngineNameVariant.isValid())
+ return {};
+
+ return renderEngineNameVariant.toString().toStdString();
+}
+
/////////////////////////////////////////////////
const QString gz::gui::qmlQrcImportPath()
{
diff --git a/src/plugins/minimal_scene/MinimalScene.cc b/src/plugins/minimal_scene/MinimalScene.cc
index 72952db8..929c6be5 100644
--- a/src/plugins/minimal_scene/MinimalScene.cc
+++ b/src/plugins/minimal_scene/MinimalScene.cc
@@ -696,7 +696,19 @@ void GzRenderer::NewMouseEvent(const common::MouseEvent &_e)
RenderThread::RenderThread()
{
// Set default graphics API to OpenGL
- this->SetGraphicsAPI(rendering::GraphicsAPI::OPENGL);
+ const std::string backendApiName = gz::gui::renderEngineBackendApiName();
+ if (backendApiName == "vulkan")
+ {
+ this->SetGraphicsAPI(rendering::GraphicsAPI::VULKAN);
+ }
+ else if (backendApiName == "metal")
+ {
+ this->SetGraphicsAPI(rendering::GraphicsAPI::METAL);
+ }
+ else
+ {
+ this->SetGraphicsAPI(rendering::GraphicsAPI::OPENGL);
+ }
RenderWindowItem::Implementation::threads << this;
qRegisterMetaType<RenderSync*>("RenderSync*");
@@ -1243,6 +1255,20 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem)
<< std::endl;
}
+ const std::string backendApiName = gz::gui::renderEngineBackendApiName();
+ if (backendApiName == "vulkan")
+ {
+ renderWindow->SetGraphicsAPI(rendering::GraphicsAPI::VULKAN);
+ }
+ else if (backendApiName == "metal")
+ {
+ renderWindow->SetGraphicsAPI(rendering::GraphicsAPI::METAL);
+ }
+ else
+ {
+ renderWindow->SetGraphicsAPI(rendering::GraphicsAPI::OPENGL);
+ }
+
elem = _pluginElem->FirstChildElement("graphics_api");
if (nullptr != elem && nullptr != elem->GetText())
{ |
Desired behavior
The MinimalScene plugin is not currently supported on macOS. This feature request is to allow MinimalScene to work on macOS when using the
ogre2
render engine by adding support for Metal.Alternatives considered
Use OpenGL on macOS
Approaches to using OpenGL on maOS have been discussed in a number of issues:
Add Metal support for the Ogre2 Render Engine gz-rendering#463 investigates running
ign gui
andign gazebo
on macOS using ogre-next2.1 and OpenGL. There is a method that will work for Ignition Edifice but there are difficulties in supporting this approach in later releases.Examples not working on macOS with Ogre2.2 gz-rendering#422 examines options for running the ignition-rendering examples on macOS using ogre-next2.2. Continuing to use OpenGL on macOS requires fall-back options for OpenGL to be implemented in ogre-next2.2, some progress has been made on this but a full implementation is not straightforward.
It was suggested that providing support for Metal in Ignition may require less work than providing fall-back support for OpenGL and has the advantage of being supported by Apple.
Implementation suggestion
Preparation
Preparatory work to support Metal in ignition-rendering is included in the following PRs:
The upstream interface required from Ogre is available in:
OGRECave/ogre-next#237
Prototype example
A possible approach is prototyped in the
simple_demo_qml
example which has been extended to provide support for either OpenGL or Metal in this branch:https://github.com/srmainwaring/ign-rendering/tree/feature/metal-simple_demo_qml
The method involves using the Qt scene graph backend for Metal provided by setting
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi);
and using the Metal render system when loading the
ogre2
render engine.Code specific to Metal must be compiled as Objective-C/C++. To prevent macOS specific code in the interface while retaining the option to still use OpenGL on macOS, a number of small interface classes have been introduced that allow the classes
IgnRenderer
,RenderThread
,TextureNode
andRenderWindowItem
in the MinimalScene plugin to dynamically load the appropriate render system.Draft implementation
A draft implementation that allows Metal to be used with
ign gui
andign gazebo
is available in the following branches:The application in the draft hardcodes the render system to be Metal, however the MinimalScene plugin defaults to using OpenGL and uses the plugin XML to override the render system with the element:
Mixing the OpenGL render system and Qt Metal scene graph back end is not permitted.
Additional context
Ignition Gazebo on macOS with Metal, including GPU sensor support, is working using the branches posted above.
The following examples use Ignition on macOS / Metal with ArduPilot SITL and an extension of Brian Gerkey's port of the ArduPilotGazebo plugin to Ignition (for further details on this usage see Ignition Gazebo + SITL support)
The text was updated successfully, but these errors were encountered: