Code for our 2026 competition robot.
To get set up running simulation, follow the instructions here to install the latest version of WPILib.
Next, clone the project and open it in 2026 WPILib VS Code.
The first time you open the project, your editor might show you errors
about undefined types ending in AutoLogged. This is because these
classes are generated by AdvantageKit's annotation processor, and won't
exist until you run a build. Try ./gradlew build in the terminal or the
Build Robot Code in your command palette, which can be opened with
Ctrl+Shift+P, or Cmd+Shift+P on mac. These won't fix the issue until
you restart or refresh VSCode, but you can do that in the next step.
After building, try running simulation with Simulate Robot Code in
the command palette. Select Sim GUI when prompted, and press OK. You
will likely see a prompt warning you that the build failed. Rather than
pressing Continue, click Fix... From the options, choose to clean the
Java workspace cache and refresh. After this, try running Simulate Robot Code again. It should start up without issues. If you're still seeing
errors, either in VSCode or from the simulate task failing, you can try
restarting VSCode. In addition, clicking Continue on the warning that
build failed is sometimes "good enough" to continue testing your code.
- Install WPILib 2026.2.1 as described in Zero-to-Robot.
- Clone this repository:
git clone https://github.com/team401/2026-Robot-Code- Launch AdvantageScope, either through:
- WPILib VSCode : Ctrl+Shift+P -> Start Tool -> AdvantageScope
- Your system app launcher/start menu
- In the top menu bar, navigate to Help > Use Custom Assets Folder.
- Navigate to the 2026-Robot-Code folder and select
advantagekit_config. - Make sure you choose
advantagekit_configand notRobot_401_2026. An easy way to do this is, when the file picker window opens to choose your custom assets folder, remain in2026-Robot-Code, click onadvantagekit_config, and then pressOk. If you select the inner folder, the robot model won't be detected by AdvantageScope.
- Navigate to the 2026-Robot-Code folder and select
If certain menus aren't visible in your Sim GUI, select Workspace > Reset in the top menu bar and your layout should be restored. Sometimes windows can be moved off screen and rendered inaccessible.
-
Open the project in WPILib VSCode
-
Press Ctrl+Shift+P and type "Simulate Robot Code" to run the sim. When prompted, select "Sim GUI". This will launch Glass, the WPILib simulator application.
-
Open AdvantageScope. Open a
3D Fieldtab by clicking the+in the top right and picking3D Field, or pressingAlt+3. -
At the top left of the window, type
Odometry/Robotinto the search bar. Click onNT:/AdvantageKit/RealOutputs/Odometry/Robotfrom the list of options. This will your sidebar to theRobotfield. For help navigating in AdvantageScope, see their Navigation Docs. -
Click and drag the
Robotfield from the sidebar to the bottom of the screen underPoses. Right click on the entry it creates, and selectRobot 2026to use Typhon's CAD model.- If
Robot 2026isn't an option, wait a few seconds to make sure all models have loaded, and then make sure you've set up your custom assets folder correctly. - If it still isn't an option, please open an issue so we can update this README with better instructions.
- If
-
Next, scroll in the sidebar back up to the search bar. This time, search for
componentPositions. SelectNT:/AdvantageKit/RealOutputs/componentPositions. DragcomponentPositionsfrom the sidebar on top ofRobot 2026in the Poses pane at the bottom of the screen. This will tell AdvantageScope to use the list of poses logged undercomponentPositionsto position the elements from the robot's 3D model.If
componentPositionsshows up as a new robot, a ghost, or a game piece, it has been added as its own set of poses. Try dragging it from the sidebar again, but this time slightly higher, so that it is placed directly inside of the originalRobotfield. If done correctly,componentPositionsshould be indented slightly under the text of theRobotentry in the list.If
componentPositionsinstead shows up as a vision estimate target, it is likely already dependent on the robot, but is still not configured correctly. Click on its icon to change it to a component (should be a puzzle piece). -
This setup will be preserved by AdvantageScope every time you reopen the app unless you close the tab.