Using the Simulator
Opening the Arena
Before you can start using the simulator, you need to have followed the steps in the Setting up the Simulator section.
To open the arena, you need to start in the folder you extracted the simulator during setup and run the run_simulator.py
script.
This will open Webots with the arena loaded and ready to run your code.
In order to run the Python script, instead of opening the file you may need to right-click and select Open with → Python.
On recent versions of macOS you may need to give Webots permission to access the directory where you have extracted the simulation files.
The Webots Interface
After opening the arena, you should see a window similar to the one below. This is the Webots interface, which has 5 key areas:
- The 3D world where the simulation takes place.
- The camera overlay, which shows the images from the robot's camera.
- The time controls, which allow you to control the speed of the simulation.
- The console, which shows logs from your code.
- The "Scene Tree" which shows the objects in the simulation.
- The built-in text editor, which allows you to edit your code. We recommend using an external editor instead to make use of features like syntax highlighting and code completion.
The Camera Overlay
The camera overlay shows the images from the robot's camera.
This only updates when vision.detect_markers()
is called in your code.
This image is the raw image that the robot sees, and is not processed in any way. To see the processed image, look at the saving images section of the camera interface to see how to save annotated images.
If the camera overlay is closed and you want to get it back, you can use the Reopening the Camera Overlay instructions.