Skip to content

Commit 929d207

Browse files
authored
Merge pull request #442 from srobo/document-multiple-simulated-robots
Document how to run robot code in different corners
2 parents 2c2ae11 + dddaf4e commit 929d207

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

simulator/programming/index.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,28 @@ On first run, the robot will execute an example program for convenience. This pr
2222

2323
Your code should be developed in `robot.py`.
2424

25-
2625
<div class="warning">
2726
Only your controller code will be present in the competition environment.
2827
</div>
2928

29+
### Running multiple robots
30+
31+
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>`:
32+
33+
```
34+
.
35+
├── competition-simulator-<version>
36+
│ ├── ...
37+
│ └─ worlds
38+
│ └── Arena.wbt
39+
├── zone-0
40+
│ └── robot.py
41+
└── zone-1
42+
└── robot.py
43+
```
44+
45+
This will run two robots in the arena, each with different `robot.py`s. You can run as many or as few zones as you like, in any combination.
46+
3047
## Robot
3148

3249
There is a pre-built robot used in the simulator.

0 commit comments

Comments
 (0)