Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/programming/vision/camera-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Setting Up The Cameras
## Ports of the PC

The PhotonVision system determines the order of device IDs based upon whichever order they are plugged in. Therefore, to identify a specific port, use the unique path that PhotonVision provides in the camera details.

The following image is an example of a camera's details as displayed in PhotonVision, with the camera's device ID (indicated by the device number) and the unique path of the port where the camera is plugged in highlighted in yellow.

![Example diagram showing how the device ID and unique path are displayed in PhotonVision](./images/example-deviceID-and-unique-path.png){width=50%}

Here is a chart to identify the ports and buses for each USB input in our current PC:

![Port of the PC diagram](./images/ports-of-pc-diagram.png){width=75%}

60 changes: 35 additions & 25 deletions docs/programming/vision/coprocessor-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,6 @@ netplan apply

- Install a text editor like Vim (`apt install vim`).

- [x] Add the setup for the static ethernet. In `/etc/netplan`, create `10-ethernet-static.yaml` with this content:
```yaml
network:
version: 2
ethernets:
enp89s0:
optional: true
dhcp4: false
dhcp6: false
addresses:
- 10.4.1.11/24
```
where `enp89s0` should be the name of the Ethernet interface from the previous step.
Change the permissions to satisfy netplan's expectations:

```bash
chmod go-r /etc/netplan/10-ethernet-static.yaml
netplan apply
```

- Add the IP address to the login prompt. To that end, change `/etc/issue` to read
```text
Ubuntu 24.04.3 LTS \n \l
Expand All @@ -150,21 +130,51 @@ $ sudo ./install.sh
$ sudo reboot now
```
This will install the latest version of PhotonVision.
For whatever reason, Photonvision will make a number of configuration changes,
one of which will be to activate `NetworkManager` as the default renderer for `netplan`.
This should not cause any issues.

After Photonvision is installed and running, visit the URL of the machine
The install script will run through a number of prompts. Choose the default settings.
One of the prompt will be asking whether PhotonVision should manage the machine's
networking settings.

Although we may revisit this decision in the future, on our current coprocessors,
we have this flag activated, that is, we let PhotonVision manage networking.
PhotonVision will activate `NetworkManager` as the default renderer for `netplan`,
and use `nmcli` to create configurations.

This means that the static IP configuration will have to be done through
the web UI as follows:
after Photonvision is installed and running, visit the URL of the machine
using port 5800; for instance, `http://10.90.161.58:5800/` where you need to replace `10.90.161.58`
with the IP reported by `ip a`. Note that your laptop must be connected to the
same network (typically, WiFi network) as the MiniPC.

Go to network settings, enter the team number (401) and select 10.4.1.11 as the
IP address. You'll get an error if the coprocessor is not connected to the robot
network, but it should work.

### Upgrading PhotonVision

PhotonVision releases are [available here](https://github.com/PhotonVision/photonvision/releases).
Updates involve downloading the latest .jar file for `linuxx64`, (say `photonvision-v2026.2.2-linuxx64.jar`),
and then replacing `/opt/photonvision/photonvision.jar` with it.

### Debugging the Coprocessor Later

If it it's not reachable on the network, attach keyboard and monitor via HDMI.
You may have to hit Enter to get a login prompt (or reboot).

## Changing BIOS settings

- [x] To make sure the coprocessor turns on when power is provided, you must change
a BIOS setting. For the TrigKey PC, this is a bit obscured:

- Hold down the DEL key when booting.
- Look for Chipset settings.
- Look for PCH-IO Configuration
- Look for "State after G3" -- set this to S0 (not S5).

To help improve performance, we've made the following changes to the BIOS:

- Advanced -> Power & Performance -> CPU - Power Management Control -> View/Configure Turbo Options:
- Energy-efficient Turbo - OFF - Hopefully prevents a little bit of opportunistic throttling of turbo frequency
- Boot -> Fast Boot - ON (boot faster??)

We still need to find and modify the setting to make the coprocessor boot when power is applied (or, if it is already enabled, document it here!).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"packaging==25.0",
"paginate==0.5.7",
"pathspec==0.12.1",
"pillow==10.4.0",
"pillow==12.1.1",
"platformdirs==4.4.0",
"pycparser==2.23",
"pygments==2.19.2",
Expand All @@ -45,7 +45,7 @@ dependencies = [
"six==1.17.0",
"smmap==5.0.2",
"tinycss2==1.4.0",
"urllib3==2.5.0",
"urllib3==2.6.3",
"watchdog==6.0.0",
"webencodings==0.5.1",
]
Loading