The FRC Programming Workshop is an open-source educational resource maintained by mentors, students, and alumni to document robotics engineering standards across FRC.
Contribution Principles
Section titled “Contribution Principles”All contributions must follow three core tenets:
- Modern WPILib & Hardware Alignment: Target modern WPILib releases and official vendor APIs (CTRE Phoenix 6, REVLib, Limelight, PathPlanner).
- Pedagogical Integrity (“Bench to Autonomous”): Verify physical hardware and CAN bus integrity before writing code; explain why systems work, separating feedforward from feedback.
- Safety First: Every motor and mechanism code sample must include stator current limits, software limits, and safe default states.
Java Code Standards
Section titled “Java Code Standards”When submitting new mechanism examples or tutorial snippets:
1. WPILib Units Requirement
Section titled “1. WPILib Units Requirement”Always use the WPILib Units library (edu.wpi.first.units.*) instead of raw double parameters:
// Recommended: Explicitly typed unitspublic void setElevatorHeight(Distance targetHeight) { ... }
// Discouraged: Ambiguous unitpublic void setElevatorHeight(double height) { ... }2. Subsystem Encapsulation & Safety
Section titled “2. Subsystem Encapsulation & Safety”Every mechanism subsystem must:
- Declare all hardware handles as
private final. - Configure stator current limits (e.g. 40A on Krakens/Falcons/NEOs) and supply current limits.
- Set forward and reverse soft limits to prevent mechanical crashes.
- Provide a default command (e.g., hold position or stop motor).
- Publish diagnostic telemetry inside
periodic().
Current Limits are Mandatory
Pull requests containing mechanism code without stator current limits will not be approved. Protecting hardware and preventing battery brownouts is our top priority.
Pull Request Workflow
Section titled “Pull Request Workflow”- Fork the Repository: Create a feature branch with a descriptive name (e.g.,
feat/wrist-code-snippetordocs/feedforward-visuals). - Develop & Test Locally:
Terminal window pnpm installpnpm dev - Run Production Build Verification:
Ensure zero Astro, MDX, or TypeScript compile errors.
Terminal window pnpm build - Submit Your PR: Describe the background, reference teams or CAD models where the mechanism was tested, and link related issues.