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/setting_up_simulator.md
+36-23Lines changed: 36 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,41 @@ title: Setting up the Simulator
6
6
Setting up the Simulator
7
7
========================
8
8
9
-
##Prerequisites
9
+
# Prerequisites
10
10
11
-
You need to download and install [Webots](https://cyberbotics.com/#download) (the download is around 300MB).
12
-
This is the platform we run our simulation in.
13
11
14
-
Version "R2023b" of Webots is supported.
12
+
## Webots
15
13
16
-
### Python Version
14
+
Our simulator runs in a program called Webots.
15
+
In order to run the simulation you first need to install Webots.
16
+
You need to download [Webots for here](https://cyberbotics.com/#download) and install it.
17
+
18
+
The current supported version is "R2023b".
19
+
20
+
21
+
## Python
17
22
18
23
You will also need Python installed.
24
+
If it is not already installed this can be downloaded and installed from the [Python website](https://www.python.org/).
19
25
20
26
| Platform | Supported Python Version |
21
27
|----------|--------------------------|
22
28
| Windows | 3.8-3.11 (64-bit) |
23
29
| macOS | 3.8-3.11 |
24
30
| Linux | 3.8-3.11 |
25
31
26
-
There are a small number of [external libraries]({{ site.baseurl }}/kit/brain_board/python_libraries) which will be available to your robot code during the competition.
27
-
Note that for local development you will need to install these yourself.
28
32
29
-
Once you have downloaded the simulation, the libraries can be installed with `pip install -r competition-simulator.../libraries.txt`.
33
+
### Python libraries
34
+
35
+
There are a small number of [external libraries]({{ site.baseurl }}/kit/brain_board/python_libraries) which are available on the physical kit that may be useful in the simulator.
36
+
If you want to use these in your code you will need to install these yourself.
37
+
38
+
Once you have downloaded the simulation, the libraries can be installed with the following command in a terminal.
@@ -36,7 +50,7 @@ The simulation for the SR2024 competition will be released at Kickstart.
36
50
37
51
1. Create a directory, perhaps called `simulation` where you will store your robot code.
38
52
2. [Download the simulation](https://github.com/srobo/competition-simulator/releases/download/TODO/competition-simulator-TODO.zip), the latest version is TODO, released on TODO.
39
-
3. Unzip the simulation as a subdirectory of the directory you created in the first step:
53
+
3. Unzip the simulation as a folder inside the folder you created in the first step:
40
54
```
41
55
simulation
42
56
├── competition-simulator-<version>
@@ -48,50 +62,49 @@ The simulation for the SR2024 competition will be released at Kickstart.
48
62
```
49
63
If there is not an existing `robot.py` an example one will be created when the simulator first runs.
50
64
51
-
4. Using the Webots IDE, open the `worlds/Arena.wbt` file.
65
+
4. Open the Webots IDE, then use that to open the `worlds/Arena.wbt` file.
52
66
53
67
You may receive a warning about your computer's GPU not being good enough, which can be ignored.
54
68
55
69
-->
56
70
57
71
<divclass="info">
58
-
On recent versions of macOS you may need to give Webots permission to access the directory where you have extracted the simulation files.
72
+
On recent versions of macOS you may need to give Webots permission to access the directory where you have extracted the simulation files.
59
73
</div>
60
74
75
+
61
76
### Changing your version of Python
62
77
63
-
If webots is not picking any version of Python or is picking up the wrong one then you'll need to change it.
78
+
Sometimes Webots will not automatically detect your installed Python so we need to change it.
64
79
When this happens Webots will print errors to its console and your robot will not move.
65
80
66
81
You will need the full path to the version of Python that you want to use.
67
82
This will vary based on the system you have.
68
-
One way to find the path is by launching the version of Python that you want to
69
-
use and running the following code:
83
+
One way to find the path is by launching Python and running the following code:
70
84
71
85
~~~~~python
72
86
import sys
73
87
print(sys.executable)
74
88
~~~~~
75
89
76
-
On Windows you can set the path to the Python version to use in Webots UI via
Once you have the path you need to enter this into the Webots settings.
91
+
To do this on Windows, open webots and go to the menu **Tools**→**Preferences**→**General**→**Python command** and enter the path in that box.
78
92
Your Python path is likely similar to `C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\python.exe` when using Python 3.11, where `<USERNAME>` is your login.
79
93
80
94
On Mac you can set the path to the Python version to use via **Webots**→**Preferences** <kbd>⌘</kbd><kbd>,</kbd>.
81
95
Your Python path is likely similar to `/Library/Frameworks/Python.framework/Versions/3.11/bin/python3` when using Python 3.11.
82
96
83
-
You'll need to ensure a matching version of Python is installed. If you're still
84
-
having problems, ask for help in [`#simulator-help`][simulator-help] in
85
-
[Discord][discord].
97
+
If you're still having problems, ask for help in [`#simulator-help`][simulator-help] in [Discord][discord].
98
+
86
99
87
100
## Updates
88
101
89
-
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.
102
+
Occasionally, we may release an update to the simulation.
103
+
To update, you will need to delete the `competition-simulator-<version>` folder and replace it with the new version that can be downloaded using the above link.
90
104
91
-
If you need a specific version of the simulator, or want to see what changes
92
-
have been made with each version, please see the
93
-
[list of releases](https://github.com/srobo/competition-simulator/releases).
105
+
If you need a specific version of the simulator, or want to see what changes have been made with each version, please see the [list of releases](release-list).
0 commit comments