This is awesome!
For those stuck with the older versions for some while, there is a nice workaround to get headless EGL rendering. It consists of two steps:
- Run Gazebo in a headless X server (XVFB works great here, e.g.
xvfb-run -a -s '-screen 0 1920x1080x24' ign gazebo -v4
). This, however, uses software rendering. - Use VirtualGL to substitute the software renderer with an EGL renderer. This has been possible since VirtualGL 2.6.80. Running this or newer build of VirtualGL, prepend
vglrun +v -d /dev/dri/card0
before theign
command to usecard0
for 3D rendering.
To sum it up, to run headless gazebo before Fortress, use the following command:
xvfb-run -a -s '-screen 0 1920x1080x24' vglrun +v -d /dev/dri/card0 ign gazebo -v4 -s
If you also want to run GUI on the headless machine, you can use a headless VNC server which will allow you to connect from remote machines to view and control the GUI. Example command using TurboVNC:
/opt/TurboVNC/bin/vncserver -fg -log /dev/stdout -xstartup "vglrun +v -d /dev/dri/card0 ign gazebo -v4"