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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 58 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,48 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
build-examples:

strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
architecture: x64
- os: macos-14
architecture: aarch64
- os: ubuntu-22.04

name: "Photonlib - Build Examples - ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
needs: [validation]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- name: Install Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Install RoboRIO Toolchain
run: ./gradlew installRoboRioToolchain
# Need to publish to maven local first, so that C++ sim can pick it up
- name: Publish photonlib to maven local
run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check
- name: Build Java examples
working-directory: photonlib-java-examples
run: ./gradlew build
- name: Build C++ examples
working-directory: photonlib-cpp-examples
run: ./gradlew build
# build-examples:

# strategy:
# fail-fast: false
# matrix:
# include:
# - os: windows-2022
# architecture: x64
# - os: macos-14
# architecture: aarch64
# - os: ubuntu-24.04

# name: "Photonlib - Build Examples - ${{ matrix.os }}"
# runs-on: ${{ matrix.os }}
# needs: [validation]

# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Fetch tags
# run: git fetch --tags --force
# - name: Install Java 17
# uses: actions/setup-java@v4
# with:
# java-version: 17
# distribution: temurin
# - name: Install SystemCore Toolchain
# run: ./gradlew installSystemCoreToolchain
# # Need to publish to maven local first, so that C++ sim can pick it up
# - name: Publish photonlib to maven local
# run: ./gradlew photon-targeting:publishtomavenlocal photon-lib:publishtomavenlocal -x check
# - name: Build Java examples
# working-directory: photonlib-java-examples
# run: ./gradlew build
# - name: Build C++ examples
# working-directory: photonlib-cpp-examples
# run: ./gradlew build
build-gradle:
name: "Gradle Build"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [validation]
steps:
# Checkout code.
Expand All @@ -85,7 +85,7 @@ jobs:
with:
node-version: 22
- name: Install mrcal deps
run: sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
run: sudo add-apt-repository -y -S 'deb http://security.ubuntu.com/ubuntu jammy main universe' && sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
- name: Gradle Build
run: ./gradlew photon-targeting:build photon-core:build photon-server:build -x check
- name: Gradle Tests
Expand All @@ -94,7 +94,7 @@ jobs:
run: ./gradlew jacocoTestReport
build-offline-docs:
name: "Build Offline Docs"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -121,7 +121,7 @@ jobs:

build-photonlib-vendorjson:
name: "Build Vendor JSON"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [validation]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- os: macos-14
artifact-name: macOS
architecture: aarch64
- os: ubuntu-22.04
- os: ubuntu-24.04
artifact-name: Linux

name: "Photonlib - Build Host - ${{ matrix.artifact-name }}"
Expand All @@ -185,7 +185,7 @@ jobs:
name: Publish
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
if: github.event_name == 'push' && github.repository_owner == 'photonvision' && github.ref == 'refs/heads/main'
# Copy artifacts to build/outputs/maven
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts
- uses: actions/upload-artifact@v4
Expand All @@ -198,17 +198,17 @@ jobs:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2025-24.04
artifact-name: Athena
build-options: "-Ponlylinuxathena"
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
- container: wpilib/systemcore-cross-ubuntu:2025-24.04
artifact-name: SystemCore
build-options: "-Ponlylinuxsystemcore"
- container: wpilib/raspbian-cross-ubuntu:bookworm-24.04
artifact-name: Raspbian
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
- container: wpilib/aarch64-cross-ubuntu:bookworm-24.04
artifact-name: Aarch64
build-options: "-Ponlylinuxarm64"

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container: ${{ matrix.container }}
name: "Photonlib - Build Docker - ${{ matrix.artifact-name }}"
needs: [validation]
Expand All @@ -226,7 +226,7 @@ jobs:
run: ./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
if: github.event_name == 'push' && github.repository_owner == 'photonvision' && github.ref == 'refs/heads/main'
# Copy artifacts to build/outputs/maven
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts ${{ matrix.build-options }}
- uses: actions/upload-artifact@v4
Expand All @@ -237,7 +237,7 @@ jobs:
combine:
name: Combine
needs: [build-photonlib-docker, build-photonlib-host]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -278,11 +278,11 @@ jobs:
artifact-name: macOSArm
architecture: x64
arch-override: macarm64
- os: ubuntu-22.04
- os: ubuntu-24.04
artifact-name: Linux
architecture: x64
arch-override: linuxx64
- os: ubuntu-22.04
- os: ubuntu-24.04
artifact-name: LinuxArm64
architecture: x64
arch-override: linuxarm64
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
artifact-name: jar-Linux
extraOpts: -Djdk.lang.Process.launchMechanism=vfork
- os: windows-latest
Expand All @@ -360,6 +360,7 @@ jobs:
name: ${{ matrix.artifact-name }}
# On linux, install mrcal packages
- run: |
sudo add-apt-repository -y -S 'deb http://security.ubuntu.com/ubuntu jammy main universe'
sudo apt-get update
sudo apt-get install --yes libcholmod3 liblapack3 libsuitesparseconfig5
if: ${{ (matrix.os) == 'ubuntu-24.04' }}
Expand Down Expand Up @@ -557,7 +558,7 @@ jobs:
path: photonvision*.xz
release:
needs: [build-photonlib-vendorjson, build-package, build-image, build-rubik-image, combine]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
# Download all fat JARs
- uses: actions/download-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: gradle/actions/wrapper-validation@v4
wpiformat:
name: "wpiformat"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Fetch all history and metadata
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
javaformat:
name: "Java Formatting"
needs: [validation]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -64,7 +64,7 @@ jobs:
defaults:
run:
working-directory: photon-client
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/photon-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
defaults:
run:
working-directory: photon-client
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
Expand All @@ -52,7 +52,7 @@ jobs:
run_java_cpp_docs:
name: Build Java and C++ API Docs
needs: [validation]
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-24.04"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -77,7 +77,7 @@ jobs:
publish_api_docs:
name: Publish API Docs
needs: [run_java_cpp_docs]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
# Download docs artifact
- uses: actions/download-artifact@v4
Expand All @@ -104,7 +104,7 @@ jobs:
publish_demo:
name: Publish PhotonClient Demo
needs: [build_demo]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/photonvision-rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
build:
name: Build and Check Docs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
buildAndDeploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ photon-server/src/main/resources/web/*
node_modules
dist
components.d.ts
photon-server/src/main/resources/web/index.html
/workspace
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sphinx:
fail_on_warning: true

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
apt_packages:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Note that these are case sensitive!
- `-Pprofile`: enables JVM profiling
- `-PwithSanitizers`: On Linux, enables `-fsanitize=address,undefined,leak`

If you're cross-compiling, you'll need the wpilib toolchain installed. This can be done via Gradle: for example `./gradlew installArm64Toolchain` or `./gradlew installRoboRioToolchain`
If you're cross-compiling, you'll need the wpilib toolchain installed. This can be done via Gradle: for example `./gradlew installArm64Toolchain` or `./gradlew installSystemCoreToolchain`

## Out-of-Source Dependencies

Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import edu.wpi.first.toolchain.*
plugins {
id "cpp"
id "com.diffplug.spotless" version "6.24.0"
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
id "edu.wpi.first.GradleRIO" version "2025.3.2"
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2025.0"
id "edu.wpi.first.GradleRIO2027" version "2027.0.0-alpha-2"
id 'edu.wpi.first.WpilibTools' version '1.3.0'
id 'com.google.protobuf' version '0.9.3' apply false
id 'edu.wpi.first.GradleJni' version '1.1.0'
Expand All @@ -21,6 +21,7 @@ allprojects {
maven { url = "https://maven.photonvision.org/snapshots" }
maven { url = "https://jogamp.org/deployment/maven/" }
}
wpilibRepositories.use2027Repos()
wpilibRepositories.addAllReleaseRepositories(it)
wpilibRepositories.addAllDevelopmentRepositories(it)
}
Expand All @@ -32,15 +33,15 @@ ext.allOutputsFolder = file("$project.buildDir/outputs")
apply from: "versioningHelper.gradle"

ext {
wpilibVersion = "2025.3.2"
wpilibVersion = "2027.0.0-alpha-2"
wpimathVersion = wpilibVersion
openCVYear = "2025"
openCVversion = "4.10.0-3"
javalinVersion = "6.7.0"
libcameraDriverVersion = "v2025.0.4"
rknnVersion = "dev-v2025.0.0-5-g666c0c6"
rubikVersion = "dev-v2025.1.0-8-g067a316"
frcYear = "2025"
frcYear = "2027_alpha1"
mrcalVersion = "v2025.0.0";


Expand Down
2 changes: 1 addition & 1 deletion docs/source/docs/hardware/selecting-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In order to use PhotonVision, you need a coprocessor and a camera. This page dis

### Minimum System Requirements

- Ubuntu 22.04 LTS or Windows 10/11
- Ubuntu 24.04 LTS or Windows 10/11
- We don't recommend using Windows for anything except testing out the system on a local machine.
- CPU: ARM Cortex-A53 (the CPU on Raspberry Pi 3) or better
- At least 8GB of storage
Expand Down
5 changes: 5 additions & 0 deletions docs/source/docs/quick-start/common-setups.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ PhotonVision requires dedicated hardware, above and beyond a roboRIO. This page
The Orange Pi 5 is the only currently supported device for object detection.
:::

## SystemCore Support

The SystemCore is not supported by PhotonVision. PhotonVision is designed to utilize the entirety of the coprocessor's resources, and this could prove to be dangerous if attempted on the main robot controller.
There are no current plans to support running on SystemCore alongside robot code, and any attempts to do so are entirely at your own risk and will require a separate fork of PhotonVision.

## SD Cards

- 8GB or larger micro SD card
Expand Down
1 change: 1 addition & 0 deletions photon-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {
wpilibNatives wpilibTools.deps.wpilib("wpimath")
wpilibNatives wpilibTools.deps.wpilib("wpinet")
wpilibNatives wpilibTools.deps.wpilib("wpiutil")
wpilibNatives wpilibTools.deps.wpilib("datalog")
wpilibNatives wpilibTools.deps.wpilib("ntcore")
wpilibNatives wpilibTools.deps.wpilib("cscore")
wpilibNatives wpilibTools.deps.wpilib("apriltag")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private void setClientMode(NetworkConfig config) {
ntInstance.stopClient();
String hostname = config.shouldManage ? config.hostname : CameraServerJNI.getHostname();
logger.debug("Starting NT Client with hostname: " + hostname);
ntInstance.startClient4(hostname);
ntInstance.startClient(hostname);
try {
int t = Integer.parseInt(config.ntServerAddress);
if (!m_isRetryingConnection) logger.info("Starting NT Client, server team is " + t);
Expand Down
Loading
Loading