Skip to content
Draft

alpha 7 #2566

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
6ca7746
bump gradle and wpilib version
samfreund Jul 20, 2026
a1bd1a3
fix geometry3d proto path
samfreund Jul 20, 2026
f6778b8
c++ 23 expected
samfreund Jul 20, 2026
ab7c075
swap from fmtlib to stdlib/wpi::util::print.hpp
samfreund Jul 20, 2026
cb4708d
upgrade gradle deps
samfreund Jul 20, 2026
e46e8ca
gcc 16 babeeeeee
samfreund Jul 21, 2026
4233ea5
this should work?
samfreund Jul 21, 2026
5c02440
aha I think this does it
samfreund Jul 21, 2026
8e1bcfa
use gcc 14 in build
spacey-sooty Jul 21, 2026
0eacf71
Do for photonlib asw
spacey-sooty Jul 21, 2026
b9e5178
fix
spacey-sooty Jul 21, 2026
b16b8a0
fix playwright
spacey-sooty Jul 21, 2026
f2d616d
no more ewbuntu
samfreund Jul 21, 2026
44391bf
fix again
spacey-sooty Jul 21, 2026
8a25553
run through the x86
spacey-sooty Jul 21, 2026
99218a4
switch Gradle build to container
spacey-sooty Jul 21, 2026
fa043ac
run playwright in container
samfreund Jul 21, 2026
b8ff8f4
config git
samfreund Jul 21, 2026
1622073
try running playwright on 26
samfreund Jul 21, 2026
ca63112
no gcc 14
samfreund Jul 21, 2026
677c868
native smoketest on 26
samfreund Jul 21, 2026
327f47a
bump to new wpilib version
samfreund Jul 28, 2026
ef85119
fix hal initialization
samfreund Jul 28, 2026
09eb1b6
add NT publish upstream removed
samfreund Jul 28, 2026
beb84ec
more hal stuff
samfreund Jul 28, 2026
123128f
remove whitespace change
samfreund Jul 29, 2026
c26f0e7
python3 needed for container
samfreund Jul 29, 2026
e8a6187
remove unnecessary declare
samfreund Jul 29, 2026
2030041
break it alllllllllll
samfreund Jul 29, 2026
5f232ad
it does what it says, why comment
samfreund Jul 29, 2026
0e09f48
gah whatever
samfreund Jul 29, 2026
35f23dd
windows-latest
samfreund Jul 29, 2026
e5d2d4c
bad test, go to timeout
samfreund Jul 29, 2026
f1633b9
timeout 2 boogaloo
samfreund Jul 29, 2026
0f58680
hopefully stop hang
samfreund Jul 30, 2026
b29f6de
try 26.04
samfreund Jul 30, 2026
3dbbdd2
bump wpilib
samfreund Jul 30, 2026
4614354
well, wpilib needs to fix their infra
samfreund Jul 30, 2026
3b70f87
math.util.Pair --> util.Pair
samfreund Jul 30, 2026
95ad23f
spotless
samfreund Jul 30, 2026
ad262a2
bump wpilib ver
samfreund Jul 31, 2026
b99250d
rahhhh gcc 14 fix
samfreund Jul 31, 2026
a9dd730
alert got moved
samfreund Aug 3, 2026
5c8ba5c
damn it jade
samfreund Aug 3, 2026
f34a2a1
more alert shenanigans
samfreund Aug 3, 2026
99fceae
use dev image version
samfreund Aug 3, 2026
af7b223
that's dumb
samfreund Aug 3, 2026
5dc8270
remove redundant timeout
samfreund Aug 4, 2026
b111801
fix race thingy whatever
samfreund Aug 4, 2026
dbf12af
format
samfreund Aug 4, 2026
ff1af47
clean up workflow
samfreund Aug 4, 2026
f60d0ec
photonlib-py: migrate to snake_case API and bump robotpy to post4 (#2…
samfreund Aug 4, 2026
cde650d
well, here we go
samfreund Aug 4, 2026
f19a2ff
just make the field image null in frontend
samfreund Aug 5, 2026
a80f9e4
actually, let's just ditch all the stuff we don't neeed
samfreund Aug 5, 2026
011ce67
migration notes
samfreund Aug 5, 2026
dc106be
did stuff
samfreund Aug 5, 2026
81adc56
Merge branch 'catch2' into alpha-7
samfreund Aug 5, 2026
219df50
missed a merge
samfreund Aug 5, 2026
704a7aa
guess we need this too
samfreund Aug 5, 2026
b38fc83
new version
samfreund Aug 6, 2026
4af5302
Revert "fix race thingy whatever"
samfreund Aug 6, 2026
ebcdd01
Bump wpilib
samfreund Aug 6, 2026
bd99629
fix stuff
samfreund Aug 6, 2026
5da818a
another migration comment
samfreund Aug 6, 2026
c35e679
bah CI
samfreund Aug 7, 2026
9127ae6
new tag
samfreund Aug 8, 2026
7a5b97d
bah CI
samfreund Aug 8, 2026
b83c55b
Merge branch 'main' into alpha-7
samfreund Aug 9, 2026
bdfb5b0
bump
samfreund Aug 10, 2026
ddc13f3
lint
samfreund Aug 10, 2026
68dc7a6
Merge branch 'main' into alpha-7
samfreund Aug 10, 2026
bb29909
lint
samfreund Aug 10, 2026
e32e61c
Merge branch 'main' into alpha-7
samfreund Aug 11, 2026
193b07c
wpilib bump
samfreund Aug 12, 2026
5065a8e
bah CI
samfreund Aug 13, 2026
5220ea1
bump wpilib version
samfreund Aug 13, 2026
e5b0437
wpilib bump
samfreund Aug 16, 2026
d7e5219
Merge branch 'main' into alpha-7
samfreund Aug 17, 2026
5b1738f
wpilib bump
samfreund Aug 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 34 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# fail-fast: false
# matrix:
# include:
# - os: windows-2022
# - os: windows-latest
# artifact-name: Win64
# - os: macos-14
# artifact-name: macOS
Expand All @@ -39,12 +39,10 @@ jobs:
# needs: [build-photonlib-host, build-photonlib-docker]

# steps:
# - name: Checkout code
# uses: actions/checkout@v6
# - uses: actions/checkout@v6
# with:
# fetch-depth: 0
# - name: Fetch tags
# run: git fetch --tags --force
# - run: git fetch --tags --force
# - uses: actions/setup-java@v5
# with:
# java-version: 25
Expand Down Expand Up @@ -93,11 +91,11 @@ jobs:

playwright-tests:
name: "Playwright E2E tests"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
needs: [validation]
# container: wpilib/systemcore-cross-debian:trixie
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: 25
Expand Down Expand Up @@ -129,15 +127,15 @@ jobs:
retention-days: 30
build-gradle:
name: "Gradle Build"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
container: wpilib/systemcore-cross-debian:trixie
needs: [validation]
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- run: git config --global --add safe.directory /__w/photonvision/photonvision
- run: git fetch --tags --force
- uses: actions/setup-java@v5
with:
java-version: 25
Expand All @@ -153,9 +151,8 @@ jobs:
- name: Generate Java/cpp Serde Tests
working-directory: photon-serde
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python generate_messages.py --tests
pip install -r requirements.txt --break-system-packages
python3 generate_messages.py --tests
- name: Upload Java/cpp Serde Tests
uses: actions/upload-artifact@v7
with:
Expand Down Expand Up @@ -228,12 +225,10 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2022
artifact-name: Win64
- os: macos-26
artifact-name: macOS
- os: ubuntu-24.04
artifact-name: Linux
- os: windows-latest
artifact-name: Win64
- os: macos-26
artifact-name: macOS

name: "Photonlib - Build Host - ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -266,15 +261,15 @@ jobs:
fail-fast: false
matrix:
include:
- container: wpilib/systemcore-cross-ubuntu:2027-24.04
- container: wpilib/systemcore-cross-debian:trixie
artifact-name: SystemCore
build-options: "-Ponlylinuxsystemcore"
- container: wpilib/raspbian-cross-ubuntu:2027-bookworm-24.04
artifact-name: Raspbian
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:2027-bookworm-24.04
- container: wpilib/aarch64-cross-debian:trixie
artifact-name: Aarch64
build-options: "-Ponlylinuxarm64"
- container: wpilib/systemcore-cross-debian:trixie
artifact-name: Linux
build-options: "-Ponlylinuxx86-64"

runs-on: ubuntu-24.04
container: ${{ matrix.container }}
Expand Down Expand Up @@ -363,6 +358,11 @@ jobs:
- name: Install Arm64 Toolchain
run: ./gradlew installArm64Toolchain
if: ${{ (matrix.artifact-name) == 'LinuxArm64' }}
- name: Make GCC 14 the default toolchain (Linux)
if: runner.os == 'Linux'
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 200
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 200
- uses: actions/download-artifact@v8
with:
name: built-docs
Expand Down Expand Up @@ -403,7 +403,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2022
- os: windows-latest
artifact-name: Win
arch-override: winx86-64

Expand All @@ -419,14 +419,14 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
- os: ubuntu-26.04
artifact-name: photonvision-*-linuxx86-64.jar
extraOpts: -Djdk.lang.Process.launchMechanism=vfork
- os: windows-2022
- os: windows-latest
artifact-name: photonvision-*-winx86-64.jar
- os: macos-latest
artifact-name: photonvision-*-macarm64.jar
- os: ubuntu-24.04-arm
- os: ubuntu-26.04-arm
artifact-name: photonvision-*-linuxarm64.jar


Expand Down Expand Up @@ -462,11 +462,11 @@ jobs:
fi
echo "=== Second run ==="
java -jar ${{ matrix.extraOpts }} *.jar --smoketest
if: ${{ (matrix.os) != 'windows-2022' }}
if: ${{ (matrix.os) != 'windows-latest' }}
- run: |
ls *.jar | %{ Write-Host "Running $($_.Name)"; Start-Process "java" -ArgumentList "-jar `"$($_.FullName)`" --smoketest" -NoNewWindow -Wait; break }
ls *.jar | %{ Write-Host "Running $($_.Name)"; Start-Process "java" -ArgumentList "-jar `"$($_.FullName)`" --smoketest" -NoNewWindow -Wait; break }
if: ${{ (matrix.os) == 'windows-2022' }}
if: ${{ (matrix.os) == 'windows-latest' }}

build-image:
needs: [build-package-linux]
Expand Down Expand Up @@ -560,8 +560,7 @@ jobs:
name: "Build image - ${{ matrix.image_suffix }}"

steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/download-artifact@v8
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/photon-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ jobs:
needs: [validation]
runs-on: "ubuntu-24.04"
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- run: git fetch --tags --force
- uses: actions/setup-java@v5
with:
java-version: 25
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -46,8 +45,7 @@ jobs:
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -83,8 +81,7 @@ jobs:
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -137,8 +134,7 @@ jobs:

steps:

- name: Checkout code
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
id "cpp"
id "com.diffplug.spotless" version "8.1.0"
id "org.wpilib.WPILibRepositoriesPlugin" version "2027.0.0"
id 'org.wpilib.NativeUtils' version '2027.7.1' apply false
id 'org.wpilib.DeployUtils' version '2027.1.0' apply false
id 'org.wpilib.NativeUtils' version '2027.14.0' apply false
id 'org.wpilib.DeployUtils' version '2027.2.0' apply false
id 'org.photonvision.tools.WpilibTools' version 'v5.0.1'
id 'com.google.protobuf' version '0.9.5' apply false
id 'org.wpilib.GradleJni' version '2027.0.0'
Expand All @@ -31,12 +31,13 @@ ext.localMavenURL = file("$project.buildDir/outputs/maven")
ext.allOutputsFolder = file("$project.buildDir/outputs")

ext {
wpilibVersion = "2027.0.0-alpha-6"
wpilibVersion = "2027.0.0-alpha-6-340-g4d0dcdcc2"
mrclibVersion = "2027.1.0-alpha-1-91-gb154ee9"
openCVversion = "2027-4.13.0-3"
ejmlVersion = "0.43.1";
ejmlVersion = "0.46.0";
avajeJsonbVersion = "3.14";
msgpackVersion = "0.9.0";
quickbufVersion = "1.3.3";
quickbufVersion = "1.4";
jacocoVersion = "0.8.14";

javalinVersion = "6.7.0"
Expand Down Expand Up @@ -97,7 +98,7 @@ spotless {
}

wrapper {
gradleVersion = '9.4.0'
gradleVersion = '9.4.1'
}

ext.getCurrentArch = {
Expand Down
10 changes: 5 additions & 5 deletions docs/source/docs/programming/photonlib/robot-pose-estimator.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ For more information on how to methods to get AprilTag data, look {ref}`here <do

PhotonLib includes a `PhotonPoseEstimator` class, which allows you to combine the pose data from all tags in view in order to get a field relative pose. For each camera, a separate instance of the `PhotonPoseEstimator` class should be created.

## Creating an `AprilTagFieldLayout`
## Creating a `Field`

`AprilTagFieldLayout` is used to represent a layout of AprilTags within a space (field, shop at home, classroom, etc.). WPILib provides a JSON that describes the layout of AprilTags on the field which you can then use in the AprilTagFieldLayout constructor. You can also specify a custom layout.
A WPILib `Field` is used to represent a field containing a set of AprilTags (field, shop at home, classroom, etc.). WPILib provides a JSON that describes the layout of AprilTags on the field which you can then use in the `Field` constructor. You can also specify a custom layout.

The API documentation can be found in here: [Java](https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/apriltag/AprilTagFieldLayout.html), [C++](https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_april_tag_field_layout.html), and [Python](https://robotpy.readthedocs.io/projects/apriltag/en/stable/robotpy_apriltag/AprilTagFieldLayout.html#robotpy_apriltag.AprilTagFieldLayout).
The API documentation can be found in here: [Java](https://github.wpilib.org/allwpilib/docs/release/java/org/wpilib/fields/Field.html), [C++](https://github.wpilib.org/allwpilib/docs/release/cpp/classwpi_1_1fields_1_1_field.html), and [Python](https://robotpy.readthedocs.io/projects/fields/en/stable/robotpy_fields/Field.html#robotpy_fields.Field).

```{eval-rst}
.. tab-set-code::
Expand Down Expand Up @@ -48,7 +48,7 @@ Another necessary argument for creating a `PhotonPoseEstimator` is the `Transfor

## Creating a `PhotonPoseEstimator`

The PhotonPoseEstimator has a constructor that takes an `AprilTagFieldLayout` (see above) and `Transform3d`.
The PhotonPoseEstimator has a constructor that takes a `Field` (see above) and `Transform3d`.

```{eval-rst}
.. tab-set-code::
Expand Down Expand Up @@ -88,7 +88,7 @@ When taking in a result from a `PhotonCamera`, PhotonPoseEstimator offers nine p

- Coprocessor MultiTag (`estimateCoprocMultiTagPose`)
- Calculates a new robot position estimate by combining all visible tag corners. Recommended for all teams as it will be the most accurate.
- Must configure the AprilTagFieldLayout properly in the UI, please see {ref}`here <docs/apriltag-pipelines/multitag:multitag localization>` for more information.
- Must configure the field properly in the UI, please see {ref}`here <docs/apriltag-pipelines/multitag:multitag localization>` for more information.
- Lowest Ambiguity (`estimateLowestAmbiguityPose`)
- Choose the Pose with the lowest ambiguity.
- Closest to Camera Height (`estimateClosestToCameraHeightPose`)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/docs/simulation/simulation-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ To use simulated object detection, you must provide an objDetClassId (zero-index
visionSim.addVisionTargets(visionTarget);
```

For convenience, an `AprilTagFieldLayout` can also be added to automatically create a target for each of its AprilTags.
For convenience, a `Field` can also be added to automatically create a target for each of its AprilTags.

```{eval-rst}
.. tab-set-code::

.. code-block:: java

// The layout of AprilTags which we want to add to the vision system
AprilTagFieldLayout tagLayout = AprilTagFieldLayout.loadFromResource(AprilTagFields.kDefaultField.m_resourceFile);
Field tagLayout = Field.loadField(Fields.DEFAULT_FIELD);

visionSim.addAprilTags(tagLayout);
```
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 10 additions & 4 deletions photon-client/src/components/settings/ApriltagControlCard.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<script setup lang="ts">
import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
import type { Quaternion } from "@/types/PhotonTrackingTypes";
import type { FieldTag, Quaternion } from "@/types/PhotonTrackingTypes";
import { toDeg } from "@/lib/MathUtils";
import { computed } from "vue";
const { Euler, Quaternion: ThreeQuat } = await import("three");

const currentFieldLayout = computed(() => useSettingsStore().currentFieldLayout);
const fieldWidth = computed(() => currentFieldLayout.value["field-dimensions"].width);
const fieldLength = computed(() => currentFieldLayout.value["field-dimensions"].length);
const fieldTags = computed<FieldTag[]>(() => currentFieldLayout.value["field-tags"] ?? []);

const quaternionToEuler = (rot_quat: Quaternion): { x: number; y: number; z: number } => {
const quat = new ThreeQuat(rot_quat.X, rot_quat.Y, rot_quat.Z, rot_quat.W);
const euler = new Euler().setFromQuaternion(quat, "ZYX");
Expand All @@ -16,8 +22,8 @@ const quaternionToEuler = (rot_quat: Quaternion): { x: number; y: number; z: num
<v-card color="surface" class="rounded-12">
<v-card-title>AprilTag Field Layout</v-card-title>
<v-card-text class="pt-0">
<p>Field width: {{ useSettingsStore().currentFieldLayout.field.width.toFixed(2) }} meters</p>
<p>Field length: {{ useSettingsStore().currentFieldLayout.field.length.toFixed(2) }} meters</p>
<p>Field width: {{ fieldWidth.toFixed(2) }} meters</p>
<p>Field length: {{ fieldLength.toFixed(2) }} meters</p>

<!-- Simple table height must be set here and in the CSS for the fixed-header to work -->
<v-table fixed-header height="100%" density="compact">
Expand All @@ -34,7 +40,7 @@ const quaternionToEuler = (rot_quat: Quaternion): { x: number; y: number; z: num
</tr>
</thead>
<tbody>
<tr v-for="(tag, index) in useSettingsStore().currentFieldLayout.tags" :key="index">
<tr v-for="(tag, index) in fieldTags" :key="index">
<td>{{ tag.ID }}</td>
<td v-for="(val, idx) in Object.values(tag.pose.translation)" :key="idx">{{ val.toFixed(2) }}&nbsp;m</td>
<td v-for="(val, idx) in Object.values(quaternionToEuler(tag.pose.rotation.quaternion))" :key="idx + 4">
Expand Down
Loading
Loading