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 Keyboard Controls — as of March 5, 2026

KeyAction
W A S DDrive (forward / strafe left / back / strafe right)
Q / ERotate left / right
.Extend intake + run intake rollers (hold)
,Retract intake
/Run intake rollers
; / 'Shooter angle (down / up)
[Run feeder + spindexer
]Run shooter (wheels + hood)
PHub aim + shooter spin-up (hold)
ORun feeder + spindexer (gated — only when aimed & at speed)
XReset field-centric heading
ZPathfind to pose

2026 REBUILT Xbox Controls — as of March 5, 2026

ButtonAction
Left JoystickDrive (direction of travel relative to field)
Right JoystickRotate left / right
StartReset field-centric heading
D-pad UpPathfind to pose
D-pad RightHub aim + shooter spin-up (hold)
Left TriggerExtend intake + run intake rollers (hold)
Left BumperRetract intake
Right BumperRun intake rollers
Right TriggerRun feeder + spindexer (only while hub aim is on target and shooter at speed; use with D-pad Right)
A / BShooter angle (down / up)
XRun feeder + spindexer
YRun 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):

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/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/ExtendedbooleanIntake deployed
Robot/Intake/RollersOnbooleanIntake rollers spinning
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/HoodAngleDegdoubleHood angle in degrees
Robot/Shooter/IsShootingbooleanShooter wheels at speed
Robot/Shooter/SpindexerOnbooleanSpindexer running
Robot/Shooter/FeederOnbooleanFeeder 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=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)
  • Magnus effect on shot balls
  • Better ramp physics (robot can’t “fly off” yet)
  • Reduce ground physics jitter on settled balls