Skip to content

Commit 28399ee

Browse files
authored
SR2024 - Update Section - Brain board
2 parents 7e4fcac + 613f909 commit 28399ee

File tree

10 files changed

+142
-138
lines changed

10 files changed

+142
-138
lines changed

_data/kit_versions.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,4 @@
55
# changelog:
66
# - Changed something
77
# - Changed another thing too
8-
- version: 2023.2.1
9-
released: 2023-01-07
10-
changelog:
11-
- Fixed issue in camera optimisation that caused JPEG corruption.
12-
- version: 2023.2.0
13-
released: 2023-01-05
14-
yanked: true
15-
changelog:
16-
- Reworked underlying vision library to improve marker detection and distance calculation.
17-
- Added a display of last captured image in web UI.
18-
- version: 2023.1.0
19-
released: 2022-12-01
20-
changelog:
21-
- Added dark theme and WiFi details to web interface.
22-
- Added terminal interface.
23-
- Updated axes for orientations.
24-
- Added frame argument to camera operations.
25-
- Added robot settings error file.
26-
- Added competitor port range (7000-8999) to firewall.
27-
- Updated C270 and B500 camera calibrations.
28-
- Fixed bug where stopping running code didn't work.
29-
- Python packages can now be installed onto the brain board using pip.
30-
- version: 2023.0.0
31-
released: 2022-10-21
32-
changelog:
33-
- Initial release for SR2023.
8+
[]

_data/sidebar_tree.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tree:
1717
title: Brain Board
1818
tree:
1919
- url: /kit/brain_board/robot_os
20-
title: Robot OS
20+
title: Student Robotics OS
2121
- url: /kit/brain_board/python_libraries
2222
title: Python Libraries
2323
- url: /kit/brain_board/wifi
@@ -38,8 +38,8 @@ tree:
3838
- url: /programming/robot_api/
3939
title: Robot API
4040
tree:
41-
- url: /programming/robot_api/metadata
42-
title: Metadata
41+
- url: /programming/robot_api/comp_mode
42+
title: Competition Mode
4343
- url: /programming/leds
4444
title: Brain Board LED API
4545
- url: /programming/motors
@@ -104,6 +104,8 @@ tree:
104104
title: Setting up the simulator
105105
- url: /tutorials/using_the_simulator
106106
title: Using the simulator
107+
- url: /tutorials/update_brain
108+
title: Updating your brain board
107109
- url: /competitor_resources/
108110
title: Resources
109111
tree:

kit/brain_board/advanced.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ layout: page
33
title: Brain Board - Advanced
44
---
55

6+
67
# Brain Board - Advanced
78

8-
When connected to your [Brain Board WiFi]({{ site.baseurl }}/kit/brain_board/wifi), it is possible to access the Brain Board via a terminal interface. The Brain Board is running Student Robotics OS, a purpose-built Linux distribution that does not have all of the conveniences of a usual Linux system.
9+
When connected to your [Brain Board WiFi]({{ site.baseurl }}/kit/brain_board/wifi), it is possible to access the Brain Board via a terminal interface.
10+
The Brain Board is running Student Robotics OS, a purpose-built Linux distribution.
911

1012
<div class="warning">
1113
Proceed at your own risk. We only provide limited support for these advanced features.
@@ -17,18 +19,20 @@ Please bear in mind the following:
1719
- We may need you to upgrade the OS which will overwrite any changes.
1820
- Any modifications you make must be in line with [the rules]({{ site.baseurl }}/rules).
1921
- We reserve the right to inspect your Brain Board at any time.
20-
- Feel free to tinker. If you are stuck, ask in [Discord]({{ site.baseurl }}/team_admin/discord), although we may be unable to help.
22+
- Feel free to tinker. If you are stuck, ask in [Discord]({{ site.baseurl }}/team_admin/discord), we may be able to help.
23+
2124

2225
## SSH Access
2326

2427
You can access the robot over SSH:
2528

2629
```shell
27-
ssh robot@robot
30+
ssh robot@robot.lan
2831
```
2932

3033
Your SSH client will prompt you for a password, which is `robot`.
3134

35+
3236
## Terminal Interface
3337

3438
A terminal interface with similar functionality to the web interface is available as `rtui`.
@@ -56,4 +60,4 @@ Some commands let you set data as well as get it:
5660

5761
- `arena B` - Set the arena to `B`
5862
- `mode COMP` - Set the mode to `COMP`
59-
- `zone 2` - Set the zone to `2`
63+
- `zone 2` - Set the zone to `2`

kit/brain_board/index.md

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,30 @@ The below will automatically calculate the latest version number, to be used whe
1010
{% assign latest_version = site.data.kit_versions | first %}
1111
{% assign latest_version = latest_version.version %}
1212

13-
Brain Board
14-
===========
13+
14+
# Brain Board
1515

1616
<img src="{{ site.baseurl }}/images/content/kit/brain.png" alt="A photo of a brain board" title="A brain board" class="right" style="max-width: 50%"/>
17-
The Brain Board provided with your kit is what runs the code you write and controls the other peripheral boards. It consists of a [Raspberry Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) and a Student Robotics KCH HAT.
1817

19-
The LEDs on the HAT display the current status of the robot and can be used to help debug your robot. There are also 3 RGB (Red, Green, and Blue) LEDs that you can control from your code.
18+
The Brain Board provided with your kit is what runs the code you write and controls the other boards.
19+
It consists of a [Raspberry Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) and a Student Robotics KCH.
20+
21+
The KCH is the board installed on top of the Pi, it powers the brain and has LEDs to show the current status of the robot.
22+
There are also 3 RGB (Red, Green, and Blue) LEDs that you can control from your code.
23+
2024

2125
## Board Diagram
2226

2327
![brain board assembly diagram]({{ site.baseurl }}/images/content/kit/brain-diagram.png "The Brain Board Assembly")
2428

29+
[test](/docs/kit/brain_board#brain-board)
30+
2531
### Indicators
2632

2733
| LED | Meaning
2834
|------------------|-------------------------
2935
| 5V Power | The Brain Board is powered
30-
| 12V Power | The KCH is powered
36+
| 12V Power | 12V power is being provided to the KCH
3137
| Reverse Polarity | The 12V power is reversed
3238
| Boot Progress | Progress Bar for Brain Boot Progress
3339
| Code | A USB containing code is plugged in
@@ -37,6 +43,7 @@ The LEDs on the HAT display the current status of the robot and can be used to h
3743
| Start | The Robot is waiting to start
3844
| OK | Shows the code status, see below table
3945

46+
4047
### OK LED
4148

4249
The OK LED shows the status of your code using different colours.
@@ -50,43 +57,27 @@ The OK LED shows the status of your code using different colours.
5057
| Green | Your code has finished without errors
5158
| Red | Your code has crashed
5259

60+
5361
## Powering the Brain Board
5462

5563
Your Brain Board will not power on unless it's connected to the "L2" port on the Power Board.
56-
This is because the rest of the power outputs are disabled until the usercode runs.
57-
58-
## Flashing the SD card
59-
60-
The SD card is located on the underside of the board underneath the green power connector. Grab the SD card with your fingers and simply pull it out of the slot.
61-
62-
To fully update your Brain Board's software, or refresh it if you think it's not working correctly, you can flash our SD card image onto the microSD card in your Brain Board.
64+
This is because the rest of the power outputs are disabled until your code runs.
6365

64-
To update the SD card, you'll need to download our image from the [updates page]({{ site.baseurl }}/kit/brain_board/robot_os). The latest version is `{{ latest_version }}`.
65-
The flashing procedure is identical to flashing Raspberry Pi images.
6666

67-
### Etcher
67+
## Student Robotics OS
6868

69-
We recommend using [Etcher](https://etcher.io), as it's simple to use, and available on Windows, macOS and Linux. If you're familiar with Raspberry Pis or other similar boards and have flashed images before with a different tool, that should also work.
69+
The Raspberry Pi runs a custom operating system that contains the Student Robotics software.
70+
The OS contains a set of pre-installed python libraries that you can use, the list of which can be found [here](./python_libraries).
7071

71-
![Etcher example]({{ site.baseurl }}/images/content/kit/etcher.png)
72+
Sometimes the OS on your Brain Board may need to be updated, the steps to do this can be found on the [tutorial page]({{ site.baseurl }}/tutorials/update_brain).
73+
The latest version of the OS is currently `{{ latest_version }}`.
74+
See the [Student Robotics OS](./robot_os) page for full details of the different versions.
7275

73-
<div class="info" markdown="1">
74-
If you choose to use a tool other than Etcher, you may need to extract the `srobo-robot-{{ latest_version }}.img.xz` to `srobo-robot-{{ latest_version }}.img`. There are many tools available for this, e.g. [7-zip](https://www.7-zip.org/).
75-
</div>
76-
77-
### Flashing
78-
79-
1. Open Etcher and select the `srobo-robot-{{ latest_version }}.img.xz` file you downloaded
80-
2. Select your SD card from the devices window
81-
3. Click 'Flash!'
82-
4. When the flash is complete you should safely eject the SD card.<br>
83-
Your computer may complain that the SD card is no longer readable, however
84-
this is expected as the data being written to the SD card is not in a format
85-
that either Windows or macOS can natively understand.
8676

8777
## Robot Settings
8878

89-
Some of the features on your robot are configured using a settings file, called `robot-settings.toml`. This file is automatically created on your USB drive the first time that you run any code on your robot.
79+
Some of the features on your robot are configured using a settings file, called `robot-settings.toml`.
80+
This file is automatically created on your USB drive the first time that you run any code on your robot.
9081

9182
You can edit the settings file using your IDE or any text editor.
9283

@@ -100,22 +91,9 @@ The robot settings file contains the following settings:
10091
| `wifi_enabled` | Enables the WiFi | `true` |
10192
| `usercode_entrypoint` | The entry point to your Python code | `robot.py` |
10293

103-
If your `robot-settings.toml` is not valid, it will be automatically regenerated with valid settings. This will reset any settings you have changed back to their default values. We therefore recommend that you do not change your settings file before a competition match.
104-
105-
In software version `2023.1.0` and later, an error file will be generated if your settings are invalid: `robot-settings-error.txt`. This file contains a message explaining the problem and a copy of your old settings.
106-
107-
108-
## Firewall
109-
110-
<div class="info">
111-
This documentation refers to a feature which is only available from software version `2023.1.0` and later.
112-
</div>
113-
114-
The Brain Board has a [network firewall](https://en.wikipedia.org/wiki/Firewall_(computing)) that prevents access to applications and services on the Brain Board unless it is required.
115-
116-
If you are running code that uses networking, you will need to use a port from the range that is allocated for competitor use:
94+
If your `robot-settings.toml` is not valid, it will be automatically regenerated with valid settings.
95+
This will reset any settings you have changed back to their default values.
96+
We therefore recommend that you do not change your settings file before a competition match.
11797

118-
| Protocol | Start of Range | End of Range |
119-
|----------|----------------|--------------|
120-
| TCP | 7000 | 8999 |
121-
| UDP | 7000 | 8999 |
98+
An error file will be generated if your settings are invalid: `robot-settings-error.txt`.
99+
This file contains a message explaining the problem and a copy of your old settings.

kit/brain_board/python_libraries.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ layout: page
33
title: Available Python Libraries
44
---
55

6-
Available Python Libraries
7-
==========================
86

9-
Robot Kit
10-
---------
7+
# Available Python Libraries
8+
9+
10+
## Robot Kit
1111

1212
The following python libraries are installed and available for use in your robot's software:
13-
<!-- cspell:disable -->
1413

14+
<!-- cspell:disable -->
1515
* [april-vision 1.0.2](https://pypi.org/project/april-vision)
1616
* [astoria 0.11.1](https://pypi.org/project/astoria)
1717
* [cached-property 1.5.2](https://pypi.org/project/cached-property)
@@ -56,8 +56,8 @@ The following python libraries are installed and available for use in your robot
5656

5757
If you wish to use a library that isn't listed above, get in contact with us on Discord and have a chat with us about it.
5858

59-
Simulator
60-
---------
59+
60+
## Simulator
6161

6262
The following libraries will be available to your robot code during the
6363
competition. Note that for local development you will need to install these

kit/brain_board/robot_os.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
---
22
layout: page
3-
title: Robot OS
3+
title: Student Robotics OS
44
---
55

6-
Robot OS
7-
========
86

9-
TODO
7+
# Student Robotics OS
108

11-
# Updates
9+
The Raspberry Pi runs a custom operating system that contains the Student Robotics software.
10+
It's based on [Raspberry Pi OS](https://www.raspberrypi.com/documentation/computers/os.html) (`2023-05-03`).
11+
The OS contains a set of pre-installed python libraries that you can use, the list of which can be found [here](./python_libraries).
1212

13-
Keeping your kit up to date is very important. It enables us to deploy new features, as well as fix bugs.
1413

15-
Once you have downloaded the file you need, refer to the documentation on [updating your brain board]({{ site.baseurl }}/kit/brain_board#flashing-the-sd-card) to apply the update.
14+
## Updates
1615

17-
Each update file is a complete upgrade. Each file contains the changes of those before it. If you need to jump up multiple versions, you can do so by using the latest file.
16+
Keeping your kit up to date is very important, it enables us to fix bugs, as well as deploy new features.
17+
18+
Below is a list of the versions released, once you have downloaded the file you need, refer to the steps on the [tutorial page]({{ site.baseurl }}/tutorials/update_brain) to apply the update.
19+
20+
Each update file is a complete upgrade and contains all the changes of those before it.
21+
If you need to jump up multiple versions, you can do so by just using the latest version.
22+
23+
24+
## OS Versions
1825

1926
{% if site.data.kit_versions.size > 0 %}
2027
{% include updates-list.html %}
2128
{% else %}
2229
There are currently no updates available.
23-
{% endif %}
30+
{% endif %}

kit/brain_board/wifi.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,56 @@ layout: page
33
title: WiFi
44
---
55

6-
WiFi
7-
====
86

9-
The Raspberry Pi that makes up your kit's brain board contains a WiFi radio which allows you to interface with and debug your robot.
10-
You can connect to your robot using any WiFi capable device (laptop, tablet, phone, etc.)
7+
# WiFi
118

12-
Connecting to Your Robot
13-
------------------------
9+
The Raspberry Pi that makes up your kit's brain board has WiFi which allows you to connect to and debug your robot, using any WiFi capable device (laptop, tablet, phone, etc.).
10+
The WiFi is only available during development and will be disabled during competition matches.
11+
12+
## Connecting to Your Robot
1413

1514
During the boot process you should notice the green LED on the KCH (the board on top of the Pi) labelled "WiFi" turn on.
16-
Your robot has now set up its very own WiFi network! It will initially have a name starting with `robot-ZZZ` followed by some random numbers.
15+
Your robot has now set up its very own WiFi network!
16+
It will initially have a name starting with `robot-ZZZ` followed by some random numbers.
1717

1818
You can now connect to your robot in the same way you normally connect to a WiFi network.
1919
You will need a WiFi key to be able to connect and you can find this inside `robot-settings.toml` on the USB drive containing your code.
2020

21-
<div class="info">
22-
If there is no <code>robot-settings.toml</code> on your USB drive, you can generate one by first running any code on your robot. For more information see our docs on <a href="{{ site.baseurl }}/kit/brain_board#robot-settings">Robot Settings</a>.
21+
<div class="info" markdown="1">
22+
If there is no `robot-settings.toml` on your USB drive, you can generate one by first running any code on your robot.
23+
For more information see our docs on [Robot Settings]({{ site.baseurl }}/kit/brain_board#robot-settings).
2324
</div>
2425

2526
These details can also be printed using:
2627
~~~~~ python
27-
R.print_wifi_details()
28+
robot.print_wifi_details()
2829
~~~~~
2930

30-
If you are having any problems connecting to your robot, just head on over to the Discord
31-
and ask for help.
31+
If you are having any problems connecting to your robot, just head on over to the Discord and ask for help.
32+
3233

33-
Using the robot interface
34-
-------------------------
34+
## Using the robot interface
3535

3636
Once you have a WiFi connection, visit `http://robot.lan` in a web browser to see the robot interface.
3737

38-
The robot interface gives you the ability to remotely start the code on your robot,
39-
as well as view the logs.
38+
The robot interface gives you the ability to remotely start the code on your robot, as well as view the logs.
4039

4140
![The robot interface on desktop]({{ site.baseurl }}/images/content/kit/wifi_interface.png)
4241

42+
4343
### Viewing logs
4444

45-
The robot interface allows you to see all messages from your code sent by `print(...)`
46-
statements (and anything else that outputs to standard output or standard
47-
error). It will also show messages from the initialisation of the robot's
48-
hardware, as well as any errors that occurred when running your code.
45+
The robot interface allows you to see all messages from your code sent by `print(...)` statements (and anything else that outputs to standard output or standard error).
46+
It will also show messages from the initialisation of the robot's hardware, as well as any errors that occurred when running your code.
4947

5048
You can also see your robot's logs on the USB stick, in a file called
5149
`log.txt`.
5250

53-
### Setting up the Robot's Environment
5451

55-
The toolbar present at the top of the page, or bottom of the page on mobile, allows you to change the robot's starting zone and mode.
56-
Changing the starting zone allows you to test how your robot handles being started in a
57-
different zone.
58-
59-
The WiFi interface will only be fully accessible when your robot is started in dev mode and will be restricted in competition mode.
52+
### Setting the robot zone
6053

61-
Changing to competition mode causes the development markers to be unreadable,
62-
and instead reads the competition markers, which are different. Therefore, you
63-
should keep your robot in development mode.
54+
The toolbar present at the top of the page, or bottom of the page on mobile, allows you to change the robot's starting zone and mode.
55+
Changing the starting zone allows you to test how your robot handles being started in a different zone.
56+
Changing mode only applies from the next time your code runs.
6457

65-
Changing this applies from the next time your code runs.
58+
See the [competition mode]({{ site.baseurl }}/programming/robot_api/comp_mode) page for details of what competition mode is.

programming/robot_api/comp_mode.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: page
3+
title: Competition Mode
4+
---
5+
6+
# Competition Mode
7+
8+
TODO

0 commit comments

Comments
 (0)