[ignition gazebo] Flashing/Blank Image/Crash in Fusion VM
Issue: Simulation World Display flashes, and cannot quit ignition application.
System Configuration:
- Invocation: ign gazebo shapes.sdf
- Ignition Gazebo, version 6.0.0~pre1
- Ubuntu 20.04.2 Desktop (in VMware Fusion Virtual Machine)
- Linux rosdesk 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021
x8664 x8664 x86_64 GNU/Linux
- VMware Fusion Player 12.1.1
- MacOS Big Sur 11.0.1
- 2018 MacMini 3.2 GHz 6-Core Intel Core i7, 32GB, Radeon RX 580 eGPU 8GB
Image Flashes:
Quit brings up OK/Cancel, Click OK, wait forever - must kill process to quit.
Asked by tovli on 2021-08-06 09:58:00 UTC
Answers
It seems to work just fine, (and quit just fine), with OpenGL support turned off in the VMware Fusion settings:
BUT it only runs at 1% real-time... I'm going to have to figure out the mesa thing apparently.
When I added a set_mesa_env.sh and source it, I thought I got full speed operation and good display but is again crashing.
# set_mesa_env
# Configure the Mesa Environment
# https://docs.mesa3d.org/envvars.html
# Core Mesa environment variables
export MESA_DEBUG=1
export MESA_GL_VERSION_OVERRIDE=4.1
export MESA_GLSL_VERSION_OVERRIDE=410
export MESA_EXTENSION_OVERRIDE="\
-GL_ARB_buffer_storage \
-GL_ARB_multi_draw_indirect \
-GL_ARB_texture_buffer_range \
-GL_ARB_compute_shader \
-GL_ARB_ES3_compatibility \
"
Asked by tovli on 2021-08-06 10:09:09 UTC
Comments
To run ignition-gazebo with accelerated 3D graphics on an Ubuntu VMware guest you need to set the Mesa environment variables that disable some of the OpenGL extensions.
The following applies to a macOS Big Sur 11.4 host (AMD Radeon Pro W5700X 16GB) with an Ubuntu 20.04.2.0 guest on VMware. You may need to experiment with the choice of valid extensions depending upon the OpenGL support of your GPU.
Set up a script you can source containing these environment variables or add them to your .bashrc:
# set_mesa_env
# Configure the Mesa Environment
# https://docs.mesa3d.org/envvars.html
# Core Mesa environment variables
export MESA_DEBUG=1
export MESA_GL_VERSION_OVERRIDE=4.1
export MESA_GLSL_VERSION_OVERRIDE=410
export MESA_EXTENSION_OVERRIDE="\
-GL_ARB_buffer_storage \
-GL_ARB_multi_draw_indirect \
-GL_ARB_texture_buffer_range \
-GL_ARB_compute_shader \
-GL_ARB_ES3_compatibility \
"
Then source them:
source set_mesa_env
Additional debug info can be obtained by setting the LIBGL_*
and GALLIUM_HUD
environment variables:
# LibGL environment variables
export LIBGL_DEBUG=verbose
export LIBGL_ALWAYS_INDIRECT=false
export LIBGL_ALWAYS_SOFTWARE=false
export LIBGL_NO_DRAWARRAYS=false
export LIBGL_SHOW_FPS=false
export LIBGL_DRI2_DISABLE=false
export LIBGL_DRI3_DISABLE=false
# Gallium environment variables
export GALLIUM_HUD="simple,\
fps\
+frametime\
+cpu\
+cpu0\
+cpu1\
+cpu2\
+cpu3\
+samples-passed\
+primitives-generated\
+num-draw-calls\
+nic-rx-ens33\
+nic-tx-ens33\
+num-fallbacks\
+num-flushes\
+num-validations\
+map-buffer-time\
+num-buffers-mapped\
+num-textures-mapped\
+num-bytes-uploaded\
+num-command-buffers\
+command-buffer-size\
+flush-time\
+surface-write-flushes\
+num-readbacks\
+num-resource-updates\
+num-buffer-uploads\
+num-const-buf-updates\
+num-const-updates\
+num-shader-relocations\
+num-surface-relocations\
+memory-used\
+num-shaders\
+num-resources\
+num-state-objects\
+num-surface-views\
+num-generate-mipmap\
+num-failed-allocations\
+num-commands-per-draw\
+shader-mem-used\
"
Setting LIBGL_ALWAYS_SOFTWARE=true
is an alternative to unsetting Accerated 3D Graphics
in the virtual machine settings if you want run ignition gazebo using software OpenGL.
Running the shapes.sdf
example:
ign gazebo -v 4 shapes.sdf
PBS materials are supported: this using the panda_world
from Ignition Fuel: Panda joint control world
ign gazebo -v 4 panda_world.sdf
If you build ignition-edifice from source you can test using the ign-rendering
examples: simple_demo
will run with either ogre
or ogre2
as a render engine. The ogre2demo
illustrates that there is still something not quite right with the OpenGL settings. It will render if you reduce the number of spot lights to a 3 x 2 grid, but fails to render correctly with a 3 x 3 grid. I'm still chasing down why that is, but any suggestions welcomed.
Asked by srmainwaring on 2021-08-21 06:39:33 UTC
Comments
Thank you for this invested answer. It helped me to understand some of the terminology and components involved under the covers.
Setting the env to 4.1 does not seem to solve the issue - thought it did but crash returned.
Asked by tovli on 2022-11-13 11:29:21 UTC
Comments