Skip to content

Commit 6202b94

Browse files
committed
Merge branch 'improve-simulator-setup'
2 parents b2bfd5c + e034a9a commit 6202b94

File tree

1 file changed

+36
-10
lines changed

1 file changed

+36
-10
lines changed

simulator/index.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,52 @@ You will also need Python installed.
2828

2929
### Installing the simulation
3030

31-
32-
1. [Download the simulation](https://github.com/srobo/competition-simulator/releases/download/sr2023.1/competition-simulator-sr2023.1.zip), and unzip it somewhere on your computer.
33-
2. Using the Webots IDE, open the `worlds/Arena.wbt` file.
31+
1. Create a directory, perhaps called `simulation` where you will store your robot code.
32+
2. [Download the simulation](https://github.com/srobo/competition-simulator/releases/download/sr2023.1/competition-simulator-sr2023.1.zip)
33+
and unzip it as a subdirectory of that directory:
34+
```
35+
simulation
36+
├── competition-simulator-<version>
37+
│ ├── ...
38+
│ └─ worlds
39+
│ └── Arena.wbt
40+
└── robot.py
41+
```
42+
If there is not an existing `robot.py` an example one will be created when the simulator first runs.
43+
3. Using the Webots IDE, open the `worlds/Arena.wbt` file.
3444

3545
You may receive a warning about your computer's GPU not being good enough, which can be ignored.
3646

47+
<div class="info">
48+
On recent versions of macOS you may need to give Webots permission to access the directory where you have extracted the simulation files.
49+
</div>
3750

3851
#### Changing your version of Python
3952

40-
If webots is picking up the incorrect version of Python, you'll need to change it.
41-
This can be done using **Tools** &rarr; **Preferences** &rarr; **General** &rarr; **Python command** (or **Webots** &rarr; **Preferences** <kbd>⌘</kbd><kbd>,</kbd> on a Mac).
53+
If webots is not picking any version of Python or is picking up the wrong one then you'll need to change it.
54+
When this happens Webots will print errors to its console and your robot will not move.
55+
56+
You will need the full path to the version of Python that you want to use.
57+
This will vary based on the system you have.
58+
One way to find the path is by launching the version of Python that you want to
59+
use and running the following code:
60+
61+
~~~~~ python
62+
import sys
63+
print(sys.executable)
64+
~~~~~
65+
66+
On Windows you can set the path to the Python version to use in Webots UI via
67+
**Tools** &rarr; **Preferences** &rarr; **General** &rarr; **Python command**.
68+
Your Python path is likely similar to `C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python39\python.exe` when using Python 3.9, where `<USERNAME>` is your login.
69+
70+
On Mac you can set the path to the Python version to use via **Webots** &rarr; **Preferences** <kbd>⌘</kbd><kbd>,</kbd>.
71+
Your Python path is likely similar to `/Library/Frameworks/Python.framework/Versions/3.9/bin/python3` when using Python 3.9.
72+
4273
You'll need to ensure a matching version of Python is installed. If you're still
4374
having problems, ask for help in [`#simulator-help`][simulator-help] in
4475
[Discord][discord].
4576

46-
On Windows your Python path is likely `C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python39\python.exe` where `<USERNAME>` is your login.
47-
On Mac your Python path is likely `/Library/Frameworks/Python.framework/Versions/3.9/bin/python3` when using Python 3.9.
48-
49-
Currently the simulator does not work properly on Apple M1 Macs.
50-
5177
### Updates
5278

5379
Occasionally, we may release an update to the simulation. To update, you will need to delete the `competition-simulator-<version>` directory, and re-download it using the above link.

0 commit comments

Comments
 (0)