## Description
Leadership team identified gaps in how we introduce new developers to
the community.
Additional docs for onboarding new developers, helping clarify roles and
what counts as a "good" PR.
## Meta
Merge checklist:
- [ X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ X] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
- [ ] If this PR adds a dependency, the license has been checked for
compatibility and steps taken to follow it
I assume based off discord comments a PR won't be accepted for a
shell.nix or equivalent flake solution so we should gitignore this so
people don't accidentally add them to PRs
The current method for checking light vs. dark mode is to compare the
name of the theme against a hardcoded string. This PR uses a dark mode
boolean. This change is for verbosity and so that we're not reliant on
theme name. Additionally, we change some references to colors to the
global theme, instead of indexing the list of themes.
As a precursor to #2394, add a bunch of linting rules to try and catch
more mistakes/potential code errors/unnecessary code. Add a bunch of
rules from https://eslint.vuejs.org/rules/ in the "uncategorized"
section that seem useful to have.
## Description
compute confidence level based on target area in total image size and
populate classId and confidence level in Java (while building the
PhotonTrackedTarget)
## Changes
- Add new VisionTargetSim constructor for object detection
- If class ID specified but confidence = -1, estimate based on total
area
---------
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
Back in
https://github.com/PhotonVision/photonvision/pull/467#issuecomment-1280964529
and
https://discord.com/channels/725836368059826228/725846784131203222/974498049609056266
we added code to poke our NT client every 5 seconds to "clicking the
save button in the settings window makes Photon show up again over
networktables". Total hack, but it seemed to work. We didn't at the time
dig any deeper in Wireshark or debug-level NT logs.
<img width="1373" height="679" alt="image"
src="https://github.com/user-attachments/assets/8cb2102e-0bae-4bfd-b9ac-55d31f8421b6"
/>
Now, it's 2026. 4 years on from the OG bug. And this code seems linked
to these issues
-
https://www.chiefdelphi.com/t/photonvision-coprocessor-not-sending-data-can-t-change-networking/516356/5
-
https://www.chiefdelphi.com/t/photonvision-network-tables-known-issue/515966
Craig collected these log files as well:
[craig-nt-never-connects.zip](https://github.com/user-attachments/files/26001809/craig-nt-never-connects.zip)
The code path that handles TCP re-connection was also changed entirely
since we first added this workaround. Regardless this hack was not
removed as part of the NT3 to NT4 upgrade:
- pre-NT4, reconnection was handled by `TCPConnector::connect_parallel`
which delegates to `TCPConnector`. This uses raw socket APIs
- post-NT4, reconnect is handled by `ParallelTcpConnector`. This uses
libuv exclusively
@crschardt did some really great debugging with a rio and radio in the
loop with a luma p1. In this test setup, removing this code improves
stability markedly. I'd still like to get this more on robot time, as
well as try to understand from Peter why we might have needed this code
in the first place.
## Changes
- Remove periodic stop/restart of NetworkTables client every 5 seconds
if `NetworkTablesInstance::isConnected` returns false.
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
- [ ] If this PR adds a dependency, the license has been checked for
compatibility and steps taken to follow it
---------
Co-authored-by: Craig Schardt <crschardt@fastem.com>
Fixes a bug where offline update did not start after confirming the
dev-version warning dialog.
The confirm action was using an incorrect file reference in template
context, so the selected JAR was not passed correctly to the upload
handler. The dialog closed, but no upload request was sent.
This change corrects the confirm handler so the selected file is passed
properly and the upload/install flow starts as expected.
We've had a couple people who didn't find it clear that multiple
coprocessors required different static IP addresses, so this PR aims to
clarify that point in the docs.
## Description
What changed? Why? (the code + comments should speak for itself on the
"how")
Added section on low-resource vision simulation with Photonvision,
including configuration details and use cases for low-spec machines.
Closes#2358
---------
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
This PR adds documentation for using usbtop, a program for monitoring
USB bus bandwidth. Many teams have been having issues with USB bus
bandwidth, and including a tool with the PhotonVision image that allows
them to monitor said bandwidth will likely prove beneficial.
This PR also documents lsusb, which can be used to get the max bandwidth
on USB buses. This is helpful as it gives us a basline for debugging
with usbtop.
## Description
Closes#1902
**What changed? Why? (the code + comments should speak for itself on the
"how")**
The amount of UI windows that contributors have open (and then proceed
to frantically close) increases exponentially with every passing build
season [(Munroe 2009)](https://xkcd.com/605/).
This PR adds headless (no-UI) test instructions, moves all of the test
related build documentation to its own subsection (and reorders it
roughly in the order we prefer they be used in), and makes the "Example"
sections their own independent H2.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_, including events
that led to this PR
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
---------
Co-authored-by: Matt M <matthew.morley.ca@gmail.com>
## Description
We've hit a problem where the `CombinedRuntimeLoader` extracts native
files, but gets interrupted in the middle. This is bad, cause all
`CombinedRuntimeLoader` used to check a file was its existence. This
change uses the hash of the file to verify that it's correct. This will
be checked at runtime, everytime, if the file is extant. If this check
fails, we will delete the extant file and attempt to reextract. We also
check a newly extracted file, if that hash does not match we error.
Note that this is reliant on
https://github.com/PhotonVision/wpilib-tool-plugin/pull/8 and should
follow #2367
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt M <matthew.morley.ca@gmail.com>
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
Pursuant to PhotonVision/rubik_jni#21 modify the neuralnetworkresult and related code to use a rotatedrect. This is scaffolding for implementing OBB -- overall this shouldn't change behavior of existing normal object detection models. This PR also bumps the rubik_jni version.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
Given that WPILib is nuking their Java tooling, it becomes necessary to
pull said tooling into PV itself. This migrates the
CombinedRuntimeLoader into PV, which should finalize all of the tooling
migration.
There have been recent updates to the QCL which mean it's now necessary
to select a checkbox to flash USB firmware. We've been having some
people miss this step, so we're now including it in the docs.
## Description
Presently, any tests using our old configs happen in place. This is
problematic, as it changes the files themselves. This means that anyone
running the tests will cause unintentional modifications, which stand a
chance of being committed and merged into main. We want these old
database files to remain untouched, thus we copy them to a temp
directory prior to running our tests.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Previously, when attempting to load a model that did not follow the old
naming pattern that was in the models directory, we caused PV to crash
due to a missing early return (reproducable on this branch with the
extra bonus ML model and missing label file):
```
[2026-02-01 17:35:15] [Config - NeuralNetworkModelManager] [ERROR] Model properties are null. This could mean the config for model /home/matth/photonvision/test-resources/old_configs/2025.3.1-old-nnmm/models/iCauseProblems.rknn was unable to be found in the database. Trying legacy...
[2026-02-01 17:35:15] [Config - NeuralNetworkModelManager] [ERROR] Failed to translate legacy model filename to properties: /home/matth/photonvision/test-resources/old_configs/2025.3.1-old-nnmm/models/iCauseProblems.rknn: /home/matth/photonvision/test-resources/old_configs/2025.3.1-old-nnmm/models/iCauseProblems-labels.txt
SQLConfigTest > testLoadNewNNMM() FAILED
java.lang.NullPointerException: Cannot invoke "org.photonvision.common.configuration.NeuralNetworkModelsSettings$ModelProperties.toString()" because "properties" is null
at org.photonvision.common.configuration.NeuralNetworkModelManager.loadModel(NeuralNetworkModelManager.java:342)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
```
This PR fixes it by adding the missing early-return, and adding unit
tests to make sure we handle this.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt M <matthew.morley.ca@gmail.com>
## Description
#2255 introduced a new, cross-platform method for monitoring hardware
and removed the custom shell commands that had been used previously.
This PR updates the documentation to reflect the removal of those
commands from hardwareConfig.json.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
FRC Team 6413 ran into problems trying to write the 2026.1.1 image using
the Raspberry Pi Imager tool. After some investigation we discovered a
bug was introduced in v2.0.2 of the imager tool which prevents it from
writing the PhotonVision images to any SD card on any Windows 10 or
Windows 11 computer.
Attempting to write a custom image (.img and .img.xz) results in the
following error dialog appearing as soon as the write action is
confirmed:
<img width="684" height="483" alt="photonvisionBurnFailure202"
src="https://github.com/user-attachments/assets/5c802ef0-75f9-4056-ac1f-760dcd3605bf"
/>
Versions 2.0.0 and earlier will successfully write the image files to
the selected SD card.
## Meta
Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_, including events
that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with all settings going back to the previous seasons's last release
(seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
The RubikPi collab notebook included a device for creating a quantized
model that was deprecated by the Qualcomm team. I've included a separate
cell with a command to check available devices and updated the command
to a known working state.
## Description
In https://github.com/PhotonVision/photonvision/issues/1771, we
discovered that the OV9281 on Linux seems to sometimes ignore our
exposure requests on first boot if we're in manual mode. Cycling the
camera's auto exposure with pauses in-between seems to fix it, which is
what this PR does.
Tested by [Team 2881 on
Discord](https://discord.com/channels/725836368059826228/725846784131203222/1465098110765105456);
thanks for helping us test this fix out!
## Meta
Closes https://github.com/PhotonVision/photonvision/issues/1771
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
closes#2318closes#2319
For the 2027 game, teams might want to detect more than 10 results.
Therefore, we're increasing the limit.
We also ran into an issue with our sim, where a user can create too many
objects and cause an overflow. We implement that same limit of 50
targets here.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Clarifies when estimate methods return an empty optional. This also
fixes some parity issues with Constrained SolvePnP not checking the
optional returned by the heading buffer.
Resolves#2322.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Added specific details to the wiring section of the photonvision docs
for two wiring methods for connecting a power regulator to a
coprocessor. This aims to help prevent any possible misunderstandings of
how to wire a regulator to a coprocessor.
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
This PR adjusts how model modification is handled. Any updates to
metadata, or deletion is handled in the frontend after sending data to
the backend. Any creation of models occurs in the backend, and we push
an update to the frontend.
This PR also fixes a typo in PhotonUtils which meant we hit the wrong
endpoint when an IP was passed into the status check.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
On main, this pop-up lists the wrong resolution. The index in the state
is getting updated out from underneath us. The easiest solution I have
is to just cache this number.
<img width="739" height="1051" alt="image"
src="https://github.com/user-attachments/assets/a4383ea0-aa1b-4446-87f1-ece8c5ea9ad5"
/>
<img width="873" height="1116" alt="image"
src="https://github.com/user-attachments/assets/7da4cd60-f8a6-4ac6-8bc6-9f0d5c165fee"
/>
Not sure of a great way to test this, since it requires the backend
taking calibration snapshots
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
_Test what you build, deploy what you test._
This refactors the Python CI workflow to wait for _all_ tests to pass
before publishing photonlibpy to PyPI.
- build-python-examples reuses the built wheel, removes redundant builds
- Simplify run.sh to not rebuild wheel since it's already installed
## Description
Find-and-replace 2026.1.1 -> 2026.2.1. This gets us 2026 field layouts
[among other
things](https://github.com/wpilibsuite/allwpilib/releases/tag/v2026.2.1)
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Persuant to #1093, I added as many docstrings as I could, at least for
things I knew about. Some of the classes I just suppressed the Javadoc
warnings in because they aren't particularly useful to document. This
gets us down to less than 100 Javadoc warnings in total. Docs for core
classes on the C++ side were also added for parity.
## Description
Monitoring CPU Temperature on Windows is challenging because most
vendors don't publish this data to WMI. As a work-around, OSHI tries to
use
[LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor)
via
[jLibreHardwareMonitor](https://github.com/pandalxb/jLibreHardwareMonitor).
If the temperature isn't found in WMI and jLibreHardwareMonitor isn't
present, OSHI issues warnings every time `getCpuTemperature()` is
called. This clogs the console with useless information when running on
Windows and makes testing difficult.
We could include jLibreHardwareMonitor as a dependency for our Windows
jar, but LibreHardwareMonitor installs Winring0.sys, which is a kernel
level driver with an unfixed severe vulnerability. Windows defender
flags Winring0 as a vulnuratble driver and blocks it from installing.
Rather than messing with it, this PR prevents Windows systems from
calling the `getCpuTemperature()` method in OSHI.
Fixes#2280
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
This bumps our actions to versions that use Node 24, instead of 20. Node
20 [enters EOL in April 2026](https://endoflife.date/nodejs).
This PR also includes various cleanups that should speed up CI, and make
it less complicated. This includes removing the architecture field from
setup-java, as it detects the native architecture.
We also upload our Gradle dependencies for charting in GitHub, this
helps us keep track of what we're using, and if we need to upgrade.
Finally, we bump the version of our image, to fix issues with the Rubik
Pi fan among other reasons.
continuation of #2194
supercedes #2276
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Forces a reload after restarting PhotonVision, restarting the
coprocessor, performing an offline update, or nuking the install. We
wait until we are reconnected to the coprocessor to reload, this is
accomplished by the addition of a status API endpoint.
This is being implemented due to issues experienced when the webpage is
not updated (particularly during offline updates).
---
Using the same statusCheck, we also wait until a new IP is available,
then change to it, after changing our static IP.
---
closes#2169closes#903
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
By hitting WPIlib's Artifactory Maven Central mirror instead of Maven
Central, we should reduce the number of 403 flakes we see during
workflow runs. This also removes jogamp from the repository list, as
jogamp dependencies were removed in #1926.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: samfreund <samf.236@proton.me>
## Description
Update to use our fork of the WPILib tool plugin. WPILib has indicated
that it won't be maintained past 2026, so we're forking it under our
org. We also fixed a bug that results in native libraries for multiple
platforms being included in a jar when only the native libraries for the
platform being built should be included.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Co-authored-by: samfreund <samf.236@proton.me>
## Description
Fixed in https://github.com/robotpy/mostrobotpy/pull/191. Closes#1968.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Instead of building photon-lib for our examples, wait until it's built
elsewhere then use that to run the examples. This means we don't have to
build photon-lib twice.
The opengraph embed requires the image to be accessible at the linked
location. As you can see by clicking on this link,
https://photonvision.org/images/PhotonVision-Icon-BG_2.png, it is not
accessible. This is because we need to configure a public directory when
we publish with vite, as the subfolders will not inherently be
published.
This PR adds a public directory and moves all our images there. I also
moved the video to a video directory rather than it being in images.
Bumps various versions in actions, as well as ensuring consistency
across workflows wrt versions used. One of the key reasons is ensuring
that we're up to date and consistent (previously having used 22.04 and
24.04), also since 3.11 is EOL.
## Description
[OSHI](https://github.com/oshi/oshi) is a free (MIT license) JNA-based
library for accessing hardware and system performance information. This
PR includes a re-write of the metrics monitoring code to be based on
OSHI. The original intent was to gain access to data about network
traffic for addition to the Settings tab. An additional benefit is that
collecting the data is now around two orders of magnitude (or more)
faster!
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: samfreund <samf.236@proton.me>
## Description
We currently log some things with ERROR status and include stack traces
for events that are typical behavior. This pollutes the logs and makes
it harder to track down real errors.
This PR changes the way that some events are logged:
* missing configs in the database are logged as [INFO] without the
exception stack trace.
* skip parsing NPU usage when the command is blank so that it doesn't
throw a NumberFormatException.
* log warn instead of error for unsupported NN backends (added by
@samfreund)
* skip warn when we don't add a model, only debug when we add it (added
by @samfreund)
Before:
```
Oct 22 20:56:26 photonvision java[831]: [2024-10-22 20:56:26] [Config - SqlConfigProvider] [ERROR] Could not deserialize apriltag layout! Loading defaults: Provided empty string for class edu.wpi.first.apriltag.AprilTagFieldLayout
Oct 22 20:56:26 photonvision java[831]: [2024-10-22 20:56:26] [Config - SqlConfigProvider] [ERROR] org.eclipse.jetty.io.EofException: Provided empty string for class edu.wpi.first.apriltag.AprilTagFieldLayout
Oct 22 20:56:26 photonvision java[831]: at org.photonvision.common.util.file.JacksonUtils.deserialize(JacksonUtils.java:136)
Oct 22 20:56:26 photonvision java[831]: at org.photonvision.common.configuration.SqlConfigProvider.load(SqlConfigProvider.java:298)
Oct 22 20:56:26 photonvision java[831]: at org.photonvision.common.configuration.ConfigManager.load(ConfigManager.java:198)
Oct 22 20:56:26 photonvision java[831]: at org.photonvision.Main.main(Main.java:290)
```
After:
```
Dec 15 22:29:09 photonvision java[662]: [2025-12-15 22:29:09] [Config - SqlConfigProvider] [INFO] Missing AprilTag Field Layout in database. Loading defaults
```
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: samfreund <samf.236@proton.me>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
On the RubikPi3, PhotonVision starts before NetworkManager has fully
initialized. This causes it to fail to identify the network interfaces
available on the board, which leads to problems with configuring and
controling networking from the UI. The failure can be detected by the
call to `nmcli` returning an [exit status of
8](https://networkmanager.dev/docs/api/latest/nmcli.html#exit_status),
which means "NetworkManager is not running."
This PR retries the call to nmcli every 0.5 seconds until the exit
status does not equal 8, or a maximum of 10 attempts have been made. The
retry only occurs the first time `getAllInterfaces()` is called.
Subsequent calls to this method will only make one attempt to avoid
locking up the program if networking isn't responding as expected.
In my testing on the RubikPi3, the code has to retry for less than 2
seconds in order to get a valid response from NetworkManager.
The need for this is greatly reduced by
https://github.com/PhotonVision/photon-image-modifier/pull/114, but this
code adds an additional layer of robustness against slow network
startup.
Closes#2212
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: samfreund <samf.236@proton.me>
## Description
On boot, the interface might not be fully configured yet, and the
returned NetworkInterface will be null. This would cause an NPE to be
thrown when attempting to get the MAC address from the interface. This
checks if the interface is null and silently returns an empty string if
it is, which is okay if the networking is being managed because if that
interface is broken, there's bigger problems. Fixes#2244.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
As per the linked issue, raw NT APIs are old and mostly obsolete, this
PR adds user-facing notifications of that.
Closes#1828
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
Runs the smoketest on each image after we build it in CI. This helps
ensure that we check every image that we build has the requisite JNI
libraries, and that they can be loaded. This is needed cause we've been
breaking that, and our current smoketests don't actually test all our
libraries since some are gated behind platform checks.
## Description
This updates RobotPy and our Python examples to the 2026 beta.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
I have all sorts of weird adapters from npcap and Hyper-V that don't
have MAC addresses, so I'm simplifying the logic down so that it always
tries to find _any_ adapter with a MAC address, but attempts to see if
it can find what adapter is in use right now and use the MAC address
from that. This also unpublishes old MAC address topics, which wasn't
done before.
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
Bump to wpilib 2026 beta. This does not bump our pythonlib, as robotpy
hasn't come out yet.
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
The old GPIO abstraction was replaced with
[`diozero`](https://www.diozero.com), which supports most hardware
running Linux due to its use of GPIO character devices provided by the
Linux kernel. `diozero` also supports [alternate
providers](https://www.diozero.com/concepts/providers.html#providers) if
for some reason the character device API is insufficient. Certain
capabilities outside of the character device API is also implemented for
common hardware.
Custom GPIO commands are implemented via a custom `diozero` provider.
The configuration for custom GPIO will need manually updated according
to the Hardware Config documentation page.
The status LED class was also reworked to support additional statuses or
LED indication types, although none have been added yet.
This was tested on a RPi 5 with LL3 illumination LEDs and an RGB status
led attached. All capabilities worked as expected. All 8 status LED
colors were tested and functional via modifying the code. Basic
functionality of custom GPIO was tested with dummy commands.
## Description
#2224 removed the custom deserializers for `Path`, but we still need one
to be able to deserialize the `Path` key in
`NeuralNetworkPropertyManager`. Additionally, Jackson seems to
auto-convert the `Path` key to a `String` using `toString` instead of
its own serializers, so a custom key serializer is also needed to
consistently use the same format for paths. This also removes unused
serde methods in `JacksonUtils` to minimize potential future churn, and
tacks an `@JsonIgnore` on `getModels` to prevent Jackson from
serializing a `ModelProperty` array into the database.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
## Description
PhotonJNICommon is just our implementation of combined runtime loader,
which we don't really need. This removes it and just uses
CombinedRuntimeLoader directly. This also fixes the issues introduced in
#2219, which lead to some of our JNIs not loading.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt M <matthew.morley.ca@gmail.com>
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
This cherry-picks the bug fix from #2225, but not the tests as we're
having issues with those. #2225 will remain open for the tests.
https://github.com/PhotonVision/photonvision/pull/2204 fixed the
off-by-one error on the frontend, but again, because enums are
serialized with ordinal(), DataSocketHandler needed to be updated to
account for the indices shifting by one.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] ~If this PR addresses a bug, a regression test for it is added~
Deferred
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
<img width="1918" height="1030" alt="image"
src="https://github.com/user-attachments/assets/5af1a5ee-012d-461d-9162-2d4de6ad0c62"
/>
A wireshark dissector can be handy for quickly visualizing time sync
messages. See the docs for how to use this!
Full disclosure -- this dissector was generated by Claude 4.5, and I
spot-checked all the numbers for correctness. This seems like idiomatic
Lua to me, but I don't know Lua at all. I don't see a nice QOL thing
nobody else will use as being a tech debt concern.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This PR switches image building from `pguyot/arm-runner-action` to
`PhotonVision/photon-image-runner`. The new runner uses native arm
runners on GitHub and is much faster than the emulation used by the
pguyot version.
Images from
a95914ca36
tested and working on:
- [x] RaspberryPi4b
- [x] OrangePi5
- [x] OrangePi5pro
- [x] RubikPi3
Closes#2191
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
#1900 updated how the value was handled in pv-slider, and
unintentionally removed bounds protection. This restores bounds
protection.
Unfortunately, there is an edge case that might be rather difficult to
solve. If the slider is already at the min/max, you can enter a number
through the text field, and while the value won't actually update, the
text field keeps the entered value, likely because the model value
didn't change, and therefore, a rerender isn't triggered. However, this
is an edge case that I doubt many people will actually encounter, so we
should still ship this.
Fixes#2221.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
## Description
#2137 made it so `TestUtils.loadLibraries()` loads both WPILib and
photon-targeting, which is used in Main.java to load libraries, but it
left the separate photon-targeting load in Main. This removes the extra
library load, since it's covered by `TestUtils.loadLibraries()`.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
We can avoid copying files by chunks just using `Files.copy`. This
should be NFC, just makes the code cleaner
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Updating to take advantage of the now independent mrcal-java (no longer
need to install SuiteSparse and friends!)
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
Removes the checkbox for linting because it's easily invalidated by
later pushes. Also prints a link to the linting docs on CI failure.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
In the UI, the title for this card is `Global Settings`. This more
closely follows the UI.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
#2180 added an additional value to PipelineType.java. Enums are
serialized with `ordinal()`, and the frontend wasn't updated to account
for this, causing an off-by-one error where the UI thought the pipeline
was actually the next pipeline over. This resyncs the enum on the
frontend to the backend and adjusts the mapping from PipelineType to
WebsocketPipelineType to make everything match.
Fixes#2201.
closes#2202
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
<!-- What changed? Why? (the code + comments should speak for itself on
the "how") -->
<!-- Fun screenshots or a cool video or something are super helpful as
well. If this touches platform-specific behavior, this is where test
evidence should be collected. -->
<!-- Any issues this pull request closes or pull requests this
supersedes should be linked with `Closes #issuenumber`. -->
This adds a template modal that can be used for confirming that the user
wants to delete something. The main goal is to reduce complication and
duplicated code, and standardize the way we handle deletion.
closes#2175
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Devolian <devondoyle@outlook.com>
## Description
Camera focus tool pipeline using a Laplacian and finding the variance.
Similar to Limelight.
closes#1597
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Looks like this is the convention from a quick Google search.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Revision of #2164. Instead of only running headless tests during a
build, now only the images are disabled. To reenable showing images, the
`enableTestUi` project property needs to be passed to gradle.
```bash
./gradlew test -PenableTestUi
```
## Meta
Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_
- [X] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Adds the ability to remove old calibrations. This might be helpful if
you have a bad calibration.
closes#1262
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
`.` is a special regex character, which means we weren't actually
matching the `.` in the string, but rather the character before it. This
resulted in the last letter in a model nickname getting cut off on
import. This fix resolves that issue.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Switch default tag family used in AprilTag pipeline. We already
functionally changed the default in
https://github.com/PhotonVision/photonvision/pull/1333 but since 2024
FIRST appears to have been using 36h11 so switching here seems to make
sense as well.
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
## Description
This adds documentation for how to lint PhotonVision, as it is not
available elsewhere and people have historically needed to figure it out
for themselves. It also adds an alias for linting PV.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/c0289923-a6c8-48b9-84c1-ce92c7acbc9d"
/>
<img width="3840" height="2160" alt="image"
src="https://github.com/user-attachments/assets/3b58c7d0-e12e-45d6-b328-c3061949349a"
/>
closes#871
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This replaces boilerplate that checks whether we've successfully sent
the request, whether there was an error, etc.
closes#2151
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This fixes a few problems with the Gradle `build` task and subtasks.
1. Spotless was being run on `node_modules`, resulting in errors for
out-of-source files. This is now disabled.
2. All tests were running from the `build` task, resulting in unexpected
windows popping up. Now only headless tests are run.
3. Headless tests were updated to run from the same root directory as
the other tests.
## Meta
Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
added a merch store link
## Meta
Merge checklist:
- [x ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Detects if a camera mismatch is present in any camera and displays a
banner in the dashboard for better visibility to the user. All detection
occurs in the backend, and is sent to the frontend via use of a mismatch
boolean included in each vision module.
<img width="1235" alt="image"
src="https://github.com/user-attachments/assets/19219a56-c366-4c56-8c4b-cb5a36fe4a04"
/>
Closes#1920
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Sam Freund <techguy763@gmail.com>
Co-authored-by: samfreund <samf.236@proton.me>
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
Simple typo fix:
s/Specifc/Specific
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
## Description
When we tagged `v2026.0.0-alpha-1`, we broke the versioning-helper
logic. It doesn't expect `alpha` in the version string. This PR adds
matching for lowercase alphanumeric to the versioning helper, which
resolves that issue.
Also turns out `getProviders()` is now broken as a gradle method. Sad.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This allows photon-targeting to be loaded using the same mechanism as
the rest of the WPILib libraries, fixing issues with libraries not being
able to find and load their dependent libraries.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
There isn't anything that 3D mode adds for OD, and the results are
typically messed up. Thus, we disable 3D mode when we're using an OD
pipeline.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
This adds the two missing pose strategies from the java version of
photonlib (Constrained PNP and the Trig solve), to C++ photonlib
---------
Co-authored-by: Matthew Morley <matthew.morley.ca@gmail.com>
## Description
See https://github.com/photonvision/photon-image-modifier/pull/77
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
There was a recent occurance of journalctl logs saying something like
`[66B blob data]`. We don't log anything binary, so journalctl might be
hiding some lines, thinking they're actually binary data when they're
actually plain text. Use `-a` to always log everything. If it's binary
data anyways, we'll want to know what it is anyways. Use `--output cat`
because we output our own timestamps and we don't want journalctl's own
timestamping. Filter the output through `sed` to remove ANSI color codes
to make reading logs easier.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
#2023 changed how file uploads were handled to use `Files.copy`, but
incorrectly didn't specify the `REPLACE_EXISTING` copy option, causing
file uploads to fail if the file already existed.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
If there are more than 10 queued results,
PhotonCamera.getAllUnreadResults() would resize two arrays at least once
each.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
The version of settings that needs to be compatible is last years, in
this case 2025.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Fix numerous places where using AutoCloseable objects without closing
them.
Changes:
- Upgrade JUnit from 5.10.0 to 5.11.4 (so `@AutoClose` can be used)
- Use `Files.copy()` to copy files
- Use try-with-resources when calling `Files.list()` or `Files.walk()`
- Use try-with-resources or `@AutoClose` to close `PhotonCamera` and
`PhotonCameraSim` objects created by tests
- Update `SQLConfigTest` to use `@TempDir`
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
It's unused and fails when run, so I'm removing it.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
After #1991, the program state was always resent in an attempt to
simplify logic, but this had the side effect of causing the settings UI
to reset periodically when the hostname check was performed. This
restores the original logic in #1791 to check for differences in the
conflict state, and to only send the program state if it's changed.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This prevents jobs from failing on forks of the repo.
Closes#1975.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Previously, NetworkManager would happily go asking for networkmanager to
do things even if it wasn't installed. This should never be the case,
but we should bail out early if it is regardless IMO. This prevents logs
and the UI from looking suspiciously "working", if you ignore the exit
code. Up for debate if we actually need this feature.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Craig Schardt <crschardt@fastem.com>
## Description
See #2026 for the previous iteration of this PR.
This adds the RKNN model trained on the COCO dataset as one of the
models shipped with PV. This model is fairly general, and has been
trained to identify a number of objects, including people, animals,
cars, and more. This model is meant for teams to test object detection,
particularly for teams who might not have access to the game elements
that our other models are trained on.
It additionally acknowledges Ultralytics for the model, and includes the
AGPL copyleft license.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
## Description
It's nice to be able to filter PRs by what components they've modified.
The 5 labels that have been selected are `frontend`, `backend`,
`documentation`, `photonlib`, and `website`, since those are the primary
components in the monorepo.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
This reverts commit 753123844b.
## Description
The COCO dataset contains images that use the NC and/or ND variants of
the CC license, and distributing a model based on that dataset is most
likely a violation of licenses. Additionally, the model is licensed under AGPL,
which might be a concern for PhotonVision, and at a minimum, there's no
license file bundled with the model right now.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
This adds the RKNN model trained on the COCO dataset as one of the
models shipped with PV. This model is fairly general, and has been
trained to identify a number of objects, including people, animals,
cars, and more. This model is meant for teams to test object detection,
particularly for teams who might not have access to the game elements
that our other models are trained on.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
This adds support for PNP_DISTANCE_TRIG_SOLVE in the the python
PhotonPoseEstimator, mirroring the implementation in the Java
PhotonPoseEstimator.
Changes:
- Add PoseStrategy.PNP_DISTANCE_TRIG_SOLVE
- Add addHeadingData() and resetHeadingData() to PhotonPoseEstimator
- Fix PhotonCameraSim.process() to set ntReceiveTimestampMicros in the
result
- Minor readability improvements to PhotonPipelineResult
- Minor test improvements to PhotonPoseEstimatorTest
- Add .vscode/settings.json (to make running python tests in VSCode
easier)
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Sam948-byte <samf.236@proton.me>
## Description
Per
https://github.com/PhotonVision/photonvision/pull/1972#issuecomment-3066574742,
camera calibration got broken because I accidently hid the entire
contents of the camera calibration card in #1972. Now, v-show is only
applied to the calibration table so that only the calibration table is
hidden during calibration.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Fixed the error in the OpenCV/WPILib version checking crash and
clarified it, since it's not PhotonVision that needs updating, but
rather WPILib.
Reported on chief
https://www.chiefdelphi.com/t/opencv-is-version-4-6-0-and-needs-to-be-4-10-0/501751/7
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Publishes metrics to NT using a protobuf under
`photonvision/coprocessors/metrics` using the device host name as the
key.
Refactors metrics to use numbers where possible, instead of strings.
Removes GPU mem display from metrics card when it can't be determined.
Updates UI metrics periodically.
Resolves#1988Closes#830
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
Fixes the amount of cameras and pose estimators reported by usage reporting.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
fixes#1977
Previously, the logic was checking for the camera object to be the same
as the placeholder camera object. Logic has been changed to check only
the name of the camera object.
## Description
CI will now run whenever a branch is pushed or a PR is opened. Fixes
2027 behaviour and allows running CI on forks
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
## Description
Disable the Alerts test in PhotonCameraTest because it's consistently
failing on Linux.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Upgrades to Vue 3 and necessary associated dependencies. Also fixes some
issues with the layout and adds validation for object detection models.
Closes#885, closes#1943, closes#1449.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt M <matthew.morley.ca@gmail.com>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Co-authored-by: samfreund <techguy763@gmail.com>
## Description
A common question is the way that people are powering their coprocs when
we're trying to help debug. Therefore, it would be useful to know when
people open a bug report.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
closes#1941
Rewrite the API to use the payload method , and use records in the
``RequestHandler``. There's a couple places where this isn't the place,
that's where the front end is making a get request, and so a payload
doesn't make sense.
This is meant to encourage more static typing.
Additionally, fix some typos in params in ``CameraSettingsStore``
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
- [x] Everything changed got tested
---------
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
Fixes#1239
Tag image corners used in `VideoSimUtil` did not match the expected
corner order returned by the detection pipeline of [BL, BR, TR, TL],
causing the tag image to appear flipped.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Added a warning about non-quantized custom models not being supported,
and a note about not being able to delete models from the GUI once
they're uploaded to the coprocessor.
---------
Co-authored-by: Sam Freund <techguy763@gmail.com>
## Description
WAS: Logs did not have a leading zero, meaning that alphabetical and
temporal sort were not the same
IS: Logs now have leading zeros added. This means that alphabetical sort
works properly.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Craig Schardt <crschardt@fastem.com>
This reverts commit a4295275ed.
## Description
This commit broke the FPS counter because I forgot to start the timer. I
could just use `restart`, and then it would only be wrong for the very
first pipeline run, but that's a hack, and frankly, the old way was
fine.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
Adds docs about the new logging added in 1923
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
QuirkyCamera was refactored to use EnumMap, since that seems to be more efficient. This also enables more concise copying of QuirkyCamera in getQuirkyCamera by just passing in the Map of the QuirkyCamera. Also, putAll was used instead of manually copying quirks in updateQuirks for conciseness.
In places like pipelines or DataSocketHandler, objects were being instantiated and assigned to a variable, but were then passed into a method, never to be used again. For pipelines especially, that style of code wasn't always consistently used, and other pipelines skipped assignment and instantiated objects in the method call. Make everything consistent by always instantiating in the method call. GenericUSBCameraSettables also had an unnecessary assignment, and that was cleaned up too for readability.
Matt says this was for mmal, and we use libcamera now, so this is unnecessary now. Also, the filtering logic that used blacklistedResIndices was completely broken.
## Description
Updates the PhotonPoseEstimator programming documentation page to
reflect the new PhotonPoseEstimator. and add a more comprehensive
step-by-step tutorial using code from the PV Pose Estimation examples.
Updates various code examples to ensure they are matching the latest
documentation or example code on GitHub.
This PR is a successor of, and therefore closes#1765.
This PR is blocked by #1706, as the linked PR updates examples.
Closes#1757 and closes#1800 and closes#1632 and closes#1773 and
closes#1465.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Kevin Reas <76408202+PaarkG@users.noreply.github.com>
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
## Description
Updates best practices in the documentation. Include more information on
how to get a camera stream into a driver dashboard.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
## Description
Adds documentation for driver mode because it currently isn't
documented.
Closes#1824
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Co-authored-by: Sam Freund <techguy763@gmail.com>
## Description
Fixed a bug where rotated camera distortion coefficient arrays and
rotated camera intrensic arrays were 8x bigger than they were supposed
to be. The root cause was because of how the data from JsonMatOfDouble
was being handled. A Mat was pulled out, then modified, then a new
JsonMatOfDouble was made from the Mat. This required a conversion from a
Mat to a Java array. The array was incorrectly sized as `elements *
bytes`, when it should've just been `elements`. Due to some uncertainty
as to the types of Mats passed into JsonMatOfDouble.fromMat, the
expected Mat type has been explicitly documented. The added regression
test rotates the calibration data 4 times, equivalent to not rotating at
all. This should mean the arrays are equal, and that is what we check.
Additionally fixes a bug when rotating 180 degrees that flipped width
and height
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
## Description
https://github.com/PhotonVision/photonvision/pull/884 says that PRs that
update pipeline settings or anything related to data exchange should
update the typing in the frontend as well, but that's not on the
checklist. Add it to ensure we don't miss it.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR addresses a bug, a regression test for it is added
There was a minor spelling mistake in the calibration documentation
"Ensure your the images" changed to be "ensure the images"
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR addresses a bug, a regression test for it is added
## Description
Rename some of the workflows and the steps within the workflows to
provide further clarity as to what they affect. Additionally, rename the
RtD workflow file to differentiate it from the javadocs/doxygen
workflow.
closes#1880
## Meta
Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_
- [X] If this PR changes behavior or adds a feature, user documentation
is updated
- [X] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [X] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [X] If this PR addresses a bug, a regression test for it is added
closes#1825
The new radio has four ethernet ports, and one dedicated port for the
DS. There's no reason for teams to tether to the roborio via USB-B, and
tethering via radio will provide more realistic match conditions.
Therefore, recommend tethering via radio.
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR addresses a bug, a regression test for it is added
## Description
We forgot to go to the correct directory prior to running ``npm ci``, so
now I'm adding it.
PROOF: see the passing website test
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [x] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [x] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR addresses a bug, a regression test for it is added
---------
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
## Description
Monorepos the [landing website](https://photonvision.org)
## Meta
Merge checklist:
- [x] @mcm001 migrates all the secrets over to this repo
- [x] Add label for website stuff
- [ ] Archive the old website repo
- [x] Website gets cleaned up
## Description
Balena Etcher has historically had issues like bootlooping. Recommend
Raspberry Pi Imager instead and warn about using Balena Etcher.
Closes#1856.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR addresses a bug, a regression test for it is added
closes#1720
Many teams have issues with their Arducams randomly disconnecting, so
we're adding some documentation on how to try and resolve that.
## Meta
Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_
- [X] If this PR changes behavior or adds a feature, user documentation
is updated
- [X] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [X] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [X] If this PR addresses a bug, a regression test for it is added
## Description
Added paranoia checks to satisfy @Gold872
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [x] If this PR addresses a bug, a regression test for it is added
## Description
Switches a dead link to VividHosting's page about passive PoE to one
that actually works.
Fixes#1842.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [ ] If this PR addresses a bug, a regression test for it is added
## Description
instead of using camera calibration, the CasADi problem formulation now
expect the caller to provide "normalized pixel coordinates". This
reduces the number of floating point operations we need to perform (and
reduces total LOC by 6%). `casadi_wrapper.cpp` now converts from (u, v)
coordinates to normalized (x'', y'') coordinates with:
x'' = (u - c_x) / f_x
y'' = (u - c_y) / f_y
Which is the inverse of this (from [opencv
docs](https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html), and
assuming no distortion):

In my testing, this is ~16% faster on my x86 laptop. Would love some rio
benchmarks.
## Meta
Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [~] If this PR changes behavior or adds a feature, user documentation
is updated
- [~] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [~] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [~] If this PR addresses a bug, a regression test for it is added
Force loads OpenCV before any OpenCV functions are used. `OpenCVLoader`
has all of its loading done in a static initializer field, so it's only
loaded once.
Also deprecates `OpenCVHelp.forceLoadOpenCV()`, since it's functionality
is the exact same.
Resolves#1803
Fixes#1472. TTF fonts were included as part of the FontAwesome kit, but
I opted to not add them because basically every browser won't use them
and it just pollutes the repo.
Everything under the `photon-lib` directory is intended to all be
licensed under MIT:
e40c8fbca0/photon-lib/.styleguide-license (L2)
Presumably we don't want to force teams to release their robot code
under GPL.
Somebody wanted a description, so here I am.
This PR fixes an error which caused the discoverModels function to be
rerun after each upload of a new model, but without clearing the list of
available models. This causes any models that were on the list prior to
the import to be duplicated. This PR also makes it so that uploading a
model automatically updates the list of available models.
---------
Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
The following deprecation warnings have been fixed:
- `SwerveModuleState.optimize(desiredState, currentRotation);`, which is
now an instance method
- `AprilTagFields.kDefaultField.loadAprilTagLayoutField();`, which is
now `AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);`
WIP:
- [x] C++
- [x] Python
This PR implements several refinements to the way that NetworkManager
controls the network interface.
- The monitor detects and logs changes to the network address
- The monitor detects and logs changes to the connection and will
reinitialize the connection if needed
- Remove NetworkInterface.java class, which wasn't used anywhere
- Use java.net.NetworkInterface to get IP addresses for any interface
(device)
- Adds a metric for the current IP address (address on the currently
selected interface)
This PR changes the text input fields to allow a user to type in a value and press enter (or click away) before the UI registers the updated value. It makes text input behave in a more expected manner. The spin buttons are no longer shown for the text box. Instead, there are up and down buttons on either side of the slider.
The only thing that I can't figure out is a way to make the up and down buttons continuously increment (decrement) the value if you click and hold. I'm not sure that this is required, but if someone wants to propose a solution, please add it to this PR.
In softprops/action-gh-release, when using an glob pattern to exclude files, all of the files to exclude must be specified on one line. Splitting them to multiple lines causes all files to match one of the two lines.
To combine on one line, use `|` between the patterns.
Selective builds breaks my ability to require that checks pass before
merging. It's not worth the bite for very few docs-only PRs, given
github limitations on needing to skip INDIVIDUAL JOB STEPS on required
CI jobs.
Maybe we should move to gitlab 💀
This fixes a bug introduced in #1592 that caused the Manage Device
Networking toggle to be disabled for systems where PhotonVision is
managing the network.
There is still a problem with the toggle defaulting to "off" and not
staying in the "on" position after settings are saved. I need help from
someone who understands the frontend to figure out why it keeps getting
set back to "off".
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Cameron (3539) <theforgelover@gmail.com>
If the exposure property for the generic USB camera settable was not
valid for one camera in the list, then the thread would crash/hang and
no cameras would show up in the list
It wasn't hard to not notice or skip over the recommendation, or just
not take it seriously. So I added some banners to direct people to read
the quick start guide, and a banner to heavily suggest using an
industrial SD card, since they're just the best thing available right
now.
Occasionally, the sim projects are capable of simulating current draw of
over 600A, which triggers a condition in
`BatterySim::calculateDefaultBatteryLoadedVoltage` that limits the
minimum measured battery voltage to 0V (to prevent it from going
negative).
When battery voltage measures 0, this causes NaN values to propagate
through the drivetrain model, making sim inoperable. Specifically, [this
is the
line](https://github.com/PhotonVision/photonvision/blob/master/photonlib-java-examples/aimandrange/src/main/java/frc/robot/subsystems/drivetrain/SwerveDriveSim.java#L452)
that causes the initial NaN values in simulation.
This PR is posed as a patch to ensure that simulation doesn't break.
This fixes mostly formatting issues so there is no longer any diff with
things after rerunning the generation script. Yes, most of this can be
fixed by running wpiformat but that doesn't exist as a pre-commit hook
atm, so I think this is nicer.
It also removes any reference to the java encode/decode within the
python message gen
WAS: we used raw hash-maps to encode program state
S/B: we use Jackson to do this encoding for us for free. We have
Objects, and we should use them to represent structured data.
---------
Co-authored-by: Craig Schardt <crschardt@fastem.com>
Fixes#1564. Also copies vendordep JSONs to the examples as advised by
Thad. Removes unused shared/javacpp/setupBuild.gradle. Also removes
unnecessary `chmod +x gradlew` from CI workflows.
Provide instructions for installing the PhotonVision version that is
compatible with WPILibPi 2023.4.2, which is the newest version available
for the Romi.
The older text is hidden in a comment so that it can be restored when
there is a newer version of WPILibPi that is compatible with newer
versions of PhotonVision.
What it says on the tin. This is all stuff from our initial effort to
port the sim things. Right now it is coupled to #1557 because this fixes
things up in that. Lets merge that one before dealing with this one
This uses the version of libcamera-gl-driver that was built using our
image. This assumes
the correct update path of the pi image version to libcamera to
photonvision.
I tasked my team with updating our upcoming Reefscape codebase to target
2025 packages, only to realise we have created an unsolvable dependency
nightmare with these things being neglected...
Signal/noise ratio is too low with this enabled. When dealing with #1567
I got ~46000 lines of errors going around in a circle rather than just
an import failure at the scope of each failed test
Instead of writing the kernel logs to the photonvision logs, this will
download them in the same zip file as the photonvision logs. Only includes dmesg logs from the current boot, which is fine since we should capture most of them in our logs now.
ARM-based machines populate the device model into Device Tree. We can
use this information to automatically detect and report the hardware
model for most Single Board Computers (SBCs). Vendors who want to
override this can still do so via the value in the configuration
database.
I made a mistake when cherry-picking things into #1534. Fixing it also
prompted me to regenerate message things without thinking even though it
wasn't needed here but it helped me catch an issue with a bad shim. I
must not have saved it properly on my computer and missed it before
review.
I found these with a quick find-and-replace and checked against the inbuilt Python type checking. I am away from my robot and can't really
confirm there are no flow-on effects. There are no other active usages of the bad casing in the Python code, so we should be good. The generated serde messages already use this casing, so we don't need to update there.
List types should never be optional if sent to NT because an empty list conveys the same
thing.
The equivalent C++ struct takes the same approach with empty vectors rather than an optional vector.
Fixes GPL violation, the license has been missing since 2024.
This also puts licenses in as many JARs and native library archives as possible (for good measure.)
We've moved the install script to photon-image-modifier. This updates
the install script in photonvision to just download and run the
install.sh from photon-image-modifier.
This is quite an odd issue/fix.
So this is what happened... Photonvision booted with the camera
connected and the camera was working...
After a short time the camera stopped working (for some reason maybe
static, maybe temp, maybe wiring, idk).
During this time pv showed
Jul 04 06:25:18 BackLeft java[643]: [2024-07-04 06:25:18] [CSCore -
PvCSCoreLogger] [ERROR] CS: ERROR 40: ioctl VIDIOC_QBUF failed at
UsbCameraImpl.cpp:723: Invalid argument (UsbUtil.cpp:156)
Jul 04 06:25:18 BackLeft java[643]: [2024-07-04 06:25:18] [CSCore -
PvCSCoreLogger] [WARN] CS: WARNING 30: BackLeft: could not queue buffer
0 (UsbCameraImpl.cpp:724)
I went over and played with the wire. The camera fully disconnected but
it ended up "reconnecting"
When the camera was "reconnected" photonvision detected a "new camera"
except this time with no otherpaths (aka no usb path, or by id path).
That resulted in pv creating a new camera configuration for a camera
with no otherpaths
Cscore then started to report errors that look like it attempted to
connect to the same camera twice
This fixes it by filtering out USB cameras that have no otherpath on
linux.
# Overview
Previously if the coproc came up later, getProperty would return the
string literal "null", which made us print the BFW. Add tests to make
sure that we don't do that anymore by rebooting a sim coproc +
robot in a combination of different orders.
There is a weird edge case at least with arducam/broken arducams/used
arducams where cscore will see it when pv starts but not be able to
connect to it. If we always read out the "current" video mode instead of
null when it is disconnected things will work. If the camera is
disconnected while we try to change the video mode when we get the
current video mode it will tell us what we wanted to set it to. Then
when the camera reconnects it will be in that video mode.
This prevents spamming of the logs by the network interface device
monitor by:
- checking to make sure the device file exists before starting the
monitoring task
- only logging once if it throws an exception, but keep trying in case
the exception is transient
Also reworks OV9782 defaults. Probably doesn't work on windows. We should hide these sliders probably.
Co-authored-by: Cameron (3539) <theforgelover@gmail.com>
This bug would only appear when there are cameras with the same naming.
Old config matching would also match using the by-id this was
problematic. When one camera is disconnected it would assign the by-id
path to the other camera with the
same name. When the camera is replugged in it would not be reassigned
the by-id path and would fail the camerainfo equals check.
Sliders for exposure and brightness would spam messages on the backend.
This used to cause crashes and can cause it to get quite laggy /
delayed. This will add a 20ms debounce which won't send the value to the
backend until the value hasn't changed for 20ms.
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This PR changes the way that photonvision interacts with nmcli to control networking on the coprocessor. Instead of modifying an existing connection, Photonvision adds new connections for DHCP and Static IP configurations. It then activiates the proper one at startup and any time that the network configuration is changed.
It also now uses the interface name and not the connection name and checks that the interface is available before making any changes. If the saved interface is not found, it updates the stored interface name and applies the network settings to the current interface. This should minimize the failure to control the network if the network interface wasn't available when PhotonVision first booted.
One other benefit of not altering the default configuration is that, if PhotonVision fails to run for any reason, the device can be accessed using the original networking configuration.
The code has been tested on an OrangePi5 and and a Raspberry Pi 4.
Addresses: #1261
Rotate camera calibration coefficients based on camera rotation. Probably. Seems to work. Maybe.
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
We accidentally copied more settings then we wanted. This adds an
annotation that we can mark variables with that will prevent them from
being copied when we switch pipeline types.
The target list in networktables is limited to 127 items. When you
capture more than 127 calibration images it breaks this limit and errors
out and dies. Do not publish calibration targets to nt. And also move cal images into their own folder
There are no settings for solvePNPEnabled while in driver mode but the
UI tries to set it. Let us not do that.
Fixes#1377
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
Chrome prints an error to the console when you have `<img src="null" />`
The path `//:0` can be used for an empty image and Chrome will not raise
an error.
This PR is for part 1 of #1354. It focuses on adding a model selection
interface for models that exist in `photonvision_config/models/`. Upon
completion we can ship more than 1 model and users could upload their
own through `ssh` without deleting the shipped model. This PR also adds
the abstractions need to support more DNN backends (say OpenCV, or RPI
AI Kit)
Up next is adding a CRUD interface for managing models through the UI.
Fixes the following issues with the client log viewer:
- Inconsistent and excessive spacing between log entries
- Lack of responsiveness to window size or scaling
Adds the following features to the log viewer:
- Auto-scroll if scrolled to the bottom
- Ability to clear logs on button click
- Search function to filter logs
- Displays the time the frontend captured a log and displays that timestamp in hh::mm::ss in the log viewer
- Allows logs to be filtered to be after a certain time
- General styling refinements to increase usability
---------
Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com>
You know... I made those charuco changes now I need to document how it
works... basic stuff.
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Uses logic in
https://github.com/PhotonVision/photon-libcamera-gl-driver/pull/16 to
push the ov9281 down to its true minimum exposure.
Updates UI to list the exposure settings in ~~microseconds.~~ Native
units - not everyone works in microseconds.
Does its darndest to actually try to set the exposure in
~~microseconds.~~ Native Units. To do this...
Lifecam is funky when doing this - [cscore limits the exposure settings
to certain quantized
values](https://github.com/wpilibsuite/allwpilib/blob/main/cscore/src/main/native/linux/UsbCameraImpl.cpp#L129).
Add a new camera quirk to allow that.
~~Updated camera quirks to re-evaluate every camera load (rather than
recalling from settings - this shouldn't be necessary)~~ This should be
rolled back, needed for arducam type selection.
Updated camera quirk matching logic to make PID/VID optional, and
basename optional (and only match trailing characters). This enables
mirroring CSCore's logic for identifying lifecams by name.
Updated the USBCamera to primarily use cscore's exposed property names.
Since camera manufacturers use a potpourri of names for the same
thing....
For nice-to-have settings: new soft-set logic to try all possible names,
but gracefully pass if the property isn't there.
For required settings: Search a list for the first setting that's
supported, fail if none are supported.
More logging of camera properties to help debug.
Note: most of this work is because cscore doesn't directly expose a
massaged exposure-setting-absolute API (and, given what we've seen,
probably _shouldn't_, this struggle is not for the faint of heart).
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This updates the install script to work correctly on Ubuntu 24.04
versions of the Orange Pi 5 images.
Changes include:
- installing libatomic1
- disabling networkd-wait-online if using Network Manager
- using systemctl instead of service to detect if photonvision is
running
- detecting if this is a RK3588 cpu and enabling all cores
Reverts PhotonVision/photonvision#1375
Causes white screen UI Bug, "the way we currently strap everything with
vue2 and vuetify has a lot of footguns in it, and using a newer package
manager where each subdependency gets its own version of node is causing
incorrect dependency resolution which also means we can't fix this
without either updating node or patching those dependencies id say just
revert the PR for now until I or someone else can do the vue3 update"
Pnpm is like npm except instead of keeping multiple copies of
dependencies, it shares a single copy for multiple dependencies
significantly reducing build time and the space needed to hold all the
dependencies. Read [here](https://pnpm.io/motivation) for more info.
This changes our CI to use pnpm and allows developers to choose to use
pnpm instead of npm. Also, pnpm has a built-in node version manager so
devs no longer need to use nvm to work on photonvision. All npm
functionality (including photon-server gradle tasks) still functions
using npm so this isn't breaking. We should make a docs change to
suggest to use pnpm.
The OV9782 camera has a specific exposure range, so a camera quirk for
it needs to exist. The default white balance is also pretty bad, so it
must be adjusted.
Closes#1204
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Cameron (3539) <theforgelover@gmail.com>
Windows users will have to add
`"-Dorg.gradle.java.home=C:\Users\Public\wpilib\2024\jdk"` to gradle
invocations, ie `./gradlew run
"-Dorg.gradle.java.home=C:\Users\Public\wpilib\2024\jdk"`, due to MSVC
ABI breakages and other stupidity
Add support for the old opencv charuco board like calibio.
Add support for other tag families while calibrating.
Fix calibration issue index out of range with charuco missing points.
* change verifyversion to use member variable
* Revert "change verifyversion to use member variable"
This reverts commit 4439839c8f.
* Removed inline specifier for versioncheck variable
---------
Co-authored-by: Drew Williams <DrewW@iARx.com>
Previously reported itself which was confusing. New print:
```
Error at org.photonvision.PhotonCamera.verifyVersion(PhotonCamera.java:378): Found the following PhotonVision cameras active on NetworkTables:
==> HD_Pro_Webcam_C920
==> Arducam_OV9281_USB_Camera
```
Add charuco calibration to photonvision. Currently does not support generating custom charuco boards. This does not support https://calib.io/pages/camera-calibration-pattern-generator. Currently only supports the 4X4_50 family. Also removes all dotboard calibration. Fixes using the lowest possible fps while doing calibration (now uses the highest fps available for each resolution).
Fixes bug where switching tabs/etc causes buildup of connected mjpg streams in network, eventually slowing down streams and causing stream failure until refresh. Accomplishes this by directly setting the source of stream elements to null before unmount, allowing chrome/edge to close the connection.
Fixes#1106
With the latest dev opi image, i saw this stack trace when object detection stopped working (threads hanging forever on detect(). The stack pointed me to somewhere inside the RGA. Based on this i moved resize into CPU (as our [native code already is lazy](6934abb26c/src/main/native/cpp/yolo_common.cpp (L227))), and was not able to see more crashes
[message.txt](https://github.com/PhotonVision/photonvision/files/14630158/message.txt)
Includes also a quick hack to add a shutdown hook that releases pipelines at exit.
* Disable camera orientation option when camera is calibrated.
* Flip logic on if camera is calibrated when disabling camera orientation rotation
* Add comment on why orientation is disabled when camera is calibrated
* Add v banner warning regarding rotating calibrated camera bug
* Run lint
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
- Fix CameraInfo equality check (which prevents the same camera on a new usb port from being enumerated by us)
- Fix warning prints
- Make matchCamerasOnlyByPath apply to Windows
- Add unit tests
Our current code matches cameras in this order (which I think is objectively wrong and stupid)
- by-id (/dev/v4l/by-id/product-string)
- by path (/dev/videoN)
- product string/name, but ascii only
- asks cscore to reconnect to cameras using `path`, which on linux is actually /dev/videoN. This isn't guaranteed to stick to a camera if you replug them weirdly at runtime.
This is silly and does not consider the actual physical usb port. I propose instead, in this order:
- By physical usb port path and base name
- by physical usb port path and USB VID/PID
- By base name only (with a toggle switch to disable this, and create a new VisionModule instead)
- Give cscore /dev/video/by-path on Linux systems, pinning Photon USBCameras to a particular usb port once created.
This changes lots of things so stay paranoid!
* Sort object detection results and reduce code dup.
* Filter objdet results by ratio and area
* Address code review
---------
Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
* Fixed cpp sim apriltag layout and cleaned up cpp sim example
* changed layout for photoncamerasim
---------
Co-authored-by: Drew Williams <DrewW@iARx.com>
fixed the unpacking order to match the current pipelineresult data layout.
* fix positioning of multitarget struct in pipelineresult unpack
* fix encode order in PhotonPipelineResult.cpp
* commented controls that should depend on networkingIsDisabled
* add the thing
* fix Manage Device Networking showing disabled
* commented controls that should depend on networkingIsDisabled
* add the thing
* fix Manage Device Networking showing disabled
* Hide the settings that aren't available when networking is disabled
* Update NetworkingCard.vue
* Update NetworkingCard.vue
---------
Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com>
Tested on Orange Pi 5 and Cool Pi 4B. Merge with parts of the OpenCV DNN PR.
Adds support for YOLOv5s models for Rockchip CPUs with a NPU. Right now hard coded to a note model from alex_idk. Very much still incubating and largely untested.
* [photon-lib java] Fix classes with protobuf support not "announcing it"
Since they didn't implement `ProtobufSerializable` this meant that most other software didn't even know protobufs were even implemented.
In AdvantageKit for example this would cause it to not work it all and crash.
* Run `spotlessJavaApply`
about: Something needs to be documented/updated in the documentation
title: ''
labels: documentation
assignees: ''
---
**Are you requesting documentation for a new feature, or updated documentation for an old feature?**
Put the feature you are requesting documentation for here, along with whether the documentation is stale and needs to be updated, or whether the documentation does not exist, and needs to be created.
**Where is it?**
Put the location of the documentation that needs to be updated here. If you're requesting documenation for a new feature, put where you think it should go.
**Additional context**
Add any other context or screenshots about the feature request here.
What changed? Why? (the code + comments should speak for itself on the "how")
Include fun testing screenshots or a cool video, to collect test evidence in a place where we can later reference it. Including proof this change was tested makes reviewing easier, helps us make sure we tested all our edge cases, and helps provide context for the future.
Any issues this pull request closes or pull requests this supersedes should be linked with `Closes #issuenumber`.
## Meta
Merge checklist:
- [ ] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes
- [ ] The description documents the _what_ and _why_, including events that led to this PR
- [ ] If this PR changes behavior or adds a feature, user documentation is updated
- [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends)
- [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
- [ ] If this PR adds a dependency, the license has been checked for compatibility and steps taken to follow it
PhotonVision is the free, fast, and easy-to-use computer vision solution for the *FIRST* Robotics Competition. You can read an overview of our features [on our website](https://photonvision.org). You can find our comprehensive documentation [here](https://docs.photonvision.org).
A copy of the latest Raspberry Pi image is available [here](https://github.com/PhotonVision/photon-pi-gen/releases). A copy of the latest standalone JAR is available [here](https://github.com/PhotonVision/photonvision/releases). If you are a Gloworm user you can find the latest Gloworm image [here](https://github.com/gloworm-vision/pi-gen/releases).
The latest release of platform-specific jars and images is found [here](https://github.com/PhotonVision/photonvision/releases).
If you are interested in contributing code or documentation to the project, please [read our getting started page for contributors](https://docs.photonvision.org/en/latest/docs/contributing/index.html) and **[join the Discord](https://discord.gg/wYxTwym) to introduce yourself!** We hope to provide a welcoming community to anyone who is interested in helping.
## Documentation
- Our main documentation page: [docs.photonvision.org](https://docs.photonvision.org)
Gradle is used for all C++ and Java code, and pnpm is used for the web UI. Instructions to compile PhotonVision yourself can be found [in our docs](https://docs.photonvision.org/en/latest/docs/contributing/building-photon.html#compiling-instructions).
You can run one of the many built in examples straight from the command line, too! They contain a fully featured robot project, and some include simulation support. The projects can be found inside the [`photonlib-java-examples`](photonlib-java-examples) and [`photonlib-cpp-examples`](photonlib-cpp-examples) subdirectories, respectively. Instructions for running these examples directly from the repo are found [in the docs](https://docs.photonvision.org/en/latest/docs/contributing/building-photon.html#running-examples).
## Gradle Arguments
Note that these are case sensitive!
*`-PArchOverride=foobar`: builds for a target system other than your current architecture. Valid overrides are:
*linuxathena
*linuxarm32
*`-PArchOverride=foobar`: builds for a target system other than your current architecture. [Valid overrides](https://github.com/wpilibsuite/wpilib-tool-plugin/blob/main/src/main/java/edu/wpi/first/tools/NativePlatforms.java) are:
*winx64
*winarm64
* macx64
* macarm64
* linuxx64
* linuxarm64
*arm32
* arm64
* x86-64
* x86
-`-PtgtIp`: Specifies where `./gradlew deploy` should try to copy the fat JAR to
*linuxathena
-`-PtgtIP`: Specifies where `./gradlew deploy` should try to copy the fat JAR to
-`-PtgtUser`: Specifies custom username for `./gradlew deploy` to SSH into
-`-PtgtPw`: Specifies custom password for `./gradlew deploy` to SSH into
-`-Pprofile`: enables JVM profiling
-`-PwithSanitizers`: On Linux, enables `-fsanitize=address,undefined,leak`
## Building
Gradle is used for all C++ and Java code, and NPM is used for the web UI. Instructions to compile PhotonVision yourself can be found [in our docs](https://docs.photonvision.org/en/latest/docs/contributing/photonvision/build-instructions.html?highlight=npm%20install#compiling-instructions).
You can run one of the many built in examples straight from the command line, too! They contain a fully featured robot project, and some include simulation support. The projects can be found inside the `photonlib-java-examples` and `photonlib-cpp-examples` subdirectories, respectively. The projects currently available include:
- photonlib-java-examples:
- aimandrange:simulateJava
- aimattarget:simulateJava
- getinrange:simulateJava
- simaimandrange:simulateJava
- simposeest:simulateJava
- photonlib-cpp-examples:
- aimandrange:simulateNative
- getinrange:simulateNative
To run them, use the commands listed below. Photonlib must first be published to your local maven repository, then the `copyPhotonlib` task will copy the generated vendordep json file into each example. After that, the simulateJava/simulateNative task can be used like a normal robot project. Robot simulation with attached debugger is technically possible by using simulateExternalJava and modifying the launch script it exports, though unsupported.
If you're cross-compiling, you'll need the WPILib toolchain installed. This must be done via Gradle: for example `./gradlew installArm64Toolchain` or `./gradlew installRoboRioToolchain`
## Out-of-Source Dependencies
PhotonVision uses the following additonal out-of-source repositories for building code.
PhotonVision uses the following additional out-of-source repositories for building code.
- Base system images for Raspberry Pi & Orange Pi: https://github.com/PhotonVision/photon-image-modifier
- Base system images for supported coprocessors: https://github.com/PhotonVision/photon-image-modifier
- C++ driver for Raspberry Pi CSI cameras: https://github.com/PhotonVision/photon-libcamera-gl-driver
- JNI code for [mrcal](https://mrcal.secretsauce.net/): https://github.com/PhotonVision/mrcal-java
-Custom build of OpenCV with GStreamer/Protobuf/other custom flags: https://github.com/PhotonVision/thirdparty-opencv
- JNI code for aruco-nano: https://github.com/PhotonVision/aruconano-jni
-JNI code for RKNN: https://github.com/PhotonVision/rknn_jni
- JNI code for Rubik Pi NPU: https://github.com/PhotonVision/rubik_jni
## Acknowledgments
PhotonVision was forked from [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/). Thank you to everyone who worked on the original project.
* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv).
* [Apache Commons](https://commons.apache.org/) - Specifically [Commons Math](https://commons.apache.org/proper/commons-math/), and [Commons Lang](https://commons.apache.org/proper/commons-lang/)
* [WPILib](https://github.com/wpilibsuite) - Specifically [allwpilib](https://github.com/wpilibsuite/allwpilib) and [their build of OpenCV](https://github.com/wpilibsuite/thirdparty-opencv).
* [Apache Commons](https://commons.apache.org/) - Specifically [Commons IO](https://commons.apache.org/proper/commons-io/), and [Commons CLI](https://commons.apache.org/proper/commons-cli/)
This page you were looking for was not found. If you think this is a mistake, [file an issue on our GitHub.](https://github.com/PhotonVision/photonvision-docs/issues)
- Ensure you have spares of the relevant electronics if you can afford it (switch, coprocessor, cameras, etc.).
- Stay on the latest version of PhotonVision until you have tested your full robot system to be functional.
- Some time before the competition, lock down the version you are using and do not upgrade unless you encounter a critical bug.
- Have a copy of the installation image for the version you are using on your programming laptop, in case re-imaging (without internet) is needed.
- Extensively test at your home setup. Practice tuning from scratch under different lighting conditions.
- Confirm you have followed all the recommendations under the {ref}`Networking<docs/quick-start/networking:Networking>` documentation (network switch and static IP).
- Only use high quality ethernet cables that have been rigorously tested.
## Camera Streaming
- All camera streams are published under the NetworkTables table `CameraPublisher`.
- The only subtable under `CameraPublisher` that will work for viewing a driver mode camera stream is the one that contains `Output` in the name.
- To view a camera stream in a dashboard, drag the correct subtable from the NetworkTables tree into your dashboard.
- Use the latest driver dashboard recommended by [WPILib](https://docs.wpilib.org/en/stable/docs/software/dashboards/dashboard-intro.html) on your driver station laptop.
## During the Competition
- Use the field calibration time given at the start of the event:
- Bring your robot to the field at the allotted time.
- Make sure the field has match-accurate lighting conditions active.
- Turn on your robot and pull up the dashboard on your driver station.
- Point your robot at the targets and ensure you get a consistent tracking (you hold one targets consistently, the ceiling lights aren't detected, etc.).
- If you have problems with your pipeline, retune the pipeline following the {ref}`camera tuning <docs/pipelines/input:Camera Tuning / Input>` documentation.
- Move the robot close, far, angled, and around the field to ensure no extra targets are found.
- Monitor camera feeds during a practice match to ensure everything is working correctly.
- After field calibration, use the "Export Settings" button in the "Settings" page to create a backup.
- Do this for each coprocessor on your robot that runs PhotonVision, and name your exports with meaningful names.
- This will contain camera information/calibration, pipeline information, network settings, etc.
- In the event of software/hardware failures (IE lost SD Card, broken device), you can then use the "Import Settings" button and select "All Settings" to restore your settings.
- This effectively works as a snapshot of your PhotonVision data that can be restored at any point.
- Before every match:
- Check the ethernet and USB connectors are seated fully.
- Close streaming dashboards when you don't need them to reduce bandwidth.
- Stream at as low of a resolution as possible while still detecting AprilTags to stay within field bandwidth limits.
PhotonVision stores and loads settings in the {code}`photonvision_config` directory, in the same folder as the PhotonVision JAR is stored. On supported hardware, this is in the {code}`/opt/photonvision` directory. The contents of this directory can be exported as a zip archive from the settings page of the interface, under "export settings". This export will contain everything detailed below. These settings can later be uploaded using "import settings", to restore configurations from previous backups.
## Directory Structure
The directory structure is outlined below.
```{image} images/configDir.png
:alt: Config directory structure
:width: 600
```
- calibImgs
- Images saved from the last run of the calibration routine
- cameras
- Contains a subfolder for each camera. This folder contains the following files:
- pipelines folder, which contains a {code}`json` file for each user-created pipeline.
- config.json, which contains all camera-specific configuration. This includes FOV, pitch, current pipeline index, and calibration data
- drivermode.json, which contains settings for the driver mode pipeline
- imgSaves
- Contains images saved with the input/output save commands.
- logs
- Contains timestamped logs in the format {code}`photonvision-YYYY-MM-D_HH-MM-SS.log`. These timestamps will likely be significantly behind the real time. Coprocessors on the robot have no way to get current time.
- hardwareSettings.json
- Contains hardware settings. Currently this includes only the LED brightness.
- networkSettings.json
- Contains network settings, including team number (or remote network tables address), static/dynamic settings, and hostname.
## Importing and Exporting Settings
The entire settings directory can be exported as a ZIP archive from the settings page.
PhotonVision interfaces with PhotonLib, our vendor dependency, using NetworkTables. If you are running PhotonVision on a robot (ie. with a RoboRIO), you should **turn the NetworkTables server switch (in the settings tab) off** in order to get PhotonLib to work. Also ensure that you set your team number. **The NetworkTables server should only be enabled if you know what you're doing!**
:::
## API
:::{warning}
NetworkTables is not a supported setup/viable option when using PhotonVision as we only send one target at a time (this is problematic when using AprilTags, which will return data from multiple tags at once).
**We strongly recommend using PhotonLib instead, as the NetworkTables API will most likely be removed in 2027.**
:::
The tables below contain the the name of the key for each entry that PhotonVision sends over the network and a short description of the key. The entries should be extracted from a subtable with your camera's nickname (visible in the PhotonVision UI) under the main `photonvision` table.
| `ledMode` | `int` | Sets the LED Mode (-1: default, 0: off, 1: on, 2: blink) |
:::{warning}
Setting the LED mode to -1 (default) when `multiple` cameras are connected may result in unexpected behavior. {ref}`This is a known limitation of PhotonVision. <docs/troubleshooting/common-errors:LED Control>`
Single camera operation should work without issue.
This page will help you install PhotonVision on non-supported coprocessor.
## Step 1: Software Install
This section will walk you through how to install PhotonVision on your coprocessor. Your coprocessor is the device that has the camera and you are using to detect targets (ex. if you are using a Limelight / Raspberry Pi, that is your coprocessor and you should follow those instructions).
:::{warning}
You only need to install PhotonVision on the coprocessor/device that is being used to detect targets, you do NOT need to install it on the device you use to view the webdashboard. All you need to view the webdashboard is for a device to be on the same network as your vision coprocessor and an internet browser.
Pre-release/development version of PhotonVision can be tested by installing/downloading artifacts from Github Actions (see below), which are built automatically on commits to open pull requests and to PhotonVision's `main` branch, or by {ref}`compiling PhotonVision locally <docs/contributing/building-photon:Build Instructions>`.
:::{warning}
If testing a pre-release version of PhotonVision with a robot, PhotonLib must be updated to match the version downloaded! If not, packet schema definitions may not match and unexpected things will occur. To update PhotonLib, refer to {ref}`installing specific version of PhotonLib<docs/programming/photonlib/adding-vendordep:Install Specific Version - Java/C++>`.
:::
GitHub Actions builds pre-release version of PhotonVision automatically on PRs and on each commit merged to main. To test a particular commit to main, navigate to the [PhotonVision commit list](https://github.com/PhotonVision/photonvision/commits/main/) and click on the check mark (below). Scroll to "Build / Build fat JAR - PLATFORM", click details, and then summary. From here, JAR and image files can be downloaded to be flashed or uploaded using "Offline Update".
```{image} images/gh_actions_1.png
:alt: Github Actions Badge
```
```{image} images/gh_actions_2.png
:alt: Github Actions artifact list
```
Built JAR files (but not image files) can also be downloaded from PRs before they are merged. Navigate to the PR in GitHub, and select Checks at the top. Click on "Build" to display the same artifact list as above.
PhotonVision exposes some command line options which may be useful for customizing execution on Debian-based installations.
## Running a JAR File
Assuming `java` has been installed, and the appropriate environment variables have been set upon installation (a package manager like `apt` should automatically set these), you can use `java -jar` to run a JAR file. If you downloaded the latest stable JAR of PhotonVision from the [GitHub releases page](https://github.com/PhotonVision/photonvision/releases), you can run the following to start the program:
```bash
java -jar /path/to/photonvision/photonvision.jar
```
## Updating a JAR File
When you need to update your JAR file, run the following:
```bash
wget https://git.io/JqkQ9 -O update.sh
sudo chmod +x update.sh
sudo ./update.sh
sudo reboot now
```
## Creating a `systemd` Service
You can also create a systemd service that will automatically run on startup. To do so, first navigate to `/lib/systemd/system`. Create a file called `photonvision.service` (or name it whatever you want) using `touch photonvision.service`. Then open this file in the editor of your choice and paste the following text:
```
[Unit]
Description=Service that runs PhotonVision
[Service]
WorkingDirectory=/path/to/photonvision
# Optional: run photonvision at "nice" -10, which is higher priority than standard
Then copy the `.service` file to `/etc/systemd/system/` using `cp photonvision.service /etc/systemd/system/photonvision.service`. Then modify the file to have `644` permissions using `chmod 644 /etc/systemd/system/photonvision.service`.
:::{note}
Many ARM processors have a big.LITTLE architecture where some of the CPU cores are more powerful than others. On this type of architecture, you may get more consistent performance by limiting which cores PhotonVision can use. To do this, add the parameter `AllowedCPUs` to the systemd service file in the `[Service]` section.
For instance, for an Orange Pi 5, cores 4 through 7 are the fast ones, and you can target those cores with the line `AllowedCPUs=4-7`.
:::
## Installing the `systemd` Service
To install the service, simply run `systemctl enable photonvision.service`.
:::{note}
It is recommended to reload configurations by running `systemctl daemon-reload`.
PhotonVision may be run on a Debian-based Linux Desktop PC for basic testing and evaluation.
:::{note}
You do not need to install PhotonVision on a Windows PC in order to access the webdashboard (assuming you are using an external coprocessor like a Raspberry Pi).
:::
## Installing Java
PhotonVision requires a JDK installed and on the system path. JDK 17 is needed (different versions will not work). If you don't have JDK 17 already, run the following to install it:
```
$ sudo apt-get install openjdk-17-jdk
```
:::{warning}
Using a JDK other than JDK17 will cause issues when running PhotonVision and is not supported.
:::
## Downloading the Latest Stable Release of PhotonVision
Go to the [GitHub releases page](https://github.com/PhotonVision/photonvision/releases) and download the relevant .jar file for your coprocessor.
:::{note}
If your coprocessor has a 64 bit ARM based CPU architecture (OrangePi, Raspberry Pi, etc.), download the LinuxArm64.jar file.
If your coprocessor has an 64 bit x86 based CPU architecture (Mini PC, laptop, etc.), download the Linuxx64.jar file.
:::
:::{warning}
Be careful to pick the latest stable release. "Draft" or "Pre-Release" versions are not stable and often have bugs.
:::
## Running PhotonVision
To run PhotonVision, open a terminal window of your choice and run the following command:
If your computer has a compatible webcam connected, PhotonVision should startup without any error messages. If there are error messages, your webcam isn't supported or another issue has occurred. If it is the latter, please open an issue on the [PhotonVision issues page](https://github.com/PhotonVision/photonvision/issues).
## Accessing the PhotonVision Interface
Once the Java backend is up and running, you can access the main vision interface by navigating to `localhost:5800` inside your browser.
Due to current [cscore](https://github.com/wpilibsuite/allwpilib/tree/main/cscore) restrictions, the PhotonVision server backend may have issues running macOS.
:::
:::{note}
You do not need to install PhotonVision on a Mac in order to access the webdashboard (assuming you are using an external coprocessor like a Raspberry Pi).
:::
VERY Limited macOS support is available.
## Installing Java
PhotonVision requires a JDK installed and on the system path. JDK 17 is needed (different versions will not work). You may already have this if you have installed WPILib 2026+. If not, [download and install it from here](https://adoptium.net/temurin/releases?version=17).
:::{warning}
Using a JDK other than JDK17 will cause issues when running PhotonVision and is not supported.
:::
## Downloading the Latest Stable Release of PhotonVision
Go to the [GitHub releases page](https://github.com/PhotonVision/photonvision/releases) and download the relevant .jar file for your coprocessor.
:::{note}
If you have an M Series Mac, download the macarm64.jar file.
If you have an Intel based Mac, download the macx64.jar file.
:::
:::{warning}
Be careful to pick the latest stable release. "Draft" or "Pre-Release" versions are not stable and often have bugs.
:::
## Running PhotonVision
To run PhotonVision, open a terminal window of your choice and run the following command:
Due to current [cscore](https://github.com/wpilibsuite/allwpilib/tree/main/cscore) restrictions, the PhotonVision using test mode is all that is known to work currently.
:::
## Accessing the PhotonVision Interface
Once the Java backend is up and running, you can access the main vision interface by navigating to `localhost:5800` inside your browser.
:::{warning}
Due to current [cscore](https://github.com/wpilibsuite/allwpilib/tree/main/cscore) restrictions, it is unlikely any streams will open from real webcams.
Working with unsupported coprocessors requires some level of "know how" of your system. The install script has only been tested on Debian/Raspberry Pi OS Buster and Ubuntu Bionic. If any issues arise with your specific OS, please open an issue on our [issues page](https://github.com/PhotonVision/photonvision/issues).
:::
:::{note}
We'd love to have your input! If you get PhotonVision working on another coprocessor, consider documenting your steps and submitting a [docs issue](https://github.com/PhotonVision/photonvision-docs/issues)., [pull request](https://github.com/PhotonVision/photonvision-docs/pulls) , or [ping us on Discord](https://discord.com/invite/wYxTwym). For example, Limelight and Romi install instructions came about because someone spent the time to figure it out, and did a writeup.
:::
## Installing PhotonVision
We provide an [install script](https://git.io/JJrEP) for other Debian-based systems (with `apt`) that will automatically install PhotonVision and make sure that it runs on startup.
```bash
$ wget https://git.io/JJrEP -O install.sh
$ sudo chmod +x install.sh
$ sudo ./install.sh
$ sudo reboot now
```
:::{note}
Your co-processor will require an Internet connection for this process to work correctly.
:::
For installation on any other co-processors, we recommend reading the {ref}`advanced command line documentation <docs/advanced-installation/sw_install/advanced-cmd:Advanced Command Line Usage>`.
## Updating PhotonVision
PhotonVision can be updated by downloading the latest jar file, copying it onto the processor, and restarting the service.
For example, from another computer, run the following commands. Substitute the correct username for "\[user\]" ( Provided images use username "pi")
The [Romi](https://docs.wpilib.org/en/latest/docs/romi-robot/index.html) is a small robot that can be controlled with the WPILib software. The main controller is a Raspberry Pi that must be imaged with [WPILibPi](https://docs.wpilib.org/en/latest/docs/romi-robot/imaging-romi.html) .
## Installation
The WPILibPi image includes FRCVision, which reserves USB cameras; to use PhotonVision, we need to edit the `/home/pi/runCamera` script to disable it. First we will need to make the file system writeable; the easiest way to do this is to go to `10.0.0.2` and choose "Writable" at the top.
SSH into the Raspberry Pi (using Windows command line, or a tool like [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/) ) at the Romi's default address `10.0.0.2`. The default user is `pi`, and the password is `raspberry`.
:::.. The following paragraph can be restored when WPILibPi becomes compatible with the current version of PhotonVision.
:::.. Follow the process for installing PhotonVision on {ref}`"Other Debian-Based Co-Processor Installation" <docs/advanced-installation/sw_install/other-coprocessors:Other Debian-Based Co-Processor Installation>`. As it mentions, this will require an internet connection so connecting the Raspberry Pi to an internet-connected router via an Ethernet cable will be the easiest solution. The pi must remain writable while you are following these steps!
:::..Temporary instructions explaining how to install the older version of PhotonVision on a Romi. Remove when no longer needed.
:::{attention}
The version of WPILibPi for the Romi is 2023.2.1, which is not compatible with the current version of PhotonVision. **If you are using WPILibPi 2023.2.1 on your Romi, you must install PhotonVision v2023.4.2 or earlier!**
To install a compatible version of PhotonVision, enter these commands in the SSH terminal connected to the Raspberry Pi. This will download and run the install script, which will install PhotonVision on your Raspberry Pi and configure it to run at startup.
```bash
$ wget https://git.io/JJrEP -O install.sh
$ sudo chmod +x install.sh
$ sudo ./install.sh -v v2023.4.2
```
The install script requires an internet connection, so connecting the Raspberry Pi to an internet-connected router via an Ethernet cable will be the easiest solution. The pi must remain writable while you are following these steps!
:::
:::..End of temporary instructions.
Next, from the SSH terminal, run `sudo nano /home/pi/runCamera` then arrow down to the start of the exec line and press "Enter" to add a new line. Then add `#` before the exec command to comment it out. Then, arrow up to the new line and type `sleep 10000`. Hit "Ctrl + O" and then "Enter" to save the file. Finally press "Ctrl + X" to exit nano. Now, reboot the Romi by typing `sudo reboot now`.
```{image} images/nano.png
```
After the Romi reboots, you should be able to open the PhotonVision UI at: [`http://10.0.0.2:5800/`](http://10.0.0.2:5800/). From here, you can adjust settings and configure {ref}`Pipelines <docs/pipelines/index:Pipelines>`.
:::{warning}
In order for settings, logs, etc. to be saved / take effect, ensure that PhotonVision is in writable mode.
:::
:::{attention}
When using an older version of PhotonVision, the user interface and features may be different than what appears in the online documentation. The [Documentation](http://10.0.0.2:5800/#/docs) link in the User Interface will open a bundled version of the documentation that matches the PhotonVision version running on your coprocessor.
PhotonVision may be run on a Windows Desktop PC for basic testing and evaluation.
:::{note}
You do not need to install PhotonVision on a Windows PC in order to access the webdashboard (assuming you are using an external coprocessor like a Raspberry Pi).
:::
## Install Bonjour
Bonjour provides more stable networking when using Windows PCs. Install [Bonjour here](https://support.apple.com/downloads/DL999/en_US/BonjourPSSetup.exe) before continuing to ensure a stable experience while using PhotonVision.
## Installing Java
PhotonVision requires a JDK installed and on the system path. **JDK 17 is needed.** You may already have it if you installed WPILib, but ensure that running `java -version` shows JDK 17. You will likely have to add WPILib's JDK to JAVA_HOME and the JDK's `bin` directory to PATH. If you do not have a JDK 17 install, [download and install it from here.](https://adoptium.net/temurin/releases?version=17)
## Downloading the Latest Stable Release of PhotonVision
Go to the [GitHub releases page](https://github.com/PhotonVision/photonvision/releases) and download the winx64.jar file.
## Running PhotonVision
To run PhotonVision, open a terminal window of your choice and run the following command:
```
> java -jar C:\path\to\photonvision\NAME OF JAR FILE GOES HERE.jar
```
If your computer has a compatible webcam connected, PhotonVision should startup without any error messages. If there are error messages, your webcam isn't supported or another issue has occurred. If it is the latter, please open an issue on the [PhotonVision issues page](https://github.com/PhotonVision/photonvision/issues).
:::{warning}
Using an integrated laptop camera may cause issues when trying to run PhotonVision. If you are unable to run PhotonVision on a laptop with an integrated camera, try disabling the camera's driver in Windows Device Manager.
:::
## Accessing the PhotonVision Interface
Once the Java backend is up and running, you can access the main vision interface by navigating to `localhost:5800` inside your browser.
Before you get started tracking AprilTags, ensure that you have followed the previous sections on installation, wiring and networking. Next, open the Web UI, go to the top right card, and switch to the "AprilTag" or "ArUco" type. You should see a screen similar to the one below.
```{image} images/apriltag.png
:align: center
```
You are now able to detect and track AprilTags in 2D (yaw, pitch, roll, etc.). In order to get 3D data from your AprilTags, please see {ref}`here. <docs/apriltag-pipelines/3D-tracking:3D Tracking>`
## Tuning AprilTags
AprilTag pipelines come with reasonable defaults to get you up and running with tracking. However, in order to optimize your performance and accuracy, you must tune your AprilTag pipeline using the settings below. Note that the settings below are different between the AprilTag and ArUco detectors but the concepts are the same.
```{image} images/apriltag-tune.png
:align: center
:scale: 45 %
```
### Target Family
Target families are defined by two numbers (before and after the h). The first number is the number of bits the tag is able to encode (which means more tags are available in the respective family) and the second is the hamming distance. Hamming distance describes the ability for error correction while identifying tag ids. A high hamming distance generally means that it will be easier for a tag to be identified even if there are errors. However, as hamming distance increases, the number of available tags decreases.
The 2026 FRC game will be using 36h11 tags, which can be found [here](https://github.com/AprilRobotics/apriltag-imgs/tree/2bc821edb4eb7b408d13c6a590d326d8a9ec98f3/tag36h11).
### Decimate
Decimation (also known as down-sampling) is the process of reducing the sampling frequency of a signal (in our case, the image). Increasing decimate will lead to an increased detection rate while decreasing detection distance. We recommend keeping this at the default value.
### Blur
This controls the sigma of Gaussian blur for tag detection. In clearer terms, increasing blur will make the image blurrier, decreasing it will make it closer to the original image. We strongly recommend that you keep blur to a minimum (0) due to it's high performance intensity unless you have an extremely noisy image.
### Threads
Threads refers to the threads within your coprocessor's CPU. The theoretical maximum is device dependent, but we recommend that users to stick to one less than the amount of CPU threads that your coprocessor has. Increasing threads will increase performance at the cost of increased CPU load, temperature increase, etc. It may take some experimentation to find the most optimal value for your system.
### Refine Edges
The edges of the each polygon are adjusted to "snap to" high color differences surrounding it. It is recommended to use this in tandem with decimate as it can increase the quality of the initial estimate.
### Pose Iterations
Pose iterations represents the amount of iterations done in order for the AprilTag algorithm to converge on its pose solution(s). A smaller number between 0-100 is recommended. A smaller amount of iterations cause a more noisy set of poses when looking at the tag straight on, while higher values much more consistently stick to a (potentially wrong) pair of poses. WPILib contains many useful filter classes in order to account for a noisy tag reading.
### Max Error Bits
Max error bits, also known as hamming distance, is the number of positions at which corresponding pieces of data / tag are different. Put more generally, this is the number of bits (think of these as squares in the tag) that need to be changed / corrected in the tag to correctly detect it. A higher value means that more tags will be detected while a lower value cuts out tags that could be "questionable" in terms of detection.
We recommend a value of 0 for the 16h5 and at most 3 for the 36h11 family.
### Decision Margin Cutoff
The decision margin cutoff is how much “margin” the detector has left before it rejects a tag; increasing this rejects poorer tags. We recommend you keep this value around a 30.
3D AprilTag tracking will allow you to track the real-world position and rotation of a tag relative to the camera's image sensor. This is useful for robot pose estimation and other applications like autonomous scoring. In order to use 3D tracking, you must first {ref}`calibrate your camera <docs/calibration/calibration:Calibrating Your Camera>`. Once you have, you need to enable 3D mode in the UI and you will now be able to get 3D pose information from the tag! For information on getting and using this information in your code, see {ref}`the programming reference <docs/programming/index:Programming Reference>`.
## Ambiguity
Translating from 2D to 3D using data from the calibration and the four tag corners can lead to "pose ambiguity", where it appears that the AprilTag pose is flipping between two different poses. You can read more about this issue [here](https://docs.wpilib.org/en/stable/docs/software/vision-processing/apriltag/apriltag-intro.html#d-to-3d-ambiguity). Ambiguity is calculated as the ratio of reprojection errors between two pose solutions (if they exist), where reprojection error is the error corresponding to the image distance between where the apriltag's corners are detected vs where we expect to see them based on the tag's estimated camera relative pose.
There are a few steps you can take to resolve/mitigate this issue:
1. Mount cameras at oblique angles so it is less likely that the tag will be seen straight on.
2. Use the {ref}`MultiTag system <docs/apriltag-pipelines/multitag:MultiTag Localization>` in order to combine the corners from multiple tags to get a more accurate and unambiguous pose.
3. Reject all tag poses where the ambiguity ratio (available via PhotonLib) is greater than 0.2.
AprilTags are a common type of visual fiducial marker. Visual fiducial markers are artificial landmarks added to a scene to allow "localization" (finding your current position) via images. In simpler terms, tags mark known points of reference that you can use to find your current location. They are similar to QR codes in which they encode information, however, they hold only a single number. By placing AprilTags in known locations around the field and detecting them using PhotonVision, you can easily get full field localization / pose estimation. Alternatively, you can use AprilTags the same way you used retroreflective tape, simply using them to turn to goal without any pose estimation.
A more technical explanation can be found in the [WPILib documentation](https://docs.wpilib.org/en/latest/docs/software/vision-processing/apriltag/apriltag-intro.html).
:::{note}
You can get FIRST's [official PDF of the targets used in 2026 here](https://firstfrc.blob.core.windows.net/frc2026/FieldAssets/2026-apriltag-images-user-guide.pdf).
PhotonVision follows the WPILib conventions for the robot and field coordinate systems, as defined [here](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/geometry/coordinate-systems.html).
You define the camera to robot transform in the robot coordinate frame.
## Camera Coordinate Frame
OpenCV by default uses x-left/y-down/z-out for camera transforms. PhotonVision applies a base rotation to this transformation to make robot to tag transforms more in line with the WPILib coordinate system. The x, y, and z axes are also shown in red, green, and blue in the 3D mini-map and targeting overlay in the UI.
- The origin is the focal point of the camera lens
- The x-axis points out of the camera
- The y-axis points to the left
- The z-axis points upwards
```{image} images/camera-coord.png
:align: center
:scale: 45 %
```
```{image} images/multiple-tags.png
:align: center
:scale: 45 %
```
## AprilTag Coordinate Frame
The AprilTag coordinate system is defined as follows, relative to the center of the AprilTag itself, and when viewing the tag as a robot would. Again, PhotonVision changes this coordinate system to be more in line with WPILib. This means that a robot facing a tag head-on would see a robot-to-tag transform with a translation only in x, and a rotation of 180 degrees about z. The tag coordinate system is also shown with x/y/z in red/green/blue in the UI target overlay and mini-map.
- The origin is the center of the tag
- The x-axis is normal to the plane the tag is printed on, pointing outward from the visible side of the tag.
- The y-axis points to the right
- The z-axis points upwards
```{image} images/apriltag-coords.png
:align: center
:scale: 45 %
```
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.