EGL support is available in Ignition Fortress

EGL support is available in Ignition Fortress!

OpenGL traditionally requires a window. Without a window, OpenGL cannot be used. This implies either X11 or Wayland is installed and running; which can be a problem when running on cloud servers, VMs, embedded devices, and similar environments.

This feature is exclusive of Ogre 2.2. Only Ignition Debian packages include this feature, You just need to install Ignition Gazebo and run the server with the following command:

ign gazebo -s --headless-rendering

You can easily try this feature in a Docker container without NVIDIA support. Hopefully this new feature will help you integrating more test in your CI.

Regards

4 Likes

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 the ign command to use card0 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"
3 Likes