Skip to content

Move simulator + AdvantageScope instructions to their own page - #20

Merged
aschokking merged 1 commit into
mainfrom
simulator-page
Oct 10, 2026
Merged

aschokking merged 1 commit into
mainfrom
simulator-page

Conversation

@aschokking

Copy link
Copy Markdown
Contributor

The only instructions for running the simulator lived inline in the Tank Drive challenge. Every later challenge then said some version of "run the simulator like before", leaving students to hunt back through an earlier page. This gives it one page that everything links to.

New: curriculum/robot-fundamentals/simulator.md

Running the Simulator, listed under Reference. Covers the same core steps as before — Simulate Robot config, controller into Joystick[0], select Teleoperated, AdvantageScope → Connect to Simulator → Import Layout — plus what the inline version lacked:

  • What each layout tab is for. Read from XbotEdu's AdvantageScope_layout.json: 2d top view, 3d view, Joysticks, Swerve, Table, Console.
  • Making changes: code only updates on restart, and Teleoperated has to be re-selected each time.
  • Troubleshooting for the problems students will actually hit: robot doesn't move (not enabled, or controller in the wrong slot), gamepad not listed, AdvantageScope blank, only one side of the tank drive moving.
  • The keyboard fallback. XbotEdu's simgui-ds.json already configures keyboard joysticks, but nothing documented it. It comes with a real limit: Keyboard 0 defines axes 0–2 only, while the gamepad's right stick reads WPILib axis 5 (XboxControllerWpiAdapter → controller.getRightY()). So WASD can drive single-stick controls like arcade drive, but not tank drive — the page says so up front rather than leaving students to discover only one side moves.

Linked from

Tank Drive now links to the page instead of duplicating it. Also linked from Altering Tank Drive, Command Groups, Moving to a Target Position, Advanced Swerve Challenges, and the Tank Drive Solution. The Joystick[0] / Connect to Simulator / Import Layout steps now appear only in simulator.md.

Bug found in XbotEdu, not fixed here

The layout's prebuilt Swerve tab is mis-wired. It reads:

NT:/AdvantageKit/RealOutputs/DriveSubsystem/CurrentSwerveState
NT:/AdvantageKit/RealOutputs/DriveSubsystem/DesiredSwerveState

but the swerve code logs from SwerveDriveSubsystem, and the desired-state key is DesiredSwerveStates (plural) — so that tab likely shows nothing. The Advanced Swerve challenge's manual setup instructions use the correct keys, so the docs point students there and don't promise the prebuilt tab works. The real fix belongs in XbotEdu's layout file.

The 2d top view tab is fine: it reads PoseSubsystem/Location, which matches the code.

Verification

pnpm docs:build passes. All the factual claims — run config name, layout tab names, joystick port 0, keyboard axis counts, and the swerve log keys — checked against the current XbotEdu and SeriouslyCommonLib sources. Not run in a live simulator.

🤖 Generated with Claude Code

The only instructions for running the simulator lived inline in the Tank
Drive challenge, so every later challenge said "run the simulator like
before" and sent students hunting back through an earlier page.

New robot-fundamentals/simulator.md is the single place for it: start the
Simulate Robot config, put a controller in Joystick[0], enable Teleoperated,
connect AdvantageScope and import the layout. Adds what the inline version
lacked: what each layout tab is for, how to pick up code changes, and a
troubleshooting section.

Also documents the keyboard joystick fallback that XbotEdu's simgui-ds.json
already configures, including its limit: Keyboard 0 defines axes 0-2 only,
while the right stick reads WPILib axis 5, so it can drive single-stick
controls but not tank drive.

Tank Drive now links to the page instead of duplicating it, as do Altering
Tank Drive, Command Groups, Moving to a Target Position, Advanced Swerve and
the Tank Drive Solution.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aschokking
aschokking merged commit 267b793 into main Oct 10, 2026
1 check passed
@aschokking
aschokking deleted the simulator-page branch October 10, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant