Webots Robot Simulator

Webots is an open source robot simulator available from Cyberbotics, available for macOS, Windows, and several versions of Ubuntu Linux. It supports multi-robot simulations including dynamics, sensing, and actuation. We will use both C and Python to write robot control programs.

macOS Installation Notes

The general installation information is best found in the Installation Procedure section of the Webots User Guide. Following are some additional notes which may help.

Installing the Application

  1. Please download the current .dmg package from the Cyberbotics download page. The version we’ll use for Fall 2023 is webots-R2023b.dmg.

  2. After opening the .dmg file, the Webots.app application can be installed in your /Applications folder using drag and drop. If you receive a complaint about an ‘unidentified developer’, please try opening the file with a control-click menu Open, then choosing Open to override the warning.

  3. The application is unsigned and macOS will not automatically allow it to run. To avoid the security warnings, please control-click Webots.app on the first launch and select Open (see macOS Security). Otherwise you’ll get a warning panel and need to go the Security pane in System Preferences to specifically allow opening the application.

  4. On first launch you’ll have an opportunity to choose a theme.

  5. You may receive a warning about insufficient graphics capabilities. Webots does have moderately hefty GPU requirements by default (see Webots System Requirements), but several rendering options can be turned off for better performance.

  6. On first launch, the Guided Tour dialog will open and offer to show off a number of simulations. This can also be opened later from the Help menu. Many of the demos include keyboard controls available by first clicking on a robot in the main view window.

Optional: Xcode C/C++ Compiler

We will be writing controllers in Python, but some of the examples use a controllerswritten in C++. Running these examples requires an Xcode installation. If you do not already have Xcode, the latest version is available on the Apple macOS App Store.

Setting up Python in Webots

The Webots application uses an external installation of Python 3 to run robot controllers written in Python. Python 3 is not available by default on macOS but the course-recommended standard Python 3 Installation with a few additional packages will satisfy this need. The Using Python section of the Webots User Guide also suggests several options for installing Python.

To configure Webots to use the Python 3 system, please open Preferences and set the Python command field to /usr/local/bin/python3.

Windows Installation Notes

The general installation information is best found in the Installation Procedure section of the Webots User Guide. Following are some additional notes which may help.

Installing the Application

  1. Please download the current .exe package from the Cyberbotics download page. The version we’ll use for Fall 2023 is webots-R2023b_setup.exe.

  2. Run the installer .exe and select ‘Install for me only’. I recommend using the default options. The default installation path is in your AppData folder.

  3. On first launch, you’ll have the opportunity to select a theme.

  4. You may receive a warning about insufficient graphics capabilities. Webots does have moderately hefty GPU requirements by default (see Webots System Requirements), but several rendering options can be turned off for better performance.

  5. On first launch, the Guided Tour dialog will open and offer to show off a number of simulations. This can also be opened later from the Help menu. Many of the demos include keyboard controls available by first clicking on a robot in the main view window.

References:

Setting up Python in Webots

Webots uses an existing Python installation rather than bundling it. Webots assumes that the official Python has been added to the system-level PATH environment variable. For guidance on Windows Python installation, please see Windows Installation Notes.

Windows and Zip Files

The course sample projects are provided as zip files which must be unpacked before use (Extract All..) Windows will allow you to open a Webots world file directly from within a zip file, but the system will not be able to access the other contents of the package and the process will obscurely fail.

Setting up Webots Projects

Webots keeps simulation data in a ‘project directory’ with a tree of folders including specific locations for world models and robot control scripts. For the early exercises I’ll provide templates to unpack and modify. These templates can both reference stock robots and objects as well as define entirely new items.

To start an entirely empty new project:

  1. Open the Wizards menu and select New Project Directory.

  2. Choose a new folder name or accept the default.

  3. Next you’ll be prompted to create a new world within the project. I suggest including the ‘rectangular arena’ else it will be just a void. The arena and similar objects are also available by adding a new PROTO node from ‘objects/floors/’.

Tutorials and References

All of the documentation is available within the Webots User Guide. A few sections of particular interest: