Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
34af230
Merge pull request #10 from FRC5010/main
5010TigerDynasty Oct 1, 2025
80b8424
updates
CameronSkea Oct 1, 2025
89a320a
Merge pull request #11 from FRC5010/main
clrozeboom Oct 5, 2025
98e3a69
Merge branch 'main' into 7-swerve-updates
clrozeboom Oct 5, 2025
b7f64a1
Remove butterbup
clrozeboom Oct 5, 2025
5492731
Merge branch 'FRC5010:main' into main
clrozeboom Oct 7, 2025
6b88da1
Squashed commit of the following:
clrozeboom Oct 7, 2025
b1cc0c2
Reinstate BlackRobot
clrozeboom Oct 7, 2025
e13250e
for robert
CameronSkea Oct 9, 2025
ee795e9
Merge branch '7-swerve-updates' into LobbinLoco
5010TigerDynasty Oct 9, 2025
b0d7885
new code
CameronSkea Oct 20, 2025
6f9381f
Added New Autos
5010TigerDynasty Oct 23, 2025
7cadfee
Merge branch 'main' of https://github.com/FRC5010/TeamBlack2025
clrozeboom Oct 25, 2025
1258f00
Merge branch 'main' into LobbinLoco
clrozeboom Oct 25, 2025
d996709
Reorder and clean up imports in example classes
clrozeboom Oct 26, 2025
5689da7
guragura
CameronSkea Oct 27, 2025
fe15524
New Paths
5010TigerDynasty Oct 27, 2025
0152761
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
CameronSkea Oct 27, 2025
4abd892
Refactor camera target handling and add distance API (#12)
clrozeboom Oct 29, 2025
1a5c452
State Machine Changes
5010TigerDynasty Oct 30, 2025
b464d51
Merge branch 'main' of https://github.com/FRC5010/TeamBlack2025
clrozeboom Nov 2, 2025
46fd02d
Merge branch 'main' into LobbinLoco
clrozeboom Nov 2, 2025
91b271a
black team bot config
5010TigerDynasty Nov 3, 2025
e4afe64
Working changes
5010TigerDynasty Nov 5, 2025
737c05c
Use copied YAGSL
clrozeboom Nov 6, 2025
30dd9ed
Update ThriftyLib APIs
clrozeboom Nov 8, 2025
78af476
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
CameronSkea Nov 10, 2025
f3b5347
shooter config pls work
CameronSkea Nov 12, 2025
a173f36
Config updates
5010TigerDynasty Nov 12, 2025
ac5588d
Working Black YAGSL values
5010TigerDynasty Nov 15, 2025
6807634
Re-enable shooter
5010TigerDynasty Nov 15, 2025
3dfd492
Merge branch 'main' of https://github.com/FRC5010/TeamBlack2025
clrozeboom Nov 15, 2025
3258380
Merge branch 'main' into LobbinLoco
clrozeboom Nov 15, 2025
e01a09f
,nm,nm,
CameronSkea Nov 17, 2025
67c5a1a
fadc
CameronSkea Nov 17, 2025
eb9d8aa
Refactor shooter and feeder gearing configuration
clrozeboom Nov 18, 2025
1b060cd
renamed everything except telemetry dont really know how.
CameronSkea Nov 20, 2025
c0b07fc
merge
CameronSkea Nov 20, 2025
4d982c6
Added States
Adamtheboss9 Nov 20, 2025
cc95781
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
Adamtheboss9 Nov 20, 2025
ad3457b
srfvs
CameronSkea Nov 20, 2025
f8a88b3
Parial to do list, shooter changes
Adamtheboss9 Nov 20, 2025
530ed7b
mass
CameronSkea Nov 20, 2025
e190775
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
Adamtheboss9 Nov 20, 2025
b35f2b6
feeder
CameronSkea Nov 22, 2025
5c7075d
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
CameronSkea Nov 22, 2025
5a0bb9d
black robot got deleted for me if it happened to anyone else let me k…
CameronSkea Nov 22, 2025
7ce2e62
config
CameronSkea Nov 22, 2025
f1c1c45
Fix sim crashes and configure commands and add 3d field
5010TigerDynasty Nov 22, 2025
df74400
Merge branch 'main' of https://github.com/FRC5010/TeamBlack2025
clrozeboom Nov 23, 2025
453ea69
Merge branch 'main' into LobbinLoco
clrozeboom Nov 23, 2025
a02922d
Enhance alliance color handling and LED integration (#14)
clrozeboom Nov 23, 2025
ceff218
Add commands to state machine
5010TigerDynasty Nov 24, 2025
b008828
Update shooter subsystem configs and state machine
clrozeboom Nov 26, 2025
4b89201
Remove the gear factor from the recording of the setpoint.
clrozeboom Nov 26, 2025
6e54f43
Hi Buttercup
5010TigerDynasty Dec 1, 2025
499f035
Updates to ButterCup
clrozeboom Dec 2, 2025
8fca1fa
Reconfigure upper and lower flywheels to make them separate subsystems
clrozeboom Dec 3, 2025
b32df9c
Did the TODO in UpperFlyWheel and LowerFlyWheel
Rguo1234 Dec 3, 2025
b5567b9
Updated Shooter
pkatzfey Dec 3, 2025
f40a922
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
pkatzfey Dec 3, 2025
9662cec
Updated Motors+LED 12/4
pkatzfey Dec 4, 2025
65c7fd0
Revision-Use this 12/4
pkatzfey Dec 5, 2025
a38e84d
LEDS and SysID
5010TigerDynasty Dec 5, 2025
8203163
Some changes to how LEDs are ordered
clrozeboom Dec 5, 2025
5d8bb58
LED Code To All Other Buttons
pkatzfey Dec 8, 2025
9e0a8fd
Added LED changes
Adamtheboss9 Dec 8, 2025
ec77ba8
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
Adamtheboss9 Dec 8, 2025
4bfb29a
More LED changes
Adamtheboss9 Dec 8, 2025
6fb710f
Final configs for Holiday Party
5010TigerDynasty Dec 11, 2025
1ba57c9
reverse intake
pkatzfey Jan 11, 2026
eb5a740
Merge branch 'LobbinLoco' of https://github.com/FRC5010/TeamBlack2025…
pkatzfey Mar 30, 2026
85619b0
Update swerve CAN IDs, zero offsets; adjust robots
clrozeboom Mar 30, 2026
448c6a1
Merge branch 'main' of https://github.com/FRC5010/TeamBlack2025
clrozeboom Apr 1, 2026
2017be6
Remove stale Javadoc @param entries (#16)
clrozeboom Apr 1, 2026
b7ae12b
Merge branch 'main' into LobbinLoco
clrozeboom Apr 1, 2026
3e1a319
Add Javadoc workflow, docs, and schemas
clrozeboom Apr 1, 2026
d0eae21
Sync up 2026 changes (#15)
clrozeboom Apr 1, 2026
553e303
Tweak shooter behavior
pkatzfey Apr 1, 2026
5cbc372
Normalize flywheel configs and add LobbinLoco
pkatzfey Apr 1, 2026
3be7007
Remove unused robots
clrozeboom Apr 4, 2026
dbd87d0
Update flywheel configs and robot simulate flags
clrozeboom Apr 4, 2026
4168e23
Removing LobbinLoco
5010TigerDynasty Apr 4, 2026
72dc996
Configure drivetrain buttons; remove aprilTagLayout
clrozeboom Apr 4, 2026
b78c8e0
Fixed inversions and stuff
5010TigerDynasty Apr 8, 2026
8748a97
Both robots work
5010TigerDynasty Apr 11, 2026
1224266
Switch feeder to SparkMax; Fixed Feeder from Continuously running.
pkatzfey Apr 15, 2026
99e2684
Demo mode
pkatzfey Apr 22, 2026
20f3739
Fix Black launcher and fix interference with shooting
pkatzfey Apr 24, 2026
aebb933
switch the steer direction
5010TigerDynasty Jun 22, 2026
a88e916
Configure buttercup AdvantageKit swerve from YAGSL values
claude Jun 22, 2026
3b6e845
Add Akit in
5010TigerDynasty Jun 22, 2026
5664b5b
Make akit Spark path drive buttercup's hardware
claude Jun 22, 2026
ac069c2
Fix akit Spark drivetrain creation: create TalonFX odometry thread fo…
claude Jun 22, 2026
6300b98
Fix odometry crash when gyro and modules sample on different threads
claude Jun 22, 2026
16662c5
Use the sparkodometry thread as a hack
5010TigerDynasty Jun 22, 2026
24d3868
Fix no-strafe: populate turnPosition from the absolute encoder (Spark)
claude Jun 22, 2026
5eb8b70
Change rotation
5010TigerDynasty Jun 22, 2026
cf6a986
Add CLAUDE.md with build commands and architecture overview
claude Jun 25, 2026
c85009d
Make Spark IO config-driven, add azimuth offset support and swerve di…
claude Jun 25, 2026
407ab9b
Read Spark PID from JSON; fix black to Spark akit and switch it to AKIT
claude Jun 25, 2026
606ef53
Fix ModuleIOSparkTalon: set turnPosition and read steer config from JSON
claude Jun 25, 2026
f7ae8ca
Spark Fishers Changes
5010TigerDynasty Jun 25, 2026
3525ab0
Fix A/B/X/Y flywheel buttons not stopping motors
claude Jun 25, 2026
8209912
Refactor driver button bindings and feeder directions
clrozeboom Jun 26, 2026
f065e21
Drive FeederSubsystem from JSON config like UpperFlyWheel
claude Jun 26, 2026
04b6457
Reverse feeder on butercup
clrozeboom Jun 26, 2026
27a487f
Feeder LED: green laser sweep, deactivate on release
claude Jun 27, 2026
ae61432
Fix getBand crash and addSegment end-index naming
claude Jun 27, 2026
7e13038
Add swerve azimuth diagnostics logging and step-test command
claude Jun 27, 2026
bfd187f
Bind azimuth step test in test mode; fix expected-steer dial
claude Jun 27, 2026
588bb2d
Add Azimuth Step Test dashboard button
claude Jun 27, 2026
d2fbfe0
Merge branch 'SparkFishers' into claude/buttercup-akit-config
claude Jun 27, 2026
8b7c408
Implement pointModulesAt for akit so the azimuth step test works
claude Jun 27, 2026
34ce7ba
Updates to Elphaba CAN
clrozeboom Jun 27, 2026
7674370
Merge SparkFishers (Elphaba CAN); sync black akit CAN IDs
claude Jun 27, 2026
62f55df
Other updates
pkatzfey Jun 27, 2026
ecd57e0
Merge SparkFishers (Other updates); sync black akit backRight CAN
claude Jun 27, 2026
8516b88
Add swerve log analyzer for azimuth diagnostics
claude Jun 29, 2026
52294f6
Merge SparkFishers: add swerve log analyzer tool
claude Jun 29, 2026
0695d8a
Use YAGSL drive and improve pointModulesAt
clrozeboom Jun 29, 2026
137f19c
Swerve diagnostic
clrozeboom Jul 23, 2026
bababaf
Switch back to akit
clrozeboom Jul 23, 2026
7f1daea
Merge akit swerve into lobbinloco
clrozeboom Jul 23, 2026
73cccb5
Update libraries
clrozeboom Aug 4, 2026
0ec07c2
Switch YAMS back
clrozeboom Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .SysId/sysid-window.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"MainWindow": {
"GLOBAL": {
"font": "Proggy Dotted",
"fps": "120",
"height": "720",
"maximized": "1",
"style": "0",
"userScale": "2",
"width": "1280",
"xpos": "0",
"ypos": "29"
}
},
"Window": {
"###Analyzer": {
"Collapsed": "0",
"Pos": "320,25",
"Size": "360,689"
},
"###Data Selector": {
"Collapsed": "0",
"Pos": "5,480",
"Size": "310,291"
},
"###Log Loader": {
"Collapsed": "0",
"Pos": "5,25",
"Size": "310,450"
},
"###Program Log": {
"Collapsed": "0",
"Pos": "327,701",
"Size": "360,135"
},
"Debug##Default": {
"Collapsed": "0",
"Pos": "60,60",
"Size": "400,400"
},
"Diagnostic Plots": {
"Collapsed": "0",
"Pos": "685,25",
"Size": "1225,779"
},
"Exception Caught!": {
"Collapsed": "0",
"Pos": "720,431",
"Size": "480,128"
},
"Override Units": {
"Collapsed": "0",
"Pos": "481,289",
"Size": "320,144"
}
}
}
1 change: 1 addition & 0 deletions .SysId/sysid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
135 changes: 1 addition & 134 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,139 +29,6 @@
null
],
"java.test.defaultConfig": "WPIlibUnitTests",
"java.import.gradle.annotationProcessing.enabled": false,
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*",
"edu.wpi.first.units.Units.*"
],
"java.completion.filteredTypes": [
"java.awt.*",
"com.sun.*",
"sun.*",
"jdk.*",
"org.graalvm.*",
"io.micrometer.shaded.*",
"java.beans.*",
"java.util.Base64.*",
"java.util.Timer",
"java.sql.*",
"javax.swing.*",
"javax.management.*",
"javax.smartcardio.*",
"edu.wpi.first.math.proto.*",
"edu.wpi.first.math.**.proto.*",
"edu.wpi.first.math.**.struct.*",
null
],
"java.dependency.enableDependencyCheckup": false,
"json.schemas": [
{
"fileMatch": [
"**/akit_swerve_drivetrain.json"
],
"url": "./src/main/resources/schemas/akit_swerve_drivetrain.schema.json"
},
{
"fileMatch": [
"**/robots.json"
],
"url": "./src/main/resources/schemas/robots.schema.json"
},
{
"fileMatch": [
"**/robot.json"
],
"url": "./src/main/resources/schemas/robot.schema.json"
},
{
"fileMatch": [
"**/competition_mode.json",
"**/demo_mode.json"
],
"url": "./src/main/resources/schemas/user-mode.schema.json"
},
{
"fileMatch": [
"**/cameras.json"
],
"url": "./src/main/resources/schemas/cameras.schema.json"
},
{
"fileMatch": [
"**/cameras/**/*.json",
"!**/cameras.json"
],
"url": "./src/main/resources/schemas/camera.schema.json"
},
{
"fileMatch": [
"**/controllers.json"
],
"url": "./src/main/resources/schemas/controllers.schema.json"
},
{
"fileMatch": [
"**/controllers/*.json",
"!**/controllers/axis/**/*.json"
],
"url": "./src/main/resources/schemas/driveteam-controller.schema.json"
},
{
"fileMatch": [
"**/controllers/axis/*.json"
],
"url": "./src/main/resources/schemas/driveteam-controller-axis.schema.json"
},
{
"fileMatch": [
"**/led_strip.json"
],
"url": "./src/main/resources/schemas/led-strip.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/percent_motor.json"
],
"url": "./src/main/resources/schemas/percent-motor.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/velocity_motor.json"
],
"url": "./src/main/resources/schemas/velocity-motor.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/yams_arm.json"
],
"url": "./src/main/resources/schemas/yams-arm.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/yams_elevator.json"
],
"url": "./src/main/resources/schemas/yams-elevator.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/yams_pivot.json"
],
"url": "./src/main/resources/schemas/yams-pivot.schema.json"
},
{
"fileMatch": [
"**/subsystems/example/yams_shooter.json"
],
"url": "./src/main/resources/schemas/yams-shooter.schema.json"
}
],
"java.debug.settings.onBuildFailureProceed": true,
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable"
}
62 changes: 62 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## What this is

FRC team 5010's 2026 robot code (WPILib, Java 17, command-based). It is built on a reusable in-house framework (`org.frc5010.common`, "FRC5010Lib") that is **JSON-configuration-driven**: robots, subsystems, drivetrains, controllers, and cameras are described by deploy-time JSON rather than hardcoded, so one codebase runs multiple physical robots. AdvantageKit (`org.littletonrobotics.junction`) provides logging/replay; the `Robot` class extends `LoggedRobot`.

## Build / run commands

The build runs Spotless (`compileJava.dependsOn(spotlessApply)`), and Spotless's `googleJavaFormat()` crashes on newer JDKs in some environments (`NoSuchMethodError ... JCImport.getQualifiedIdentifier`). When that happens, exclude the Spotless tasks:

```bash
./gradlew compileJava -x spotlessJava -x spotlessJavaCheck # compile only
./gradlew build -x spotlessJava -x spotlessJavaCheck # full build
./gradlew test -x spotlessJava -x spotlessJavaCheck # JUnit 5 tests (src/test/java)
./gradlew test --tests 'org.frc5010.common.arch.GenericRobotTest' # single test class
./gradlew simulateJavaRelease # desktop/maple-sim simulation
./gradlew deploy # deploy to the roboRIO
```

Spotless config: `googleJavaFormat`, `removeUnusedImports`, 100-col limit. Run `./gradlew spotlessApply` locally before pushing where the toolchain works; otherwise match the style by hand (2-space indent, ≤100 col code lines — comments/Javadoc are left alone by the formatter).

Chromium/Playwright are preinstalled in the cloud env; do not run `playwright install`.

## How a robot is selected and built (read these together)

1. `frc.robot.Main` → `frc.robot.Robot` (`LoggedRobot`) → `RobotContainer` → `RobotsParser`.
2. `RobotsParser` reads `src/main/deploy/robots.json`, which maps a robot **name → { id (roboRIO MAC), robotClass, simulate, competition }**. The active robot is chosen by matching the RIO's MAC, or in simulation by the `simulate: true` flag. The matching entry's `robotClass` (e.g. `frc.robot.blackteam.BlackRobot`) is instantiated via reflection with its **deploy directory name** (e.g. `buttercup_swerve`).
3. `GenericRobot(String directory)` constructs `RobotParser` + `SubsystemParser`, which read the JSON files under `src/main/deploy/<directory>/` and build the drivetrain, subsystems, cameras, and controllers. **Exceptions during this phase are caught in `GenericRobot`'s constructor, printed, and swallowed** — a failed parse leaves a half-built robot rather than a crash, so "the drivetrain didn't get created" usually means an exception was thrown and logged during config parsing.

So robot behavior is determined largely by `src/main/deploy/<robot>/*.json`, not by Java edits. The two configured robots share `BlackRobot` but have different deploy dirs (`black_robot`, `buttercup_swerve`).

## Code layout

- `src/main/java/org/frc5010/common/` — the framework library:
- `arch/` — `GenericRobot`, `GenericSubsystem`, `GenericCommand`, NetworkTables value plumbing.
- `config/` — JSON parsers (`RobotParser`, `SubsystemParser`, `RobotsParser`) and the `config/json/**` POJOs that map 1:1 to the deploy JSON. `UnitsParser` + `config/units/**` parse `{ "val", "uom" }` measurements (units accept aliases, e.g. `m/sec`, `kg*m^2`, `degrees`).
- `drive/` — drivetrain abstractions. See the swerve section below.
- `telemetry/` — `DisplayValuesHelper` + `Display*` types wrap NetworkTables entries; `makeConfig*` values are persistent and dashboard-editable (used for live tuning).
- `sensors/`, `motors/`, `mechanisms/`, `subsystems/`, `vision/`, `auto/`, `commands/`.
- `src/main/java/frc/robot/` — WPILib entrypoint + robot-specific code; `blackteam/BlackRobot` is the concrete `GenericRobot` and its subsystems (flywheels, feeder).
- `src/main/deploy/<robot>/` — per-robot JSON config (robot.json, drivetrain, subsystems, controllers, cameras, pathplanner).
- `src/main/resources/schemas/` — JSON schemas for the config files (e.g. `akit_swerve_drivetrain.schema.json`); validate config changes against these.

## Swerve drivetrain architecture (the most complex area)

`GenericSwerveDrivetrain` (the WPILib `Subsystem`) wraps a `SwerveDriveFunctions` implementation chosen by `robot.json`'s `driveType`:

- `YAGSL_SWERVE_DRIVE` → `YAGSLSwerveDrivetrain` (the YAGSL/`swervelib` library). Configured by `deploy/<robot>/yagsl_swerve/**` JSON (modules, `pidfproperties.json`, `physicalproperties.json`, `swervedrive.json`).
- `AKIT_SWERVE_DRIVE` → `AkitSwerveDrive` (AdvantageKit-style IO-layer swerve). Configured by `deploy/<robot>/akit_swerve_drivetrain.json` (validated by the schema). `type` selects the module IO: `TalonFX`, `SparkTalon` (TalonFX drive + Spark steer), or `Spark` (NEO/SparkMax drive + steer).

Key AKit-swerve facts that are non-obvious and have caused real bugs:

- **The `Spark` IO ignores most of the JSON** — `ModuleIOSpark` reads CAN IDs, gear ratios, drive PID, current limits, and per-module `zeroRotation` from the hardcoded `drive/swerve/akit/DriveConstants.java`, **not** from `akit_swerve_drivetrain.json`. The JSON still drives kinematics/PathPlanner/sim. To change Spark hardware behavior, edit `DriveConstants`. (`SparkTalon`/`TalonFX` IOs do read the JSON via `AkitSwerveConfig`.)
- **Two odometry threads.** `ModuleIOSpark`/`ModuleIOSparkTalon` sample on `SparkOdometryThread`; `GyroIOPigeon2` (a CTRE device) samples on `TalonFXOdometryThread`. Both must be created for the gyro to work, and `AkitSwerveDrive.periodic` must tolerate the two queues having different lengths.
- **Steering runs closed-loop on the absolute encoder.** Canandmags are read via the Spark's absolute-encoder API; offsets rely on the encoder's internal zero (config offsets are `0`). `Module.runSetpoint` cosine-scales drive speed by the *measured* steering angle and `optimize()`s against it, so the module IO must populate `inputs.turnPosition` (not just `turnAbsolutePosition`) or strafe/odometry break. A module whose zero leaves it resting at ±180° sits on the wrap seam and will intermittently flip direction.
- Simulation skips the hardware IO entirely (uses `ModuleIOSim`/`GyroIOSim` + maple-sim) and never starts the odometry threads, so hardware-thread/encoder bugs do **not** reproduce in sim.

## Git / workflow

Active development branches are created per-task off the team's feature branches (e.g. `claude/...`). The default branch is protected — branch before committing. Do not push to a different branch without explicit permission. GitHub operations go through the `mcp__github__*` tools (scope: `frc5010/teamblack2025`); there is no `gh` CLI.
Empty file modified gradlew
100755 → 100644
Empty file.
Loading