Skip to content

Commit 96c51e7

Browse files
committed
More information about developing code for the simulator
1 parent ddc1004 commit 96c51e7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

simulator/using_the_simulator.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ These methods are also available on the physical kits.
5757

5858
## Developing your code
5959

60-
On first run, the robot will execute an example program for convenience. This program will be copied to the directory `competition-simulator-<version>` is stored in:
60+
You should develop your code outside the folder which contains the world simulation, in a file called `robot.py`.
61+
This should be within the parent directory you created when [setting up the world simulation]({{ site.baseurl }}/simulator/setting_up_simulator#world-simulation).
6162

6263
```
6364
.
@@ -68,12 +69,17 @@ On first run, the robot will execute an example program for convenience. This pr
6869
└── robot.py
6970
```
7071

71-
Your code should be developed in `robot.py`.
72+
If you run the simulation without a `robot.py` file in place, the simulation will copy an example there and run it.
7273

7374
<div class="warning">
7475
Only your controller code will be present in the competition environment.
7576
</div>
7677

78+
### Making changes
79+
80+
In order for your simulated robot to pick up changes to your code you need to save the files you are working on and then reload the simulation.
81+
This will also reset the state of the simulated world, allowing your robot to start afresh.
82+
7783
### Running multiple robots
7884

7985
To test how your robot behaves in each starting zone of the arena, you can copy your robot's code to run in each corner. Code can be placed in a `zone-<zone>` directory to run in starting zone `<zone>`:

0 commit comments

Comments
 (0)