Skip to content

Commit

Permalink
Resolve conflitcs and update pv (#10)
Browse files Browse the repository at this point in the history
* Kill deprecated things (PhotonVision#1311)

* Change sim to use 36h11 tags when doing multitag (PhotonVision#1314)

* Undistort corner pitch/yaw using opencv (PhotonVision#1250)

* Undistort pitch/yaw

* Actually implement lol

* Update TargetCalculations.java

* fix yawpitch test units

* format

---------

Co-authored-by: amquake <[email protected]>

* Bump libcamera to fix picam v1, remove duplicate opencv (PhotonVision#1263)

* Charuco Support (PhotonVision#1312)

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).

* Add sequence ID, capture, publish and recieve timestamp to PhotonPipelineResult (PhotonVision#1305)

Closes PhotonVision#1304

* Expose object detection class id/conf in photonlib (PhotonVision#1266)

* Implement class id/conf in photonlib

* Maybe fix things

* run lint

* Update Packet.java comments

* Update Packet.java comments again

* Update comments

* oops

* Update packet.py

---------

Co-authored-by: Chris Gerth <[email protected]>

* Allow file uploads of any size and better report active cameras in PhotonCamera error print (PhotonVision#1298)

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
```

* Disable Arm32 Builds (PhotonVision#1325)

Disables Arm32 builds and removes mention of the build option in the README.

* [PhotonLib C++] Fix SetVersionCheckEnabled to actually disable version checking (PhotonVision#1323)

* change verifyversion to use member variable

* Revert "change verifyversion to use member variable"

This reverts commit 4439839.

* Removed inline specifier for versioncheck variable

---------

Co-authored-by: Drew Williams <[email protected]>

* Update README.md (PhotonVision#1321)

* Move PhotonVersion to C++ file (PhotonVision#949)

This was supposed to speed up incremental compilation, but not sure it actually does. It's better form tm tho and fixes a robotpy-wrapper weirdness

* Bump wpilib to latest dev (PhotonVision#1327)

* Publish generated proto sources (PhotonVision#1328)

* Disable transitive deps for rknn-jni (PhotonVision#1329)

* Update maven URL to reposilite (PhotonVision#1330)

Also bumps to new builds of artifacts (NFC)

* Allow opencv8 distortion model in PhotonCamera (PhotonVision#1317)

We previously assumed only OpenCV5 but mrcal uses opencv8

* Fix mac released jar naming (PhotonVision#1332)

* Change default AprilTag family to 36h11 (PhotonVision#1333)

Change default AprilTag family to 36h11

Resolves PhotonVision#1226

* Warn when getBestCameraToTarget returns 0, 0, 0 (PhotonVision#1334)

Resolves PhotonVision#915

* Fix libcamera not found bug (PhotonVision#1326)

* Update build.yml

* Camera Lost Stream (PhotonVision#1341)

* Fix no stream on camera unplug.

* Spotless remove datarate

* Make Static Frames Class

* lint and format

* Add photon.pb.h/PhotonVersion to cpp headers zip & create combined sources zip (PhotonVision#1335)

Combined sources zip is useful for robotpy to build both targeting & lib in the same build

* Create combine job and offline vendordep ZIP (PhotonVision#1343)

* Create combine job

* Update build.yml

* Bump max workers in photonlib

* Oops

* actually kill entirely

* Maybe fix test

* Don't run tests

* Update OpenCVTest.java

* Update build.yml

* Use upload-artifact@v4

* Update build.yml

* Update build.yml

* Only download necessary files in release step (PhotonVision#1344)

* Only publish to maven on main fork (PhotonVision#1345)

* Bump libcamera driver version (PhotonVision#1346)

* Update build.gradle

* Revert "Warn when getBestCameraToTarget returns 0, 0, 0 (PhotonVision#1334)" (PhotonVision#1351)

This reverts commit 6ff7b3e. See PhotonVision#1351 for context

* fix CSI camera null quirks error (PhotonVision#1349)

temp fix for this issue with csi cameras

* Support more charuco boards (PhotonVision#1348)

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.

* Bump wpilib to 2025.0.0-alpha-1 and break non-FRC JDKs (PhotonVision#1356)

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

* Move docs in-source (PhotonVision#1357)

* Rename .readthedocs to match RTD

* Adds support for OV9782's quirks (PhotonVision#1284)

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 PhotonVision#1204

---------

Co-authored-by: Matt <[email protected]>
Co-authored-by: Cameron (3539) <[email protected]>

* Fix OV9782 typos (PhotonVision#1358)

There were a couple of typos in the last OV9782 fix, this addresses
those. Additionally, remove Matt's comment that he forgot.

* Update docs on docs about docs (PhotonVision#1360)

* Use pnpm instead of npm (PhotonVision#1375)

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.

* Fixed spelling error (PhotonVision#1376)

* Revert "Use pnpm instead of npm" (PhotonVision#1382)

Reverts 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"

* Run wpiformat  (PhotonVision#1379)

* Use new OrangePi5 images and add OrangePi5 Pro (PhotonVision#1388)

* Use ReadQueue for PhotonCamera timestamps (PhotonVision#1316)

This removes the extra GetLastChange call to keep everything properly
atomic.

Closes PhotonVision#1303

* Add API docs to sidebar (PhotonVision#1383)

* Add rsync & sphinx-autobuild docs (PhotonVision#1391)

* Update install.sh for OPi5 Ubuntu 24.04 (PhotonVision#1390)

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

* Move to using Absolute Exposure Range (PhotonVision#1352)

Uses logic in
PhotonVision/photon-libcamera-gl-driver#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 <[email protected]>

* Add OrangePi5b image to generated images (PhotonVision#1394)

* Document how to install PhotonLib of specific version (PhotonVision#1392)

* Fixed PipelineManager logic

* spotless

* Error fixes

* cameraExposure -> cameraExposureRaw

* Trying reverting some changes

* Revert "Trying reverting some changes"

This reverts commit f3faf80.

---------

Co-authored-by: Matt <[email protected]>
Co-authored-by: Drew Williams <[email protected]>
Co-authored-by: amquake <[email protected]>
Co-authored-by: Programmers3539 <[email protected]>
Co-authored-by: Chris Gerth <[email protected]>
Co-authored-by: Craftzman7 <[email protected]>
Co-authored-by: Drew Williams <[email protected]>
Co-authored-by: Jade <[email protected]>
Co-authored-by: Cameron (3539) <[email protected]>
Co-authored-by: Gautam <[email protected]>
Co-authored-by: Sriman Achanta <[email protected]>
Co-authored-by: MADMAN-Modding <[email protected]>
Co-authored-by: Craig Schardt <[email protected]>
Co-authored-by: vic123 <[email protected]>
  • Loading branch information
15 people committed Aug 19, 2024
1 parent e462114 commit 6ce47bf
Show file tree
Hide file tree
Showing 432 changed files with 47,616 additions and 3,814 deletions.
174 changes: 125 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: Build

on:
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
push:
branches: [ master ]
tags:
- 'v*'
paths:
- '**'
- '!docs/**'
- '.github/**'
pull_request:
branches: [ master ]
paths:
- '**'
- '!docs/**'
- '.github/**'

jobs:
build-client:
Expand Down Expand Up @@ -55,13 +64,13 @@ jobs:
run: |
chmod +x gradlew
./gradlew copyPhotonlib -x check
./gradlew build -x check --max-workers 2
./gradlew build -x check
- name: Build C++ examples
working-directory: photonlib-cpp-examples
run: |
chmod +x gradlew
./gradlew copyPhotonlib -x check
./gradlew build -x check --max-workers 2
./gradlew build -x check
build-gradle:
name: "Gradle Build"
runs-on: ubuntu-22.04
Expand All @@ -83,11 +92,11 @@ jobs:
- name: Gradle Build
run: |
chmod +x gradlew
./gradlew build -x check --max-workers 2
./gradlew photon-targeting:build photon-core:build photon-server:build -x check
- name: Gradle Tests
run: ./gradlew testHeadless -i --max-workers 1 --stacktrace
run: ./gradlew testHeadless -i --stacktrace
- name: Gradle Coverage
run: ./gradlew jacocoTestReport --max-workers 1
run: ./gradlew jacocoTestReport
- name: Publish Coverage Report
uses: codecov/codecov-action@v3
with:
Expand All @@ -101,37 +110,36 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
repository: 'PhotonVision/photonvision-docs.git'
ref: master
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- name: Install dependencies
working-directory: docs
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
pip install -r requirements.txt
- name: Build the docs
working-directory: docs
run: |
make html
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: built-docs
path: build/html
path: docs/build/html
build-photonlib-host:
env:
MACOSX_DEPLOYMENT_TARGET: 12
MACOSX_DEPLOYMENT_TARGET: 13
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
artifact-name: Win64
architecture: x64
- os: macos-12
- os: macos-14
artifact-name: macOS
architecture: x64
architecture: aarch64
- os: ubuntu-22.04
artifact-name: Linux

Expand All @@ -146,26 +154,37 @@ jobs:
with:
java-version: 17
distribution: temurin
architecture: ${{ matrix.architecture }}
- run: git fetch --tags --force
- run: |
chmod +x gradlew
./gradlew photon-lib:build --max-workers 1
# - run: ./gradlew photon-lib:publish photon-targeting:publish
# name: Publish
# env:
# ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
# if: github.event_name == 'push'
./gradlew photon-targeting:build photon-lib:build -Pbuildalldesktop -i
- run: ./gradlew photon-lib:publish photon-targeting:publish -Pbuildalldesktop
name: Publish
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
# Copy artifacts to build/outputs/maven
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts -Pbuildalldesktop
- uses: actions/upload-artifact@v4
with:
name: maven-${{ matrix.artifact-name }}
path: build/outputs

build-photonlib-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2024-22.04
artifact-name: Athena
build-options: "-Ponlylinuxathena"
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
artifact-name: Raspbian
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
artifact-name: Aarch64
build-options: "-Ponlylinuxarm64"

runs-on: ubuntu-22.04
container: ${{ matrix.container }}
Expand All @@ -178,16 +197,49 @@ jobs:
run: |
git config --global --add safe.directory /__w/photonvision/photonvision
- name: Build PhotonLib
# We don't need to run tests, since we specify only non-native platforms
run: |
chmod +x gradlew
./gradlew photon-lib:build --max-workers 1
# - name: Publish
# run: |
# chmod +x gradlew
# ./gradlew photon-lib:publish photon-targeting:publish
./gradlew photon-targeting:build photon-lib:build ${{ matrix.build-options }} -i -x test
- name: Publish
run: |
chmod +x gradlew
./gradlew photon-lib:publish photon-targeting:publish ${{ matrix.build-options }}
env:
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
if: github.event_name == 'push'
if: github.event_name == 'push' && github.repository_owner == 'photonvision'
# Copy artifacts to build/outputs/maven
- run: ./gradlew photon-lib:publish photon-targeting:publish -PcopyOfflineArtifacts ${{ matrix.build-options }}
- uses: actions/upload-artifact@v4
with:
name: maven-${{ matrix.artifact-name }}
path: build/outputs

combine:
name: Combine
needs: [build-photonlib-docker, build-photonlib-host]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --tags --force
# download all maven-* artifacts to outputs/
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: output
pattern: maven-*
- run: find .
- run: zip -r photonlib-$(git describe --tags --match=v*).zip .
name: ZIP stuff up
working-directory: output
- run: ls output
- uses: actions/upload-artifact@v4
with:
name: photonlib-offline
path: output/*.zip

build-package:
needs: [build-client, build-gradle, build-offline-docs]

Expand All @@ -198,23 +250,19 @@ jobs:
- os: windows-latest
artifact-name: Win64
architecture: x64
arch-override: none
arch-override: winx64
- os: macos-latest
artifact-name: macOS
architecture: x64
arch-override: none
- os: ubuntu-latest
artifact-name: Linux
architecture: x64
arch-override: none
arch-override: macx64
- os: macos-latest
artifact-name: macOSArm
architecture: x64
arch-override: macarm64
- os: ubuntu-latest
artifact-name: LinuxArm32
artifact-name: Linux
architecture: x64
arch-override: linuxarm32
arch-override: linuxx64
- os: ubuntu-latest
artifact-name: LinuxArm64
architecture: x64
Expand All @@ -232,6 +280,7 @@ jobs:
with:
java-version: 17
distribution: temurin
architecture: ${{ matrix.architecture }}
- run: |
rm -rf photon-server/src/main/resources/web/*
mkdir -p photon-server/src/main/resources/web/docs
Expand All @@ -250,11 +299,11 @@ jobs:
path: photon-server/src/main/resources/web/docs
- run: |
chmod +x gradlew
./gradlew photon-server:shadowJar --max-workers 2 -PArchOverride=${{ matrix.arch-override }}
./gradlew photon-server:shadowJar -PArchOverride=${{ matrix.arch-override }}
if: ${{ (matrix.arch-override != 'none') }}
- run: |
chmod +x gradlew
./gradlew photon-server:shadowJar --max-workers 2
./gradlew photon-server:shadowJar
if: ${{ (matrix.arch-override == 'none') }}
- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -310,7 +359,7 @@ jobs:
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: RaspberryPi
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.4/photonvision_raspi.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-1/photonvision_raspi.img.xz
cpu: cortex-a7
image_additional_mb: 0
extraOpts: -Djdk.lang.Process.launchMechanism=vfork
Expand Down Expand Up @@ -349,33 +398,45 @@ jobs:
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: RaspberryPi
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.4/photonvision_raspi.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-1/photonvision_raspi.img.xz
cpu: cortex-a7
image_additional_mb: 0
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: limelight2
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.4/photonvision_limelight.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-1/photonvision_limelight.img.xz
cpu: cortex-a7
image_additional_mb: 4096
image_additional_mb: 0
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: limelight3
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.5/photonvision_limelight3.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-1/photonvision_limelight3.img.xz
cpu: cortex-a7
image_additional_mb: 0
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: orangepi5
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.10/photonvision_opi5.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-3/photonvision_opi5.img.xz
cpu: cortex-a8
image_additional_mb: 1024
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: orangepi5b
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-3/photonvision_opi5b.img.xz
cpu: cortex-a8
image_additional_mb: 4096
image_additional_mb: 1024
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: orangepi5plus
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2024.0.10/photonvision_opi5plus.img.xz
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-3/photonvision_opi5plus.img.xz
cpu: cortex-a8
image_additional_mb: 4096
image_additional_mb: 1024
- os: ubuntu-latest
artifact-name: LinuxArm64
image_suffix: orangepi5pro
image_url: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2025.0.0-beta-3/photonvision_opi5pro.img.xz
cpu: cortex-a8
image_additional_mb: 1024

runs-on: ${{ matrix.os }}
name: "Build image - ${{ matrix.image_url }}"
Expand All @@ -388,7 +449,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: jar-${{ matrix.artifact-name }}
- uses: pguyot/arm-runner-action@v2
- uses: pguyot/arm-runner-action@HEAD
name: Generate image
id: generate_image
with:
Expand All @@ -413,12 +474,25 @@ jobs:
name: image-${{ matrix.image_suffix }}
path: photonvision*.xz
release:
needs: [build-package, build-image]
needs: [build-package, build-image, combine]
runs-on: ubuntu-22.04
steps:
# Download literally every single artifact. This also downloads client and docs,
# but the filtering below won't pick these up (I hope)
# Download all fat JARs
- uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: jar-*
# Download offline photonlib
- uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: photonlib-offline
# Download all images
- uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: image-*

- run: find
# Push to dev release
- uses: pyTooling/Actions/releaser@r0
Expand All @@ -430,6 +504,7 @@ jobs:
**/*.xz
**/*.jar
**/photonlib*.json
**/photonlib*.zip
if: github.event_name == 'push'
# Upload all jars and xz archives
- uses: softprops/action-gh-release@v1
Expand All @@ -438,6 +513,7 @@ jobs:
**/*.xz
**/*.jar
**/photonlib*.json
**/photonlib*.zip
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 11 additions & 2 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: Lint and Format

on:
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
push:
branches: [ master ]
tags:
- 'v*'
paths:
- '**'
- '!docs/**'
- '.github/**'
pull_request:
branches: [ master ]
paths:
- '**'
- '!docs/**'
- '.github/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand All @@ -26,9 +35,9 @@ jobs:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install wpiformat
run: pip3 install wpiformat
run: pip3 install wpiformat==2024.37
- name: Run
run: wpiformat
- name: Check output
Expand Down
Loading

0 comments on commit 6ce47bf

Please sign in to comment.