Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Webots have headless mode

Tags:

webots

I saw this question from 2014 on the webots forum, but nothing since then.

We would like to run our simulation on a powerful server and remotely access it. Does webots have the ability to start in a headless mode, or does it require a graphical ui.

Thanks

like image 933
Robert Pangrazio Avatar asked Mar 31 '26 05:03

Robert Pangrazio


1 Answers

Webots doesn't have any headless mode per se, however, there are several arguments that will allow you to run it on a server without any ui (https://cyberbotics.com/doc/guide/starting-webots#command-line-arguments):

  • batch: Prevent Webots from creating blocking pop-up windows.
  • stdout: Redirect the stdout of the controllers to the terminal.
  • stderr: Redirect the stderr of the controllers to the terminal.
  • minimize: Minimize the Webots window on startup.
  • mode=: Choose the startup mode, overriding application preferences. The argument must be either pause, realtime, run or fast.

In addition to this, there are several environment variables that you might need to set (on Linux at least):

export DEBIAN_FRONTEND=noninteractive
export DISPLAY=:99
export LIBGL_ALWAYS_SOFTWARE=true

Finally, you may need to start a virtual screen with Xvfb:

Xvfb :99 -screen 0 1024x768x16 &

Following these steps I have been able for example to run Webots in a headless Docker environment: https://github.com/cyberbotics/webots/wiki/Docker

like image 187
David Mansolino Avatar answered Apr 03 '26 15:04

David Mansolino



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!