This PR updates everything for 2027. This includes removing GradleRIO, simplifying our wpilib version defintion, updating APIs, updating to Java 21, and more.
Note that photonlibpy is failing because robotpy has not been fully updated yet. Examples are omitted because they need to be updated for our new PhotonPoseEstimator API and still need some changes from WPILIB. photonlib windows build is failing because we're waiting for some upstream changes. Finally, images are failing since they don't have Java 21 yet.
Occasionally, the sim projects are capable of simulating current draw of
over 600A, which triggers a condition in
`BatterySim::calculateDefaultBatteryLoadedVoltage` that limits the
minimum measured battery voltage to 0V (to prevent it from going
negative).
When battery voltage measures 0, this causes NaN values to propagate
through the drivetrain model, making sim inoperable. Specifically, [this
is the
line](https://github.com/PhotonVision/photonvision/blob/master/photonlib-java-examples/aimandrange/src/main/java/frc/robot/subsystems/drivetrain/SwerveDriveSim.java#L452)
that causes the initial NaN values in simulation.
This PR is posed as a patch to ensure that simulation doesn't break.
* add classes to targeting and update gradle
* rename me
* Finish cleanup
* Formatting fixes
* just use common.gradle
* Update build.gradle
* Update config.gradle
* remove typo
* simplify
* Add Packet Headers
* move simulation classes into simulation folder
* draw in dependency
* fix
* Everything working minus tests cause im lazy
* formatting fixes
REMEMBER TO REMOVE UNUSED IMPORTS, IM JUST TOO LAZY TO CHECK RN
* move packet test to targeting
* Formatting fixes
* remove TargetCorner from c++
im not 100% sure but just doing std::pair<double, double> is sufficient and shouldnt conflict with protobuf
* think i added packet
* fix namespace issue
* organize imports in photon-targeting
* Formatting fixes
* remove ctors
* fix typo
* Add PNP and Multitag packet tests
* revert TargetCorner class
* Add Test placeholders
* remove annoying print
* Reorganize build and publish process
channeling inner Thad
* add targeting as flag
* Update config.gradle
* fix issue with platform binaries not building
* Update photonlib.json.in
casing still needs to be checked
* add minimum level back
* add back UTF-8 encoding of javadoc
* simplify publish model for photon-lib
* fix windows symbol generation
* formatting fixes
* move task from main gradle to config
* Update config.gradle