Skip to Content
HomeProgrammingFrcSimulationSimulation: Quick Start

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.

PlatformGitGit LFS
WindowsInstall Git for Windows Included — make sure the “Git LFS” checkbox is checked during setup
macOSIncluded with Xcode Command Line Tools (xcode-select --install)brew install git-lfs && git lfs install
Linuxsudo 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.git

If 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):

  1. Click the three-dot menu (···) in the top-right of the WPILib sidebar (or the WPILib icon in the top-right corner)
  2. Select “Simulate Robot Code”
  3. Choose “Sim GUI”

VS Code (command palette):

  1. Ctrl+Shift+P → type “WPILib”
  2. Select “Simulate Robot Code”
  3. Choose “Sim GUI”

Terminal:

cd robot/2026-rebuilt ./gradlew simulateJava

Either 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:

  1. Connect a controller:
    • Xbox / gamepad: Plug it in — it should appear automatically
    • No controller? Drag “Keyboard 0” onto “Joystick 0” (see key mappings below)
  2. Click “Teleoperated” to enable the robot

Set Up AdvantageScope

  1. Open AdvantageScope (installed with WPILib)
  2. Connect via NetworkTables 4 (AdvantageKit)
  3. Click the + button (top right) → select 3D Field
  4. In the bottom-right Field section, select this year’s game
  5. Add game pieces:
    • In the left panel, find RealOutputsSimGamePieces
    • Drag the game piece type into the Poses section (bottom center)
    • From the dropdown, select the matching game piece model
  6. (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_models directory (e.g. for 2026: feds-central/robot/2026-rebuilt/sim_models)
    • Our robot models will now appear in the robot model dropdown
  7. Add the robot:
    • In the left panel, expand RealOutputsSim
    • Drag RobotPose into 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)
  8. (Optional — required for FEDS (Components)) Add component poses:
    • Drag Sim/ComponentPoses from the left panel onto the robot pose you added in step 7, so the component animations are tied to the robot

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.

KeyboardXboxAction
Movement (left side)
W / SLeft Stick YDrive forward / back
A / DLeft Stick XStrafe left / right
Q / ERight Stick XRotate CCW / CW (spin left / right)
Shooting (top row — O P [ ])
P (hold)XHub shot — feeder + spindexer + shooter wheels + hood
O (hold)YHalfcourt / passing shot
[ (hold)D-pad RightAim hub + spin up shooter (passing shot aim when in neutral zone)
] (hold)Right TriggerGated fire (only fires when aimed + at speed; use with [)
Feeder / reset (home row — L ; ')
L (hold)ALayup — shoot from against hub
; (hold)BReverse feeder + spindexer
'StartReset field-centric heading
Intake (bottom row — , . /)
, (hold)Left TriggerExtend intake + run intake rollers
.Left BumperRetract intake
/ (hold)Right BumperReverse intake rollers

2026 REBUILT Xbox Controls (Operator — port 1)

Operator controls require a physical Xbox controller. They are not mapped to the keyboard.

ButtonAction
Left TriggerHood angle up (manual, small increment)
Left BumperHood angle down (manual, small increment)
Right BumperRetract intake
StartReverse feeder + spindexer
A / BHood angle multiplier up / down
YAgitate intake in (hold)
XAgitate intake out (hold)
Right TriggerDither 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):

KeyTypeWhat it shows
Sim/RobotPosePose3dGround-truth robot pose (perfect — no sensor noise)
Sim/RobotGroundClearancedoubleHeight of chassis above ground (m)
Sim/RobotIsAirbornebooleanWhether the robot is off the ground
Sim/FuelHeldintNumber of fuel balls in the hopper
Sim/ScoreintTotal scored points
Sim/VirtualGoalPose3dShoot-on-the-move virtual target position (moves based on robot velocity)
Sim/ComponentPosesPose3d[]Individual mechanism poses for 3D rendering (use with Robot_Components model)
Sim/GamePieces/FuelPose3d[]All fuel ball positions (drag into 3D field)
Sim/Limelights/{name}/DirectionLinePose3d[]Camera aim direction (2-point line)

Robot/ — values that exist on both sim and real robot:

KeyTypeWhat it shows
Robot/Intake/ExtensionPctdoubleIntake deploy position (0–100%)
Robot/Intake/RollerStatestringRoller state (ON / OFF / REVERSE)
Robot/Intake/FuelDetectedbooleanLimelight sees a fuel ball
Robot/Limelights/limelight-one/TVbooleanTarget visible
Robot/Limelights/limelight-one/TXdoubleTarget horizontal angle (°)
Robot/Limelights/limelight-one/TYdoubleTarget vertical angle (°)
Robot/Limelights/limelight-one/TAdoubleTarget area (% of image)
Robot/Shooter/HoodAngleRotationsdoubleHood position in motor rotations (0–30)

Sim/Debug/ — motor and gate diagnostics (sim only):

KeyTypeWhat it shows
Sim/Debug/ShooterVelocityRPSdoubleShooter wheel velocity (RPS)
Sim/Debug/ShooterVoltageIndoubleShooter motor voltage
Sim/Debug/FeederVelocityRPSdoubleFeeder velocity (RPS)
Sim/Debug/FeederVoltageIndoubleFeeder motor voltage
Sim/Debug/SpindexerVelocityRPSdoubleSpindexer velocity (RPS)
Sim/Debug/SpindexerVoltageIndoubleSpindexer motor voltage
Sim/Debug/HoodAngleDegdoubleHood angle (degrees)
Sim/Debug/HoodVoltageIndoubleHood motor voltage
Sim/Debug/HoodPositionRotdoubleHood position (motor rotations)
Sim/Debug/IntakeDeployPositionRotdoubleIntake deploy position (rotations)
Sim/Debug/IntakeDeployExtendedPctdoubleIntake deploy position (0–100%)
Sim/Debug/IntakeRollerVelocityRPSdoubleIntake roller velocity (RPS)
Sim/Debug/IntakeZoneActivebooleanIntake zone currently active
Sim/Debug/ShootingGateOpenbooleanShooter + feeder both above threshold
Sim/Debug/BatteryVoltagedoubleSimulated battery voltage
Sim/Debug/FuelHelddoubleBalls 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=true

Logs 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 this

Change 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:

  1. Export your CAD as .glb files (binary glTF — the only format AdvantageScope supports)
  2. Drop them into your year’s sim_models/ directory (e.g. Robot_Components/ or Robot_Static/)
  3. Update the config.json if you added/changed components
  4. git add and git commit as 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.

PlatformHow to install
WindowsReinstall Git for Windows  and make sure the “Git LFS” checkbox is checked during setup. It’s enabled by default, but may have been unchecked.
macOSRun: 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:

  1. Check that models are downloaded: Look in your year’s sim_models/ directory — the .glb files should be several MB each, not ~130 bytes. If they’re tiny, they’re still pointer files. Run ./gradlew fetchModels to download them.
  2. Check AdvantageScope config: Make sure you selected “Use custom assets folder” and pointed it to the correct sim_models directory (see Set Up AdvantageScope step 7).
  3. 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:

  1. Make sure you’re using FEDS (Components), not FEDS (Static) (single static mesh)
  2. Drag Sim/ComponentPoses onto 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