4.6 KiB
4.6 KiB
type, domain, subdomain, level, tags, status, source, growth
| type | domain | subdomain | level | tags | status | source | growth | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| training-material | robotics | code-index | reference |
|
active | Team2890 Gitea (Mothman repo) | tree |
Team 2890 Codebase Index — Training Reference
Source: https://gitea.hawkcollective2890.com/Team2890/Mothman Access: Via Gitea API token (read) Language: Java (WPILib) Note: Concepts apply to C++ — syntax differs, patterns identical
Repo Structure Overview
Mothman/
├── src/main/java/frc/robot/
│ ├── Constants.java — Robot-wide constants
│ ├── LimelightHelpers.java — Vision targeting helpers
│ ├── Main.java — Robot entry point
│ ├── Robot.java — Main robot class (periodic methods)
│ ├── RobotContainer.java — Joysticks, commands, subsystems wiring
│ ├── commands/ — Command classes
│ └── subsystems/ — Hardware subsystem controllers
├── src/main/deploy/
│ ├── pathplanner/ — Autonomous paths + autos
│ └── swerve/ — Swerve module JSON configs
└── vendordeps/ — Vendor libraries (Phoenix, REV, etc.)
Key Training Resources by Topic
🏎️ Swerve Drive (YAGSL)
Config files:
deploy/swerve/neo/swervedrive.json— swerve drive configdeploy/swerve/neo/modules/*.json— per-module PID/physical properties
Code:
subsystems/swervedrive/SwerveSubsystem.java— main swerve controllercommands/swervedrive/drivebase/AbsoluteDriveAdv.java— advanced field-relative drive
Training value:
- YAGSL configuration structure (JSON-based swerve setup)
- Swerve module characterization
- Field-relative vs robot-relative control
📍 PathPlanner (Autonomous)
Config:
src/main/deploy/pathplanner/autos/*.auto— named autonomous routinessrc/main/deploy/pathplanner/paths/*.path— individual path segments
Example autos:
1 Meter Test Auto.auto90 Degree Test Auto.auto
Training value:
- Auto path structure (waypoints, constraints)
- PathPlannerLib integration
- Auto command sequencing
👁️ Vision (PhotonVision + Limelight)
Code:
subsystems/swervedrive/Vision.java— AprilTag detection, pose estimationLimelightHelpers.java— Limelight vision helpers
Training value:
- Camera pipeline setup (PhotonVision)
- AprilTag interpretation (field layout)
- Pose estimation from vision
🎮 Subsystems
ClimberSubsystem.java— Robot climber mechanismIntakeSubsystem.java— Game piece intakeShooterSubsystem.java— Scoring shooterTargetingSubsystems.java— Aim assist
Training value:
- Subsystem architecture (commands bound to triggers)
- Motor controller setup (Phoenix/REV)
⚙️ Vendor Dependencies (vendordeps/)
Phoenix5-replay-5.36.0.json— TalonFX (legacy)Phoenix6-replay-26.1.0.json— TalonFX (new)REVLib.json— NEO, SparkFlex motorsPathplannerLib-2026.1.2.json— Auto/path planningphotonlib.json— PhotonVisionyagsl-2026.1.14.json— Swerve libraryReduxLib-2026.1.1.json— SensorsStudica-2026.0.0.json— Contour followingThriftyLib-2026.json— Thrifty cameras
Key Files for C++ Developers
For C++ teams learning from Java code:
- Subsystem class — Java:
extends SubsystemBase→ C++: Inheritfrc::SubsystemBase - Command binding — Java:
+=operator → C++:AddCommands() - Motor controller — Java:
.set()→ C++:Set() - Joystick input — Java:
driver.getRawButton()→ C++:GetRawButton() - Auto commands —
pathplanner(same library in both languages)
What to Use for Training
For students learning FRC programming:
- Start with
SwerveSubsystem.java— see swerve control in action - Look at
AbsoluteDriveAdv.java— field-relative swerve drive logic - Check
RobotContainer.java— how subsystems + commands + joysticks wire together - Study the path files — how autos are composed from paths
For C++ students:
- The pattern is identical. Focus on the logic, not the syntax.
- YAGSL config (JSON) works the same in both languages
External Mirrors
- PhotonVision → Team2890/PhotonVision — Vision processing (mirrored from github)
- YAGSL → Team2890/YAGSL — Swerve library (mirrored)
- allwpilib → Team2890/allwpilib — WPILib source (mirrored)
Access: https://gitea.hawkcollective2890.com/Team2890/Mothman