Skip to main content

Lesson 0: Setup and Verification

This lesson guides you through installing WPILib, verifying your setup, and running your first robot simulation.

Prerequisites​

  • Operating System: Windows 10/11, macOS 11+, or Ubuntu 20.04+
  • Disk Space: ~2GB for WPILib installation
  • RAM: 8GB minimum, 16GB recommended
  • Internet: Required for initial download

Step 1: Install WPILib​

Download WPILib​

  1. Go to the WPILib Releases page
  2. Download the latest release installer for your OS: (as of 12/30/25 I'd recommend the 2026 Beta)
    • Windows: WPILib_Windows-2026.1.1-beta-1.iso (or latest)
    • macOS: WPILib_macOS-2026.1.1-beta-1.dmg (or latest)
    • Linux: WPILib_Linux-2026.1.1-beta-1.tar.gz (or latest)

Install WPILib​

Windows:

  1. Mount the ISO file (double-click)
  2. Run WPILibInstaller.exe
  3. Follow the installation wizard

macOS:

  1. Open the DMG file
  2. Run the installer application
  3. Follow the installation wizard

Linux:

  1. Extract the tar.gz file: tar -xzf WPILib_Linux-*.tar.gz
  2. Run: ./WPILibInstaller
  3. Follow the installation wizard

Verify Installation​

After sucessful installation, you should see a desktop icon that says "2026 WPILib VS Code"

image
  1. Launch WPILib VS Code from your desktop or applications folder
  2. You should see "WPILib" in the title bar
  3. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)
  4. Type "WPILib" - you should see WPILib commands

Step 2: Simulation Setup (C++)​

Why Simulation?​

This bootcamp follows a simulation-first approach. You'll develop and test all your robot code in simulation before ever touching real hardware. This approach:

  • ✅ Lets you learn without needing physical robot access
  • ✅ Provides instant feedback on your code changes
  • ✅ Matches how TEAM1771 develops competition code
  • ✅ Makes testing faster and more reliable

Install C++ Simulation Dependencies​

For C++ robot simulation, WPILib requires additional toolchain components beyond the base installation.

Check if Already Installed​

When you ran the WPILib installer (Step 1), you may have already installed these. To verify:

  1. Try building and simulating a project (Steps 3-4 below)
  2. If you get build errors mentioning missing compilers or toolchains, continue with the installation below

Install C++ Desktop Support​

If you need to install C++ simulation dependencies:

  1. Follow the official WPILib guide for your operating system:

  2. Quick Summary (see official docs for full details):

    • Windows: Install Desktop Development with C++ in Visual Studio Build Tools
    • macOS: Install Xcode Command Line Tools via xcode-select --install
    • Linux: Install build-essential and other development packages via apt
  3. Restart VS Code after installation to ensure tools are recognized

Verify C++ Simulation Works​

After installing dependencies, verify everything works:

  1. Open the 00-setup-check project (see Step 3 below)
  2. Build the project using "WPILib: Build Robot Code" command
  3. If build succeeds with "BUILD SUCCESSFUL", you're ready to go!
  4. If you see compilation errors, check the Troubleshooting section below

Running Simulation from VS Code​

There are several ways to run robot simulation in WPILib VS Code:

  1. Press Ctrl+Shift+P / Cmd+Shift+P
  2. Type: "WPILib: Simulate Robot Code"
  3. Select "Desktop" as the simulation type
  4. Click "Run" in the simulation dialog (leave GUI checked)
  5. The simulator GUI will launch

Method 2: WPILib Icon Menu​

  1. Click the WPILib icon (red hexagon with "W") in the VS Code toolbar
  2. Select "Simulate Robot Code"
  3. Choose simulation options and click "Run"

Method 3: Gradle Tasks (Advanced)​

From the VS Code terminal:

./gradlew simulateCpp   # For C++ projects (this bootcamp uses C++)

What You Should See​

When simulation starts successfully:

  • ✅ Terminal shows robot code compiling and starting
  • ✅ Simulation GUI window opens (shows robot visualization)
  • ✅ No error messages in the terminal
  • ✅ You can enable the robot and see it respond to inputs

Troubleshooting​

Build Errors: Missing Toolchain​

Symptoms: Errors like "compiler not found", "cannot find -lstdc++", or "toolchain not configured"

Fix:

  • Ensure you completed the C++ installation steps above
  • Restart VS Code after installing build tools
  • On Windows: Verify Visual Studio Build Tools are installed
  • On macOS: Run xcode-select --install and accept the license
  • On Linux: Install build-essential: sudo apt install build-essential

Build Errors: WPILib Version Mismatch​

Symptoms: Errors mentioning library versions or missing WPILib headers

Fix:

  • Verify your WPILib installation matches the project version
  • Try "WPILib: Clean Robot Code" then rebuild
  • Check that you downloaded the correct WPILib version (see Step 1)

Simulation GUI Won't Launch​

Symptoms: Build succeeds, but no simulation window appears

Fix:

  • Check terminal output for error messages
  • Ensure no other robot simulation is already running
  • Try restarting VS Code
  • On Linux: Verify you have GUI libraries installed (libgl1-mesa-glx, libxext6)

General Debugging​

If you encounter issues:

  • Check the terminal output for specific error messages
  • Try "WPILib: Clean Robot Code" followed by "WPILib: Build Robot Code"
  • Restart VS Code
  • Verify you opened the correct project folder (should contain build.gradle)
  • Ask for help on the team Slack - we're here to help!

Step 3: Open Your First Project​

Open the Setup Check Project​

If you haven't cloned this project yet, using either VS Code or the git CLI, clone this project repository: https://github.com/TEAM1771/Bootcamp.git (please Google or ask in Slack if you need additional help)

How to clone from a project repository:

  1. Open up the WPILib VSCode and click on the "Clone from Git Repository" option, select "Clone from Github" in the Command Palette, and follow the instructions on your browser.
image
  1. In the Command Palette, select the "Bootcamp" project, or type in the name if you have to search for it.
image
  1. VS Code will then ask you where to store the "Bootcamp" project folder on your computer, make sure to remember where you place it!

If you have cloned this project, open it:

  1. In VS Code, press File, then Open Folder
  2. Navigate to: Bootcamp/projects/00-setup-check/ (assuming you have already cloned)

Build the Project​

  1. Press Ctrl+Shift+P / Cmd+Shift+P
  2. Type: "WPILib: Build Robot Code"
  3. Wait for the build to complete (20-60 seconds first time)
  4. Check the terminal for "BUILD SUCCESSFUL"

If you see build errors:

  • ✅ Verify WPILib was installed correctly
  • ✅ Check that you opened the correct project folder
  • ✅ Try "WPILib: Clean Robot Code" then rebuild
  • ✅ If you see C++ compiler errors, return to Step 2: Simulation Setup

Step 4: Run Simulation​

Start Robot Simulation​

  1. Press Ctrl+Shift+P / Cmd+Shift+P
  2. Type: "WPILib: Simulate Robot Code"
  3. Select "Desktop" as the simulation type
  4. Click "Run"

You should see:

  • Robot code starts in the terminal
  • Simulation GUI opens
  • No error messages

If this doesn't work yet, review Step 2 (Simulation Setup) for troubleshooting tips, or reach out on Slack for help. Don't worry, you can still continue with the Bootcamp!

Then, continue by enabling the robot and connecting your keyboard as a controller

  1. Click Teleoperated under Robot State
  2. Drag Keyboard 0 from System Joysticks to Joystick[0]

Step 5: View Telemetry in Elastic​

Launch Elastic​

  1. Press Ctrl+Shift+P / Cmd+Shift+P
  2. Type: "WPILib: Start Tool"
  3. Select: "Elastic"

(alternatively just search in your windows search bara)

Elastic is a dashboard for viewing robot data in real-time.

Connect to Robot​

  1. In Elastic, it should auto-connect to localhost
  2. If not connected, check the connection settings and change IP address mode to localhost

View Values​

In the Elastic UI, you should be able to find the following after clicking Add Widget and SmartDashboard

  • ExampleSubsystem/State: Shows current state (OFF/ON)
  • ExampleSubsystem/Counter: A number that increments when ON

Drag these widgets to your dashboard

Test Controller Input​

  1. Open Elastic on the right half of your screen and Sim GUI on left side
  2. Make sure Sim GUI is in focus, and you setup controllers/teleop mode as described in Step 4
  3. Press Z - state should change to ON
  4. Release Z - state should return to IDLE
  5. Watch the counter increment while Z is held
  6. Press X - state should change to OFF, counter resets

What to Look For​

✅ Successful Setup Checklist​

  • WPILib installed and VS Code launches
  • Project builds without errors
  • Simulation starts and runs
  • Driver Station connects (green indicators)
  • Elastic displays telemetry values
  • SmartDashboard shows subsystem state
  • Counter value changes in simulation
  • Controller buttons affect subsystem state

🔧 Troubleshooting​

If using Windows, ensure that OneDrive is deactivated/inactive for the setup process!

Build Errors:

  • Verify WPILib version matches project
  • Clean and rebuild
  • Check that all files are present

Simulation Won't Start:

  • Check for build errors first
  • Verify no other robot code is running
  • Restart VS Code

No Telemetry in Elastic:

  • Verify simulation is running
  • Check Elastic connection (localhost:1735)
  • Enable the robot (teleop mode) in Sim GUI

Next Steps​

Once your setup is verified:

  1. 📖 Review the Style Guide to understand team patterns
  2. 📖 Study the Controller Map for button conventions
  3. 💻 Open projects/00-setup-check/src/main/cpp/ and explore the code
  4. 📋 Complete the TODO items in the project README
  5. 🚀 Move on to the next lesson!

Additional Resources​