Skip to content

Port Az-RBSI to WPILib 2027 and SystemCore with Commands V2 - #186

Merged
tbowers7 merged 16 commits into
developfrom
sc2027
Oct 27, 2026
Merged

tbowers7 merged 16 commits into
developfrom
sc2027

Conversation

@tbowers7

@tbowers7 tbowers7 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Merge sc2027 into develop as the Commands V2 baseline for Az-RBSI’s 2027 releases. This branch does not implement Commands V3; that will be maintained separately.

Changes

  • Migrate the build and robot code to the WPILib 2027 alpha toolchain, Java 25, SystemCore deployment, and updated WPILib and vendor APIs.
  • Add configurable SystemCore CAN assignments for each complete swerve module and the Pigeon. The default uses can_s2 for front modules, can_s3 for back modules, can_s4 for the IMU, and can_s1 for mechanisms.
  • Improve autonomous start-pose validation and bound odometry and vision processing so stale sensor work cannot accumulate indefinitely.
  • Update tests, installation and CAN wiring guidance, and 2027 season assets.

Compatibility and follow-up

This branch currently uses GradleRIO 2027.0.0-alpha-6 and a Commands V2 vendordep. Choreo, YAGSL, NavX/Studica, and several other integrations are disabled pending compatible 2027 releases. Teams must verify CAN assignments and drive behavior on their hardware before deployment. The kickoff release will require a further dependency and API update.

Validation

The autonomous localization commit reports a passing build with 43 tests; the latest CAN-layout commit reports passing targeted constants and utility tests. I did not rerun the test suite while drafting this description.

tbowers7 and others added 13 commits July 8, 2026 13:38
Migrates the project onto the WPILib 2027 alpha toolchain, including GradleRIO
2027 alpha, the updated Gradle wrapper, refreshed WPILib settings, and the
SystemCore-era package/API changes throughout the robot code and tests. This
also moves the robot entry point into the new `first` package shape expected
by the importer.

Updates the robot source tree for 2027-compatible WPILib, CTRE, REV, PathPlanner,
PhotonVision, AdvantageKit, Autopilot, URCL, and CommandsV2 APIs. This includes
broad import/package updates, motor/controller constructor changes, timer API
updates, geometry/kinematics type changes, logging adjustments, and test fixes
needed for the migrated APIs.

Temporarily disables dependency paths that are not yet 2027/SystemCore
compatible. Choreo, YAGSL, Studica/NavX, ReduxLib, ThriftyLib, Phoenix 5,
and maple-sim vendordeps are removed, while their source integrations are
stubbed or commented with TODOs so they can be restored once compatible vendor
releases exist. Autopilot is kept via the forked 2027 vendordep.

Removes the old YAGSL/Studica runtime dependency surface from active code,
including the YAGSL constants parser, NavX IMU implementation, and Choreo auto
controller/follower paths. `RobotConstants.kChassisMatter` is removed entirely
because physics simulation will be revisited later with an appropriate
2027-compatible model.

Adjusts field and vision support for the migrated WPILib layout classes by
preserving the original AprilTag JSON text for PhotonVision instead of reserializing
`AprilTagFieldLayout`. The drive, IMU, accelerometer, vision, flywheel example,
utility, and generated tuner constants code paths are updated to compile and test
against the 2027 alpha libraries.

Refreshes tests for the new CTRE and WPILib APIs, including explicit default
`CANBus` construction and `Timer.getTimestamp()`. The staged state was validated
with `./gradlew build -Dorg.gradle.java.home=/Users/tbowers/wpilib/2027_alpha5/jdk`,
which passes with 39 tests green.

Adds 2027 season presentation assets and README updates, including CANOPY and FRC
BIOCORE logos, BIOCORE VS Code theme installation instructions, and moving the
AZ-FIRST logo into `assets/` so repository imagery is organized under the assets
tree.
Preserve the raw gyro reference during pose-estimator resets while exposing the field-aligned estimator heading to callers.

Track accepted vision timing so PathPlanner keeps a recently localized pose instead of unconditionally replacing it with the nominal starting pose.

Co-authored-by: Codex <codex@openai.com>
Simplify drivetrain, vision, field-state, and registry decisions while replacing fixed module counts and repeated branches with clearer data-driven loops.

Consolidate alert and odometry queue handling, eliminate unnecessary allocations, and cover HUB shift boundaries with focused tests.

Co-authored-by: Codex <codex@openai.com>
Validate the selected PathPlannerAuto against its alliance-correct starting pose before scheduling it. Preserve fresh vision inside the 0.5 meter tolerance, reset an uninitialized or visionless estimator to the path start, and block drivetrain output with an alert when trusted vision places the robot elsewhere.

Keep the pose estimator and external pose buffer advancing while disabled, and move accepted vision into a bounded queue owned by DriveOdometry. Apply no more than two estimates per loop, retain timestamped estimator history after the initial disabled localization snap, and log queue depth, drops, and processing.

Replace the Phoenix and Spark sampling queues with overwrite-oldest buffers so overload retains current measurements. Refresh module CTRE telemetry in one drivetrain-wide operation and add sub-timers for bulk refresh, lock wait, module draining, estimator work, vision application, and total odometry cost.

Process only the newest unread PhotonVision and Limelight result from each stream, reuse cached power-channel readings, and lower the PathPlanner strafe gain to 3.0. These changes bound stale work while preserving current sensor data and per-module connection diagnostics.

Add tests for PathPlanner start decisions and overwrite-oldest queue ordering. The complete WPILib 2027 build passes all 43 tests, including the existing drivetrain, vision, simulation, and utility coverage.

Co-authored-by: Codex <codex@openai.com>
Pass the current rotation directly into the alliance heading helper, keeping field-relative drive calculations explicit at both call sites.

Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Default the front modules, back modules, and Pigeon to separate native SystemCore buses while keeping each complete module and the IMU independently assignable. Map the historical RIO mechanism alias to can_s1 and remove the unused DriveTrain bus constant.

Align generated Tuner examples and test fixtures with can_s* names. Document one-, two-, and three-bus wiring choices, the default front/back/IMU layout, and how teams configure other splits. Verify the targeted constants and utility tests with the bundled Java 25.

Co-authored-by: Codex <codex@openai.com>
@tbowers7 tbowers7 added the Season Upgrade PR or Issue related to upgrading Az-RBSI from one season to the next. label Oct 27, 2026
@tbowers7 tbowers7 added this to the v27.0.0 milestone Oct 27, 2026
@tbowers7 tbowers7 linked an issue Oct 27, 2026 that may be closed by this pull request
tbowers7 and others added 2 commits October 27, 2026 12:15
Configure both CI jobs with Temurin 25 and align dependency submission with the 2027 Java target.

Co-authored-by: Codex <codex@openai.com>
Replace the legacy roboRIO cross-build container so native WPILib test libraries can load with the required C++ runtime.

Co-authored-by: Codex <codex@openai.com>
@tbowers7
tbowers7 merged commit 0552623 into develop Oct 27, 2026
5 checks passed
@tbowers7
tbowers7 deleted the sc2027 branch October 27, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Season Upgrade PR or Issue related to upgrading Az-RBSI from one season to the next.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement support for SystemCore

1 participant