Unit 0 · Lesson 2

Installing Vendor Libraries

WPILib gives you the framework. Vendor libraries give you the hardware. Before you can command a single motor, you need both — and they need to be the right versions of each other.

By the end of this lesson, you will:

  • Explain what vendor libraries are and why WPILib alone isn't enough
  • Identify the two dominant vendor ecosystems in FRC: CTRE Phoenix 6 and REVLib
  • Know which hardware each library controls
  • Install vendor libraries using both the online and offline methods
  • Verify a successful install by checking your project's vendordeps/ folder
  • Understand why version mismatches cause hardware failures at competition

Why WPILib Alone Isn't Enough

WPILib knows what a motor is — it defines a generic MotorController interface. But it has no idea whether your motor is bolted to a TalonFX, a SparkMax, or a SparkFlex. Each of those controllers has proprietary firmware, configuration registers, and CAN protocols that WPILib cannot know about in advance.

Vendor libraries fill that gap. They are manufacturer-published Java packages that sit between WPILib's generic abstractions and your specific hardware. Without them, you have a framework but no way to actually talk to your motors, encoders, or IMUs.

💡 The Analogy

Think of WPILib as the outlet on the wall — standard voltage, standard shape. Vendor libraries are the power adapter for your specific device. The outlet works great, but if your laptop's adapter is the wrong wattage or has the wrong plug, nothing charges. The library version has to match what your hardware expects.

The Two Major Ecosystems

Most FRC teams run hardware from one or both of these vendors. You will almost certainly work with both over your FRC career.

👇 Click each card to see which hardware it covers
🔶
CTRE Phoenix 6
tap to see hardware
CTRE covers

TalonFX — Falcon 500, Kraken X60
CANcoder — absolute encoder
Pigeon 2 — IMU / gyro
CANivore — CAN FD bus adapter

Phoenix 6 is current. Phoenix 5 is legacy — don't mix them.

🟢
REVLib
tap to see hardware
REV covers

SparkMax — NEO, NEO 550
SparkFlex — NEO Vortex
Through Bore Encoder
Color Sensor V3

REV hardware is configured via the REV Hardware Client app.

📦
Other Vendors
tap to learn more
Also common

PhotonLib — PhotonVision camera
NavX — Kauai Labs IMU
PathPlanner — autonomous paths
AdvantageKit — logging & replay

These follow the same install process as CTRE and REV.

Side-by-Side Comparison

CTRE  Phoenix 6 REV  REVLib
Motors TalonFX (Falcon 500, Kraken X60) SparkMax (NEO, 550), SparkFlex (Vortex)
Encoder CANcoder (absolute, CAN) Through Bore Encoder (absolute, USB/DIO)
IMU Pigeon 2 (CAN)
Config tool Phoenix Tuner X REV Hardware Client
CAN protocol Standard CAN / CAN FD (CANivore) Standard CAN
Team 2910 uses ✓ Primary — all drive motors Occasionally for mechanism motors

How Vendor Libraries Work: The vendordep File

When you install a vendor library, WPILib adds a small JSON file to your project's vendordeps/ folder. This file tells Gradle where to find the library's compiled code, which version to use, and what dependencies it needs. Gradle then downloads the actual library jars and links them into your build automatically.

Click any highlighted key in the JSON below to learn what it does.

  vendordeps / Phoenix6-frc2025-latest.json
"name": "Phoenix6",
"version": "25.1.0",
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"frcYear": 2025,
"mavenUrls": [
  "https://maven.ctr-electronics.com/release"
],
"jsonUrl": "https://maven.ctr-electronics.com/.../Phoenix6-frc2025-latest.json",
"javaDependencies": [
  { "groupId": "com.ctre.phoenix6", "artifactId": "wpiapi-java", ... }
],
"requires": ["WPILib"]
"name" The human-readable name of the library. This is what appears in the WPILib vendor library manager and in error messages. It does not affect the build — it's just a label.
💡 You don't edit this file manually

The JSON is generated by WPILib when you install the library. You only touch it if you need to pin a specific version or troubleshoot a Gradle resolution failure. In normal use, let the WPILib tools manage it.

Installing Vendor Libraries

WPILib supports two installation methods. The online method is simpler and recommended for initial setup. The offline method is essential for competition, where Wi-Fi is unreliable.

Use this method at home or during build season when you have a reliable internet connection.

  1. Open WPILib VS Code

    Make sure you have a robot project open. Vendor libraries are installed per project — not globally.

  2. Open the WPILib Command Palette

    Click the WPILib icon in the sidebar, or press Ctrl+Shift+P and type WPILib: Manage Vendor Libraries.

  3. Select "Install new library (online)"

    A text field will appear asking for the vendordep URL.

  4. Paste the URL for your library

    For CTRE Phoenix 6:

    https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json

    For REVLib:

    https://software-metadata.revrobotics.com/REVLib-2025.json
  5. Click OK and run a Gradle build

    WPILib will download the JSON and trigger a build. Watch the terminal — a successful download shows BUILD SUCCESSFUL. If you see FAILED, check your internet connection and verify the URL is current for this season.

💡 Check the season year in the URL

vendordep URLs are versioned by season year. A URL ending in frc2024 will install last year's library, which may be incompatible with this year's roboRIO image and firmware. Always verify the URL ends in the current season year before pasting it. The team's programming documentation should have the current URLs pinned.

Use this method at competition or any time you cannot rely on internet access. It requires downloading the library installer in advance.

  1. Download the offline installer before you leave

    For CTRE: download the Phoenix 6 offline installer from the CTRE GitHub releases page. For REV: download the REVLib offline installer from the REV Robotics website. These are typically .zip or .exe files containing the full Maven cache.

  2. Run the offline installer on your laptop

    The installer copies the library jars into WPILib's local Maven cache (~/wpilib/XXXX/maven/). After this, Gradle can resolve the library without internet access.

  3. Open WPILib VS Code and open the Command Palette

    Press Ctrl+Shift+PWPILib: Manage Vendor Libraries.

  4. Select "Install new library (offline)"

    WPILib will scan your local Maven cache and show the libraries it found. Select the one you want to install.

  5. Run a Gradle build to confirm

    A BUILD SUCCESSFUL message with no network activity confirms the offline install worked correctly.

💡 Do this before competition week

Run both the online install and the offline installer at least once before you travel to an event. That way, if the competition venue's Wi-Fi is down, you can still build and deploy without any issues. Make this a standard item on your pre-competition checklist.

Removing a vendor library is occasionally necessary — for example, if you accidentally installed the wrong library, or if you're cleaning up a template project.

  1. Open the Command Palette

    Ctrl+Shift+PWPILib: Manage Vendor Libraries

  2. Select "Manage current libraries"

    A list of all currently installed vendor libraries for this project will appear, each with a checkbox.

  3. Uncheck the library you want to remove

    WPILib will remove the corresponding JSON file from your vendordeps/ folder.

  4. Run a Gradle build

    Confirm the build still succeeds. If you had code using that library, you will now see compiler errors — which is expected. Remove the affected import statements and class references before the build will pass again.

⚠️ Never mix Phoenix 5 and Phoenix 6

One of the most common library mistakes seen at events: a project that has both Phoenix 5 and Phoenix 6 vendordep files installed. They conflict with each other. If you're migrating from Phoenix 5, remove the Phoenix 5 vendordep first, then install Phoenix 6. You cannot run both simultaneously in the same project.

Verifying Your Install

After installing, open your project in VS Code's file explorer and look for the vendordeps/ folder at the project root. You should see one .json file per installed library:

MyRobotProject/
├── src/
├── vendordeps/
│ ├── Phoenix6-frc2025-latest.json
│ └── REVLib-2025.json
├── build.gradle
└── ...

You can also open build.gradle and look for a dependencies { } block — installed vendor libraries will appear as implementation entries there after your first successful build.

The most reliable verification is a compile test. Open any Java file in your project and try importing a vendor class:

import com.ctre.phoenix6.hardware.TalonFX; // CTRE
import com.revrobotics.spark.SparkMax; // REV

If VS Code can resolve these without red underlines, your vendor libraries are installed and linked correctly.

The Version Mismatch Problem

Every vendor library has a version number that must align with two other things: the firmware flashed on your physical devices, and the season year of your WPILib install. When these three are out of sync, the results range from compile errors to devices that silently ignore commands at competition.

🔍 Event Observation

Version mismatches are one of the most common causes of unexplained hardware failures in their first practice match. The failure mode is particularly tricky because the code compiles fine — it's only at runtime, when the library tries to send a CAN frame the firmware doesn't understand, that things go wrong.

The fix is simple, but it requires discipline: whenever you update a vendor library's vendordep JSON, immediately update the firmware on all associated devices using the vendor's configuration tool (Phoenix Tuner X for CTRE, REV Hardware Client for REV). Do both steps together, every time.

Version Compatibility Checklist

Component Where to Check How to Update
Library version vendordeps/*.json"version" field WPILib: Manage Vendor Libraries → reinstall
Device firmware Phoenix Tuner X / REV Hardware Client Connect device via USB, click "Update Firmware"
roboRIO image roboRIO Imaging Tool (in WPILib tools/) Connect via USB-B, run the imaging tool
WPILib version VS Code → Help → About → check extension Re-run WPILib installer for current season

🔌 System Check

⚙️ Hardware Prerequisites for This Lesson

The install itself is laptop-only. You can complete all the steps above without a robot present. But before you write any code that uses these libraries, verify the following on your physical robot:

  • TalonFX (CTRE): Open Phoenix Tuner X, connect via USB or WiFi to the roboRIO, and confirm each TalonFX appears in the device list. If a device shows "No Firmware" or a yellow warning, update its firmware before writing motor control code.
  • SparkMax / SparkFlex (REV): Open REV Hardware Client. Each controller should show a green status light when connected. The firmware version shown in the client must match the REVLib version you just installed.
  • CAN bus: All CTRE and REV devices communicate over the CAN bus. If a device doesn't appear in its configuration tool, check the CAN wiring before assuming the library install failed. The software is almost never the first thing to check.
  • Unique CAN IDs: Every device on the CAN bus needs a unique ID (0–62). Duplicate IDs are a common source of confusing behavior. Check and set IDs before your first deploy.

Knowledge Check

Click an answer to check your understanding.

You want to control a Kraken X60 brushless motor. Which vendor library do you need to install?
  • 1REVLib — it covers all brushless motors
  • 2CTRE Phoenix 6 — the Kraken X60 uses a TalonFX controller
  • 3No vendor library needed — WPILib's generic MotorController covers it
  • 4PhotonLib — it handles all CAN devices
Your code compiles without errors, but at competition your TalonFX motors don't respond to commands. Before touching the code, what should you check first?
  • 1Reinstall WPILib from scratch
  • 2Delete and recreate the robot project
  • 3Check the firmware version on each TalonFX in Phoenix Tuner X — it may not match the Phoenix 6 library version
  • 4Switch to using SparkMax motors instead
At competition, the venue Wi-Fi is down and you need to add REVLib to a project. You can still do this because:
  • 1Vendor libraries are bundled inside WPILib and don't need internet access
  • 2The roboRIO can download libraries directly from the manufacturer
  • 3You ran the REVLib offline installer before leaving for the event, so the library jars are already in your local Maven cache
  • 4You can copy the vendordep JSON file from another team's laptop and it will work
💪 Practice Prompt

Library Installation Checklist

Complete each step and write down your results — you'll need this information when we write motor control code in Unit 5.

  1. Install CTRE Phoenix 6 using the online method. After the build succeeds, open the vendordeps/ folder and record the exact version number shown in the JSON file's "version" field.
  2. Install REVLib using the online method. Record its version number the same way.
  3. In any Java file in your project, try importing com.ctre.phoenix6.hardware.TalonFX and com.revrobotics.spark.SparkMax. Do both resolve without red underlines? If not, which step above went wrong?
  4. If you have access to a physical CTRE or REV device: open Phoenix Tuner X or REV Hardware Client. Does the firmware version shown for the device match the library version you recorded in steps 1 or 2? If not — what would you do to fix it?
  5. Bonus: Look up the current vendordep URL for PathPlanner and install it. What version did you get? (PathPlanner is a path planning library we'll use in Unit 9.)