Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/spectrum3847/2026-Spectrum/llms.txt

Use this file to discover all available pages before exploring further.

Spectrum 3847’s 2026 robot code powers our competition robots for the FRC game REBUILT. Built on WPILib’s command-based framework in Java, the codebase features a trigger-driven state machine, a reusable SpectrumLib library, full robot simulation, and vision-assisted pose estimation — all designed so multiple programmers can work on independent subsystems without stepping on each other.

Setup & Installation

Install WPILib, clone the repo, and get the simulator running on your machine.

Project Structure

Understand how the codebase is organized — robot subsystems, SpectrumLib, and configs.

Robot Architecture

Learn how subsystems, mechanisms, states, and triggers work together.

FRC Software Basics

New to FRC programming? Start here with Java and WPILib fundamentals.

Development Guide

Code style, commits, tooling, and best practices for contributing.

2026 Season Specifics

Game-specific robot states, controls layout, and vision configuration for REBUILT.

Key features

The Mechanism abstract class wraps CTRE TalonFX/Kraken motor controllers, handling leader/follower configuration, Motion Magic, velocity, torque-current, and voltage control modes. It exposes CachedDouble sensor values for efficient CANbus access and generates Trigger factories (at/above/below position or velocity) for use in command bindings.
Robot behaviors are expressed as WPILib Trigger conditions bound to Command sequences — no complex CommandGroup nesting. High-level states (e.g., INTAKE_FUEL, TURRET_TRACK_WITH_LAUNCH) are coordinated through Coordinator.java, which fans out to individual subsystem state methods simultaneously.
RobotSim.java wires up IronMaple season-specific physics — RebuiltFuelOnFly game piece simulation and Arena2026Rebuilt field environment — alongside LinearSim, ArmSim, and RollerSim classes from SpectrumLib for mechanism visualization in WPILib’s Mechanism2D.
A single codebase supports multiple physical robots (FM2026, XM2026, PM2026, AM2026) through configuration classes loaded at startup based on the RoboRIO’s unique ID. Each config can mark individual mechanisms as attached or detached, preventing hardware initialization errors on robots missing certain components.
Limelight 4 cameras provide MegaTag1 (3D) and MegaTag2 (2D) pose estimates, fused into the swerve drivetrain’s WPILib pose estimator via addVisionMeasurement. PhotonVision on an Orange Pi handles game-piece object detection. The 2026 REBUILT AprilTag field layout (k2026RebuiltWelded) is loaded for accurate localization.
Autonomous routines are built in PathPlanner with event-marker-triggered commands at waypoints. Paths and autos are stored under src/main/deploy/pathplanner/ and are selected from SmartDashboard at match time.

Getting started quickly

1

Install prerequisites

Download WPILib 2026 and JDK 17 (Eclipse Temurin recommended). See the Setup guide for full instructions.
2

Clone and open the repo

git clone https://github.com/spectrum3847/2026-Spectrum.git
cd 2026-Spectrum
Open the folder in WPILib VSCode.
3

Run in simulation

Press Ctrl+Shift+P → type sim → select WPILib: Simulate Robot Code. Gradle will build, then launch Glass for the GUI simulator.
4

Explore the codebase

Start with Project Structure to understand where things live, then read Robot Architecture to understand how subsystems, states, and triggers connect.
Java 17 is required. WPILib 2026 does not support Java 18 or later. Use SDKMAN on macOS/Linux to manage Java versions easily.

Build docs developers (and LLMs) love