From d8da500f87afa396c7539c3d914ba042eecc43e8 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Fri, 6 Sep 2024 02:01:29 -0700 Subject: [PATCH] Fix crash and update launch file (#277) Signed-off-by: Ian Chen --- examples/sim_plugins.gzlaunch | 268 ++++++++++++++++++++++++++-------- src/Manager.cc | 5 +- 2 files changed, 212 insertions(+), 61 deletions(-) diff --git a/examples/sim_plugins.gzlaunch b/examples/sim_plugins.gzlaunch index aae71c0b..13cd40ef 100644 --- a/examples/sim_plugins.gzlaunch +++ b/examples/sim_plugins.gzlaunch @@ -109,7 +109,6 @@ --> - @@ -120,77 +119,228 @@ :/qml/images/drawer.png - - - 3D View - false - docked - - - ogre2 - scene - 0.4 0.4 0.4 - 0.8 0.8 0.8 - -6 0 6 0 0.5 0 + + + + 3D View + false + docked + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -6 0 6 0 0.5 0 + + + + + + floating + 5 + 5 + false + + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + + + + + + false + 5 + 5 + floating + false + - - - World control - false - false - 72 - 121 - 1 - floating - - - - - + + + false + 5 + 5 + floating + false + + - true - true - true - /world/<%= worldName %>/control - /world/<%= worldName %>/stats + + + false + 5 + 5 + floating + false + + + + + + World control + false + false + 72 + 1 + floating + + + + + + true + true + true + true + - - World stats - false - false - 110 - 290 - 1 - - floating - - - - - - - true - true - true - true - /world/<%= worldName %>/stats + + World stats + false + false + 110 + 290 + 1 + floating + + + + + + true + true + true + true + + + + + + false + 0 + 0 + 250 + 50 + floating + false + #666666 + + + + + + + false + 250 + 0 + 150 + 50 + floating + false + #666666 + + + + + + + false + 0 + 50 + 250 + 50 + floating + false + #777777 + + + + + + + false + 250 + 50 + 50 + 50 + floating + false + #777777 + + + + + + + false + 300 + 50 + 100 + 50 + floating + false + #777777 + + + + + + + false + docked + - - Entity tree - + + false + docked + - - - /world/<%= worldName %>/gui/transform_mode - + diff --git a/src/Manager.cc b/src/Manager.cc index 5ff73c00..764adf87 100644 --- a/src/Manager.cc +++ b/src/Manager.cc @@ -1140,8 +1140,9 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem) << "] File[" << file << "]" << std::endl; PluginPtr plugin = loader.Instantiate(name); - if (plugin->QueryInterface()->Load(_elem)) - this->plugins.insert(plugin); + if (!plugin->QueryInterface()->Load(_elem)) + gzerr << "Unable to load " << name << std::endl; + this->plugins.insert(plugin); } //////////////////////////////////////////////////