You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: simulator/index.md
+36-10Lines changed: 36 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,26 +28,52 @@ You will also need Python installed.
28
28
29
29
### Installing the simulation
30
30
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.
34
44
35
45
You may receive a warning about your computer's GPU not being good enough, which can be ignored.
36
46
47
+
<divclass="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>
37
50
38
51
#### Changing your version of Python
39
52
40
-
If webots is picking up the incorrect version of Python, you'll need to change it.
41
-
This can be done using **Tools**→**Preferences**→**General**→**Python command** (or **Webots**→**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
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**→**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
+
42
73
You'll need to ensure a matching version of Python is installed. If you're still
43
74
having problems, ask for help in [`#simulator-help`][simulator-help] in
44
75
[Discord][discord].
45
76
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
-
51
77
### Updates
52
78
53
79
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