FRC Blueprint
FRC Blueprint is an interactive, native VS Code extension designed to accelerate WPILib robot code development for FIRST Robotics Competition (FRC) teams.
Instead of relying on rigid, static snippets or copying and pasting old code, FRC Blueprint provides a native, interactive state-machine wizard that guides you through the setup of standard robot mechanisms. It dynamically generates tailored, highly-structured boilerplate code, complete with hardware-specific configurations, dynamic follower motor logic, and WPILib physics simulation support.
Built with AdvantageKit and Hardware-Specific IO Interfaces in mind, this extension enforces best practices for Command-Based robot architectures right out of the box.
Key Features
Interactive Subsystem Wizard
Trigger the command palette, and FRC Blueprint walks you through a native, multi-step UI flow to configure your mechanism. Made a mistake? Use the native Back button to return to a previous step without losing your typed inputs or having to cancel the command.
Mechanism Archetypes
Instantly generate complete file structures for the most common FRC mechanisms. The extension currently supports:
- Linear Mechanisms: Elevators, telescoping arms, and linear actuators.
- Pivoting Mechanisms: Single-jointed arms, wrists, and rotational intakes.
- Continuous Rotation Mechanisms: Flywheels, shooters, and spinning rollers.
Hardware-Specific Boilerplate
Stop writing the same motor configuration code over and over. Select your motor controller type during setup, and the extension generates the correct configuration API, PID slots, and telemetry updates.
- Currently Supported: CTRE TalonFX (Kraken X60, Falcon 500)
- In Development: REV SPARK MAX (NEO, NEO 550)
Dynamic Follower Scaling
Specify your exact follower motor count (from 0 to 10), and the EJS templating engine will automatically scale the generated Java files. It dynamically injects:
- Follower instantiations and CAN ID parameters.
- Opposed/Matching motor alignment configurations.
- Mirrored telemetry signals and
StatusSignal refresh loops.
Out-of-the-Box Simulation (IOSim)
Develop your code before the robot is built. Every generated subsystem includes an IOSim implementation pre-configured with WPILib physics classes (SingleJointedArmSim, FlywheelSim, ElevatorSim). The extension automatically calculates the simulated DCMotor current limits and inertias based on your selected follower motor count.
Smart Workspace Memory
Tired of clicking through the file explorer to find your subsystems folder? FRC Blueprint utilizes the VS Code Workspace Configuration API. The first time you generate a mechanism, it saves your target directory to .vscode/settings.json. The next time you run the command, it bypasses the folder selection entirely.
Getting Started
Prerequisites
- Visual Studio Code (WPILib): Version
^1.102.0 or higher. It is highly recommended that you use the official WPILib VS Code installation provided by the FRC WPILib installer. You can download the latest release from the WPILib GitHub Releases page.
- FRC Toolchain: Your project must be a Java-based WPILib project utilizing the Command-Based Framework.
- Dependencies: Generated files assume the presence of
CTRE Phoenix 6, AdvantageKit, and WPILib standard math/physics libraries.
Installation
(Note: As this extension is currently in local development, install via VSIX)
- Download the
.vsix package from the latest release.
- Open VS Code.
- Go to the Extensions view (
Ctrl+Shift+X).
- Click the
... menu in the top right and select Install from VSIX.
- Select the downloaded file.
Usage Guide
Generating a new subsystem takes less than 10 seconds.
- Open the VS Code Command Palette (
Ctrl+Shift+P or Cmd+Shift+P).
- Type and execute:
FRC: Create New Subsystem.
- Step 1: Select the Mechanism Archetype (Linear, Pivoting, or Continuous).
- Step 2: Type the name of your subsystem (e.g.,
Elevator, Wrist, Shooter). Safe Java naming conventions (PascalCase/camelCase) are enforced.
- Step 3: Enter the number of follower motors attached to the mechanism (e.g.,
0, 1, 2).
- Step 4: Select your Motor Controller type (e.g.,
TalonFX).
- Complete: The extension generates the folder and files instantly.
Example Output Structure
If you generate a Pivoting Mechanism named Arm with 1 follower motor using TalonFX controllers, the extension generates the following architecture:
src/main/java/frc/robot/subsystems/
└── arm/
├── Arm.java (High-level Subsystem wrapper & Commands)
├── ArmConstants.java (Hardware IDs, PID/Feedforward, Gear Ratios)
├── ArmIO.java (Interface for AutoLogged inputs)
├── ArmIOSim.java (WPILib SingleJointedArmSim implementation)
└── ArmIOTalonFX.java (CTRE Phoenix 6 Hardware implementation)
Extension Settings
This extension contributes the following settings to your workspace (.vscode/settings.json):
frc-blueprint.subsystemsPath: The absolute file path to your robot's subsystems directory.
- Note: You do not need to configure this manually. The extension prompts you to select a folder via the UI on your first run and automatically saves the path for future use.
To change or reset this path, simply open your .vscode/settings.json file and edit or delete the "frc-blueprint.subsystemsPath" entry.
Known Issues & Limitations
- SPARK MAX Support: Templates for REV SPARK MAX motor controllers are visible in the UI but will display a "Not Implemented Yet" warning. Support is slated for the next major release.
- Physics Tuning: The generated
IOSim files provide the structural boilerplate for simulation. However, you must manually tune the physical constants (e.g., Center of Gravity length, Mass, and Moment of Inertia) in the Constants file to make the simulation accurately reflect your specific robot's behavior.
Contributing
We welcome contributions from the FIRST Robotics community! If you have suggestions for better boilerplate structures, new hardware integrations, or bug fixes:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature).
- Commit your changes (
git commit -m 'Add some AmazingFeature').
- Push to the branch (
git push origin feature/AmazingFeature).
- Open a Pull Request.
Built for FRC Teams, by FRC Teams. Good luck this season!