-
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
Make Grid3D plugin more flexible #172
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## ign-gui3 #172 +/- ##
============================================
- Coverage 60.31% 59.12% -1.20%
============================================
Files 20 21 +1
Lines 2510 2608 +98
============================================
+ Hits 1514 1542 +28
- Misses 996 1066 +70
Continue to review full report at Codecov.
|
One issue that I found appears when the gui.config file contains a 3DScene and a Grid3D <!-- 3D scene -->
<plugin filename="Scene3D" 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 3.14</camera_pose>
</plugin>
<plugin filename="Grid3D" name="3D Grid">
<engine>ogre2</engine>
<scene>scene</scene>
</plugin> This is the trace of ign-gui [GUI] [Msg] Loading config [gui.config]
[GUI] [Dbg] [Application.cc:305] Loading plugin [Scene3D]
[GUI] [Msg] Added plugin [3D View] to main window
[GUI] [Msg] Loaded plugin [Scene3D] from path [/home/ahcorde/ignition_citadel/install/lib/ign-gui-3/plugins/libScene3D.so]
[GUI] [Dbg] [Application.cc:305] Loading plugin [Grid3D]
[GUI] [Msg] Added plugin [3D Grid] to main window
[GUI] [Msg] Loaded plugin [Grid3D] from path [/home/ahcorde/ignition_citadel/install/lib/ign-gui-3/plugins/libGrid3D.so]
[GUI] [Dbg] [Application.cc:266] Loading window config
[GUI] [Dbg] [Application.cc:421] Applying config
[GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[GUI] [Wrn] [Grid3D.cc:233] Engine "ogre2" has no scene, Grid plugin won't work.
[GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[GUI] [Dbg] [Scene3D.cc:941] Create scene [scene] The Scene created by the 3DScene is create after the Grid3D is trying to access it. I'm getting a segfault. Is there any way to wait to other plugin to be loaded? If I add to the config file only the 3DScene and then manually a added with the interface the Grid 3D I'm not getting the segfault |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Nice catch, addressed in 2cad85a. Also added the grid to the example scene. |
This fixes gazebosim/gz-sim#312.
Trying to load
ogre
whenogre2
is already loaded explodes the whole application. With this change, when loading the plugin from the menu, it now defaults to the first loaded engine / scene insteadogre
.