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 Keyboard Controls — as of March 5, 2026
| Key | Action |
|---|---|
W A S D | Drive (forward / strafe left / back / strafe right) |
Q / E | Rotate left / right |
. | Extend intake + run intake rollers (hold) |
, | Retract intake |
/ | Run intake rollers |
; / ' | Shooter angle (down / up) |
[ | Run feeder + spindexer |
] | Run shooter (wheels + hood) |
P | Hub aim + shooter spin-up (hold) |
O | Run feeder + spindexer (gated — only when aimed & at speed) |
X | Reset field-centric heading |
Z | Pathfind to pose |
2026 REBUILT Xbox Controls — as of March 5, 2026
| Button | Action |
|---|---|
Left Joystick | Drive (direction of travel relative to field) |
Right Joystick | Rotate left / right |
Start | Reset field-centric heading |
D-pad Up | Pathfind to pose |
D-pad Right | Hub aim + shooter spin-up (hold) |
Left Trigger | Extend intake + run intake rollers (hold) |
Left Bumper | Retract intake |
Right Bumper | Run intake rollers |
Right Trigger | Run feeder + spindexer (only while hub aim is on target and shooter at speed; use with D-pad Right) |
A / B | Shooter angle (down / up) |
X | Run feeder + spindexer |
Y | Run shooter (wheels + hood) |
- Note: In order for the robot to shoot fuel, the robot must be running its spindexer/feeder and the shooter at the same time.
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/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/Extended | boolean | Intake deployed |
Robot/Intake/RollersOn | boolean | Intake rollers spinning |
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/HoodAngleDeg | double | Hood angle in degrees |
Robot/Shooter/IsShooting | boolean | Shooter wheels at speed |
Robot/Shooter/SpindexerOn | boolean | Spindexer running |
Robot/Shooter/FeederOn | boolean | Feeder running |
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)
- Magnus effect on shot balls
- Better ramp physics (robot can’t “fly off” yet)
- Reduce ground physics jitter on settled balls