Skip to content

alpha 7 - #2566

Draft
samfreund wants to merge 78 commits into
PhotonVision:mainfrom
samfreund:alpha-7
Draft

alpha 7#2566
samfreund wants to merge 78 commits into
PhotonVision:mainfrom
samfreund:alpha-7

Conversation

@samfreund

@samfreund samfreund commented Jul 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the photonlib Things related to the PhotonVision library label Jul 21, 2026
@samfreund samfreund mentioned this pull request Jul 21, 2026
@github-actions github-actions Bot added the backend Things relating to photon-core and photon-server label Jul 28, 2026
@samfreund
samfreund force-pushed the alpha-7 branch 7 times, most recently from 096280e to bf6bdb0 Compare July 30, 2026 05:50
@samfreund

This comment was marked as resolved.

Comment thread .github/workflows/build.yml Outdated

env:
IMAGE_VERSION: v2027.1.1
IMAGE_VERSION: Dev

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh yeah revert this

Comment thread photon-targeting/src/main/native/jni/FileLoggerExtrasJNI.cpp
@github-actions github-actions Bot added documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items labels Aug 4, 2026
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates PhotonVision for the WPILib “alpha 7” ecosystem by migrating AprilTag field-layout usage from AprilTagFieldLayout to the newer Field API across C++, Java, Python, and the web UI, while also modernizing native test infrastructure and build dependencies to match the updated WPILib stack.

Changes:

  • Migrate field layout/tag types to Field/FieldTag across libraries, simulation, configuration, tests, and docs.
  • Switch native C++ tests from GoogleTest to Catch2 (plus updated test mains / HAL init patterns).
  • Update Gradle/build + CI plumbing for new WPILib artifacts (fields, mrclib) and related version bumps.

Reviewed changes

Copilot reviewed 115 out of 116 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shared/javacommon.gradle Add WPILib fields Java dependency.
shared/config.gradle Pass mrclibVersion into nativeUtils dependency config.
shared/common.gradle Add WPILib fields Java dependency.
photonlib-cpp-examples/poseest/src/test/cpp/main.cpp Update HAL init call signature.
photonlib-cpp-examples/poseest/src/main/include/Vision.h Remove redundant AprilTag layout include.
photonlib-cpp-examples/poseest/src/main/include/Constants.h Remove redundant AprilTag layout include.
photonlib-cpp-examples/aimattarget/src/test/cpp/main.cpp Update HAL init call signature.
photonlib-cpp-examples/aimattarget/src/main/include/VisionSim.h Remove redundant AprilTag layout include.
photonlib-cpp-examples/aimattarget/src/main/include/Constants.h Remove redundant AprilTag layout include.
photonlib-cpp-examples/aimandrange/src/test/cpp/main.cpp Update HAL init call signature.
photonlib-cpp-examples/aimandrange/src/main/include/VisionSim.h Remove redundant AprilTag layout include.
photonlib-cpp-examples/aimandrange/src/main/include/Constants.h Remove redundant AprilTag layout include.
photon-targeting/src/test/native/cpp/PacketTest.cpp Port tests from GoogleTest to Catch2.
photon-targeting/src/test/native/cpp/net/TimeSyncTest.cpp Port tests from GoogleTest to Catch2.
photon-targeting/src/test/native/cpp/main.cpp Replace GoogleTest runner with Catch2 runner + HAL gating for list commands.
photon-targeting/src/test/native/cpp/CasadiWrapperTest.cpp Port test from GoogleTest to Catch2.
photon-targeting/src/test/java/net/TimeSyncTest.java Update HAL init call signature.
photon-targeting/src/test/java/jni/FileLoggerTest.java Update HAL init call signature.
photon-targeting/src/test/java/jni/CscoreExtrasTest.java Update HAL init call signature.
photon-targeting/src/test/java/ConstrainedSolvepnpTest.java Update HAL init call signature (and remove teardown).
photon-targeting/src/main/proto/photon.proto Update proto import path for WPIMath geometry proto.
photon-targeting/src/main/native/jni/CscoreExtras.cpp Switch error formatting from fmt to std::format.
photon-targeting/src/main/native/jni/ConstrainedSolvepnpJNI.cpp Switch expected type to std::expected.
photon-targeting/src/main/native/include/photon/targeting/PhotonPipelineResult.h Switch printing from fmt to wpi::util::println.
photon-targeting/src/main/native/include/photon/estimation/VisionEstimation.h Migrate API from AprilTag layout types to wpi::fields::Field.
photon-targeting/src/main/native/include/photon/estimation/OpenCVHelp.h Switch printing from fmt to wpi::util::print.
photon-targeting/src/main/native/include/photon/constrained_solvepnp/wrap/casadi_wrapper.h Switch wpi::util::expected to std::expected.
photon-targeting/src/main/native/cpp/photon/estimation/VisionEstimation.cpp Migrate implementation to Field/FieldTag + std::expected.
photon-targeting/src/main/native/cpp/photon/constrained_solvepnp/wrap/casadi_wrapper.cpp Switch fmt prints/expected to WPILib print + std::expected.
photon-targeting/src/main/native/cpp/net/TimeSyncServer.cpp Switch stderr logging from fmt::print to wpi::util::print.
photon-targeting/src/main/native/cpp/net/TimeSyncClient.cpp Switch stderr logging from fmt::print to wpi::util::print.
photon-targeting/src/main/java/org/photonvision/estimation/VisionEstimation.java Migrate Java estimation helpers from AprilTag layout types to Field.
photon-targeting/build.gradle Add fields/mrclib native deps + switch tests to Catch2 + timeouts.
photon-server/src/main/java/org/photonvision/server/DataSocketHandler.java Update Pair import to new WPILib location.
photon-server/src/main/java/org/photonvision/Main.java Update HAL init call signature.
photon-serde/templates/ThingTests.cpp.jinja Switch generated C++ serde tests from GoogleTest to Catch2.
photon-serde-tests/build.gradle Switch tests to Catch2 + add native fields deps.
photon-lib/src/test/native/cpp/VisionSystemSimTest.cpp Port tests to Catch2 + migrate layout types to Field.
photon-lib/src/test/native/cpp/VersionTest.cpp Port test to Catch2.
photon-lib/src/test/native/cpp/PhotonUtilsTest.cpp Port test to Catch2.
photon-lib/src/test/native/cpp/PhotonPoseEstimatorTest.cpp Port tests to Catch2 + migrate layout types to Field.
photon-lib/src/test/native/cpp/PhotonCameraTest.cpp Port tests to Catch2.
photon-lib/src/test/native/cpp/main.cpp Replace GoogleTest runner with Catch2 runner + HAL gating for list commands.
photon-lib/src/test/java/org/photonvision/VisionSystemSimTest.java Migrate Java tests from AprilTag layout types to Field + HAL init update.
photon-lib/src/test/java/org/photonvision/PhotonPoseEstimatorTest.java Migrate Java tests from AprilTag layout types to Field + HAL init update.
photon-lib/src/test/java/org/photonvision/PhotonCameraTest.java Update HAL init call signature.
photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h Migrate addAprilTags to take wpi::fields::Field.
photon-lib/src/main/native/include/photon/simulation/VideoSimUtil.h Update AprilTag image generator include/call.
photon-lib/src/main/native/include/photon/simulation/PhotonCameraSim.h Migrate sim camera layout storage/ctor defaults to Field.
photon-lib/src/main/native/include/photon/PhotonPoseEstimator.h Migrate pose estimator layout storage to Field.
photon-lib/src/main/native/include/photon/PhotonCamera.h Update Alert include/type to new WPILib location.
photon-lib/src/main/native/cpp/photon/simulation/PhotonCameraSim.cpp Migrate sim camera to Field/FieldTag defaults and usage.
photon-lib/src/main/native/cpp/photon/PhotonPoseEstimator.cpp Migrate internals to accept Field.
photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp Switch version-mismatch formatting from fmt::format to std::format and update Alert IDs.
photon-lib/src/main/java/org/photonvision/simulation/VisionSystemSim.java Migrate simulation tag-layout input from AprilTag layout to Field.
photon-lib/src/main/java/org/photonvision/simulation/VideoSimUtil.java Update AprilTag image generator usage.
photon-lib/src/main/java/org/photonvision/simulation/SimCameraProperties.java Update Pair import to new WPILib location.
photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java Migrate sim camera tag layout to Field + defaults to Fields.DEFAULT_FIELD.
photon-lib/src/main/java/org/photonvision/PhotonPoseEstimator.java Migrate pose estimator APIs from AprilTag layout to Field + update Pair import.
photon-lib/src/main/java/org/photonvision/PhotonCamera.java Update Alert import + add Alert IDs.
photon-lib/py/test/visionSystemSim_test.py Migrate RobotPy API usage to robotpy_fields + new method/property naming.
photon-lib/py/test/photonPoseEstimator_test.py Migrate RobotPy API usage to robotpy_fields + new method/property naming.
photon-lib/py/test/photonlibpy_test.py Update RobotPy NTCore API naming.
photon-lib/py/test/openCVHelp_test.py Update RobotPy NTCore + wpimath property usage.
photon-lib/py/setup.py Bump RobotPy alpha versions and add robotpy-fields dependency.
photon-lib/py/photonlibpy/timesync/timeSyncServer.py Update RobotPy Timer API naming.
photon-lib/py/photonlibpy/simulation/visionTargetSim.py Update wpimath Translation/Rotation property usage in comparisons.
photon-lib/py/photonlibpy/simulation/visionSystemSim.py Migrate AprilTag layout type to Field + update RobotPy API naming.
photon-lib/py/photonlibpy/simulation/simCameraProperties.py Update wpimath API naming/property access.
photon-lib/py/photonlibpy/simulation/photonCameraSim.py Migrate AprilTag layout type to Field + update wpimath/Timer naming.
photon-lib/py/photonlibpy/photonPoseEstimator.py Migrate AprilTag layout type to Field + update RobotPy API naming.
photon-lib/py/photonlibpy/photonCamera.py Update NTCore/WPILib API naming and pubsub options.
photon-lib/py/photonlibpy/packet.py Update WPILib error-reporting API naming + quaternion accessors.
photon-lib/py/photonlibpy/networktables/NTTopicSet.py Update NTCore topic API naming + pubsub options field names.
photon-lib/py/photonlibpy/estimation/visionEstimation.py Migrate AprilTag layout type to Field + update method naming.
photon-lib/py/photonlibpy/estimation/targetModel.py Update wpimath Translation property usage (and planar detection).
photon-lib/py/photonlibpy/estimation/rotTrlTransform3d.py Update wpimath rotate/relative API naming.
photon-lib/py/photonlibpy/estimation/openCVHelp.py Update wpimath rotate/quaternion API naming + Translation property usage.
photon-lib/py/photonlibpy/estimation/cameraTargetRelation.py Update wpimath Translation property usage.
photon-lib/build.gradle Add fields/mrclib native deps + switch tests to Catch2.
photon-core/src/test/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumerTest.java Ensure FMSInfo data is also published via NT for test realism + HAL init update.
photon-core/src/test/java/org/photonvision/common/configuration/ConfigTest.java Add tests for field-layout JSON migration + Field parsing.
photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipeline/OutputStreamPipeline.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipeline.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipeline.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipeline/Calibrate3dPipeline.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/MultiTargetPNPPipe.java Migrate pipe params from AprilTag layout to Field.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindCirclesPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindBoardCornersPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/DrawCalibrationPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw3dTargetsPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dTargetsPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dCrosshairPipe.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/vision/camera/csi/LibcameraGpuSettables.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/common/logging/Logger.java Update Pair import to new WPILib location.
photon-core/src/main/java/org/photonvision/common/dataflow/websocket/UIProgramSettings.java Migrate stored UI settings layout type to Field.
photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java Update Alert usage + parse field layout as Field + tweak team server config.
photon-core/src/main/java/org/photonvision/common/configuration/SqlConfigProvider.java Load/migrate legacy ATFL JSON to Field and persist migrated JSON back.
photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java Migrate config storage field layout type to Field.
photon-core/src/main/java/org/photonvision/common/configuration/LegacyConfigProvider.java Migrate legacy config loader to Field defaults.
photon-core/src/main/java/org/photonvision/common/configuration/FieldLayoutMigration.java Add JSON migration helper for legacy AprilTagFieldLayout -> Field.
photon-core/build.gradle Add fields native dependency.
photon-client/tests/quirks.spec.ts Reformat locators for readability.
photon-client/tests/input.spec.ts Reformat locator + normalize selector quoting.
photon-client/src/types/WebsocketDataTypes.ts Update websocket settings payload type to Field.
photon-client/src/types/PhotonTrackingTypes.ts Replace AprilTagFieldLayout TS type with Field/dimensions/tags types.
photon-client/src/stores/settings/GeneralSettingsStore.ts Update store field layout typing + assignment.
photon-client/src/components/settings/ApriltagControlCard.vue Update UI field layout rendering for new Field shape + computed helpers.
gradle/wrapper/gradle-wrapper.properties Bump Gradle wrapper to 9.4.1.
docs/source/docs/simulation/simulation-java.md Update docs to Field API.
docs/source/docs/programming/photonlib/robot-pose-estimator.md Update docs to Field API and links.
build.gradle Update WPILib-related plugin versions + WPILib version strings + other dep bumps.
.github/workflows/python.yml Minor checkout step simplification.
.github/workflows/photon-api-docs.yml Minor checkout/tag-fetch step simplification.
.github/workflows/build.yml Update runners/containers/tooling steps for new build environment.
Suppressed comments (1)

photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp:402

  • std::format is used here but this translation unit does not include <format>. This can be a hard compile error on some standard library implementations if <format> is not included explicitly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 124 to 128
cornersPlaner = True
for corner in verts:
if abs(corner.X() < 1e-4):
if abs(corner.x < 1e-4):
cornersPlaner = False
self.isPlanar = cornersPlaner
Comment on lines 200 to 208
public PhotonCameraSim(
PhotonCamera camera,
SimCameraProperties prop,
double minTargetAreaPercent,
double maxSightRangeMeters,
AprilTagFieldLayout tagLayout) {
Field tagLayout) {
this(camera, prop);
this.minTargetAreaPercent = minTargetAreaPercent;
this.maxSightRangeMeters = maxSightRangeMeters;
Comment thread photon-targeting/src/main/native/jni/CscoreExtras.cpp
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
@samfreund samfreund moved this to In progress in 2027 Release Aug 11, 2026
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items photonlib Things related to the PhotonVision library

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants