Original example provided by the CTRE Examples Repository.
You will need a copy of the latest WIPLib installed.
You can follow the instructions listed here at the Official WPILib Docs.
Don't forget to install the FRC Game Tools.
You can follow the instructions to install this listed here at the Official WPILib Docs.
Make sure you have an XBox (or something similar) controller on hand for the simulation.
- Clone this repository by clicking the blue Code button above the file listing.
- Extract the zip into a good place, the Downloads folder will suffice.
- Make sure that the file structure is akin to this:
- Downloads
- ├─ Your extracted ZIP
- │ ├─ Project files.
- Make sure that the file structure is akin to this:
- Open WPILib VS Code.
- Click 'Open Folder' from the start page.
- Choose your Extracted ZIP folder from earlier.
Your screen should look alike to the screenshot below.
Don't worry about most of the icons on the bottom and to the left, it's just apart of my custom setup and won't affect anything for you.

- Click the three dots in the top right.
- Click the
Simulate Robot Codefrom the dropdown menu as shown below.
- Make sure to select DriverStation only when the prompt appears between the Sim GUI and DriverStation.

- Open FRC Driver Station, searching on the taskbar should suffice.
At this point you should have the sim running in VS Code, and the Driver Station open.
Next is AdvantageScope.
- Open AdvantageScope. This can be found on your desktop in the
*Year* WPILib Toolsfolder on your Desktop.- You can also open it via the WPILib command palette -> Start Tool task.
- Connect AdvantageScope to your sim session via the File dropdown shown below.
- It should connect with no problems.
- After that click the Tabs dropdown, click the New Tab expander, and add an Odometry tab, and a 3D Field tab.
- Odometry is a 2D Field that shows and tracks your robot's moves.
- Your window should like like the screenshot below.
- Don't forget to change the Radians to Degrees, as field2d is in degrees.
- Drag the Robot object into the 2D Poses slot.
- After that it should show the robots position of the field like the screenshot below.
- Plug in your controller.
- Driver Station should stop complaining about missing a joystick, and the sim should be controllable via the joysticks now.
The simulation should be functional now, perfect for testing!





