Simulation Quick Start
Test all robot code changes in the simulator before running on the real robot. The sim lets you run code that might not work yet, iterate on new features, and keep developing even without access to a physical robot.
What the Sim Covers
- Physics — collisions, bouncing, gravity, ramps
- Game pieces — intake, hold, shoot, score
- Full robot control — drivetrain + all mechanisms
- Limelight AprilTag simulation — simulated vision pose estimates for localization
- Limelight game piece detection — simulated fuel detection via 3D frustum sensor (publishes tv/tx/ty/ta)
Setup
Install WPILib
Download the WPILib installer . This gives you:
- WPILib VS Code (a special VS Code build with FRC extensions)
- AdvantageScope (3D visualization)
- Java, Gradle, and all FRC vendor deps
Install Git + Git LFS
You need Git for version control. Git LFS is recommended (but not required) — it downloads our 3D robot models for AdvantageScope. Without it the sim still works, but you’ll only be able to use KitBot in AdvantageScope.
| Platform | Git | Git LFS |
|---|---|---|
| Windows | Install Git for Windows | Included — make sure the “Git LFS” checkbox is checked during setup |
| macOS | Included with Xcode Command Line Tools (xcode-select --install) | brew install git-lfs && git lfs install |
| Linux | sudo apt install git (Ubuntu/Debian) | sudo apt install git-lfs && git lfs install |
See Troubleshooting if you run into issues with Git LFS.
Get the Code
Clone the repo (if you haven’t already):
GitKraken: Open GitKraken and clone https://github.com/feds201/feds-central.git.
Git CLI:
git clone https://github.com/feds201/feds-central.gitIf you already have the repo, pull the latest changes.
Open in WPILib VS Code
Open this year’s robot project in WPILib VS Code (not regular VS Code). For 2026, that’s robot/2026-rebuilt/.
Run the Sim
You can launch the simulator from VS Code or from the terminal.
VS Code (menu):
- Click the three-dot menu (···) in the top-right of the WPILib sidebar (or the WPILib icon in the top-right corner)
- Select “Simulate Robot Code”
- Choose “Sim GUI”
VS Code (command palette):
Ctrl+Shift+P→ type “WPILib”- Select “Simulate Robot Code”
- Choose “Sim GUI”
Terminal:
cd robot/2026-rebuilt
./gradlew simulateJavaEither way, a WPILib simulation GUI window will open. Don’t close it — you’ll need it in a moment.
You need internet access for the first run. Gradle downloads dependencies (~500MB) and 3D robot models (~100MB via Git LFS) from GitHub. School Wi-Fi may block these downloads, and hotspot can be very slow for files this large. We recommend using home internet for your first build.
The first build takes a while (downloading + compiling). After that, everything is cached locally — subsequent runs are fast and don’t need internet. Once the sim launches, wait a few seconds for it to fully initialize before doing anything.
Set Up the Sim GUI
In the WPILib simulation GUI that opened:
- Connect a controller:
- Xbox / gamepad: Plug it in — it should appear automatically
- No controller? Drag “Keyboard 0” onto “Joystick 0” (see key mappings below)
- Click “Teleoperated” to enable the robot
Set Up AdvantageScope
- Open AdvantageScope (installed with WPILib)
- Connect via NetworkTables 4 (AdvantageKit)
- Click the + button (top right) → select 3D Field
- In the bottom-right Field section, select this year’s game
- Add game pieces:
- In the left panel, find
RealOutputs→Sim→GamePieces - Drag the game piece type into the Poses section (bottom center)
- From the dropdown, select the matching game piece model
- In the left panel, find
- (Optional — required for our robot models) Set custom assets folder:
- In the AdvantageScope menu, select “Use custom assets folder”
- Point it to the current year’s
sim_modelsdirectory (e.g. for 2026:feds-central/robot/2026-rebuilt/sim_models) - Our robot models will now appear in the robot model dropdown
- Add the robot:
- In the left panel, expand
RealOutputs→Sim - Drag
RobotPoseinto the Poses section - From the robot model dropdown, pick one of these:
- KitBot — no setup needed, but doesn’t look like our robot
- FEDS (Static) — our actual CAD, looks like our robot but mechanisms don’t animate (requires step 6)
- FEDS (Components) — our CAD with animated mechanisms like rollers and hood (requires steps 6 and 8)
- In the left panel, expand
- (Optional — required for FEDS (Components)) Add component poses:
- Drag
Sim/ComponentPosesfrom the left panel onto the robot pose you added in step 7, so the component animations are tied to the robot
- Drag
You should now see the field, robot, and game pieces rendered in 3D.
Drive!
2026 REBUILT Driver Controls
The keyboard maps to the driver controller (port 0) only. If you need operator functions (manual hood angle adjust, agitation modes), you must plug in a physical Xbox controller on port 1.
Left-hand keys (WASD + QE) drive the robot. Right-hand keys (O P [ ], K L ; ', M , . /) are the action controls — roughly arranged so “shooting” keys sit on the top row, “feeder/aim” on the home row, and “intake” on the bottom row.
| Keyboard | Xbox | Action |
|---|---|---|
| Movement (left side) | ||
W / S | Left Stick Y | Drive forward / back |
A / D | Left Stick X | Strafe left / right |
Q / E | Right Stick X | Rotate CCW / CW (spin left / right) |
Shooting (top row — O P [ ]) | ||
P (hold) | X | Hub shot — feeder + spindexer + shooter wheels + hood |
O (hold) | Y | Halfcourt / passing shot |
[ (hold) | D-pad Right | Aim hub + spin up shooter (passing shot aim when in neutral zone) |
] (hold) | Right Trigger | Gated fire (only fires when aimed + at speed; use with [) |
Feeder / reset (home row — L ; ') | ||
L (hold) | A | Layup — shoot from against hub |
; (hold) | B | Reverse feeder + spindexer |
' | Start | Reset field-centric heading |
Intake (bottom row — , . /) | ||
, (hold) | Left Trigger | Extend intake + run intake rollers |
. | Left Bumper | Retract intake |
/ (hold) | Right Bumper | Reverse intake rollers |
2026 REBUILT Xbox Controls (Operator — port 1)
Operator controls require a physical Xbox controller. They are not mapped to the keyboard.
| Button | Action |
|---|---|
Left Trigger | Hood angle up (manual, small increment) |
Left Bumper | Hood angle down (manual, small increment) |
Right Bumper | Retract intake |
Start | Reverse feeder + spindexer |
A / B | Hood angle multiplier up / down |
Y | Agitate intake in (hold) |
X | Agitate intake out (hold) |
Right Trigger | Dither agitation (hold) |
- Note: In order for the robot to shoot fuel, the shooter wheels must be at speed AND the feeder/spindexer must be running at the same time. The gated fire command (
Right Trigger/]) handles this automatically when combined with hub aim (D-pad Right/[).
Reference
AdvantageScope Telemetry Keys
All sim telemetry is under RealOutputs in AdvantageScope. Values are split into two namespaces:
Sim/ — simulation-only values (don’t exist on the real robot):
| Key | Type | What it shows |
|---|---|---|
Sim/RobotPose | Pose3d | Ground-truth robot pose (perfect — no sensor noise) |
Sim/RobotGroundClearance | double | Height of chassis above ground (m) |
Sim/RobotIsAirborne | boolean | Whether the robot is off the ground |
Sim/FuelHeld | int | Number of fuel balls in the hopper |
Sim/Score | int | Total scored points |
Sim/VirtualGoal | Pose3d | Shoot-on-the-move virtual target position (moves based on robot velocity) |
Sim/ComponentPoses | Pose3d[] | Individual mechanism poses for 3D rendering (use with Robot_Components model) |
Sim/GamePieces/Fuel | Pose3d[] | All fuel ball positions (drag into 3D field) |
Sim/Limelights/{name}/DirectionLine | Pose3d[] | Camera aim direction (2-point line) |
Robot/ — values that exist on both sim and real robot:
| Key | Type | What it shows |
|---|---|---|
Robot/Intake/ExtensionPct | double | Intake deploy position (0–100%) |
Robot/Intake/RollerState | string | Roller state (ON / OFF / REVERSE) |
Robot/Intake/FuelDetected | boolean | Limelight sees a fuel ball |
Robot/Limelights/limelight-one/TV | boolean | Target visible |
Robot/Limelights/limelight-one/TX | double | Target horizontal angle (°) |
Robot/Limelights/limelight-one/TY | double | Target vertical angle (°) |
Robot/Limelights/limelight-one/TA | double | Target area (% of image) |
Robot/Shooter/HoodAngleRotations | double | Hood position in motor rotations (0–30) |
Sim/Debug/ — motor and gate diagnostics (sim only):
| Key | Type | What it shows |
|---|---|---|
Sim/Debug/ShooterVelocityRPS | double | Shooter wheel velocity (RPS) |
Sim/Debug/ShooterVoltageIn | double | Shooter motor voltage |
Sim/Debug/FeederVelocityRPS | double | Feeder velocity (RPS) |
Sim/Debug/FeederVoltageIn | double | Feeder motor voltage |
Sim/Debug/SpindexerVelocityRPS | double | Spindexer velocity (RPS) |
Sim/Debug/SpindexerVoltageIn | double | Spindexer motor voltage |
Sim/Debug/HoodAngleDeg | double | Hood angle (degrees) |
Sim/Debug/HoodVoltageIn | double | Hood motor voltage |
Sim/Debug/HoodPositionRot | double | Hood position (motor rotations) |
Sim/Debug/IntakeDeployPositionRot | double | Intake deploy position (rotations) |
Sim/Debug/IntakeDeployExtendedPct | double | Intake deploy position (0–100%) |
Sim/Debug/IntakeRollerVelocityRPS | double | Intake roller velocity (RPS) |
Sim/Debug/IntakeZoneActive | boolean | Intake zone currently active |
Sim/Debug/ShootingGateOpen | boolean | Shooter + feeder both above threshold |
Sim/Debug/BatteryVoltage | double | Simulated battery voltage |
Sim/Debug/FuelHeld | double | Balls in hopper |
Useful Flags
Save Log Files (simLogging)
By default, the sim doesn’t write .wpilog files. To enable logging (useful for SysID characterization or offline analysis):
./gradlew simulateJava -PsimLogging=trueLogs are saved to the logs/ directory.
Simulation Speed
The sim runs in real-time by default. The speed multiplier is set in RebuiltSimManager.java:
SimulatedArena.overrideSimulationTimings(Seconds.of(DT), 1);
// ^ change thisChange the second argument to 2 for 2x speed, 5 for 5x, etc. (There’s no command-line flag for this yet — see future improvements below.)
Adding or Updating 3D Models
To add new models or update existing ones, just treat them like any other file:
- Export your CAD as
.glbfiles (binary glTF — the only format AdvantageScope supports) - Drop them into your year’s
sim_models/directory (e.g.Robot_Components/orRobot_Static/) - Update the
config.jsonif you added/changed components git addandgit commitas usual
That’s it. Git LFS handles the rest behind the scenes — your .glb files are automatically routed through LFS so they don’t bloat the repo. To your teammates, pulling your changes works normally; their next ./gradlew simulateJava will download the updated models.
Troubleshooting
Git LFS Not Installed
If you see this warning when running the sim:
Git LFS not available — 3D models will not be downloaded.You need to install Git LFS. The simulation still works without it — you just won’t see the robot model in AdvantageScope.
| Platform | How to install |
|---|---|
| Windows | Reinstall Git for Windows and make sure the “Git LFS” checkbox is checked during setup. It’s enabled by default, but may have been unchecked. |
| macOS | Run: brew install git-lfs && git lfs install |
| Linux (Ubuntu/Debian) | Run: sudo apt install git-lfs && git lfs install |
| Linux (Fedora) | Run: sudo dnf install git-lfs && git lfs install |
After installing, run ./gradlew simulateJava — the models will download automatically.
On macOS/Linux, the two commands do different things: brew/apt install puts the git-lfs binary on your machine, and git lfs install registers git hooks so that pull/checkout triggers LFS downloads. You need both.
Models Not Showing in AdvantageScope
If the simulation runs but you don’t see the robot model in AdvantageScope:
- Check that models are downloaded: Look in your year’s
sim_models/directory — the.glbfiles should be several MB each, not ~130 bytes. If they’re tiny, they’re still pointer files. Run./gradlew fetchModelsto download them. - Check AdvantageScope config: Make sure you selected “Use custom assets folder” and pointed it to the correct
sim_modelsdirectory (see Set Up AdvantageScope step 7). - Check your network: The first model download needs internet access to pull from GitHub’s LFS servers. After that, files are cached locally.
Robot Model Has No Moving Parts
If the robot model appears but mechanisms don’t animate:
- Make sure you’re using FEDS (Components), not FEDS (Static) (single static mesh)
- Drag
Sim/ComponentPosesonto the robot pose in the Poses section — the component poses must be tied to the robot pose, not added as a separate entry
Future Improvements
- More realistic AprilTag sim (currently reports perfect odometry with fake detections)
- Command-line flag for time speedup
- More realistic intake (game pieces currently just disappear)
- Better ramp physics (robot can’t “fly off” yet)
- Reduce ground physics jitter on settled balls