Team 2890 Codebase Index — Training Reference

Source: http://2890.duckdns.org:3002/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 config
  • deploy/swerve/neo/modules/*.json — per-module PID/physical properties

Code:

  • subsystems/swervedrive/SwerveSubsystem.java — main swerve controller
  • commands/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 routines
  • src/main/deploy/pathplanner/paths/*.path — individual path segments

Example autos:

  • 1 Meter Test Auto.auto
  • 90 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 estimation
  • LimelightHelpers.java — Limelight vision helpers

Training value:

  • Camera pipeline setup (PhotonVision)
  • AprilTag interpretation (field layout)
  • Pose estimation from vision

🎮 Subsystems

FileWhat it Controls
ClimberSubsystem.javaRobot climber mechanism
IntakeSubsystem.javaGame piece intake
ShooterSubsystem.javaScoring shooter
TargetingSubsystems.javaAim assist

Training value:

  • Subsystem architecture (commands bound to triggers)
  • Motor controller setup (Phoenix/REV)

⚙️ Vendor Dependencies (vendordeps/)

LibraryPurpose
Phoenix5-replay-5.36.0.jsonTalonFX (legacy)
Phoenix6-replay-26.1.0.jsonTalonFX (new)
REVLib.jsonNEO, SparkFlex motors
PathplannerLib-2026.1.2.jsonAuto/path planning
photonlib.jsonPhotonVision
yagsl-2026.1.14.jsonSwerve library
ReduxLib-2026.1.1.jsonSensors
Studica-2026.0.0.jsonContour following
ThriftyLib-2026.jsonThrifty cameras

Key Files for C++ Developers

For C++ teams learning from Java code:

PatternJava (Mothman)C++ (WPILib)
Subsystem classextends SubsystemBaseInherit frc::SubsystemBase
Command binding+= operatorAddCommands()
Motor controller.set()Set()
Joystick inputdriver.getRawButton()GetRawButton()
Auto commandspathplannerpathplanner (same lib)

What to Use for Training

For students learning FRC programming:

  1. Start with SwerveSubsystem.java — see swerve control in action
  2. Look at AbsoluteDriveAdv.java — field-relative swerve drive logic
  3. Check RobotContainer.java — how subsystems + commands + joysticks wire together
  4. 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

RepoURLPurpose
PhotonVisionTeam2890/PhotonVisionVision processing (mirrored from github)
YAGSLTeam2890/YAGSLSwerve library (mirrored)
allwpilibTeam2890/allwpilibWPILib source (mirrored)

Access: http://2890.duckdns.org:3002/Team2890/Mothman