Skip to content

Commit 9490c2f

Browse files
samfreundGold856
andauthored
Bump wpilib to 2026 beta (#2192)
## 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>
1 parent 467f22b commit 9490c2f

File tree

34 files changed

+61
-76
lines changed

34 files changed

+61
-76
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id "cpp"
55
id "com.diffplug.spotless" version "6.24.0"
66
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
7-
id "edu.wpi.first.GradleRIO" version "2025.3.2"
7+
id "edu.wpi.first.GradleRIO" version "2026.1.1-beta-1"
88
id 'edu.wpi.first.WpilibTools' version '1.3.0'
99
id 'com.google.protobuf' version '0.9.3' apply false
1010
id 'edu.wpi.first.GradleJni' version '1.1.0'
@@ -32,15 +32,15 @@ ext.allOutputsFolder = file("$project.buildDir/outputs")
3232
apply from: "versioningHelper.gradle"
3333

3434
ext {
35-
wpilibVersion = "2025.3.2"
35+
wpilibVersion = "2026.1.1-beta-1"
3636
wpimathVersion = wpilibVersion
3737
openCVYear = "2025"
3838
openCVversion = "4.10.0-3"
3939
javalinVersion = "6.7.0"
4040
libcameraDriverVersion = "dev-v2025.0.4-2-gc91d4b7"
4141
rknnVersion = "dev-v2025.0.0-7-g83c1bf3"
4242
rubikVersion = "dev-v2025.1.0-7-g39588a8"
43-
frcYear = "2025"
43+
frcYear = "2026beta"
4444
mrcalVersion = "dev-v2025.0.0-2-g2adb187";
4545

4646

docs/source/docs/advanced-installation/sw_install/mac-os.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ VERY Limited macOS support is available.
1212

1313
## Installing Java
1414

15-
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 2025+. If not, [download and install it from here](https://adoptium.net/temurin/releases?version=17).
15+
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).
1616

1717
:::{warning}
1818
Using a JDK other than JDK17 will cause issues when running PhotonVision and is not supported.

docs/source/docs/advanced-installation/sw_install/windows-pc.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ Bonjour provides more stable networking when using Windows PCs. Install [Bonjour
1212

1313
## Installing Java
1414

15-
PhotonVision requires a JDK installed and on the system path. **JDK 17 is needed. Windows Users must use the JDK that ships with WPILib.** [Download and install it from here.](https://github.com/wpilibsuite/allwpilib/releases/tag/v2025.3.2) Either ensure the only Java on your PATH is the WPILIB Java or specify it to gradle with `-Dorg.gradle.java.home=C:\Users\Public\wpilib\2025\jdk`:
16-
17-
```
18-
> ./gradlew run "-Dorg.gradle.java.home=C:\Users\Public\wpilib\2025\jdk"
19-
```
20-
21-
:::{warning}
22-
Using a JDK other than WPILIB's JDK17 will cause issues when running PhotonVision and is not supported.
23-
:::
15+
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)
2416

2517
## Downloading the Latest Stable Release of PhotonVision
2618

docs/source/docs/contributing/building-photon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This section contains the build instructions from the source code available at [
88

99
**Java Development Kit:**
1010

11-
This project requires Java Development Kit (JDK) 17 to be compiled. This is the same Java version that comes with WPILib for 2025+. **Windows Users must use the JDK that ships with WPILib.** For other platforms, you can follow the instructions to install JDK 17 for your platform [here](https://bell-sw.com/pages/downloads/#jdk-17-lts).
11+
This project requires Java Development Kit (JDK) 17 to be compiled. This is the same Java version that comes with WPILib for 2026+. **Windows Users must use the JDK that ships with WPILib.** For other platforms, you can follow the instructions to install JDK 17 for your platform [here](https://bell-sw.com/pages/downloads/#jdk-17-lts).
1212

1313
**Node JS:**
1414

docs/source/docs/troubleshooting/networking-troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ A few issues make up the majority of support requests. Run through this checklis
1111
- Even if there's a switch between your laptop and coprocessor, you'll still want a radio or router in the loop somehow.
1212
- The FRC radio is the _only_ router we will officially support due to the innumerable variations between routers.
1313
- (Raspberry Pi, Orange Pi & Limelight only) have you flashed the correct image, and is it [up to date](https://github.com/PhotonVision/photonvision/releases/latest)?
14-
- Is your robot code using a **2025** version of WPILib, and is your coprocessor using the most up to date **2025** release?
15-
- 2022, 2023, 2024, and 2025 versions of either cannot be mix-and-matched!
14+
- Is your robot code using a **2026** version of WPILib, and is your coprocessor using the most up to date **2026** release?
15+
- 2022, 2023, 2024, 2025, and 2026 versions of either cannot be mix-and-matched!
1616
- Your PhotonVision version can be checked on the settings tab.
1717
- Is your team number correctly set on the settings tab?
1818

@@ -30,7 +30,7 @@ Please check that:
3030
1\. You don't have the NetworkTables Server on (toggleable in the settings tab). Turn this off when doing work on a robot.
3131
2\. You have your team number set properly in the settings tab.
3232
3\. Your camera name in the `PhotonCamera` constructor matches the name in the UI.
33-
4\. You are using the 2025 version of WPILib and RoboRIO image.
33+
4\. You are using the 2026 version of WPILib and RoboRIO image.
3434
5\. Your robot is on.
3535

3636
If all of the above are met and you still have issues, feel free to {ref}`contact us <index:contact us>` and provide the following information:

photon-targeting/src/main/native/cpp/photon/constrained_solvepnp/wrap/casadi_wrapper.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ struct ProblemState {
156156
#undef MAKE_ARGV
157157
};
158158

159-
wpi::expected<constrained_solvepnp::RobotStateMat,
160-
sleipnir::SolverExitCondition>
159+
wpi::expected<constrained_solvepnp::RobotStateMat, slp::ExitStatus>
161160
constrained_solvepnp::do_optimization(
162161
bool heading_free, int nTags,
163162
constrained_solvepnp::CameraCalibration cameraCal,
@@ -173,7 +172,7 @@ constrained_solvepnp::do_optimization(
173172
if constexpr (VERBOSE) fmt::println("Got unexpected num cols!");
174173
// TODO find a new error code
175174
return wpi::unexpected{
176-
sleipnir::SolverExitCondition::kNonfiniteInitialCostOrConstraints};
175+
slp::ExitStatus::NONFINITE_INITIAL_COST_OR_CONSTRAINTS};
177176
}
178177

179178
// rescale observations to homogenous pixel coordinates
@@ -203,7 +202,7 @@ constrained_solvepnp::do_optimization(
203202
auto problemOpt = createProblem(nTags, heading_free);
204203
if (!problemOpt) {
205204
return wpi::unexpected{
206-
sleipnir::SolverExitCondition::kNonfiniteInitialCostOrConstraints};
205+
slp::ExitStatus::NONFINITE_INITIAL_COST_OR_CONSTRAINTS};
207206
}
208207

209208
ProblemState<3> pState{robot2camera, field2points, point_observations,
@@ -233,7 +232,7 @@ constrained_solvepnp::do_optimization(
233232

234233
// Check for diverging iterates
235234
if (x.template lpNorm<Eigen::Infinity>() > 1e20 || !x.allFinite()) {
236-
return wpi::unexpected{sleipnir::SolverExitCondition::kDivergingIterates};
235+
return wpi::unexpected{slp::ExitStatus::DIVERGING_ITERATES};
237236
}
238237

239238
GradMat g = pState.calculateGradJ(x);
@@ -254,7 +253,7 @@ constrained_solvepnp::do_optimization(
254253
auto H_ldlt = H.ldlt();
255254
if (H_ldlt.info() != Eigen::Success) {
256255
std::cerr << "LDLT decomp failed! H=" << std::endl << H << std::endl;
257-
return wpi::unexpected{sleipnir::SolverExitCondition::kLocallyInfeasible};
256+
return wpi::unexpected{slp::ExitStatus::LOCALLY_INFEASIBLE};
258257
}
259258

260259
// Make sure H is positive definite (all eigenvalues are > 0)
@@ -278,8 +277,7 @@ constrained_solvepnp::do_optimization(
278277

279278
if (H_ldlt.info() != Eigen::Success) {
280279
std::cerr << "LDLT decomp failed! H=" << std::endl << H << std::endl;
281-
return wpi::unexpected{
282-
sleipnir::SolverExitCondition::kLocallyInfeasible};
280+
return wpi::unexpected{slp::ExitStatus::LOCALLY_INFEASIBLE};
283281
}
284282

285283
// If our eigenvalues aren't positive definite, pick a new δ for next
@@ -289,8 +287,7 @@ constrained_solvepnp::do_optimization(
289287

290288
// If the Hessian perturbation is too high, report failure
291289
if (δ > 1e20) {
292-
return wpi::unexpected{
293-
sleipnir::SolverExitCondition::kLocallyInfeasible};
290+
return wpi::unexpected{slp::ExitStatus::LOCALLY_INFEASIBLE};
294291
}
295292
} else {
296293
// Done!
@@ -301,8 +298,7 @@ constrained_solvepnp::do_optimization(
301298
}
302299

303300
if (i_reg == MAX_REG_STEPS) {
304-
return wpi::unexpected{
305-
sleipnir::SolverExitCondition::kLocallyInfeasible};
301+
return wpi::unexpected{slp::ExitStatus::LOCALLY_INFEASIBLE};
306302
}
307303
} else {
308304
// std::printf("Already regularized\n");
@@ -345,8 +341,7 @@ constrained_solvepnp::do_optimization(
345341

346342
// If our step size shrank too much, report local infesibility
347343
if (alpha < α_min_frac * γConstraint) {
348-
return wpi::unexpected{
349-
sleipnir::SolverExitCondition::kLocallyInfeasible};
344+
return wpi::unexpected{slp::ExitStatus::LOCALLY_INFEASIBLE};
350345
}
351346
}
352347
}

photon-targeting/src/main/native/cpp/photon/estimation/VisionEstimation.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,8 @@ std::optional<photon::PnpResult> EstimateRobotPoseConstrainedSolvePNP(
191191
guess2.X().value(), guess2.Y().value(),
192192
guess2.Rotation().Radians().value()};
193193

194-
wpi::expected<constrained_solvepnp::RobotStateMat,
195-
sleipnir::SolverExitCondition>
196-
result = constrained_solvepnp::do_optimization(
194+
wpi::expected<constrained_solvepnp::RobotStateMat, slp::ExitStatus> result =
195+
constrained_solvepnp::do_optimization(
197196
headingFree, knownTags.size(), cameraCal, robotToCamera, guessMat,
198197
field2points, pointObservations, gyroTheta.Radians().value(),
199198
gyroErrorScaleFac);

photon-targeting/src/main/native/include/photon/constrained_solvepnp/wrap/casadi_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#pragma once
1919

2020
#include <Eigen/Core>
21-
#include <sleipnir/optimization/SolverExitCondition.hpp>
21+
#include <sleipnir/optimization/solver/exit_status.hpp>
2222
#include <wpi/expected>
2323

2424
namespace constrained_solvepnp {
@@ -40,7 +40,7 @@ using RobotStateMat = Eigen::Matrix<casadi_real, 3, 1>;
4040
* to this. The number of columns in field2points and point_observations just be
4141
* exactly 4x nTags.
4242
*/
43-
wpi::expected<RobotStateMat, sleipnir::SolverExitCondition> do_optimization(
43+
wpi::expected<RobotStateMat, slp::ExitStatus> do_optimization(
4444
bool heading_free, int nTags, CameraCalibration cameraCal,
4545
// Note that casadi is column major, apparently
4646
Eigen::Matrix<casadi_real, 4, 4, Eigen::ColMajor> robot2camera,

photon-targeting/src/main/native/jni/ConstrainedSolvepnpJNI.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ Java_org_photonvision_jni_ConstrainedSolvepnpJni_do_1optimization
8484
std::cout << "observations:\n" << pointObservationsMat << std::endl;
8585
#endif
8686

87-
wpi::expected<constrained_solvepnp::RobotStateMat,
88-
sleipnir::SolverExitCondition>
89-
result = constrained_solvepnp::do_optimization(
87+
wpi::expected<constrained_solvepnp::RobotStateMat, slp::ExitStatus> result =
88+
constrained_solvepnp::do_optimization(
9089
headingFree, nTags, cameraCal_, robot2cameraMat, xGuessMat,
9190
field2pointsMat, pointObservationsMat, gyro_θ, gyro_error_scale_fac);
9291

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"enableCppIntellisense": true,
33
"currentLanguage": "cpp",
4-
"projectYear": "2025",
4+
"projectYear": "2026beta",
55
"teamNumber": 5
66
}

0 commit comments

Comments
 (0)