Note

This setup is for Java/C++ only

Online Installer

Caution

The online installation will download approximately 1.5GB worth of data, please maintain a stable connection while downloading

Warning

Windows 7: You must install the standalone version of .NET Version 4.62+ which can be found here. Before preceding!

Download the installer (32bit or 64bit) from WPI.

../../../_images/installer-1.png

Installing for All Users will require admin privileges and install for all users on the machine.

Note

Software will be installed to C:\Users\Public\wpilib\YYYY. YYYY Corresponds to the currently supported year.

Download VS Code

Due to licensing reasons with VS Code, the installer does not contain it bundled in. To overcome this hit the Select/Download VS Code button.

../../../_images/installer-2.png

This will open up the selector tool.

../../../_images/installer-3.png

Select the Download option and VS Code will be downloaded.

../../../_images/installer-4.png

Once VS Code is downloaded the window will auto change back to the installer window and Execute Install can be run.

../../../_images/installer-5.png

What was just Installed

  • Visual Studio Code - The preferred and supported IDE for robot code development.

  • C++ Compiler - Toolchains required for building C++ code.

  • Java JDK/JRE - Specific version of the JDK/JRE that is used to build code.

  • Gradle - Specific version of Gradle used for building and deploying Java or C++ code

  • WPILib Tools - Tools used for robot enhancement

  • WPILib Dependencies - OpenCV, etc.

  • VS Code Extensions - WPILib extensions for robot code development

Important

The installer creates a separate version of VS Code for robotics development, even if VS Code is already installed locally. This is done to prevent workflows from breaking.

Note

This section and all macOS examples was completed and tested using macOS High Sierra

The macOS installation requires multiple individual steps to be completed.

VS Code Download

VS Code needs to be installed before the extensions are installed. The preferred version of VS Code is 1.41.1 which can be downloaded here. This will automatically download a file called VSCode-darwin-stable.zip. Navigate to the downloads folder and drag the Visual Studio Code into the Applications folder.

../../../_images/online-installation-1.png

After dragging to the Applications folder the VS Code Icon will be visible in Applications

../../../_images/online-installation-2.png

WPILib Download

The latest release for the WPILib can be found here

Chose the macOS version WPILib_Mac-2020.3.2.tar.gz

../../../_images/online-installation-3.png

Double click on the WPILib_Mac-2020.3.2.tar to remove the tar extension. There should now be a folder as shown below.

../../../_images/online-installation-4.png

Open the terminal and run these commands

mkdir wpilib/2020

cp -R ~/Downloads/WPILib_Mac-2020.3.2/ ~/wpilib/2020

This will create the appropriate directories for WPILib and move the contents of WPILib_Mac-2020.3.2 to the ~/wpilib/2020 folder. When done the folder structure should look like this.

../../../_images/online-installation-5.png

The tools need to be update so they can be used. Run the commands below to do so.

cd ~/wpilib/2020/tools

python ToolsUpdater.py

An example of using the terminal is shown below.

../../../_images/online-installation-6.png

Installing Extensions

For VS Code to work properly the WPILib extensions need to be installed. Open VS Code and use the shortcut Cmd-Shift-P to open the command pallet. Type in the command Extensions: Install from VSIX.

../../../_images/online-installation-7.png

Navigate to the ~/wpilib/2020/vsCodeExtensions folder, select Cpp.vsix and hit install.

../../../_images/online-installation-8.png

Repeat this step for all the vsix files located in ~/wpilib/2020/vsCodeExtensions.

They must be completed in this order:

  1. Cpp.vsix

  2. JavaLang.vsix

  3. JavaDeps.vsix

  4. JavaDebug.vsix

  5. WPILib.vsix

Note

On the bottom right of the VS Code window popups will show saying if the installation is complete. Wait until there is a completed popup before preceding with the next extension. Also when installing the JavaLang.vsix there may be an error shown. This should be ignored for now

Getting VS Code to use Java 11

VS Code needs to be pointed to where the WPILib Java Home is. This is simply done by running the following command WPILib: Set VS Code Java Home to FRC Home.

../../../_images/online-installation-9.png

What was just Installed

  • Visual Studio Code - The preferred and supported IDE for robot code development.

  • C++ Compiler - Toolchains required for building C++ code.

  • Java JDK/JRE - Specific version of the JDK/JRE that is used to build code.

  • Gradle - Specific version of Gradle used for building and deploying Java or C++ code

  • WPILib Tools - Tools used for robot enhancement

  • WPILib Dependencies - OpenCV, etc.

  • VS Code Extensions - WPILib extensions for robot code development

Note

This section and all Linux examples was completed and tested using Ubuntu Desktop 20.04 LTS

The Linux installation requires multiple individual steps to be completed.

Installing VS Code

VS Code needs to be installed before the extensions are installed. The preferred version of VS Code is 1.41.1 which can be downloaded here. This will try to open a file called code_1.41.1-1576681836_amd64.deb. Chose to save the file instead of opening right away.

../../../_images/online-installation-11.png

The file code_1.41.1-1576681836_amd64.deb will be saved to the Downloads folder. Right click on the file and select Open With Other Application and chose Software Install. When software install opens verify the Version number as 1.41.1 and hit Install.

../../../_images/online-installation-21.png

There should be an Authentication prompt asking for the user to input their password. After the Authentication window the install will start and should only take a minute.

WPILib Download

The latest release for the WPILib can be found here

Chose the Linux version WPILib_Linux-2020.3.2.tar.gz

../../../_images/online-installation-31.png

The file will be placed in the Downloads folder. Right click on the WPILib_Linux-2020.3.2.tar.gz and select Extract Here. This will extract the contents to the Downloads folder.

Open Terminal and run these commands.

mkdir -p ~/wpilib/2020

mv -v ~/Downloads/WPILib_Linux-2020.3.2/* ~/wpilib/2020

python3 ~/wpilib/2020/tools/ToolsUpdater.py

This will move everything to the correct location and run the updater for the tools.

VS Code Extensions

For VS Code to be used for robotics the extensions from WPILib need to be installed.

  1. Open VS Code using terminal by typing in code.

  2. To open the command palette use Ctrl+Shift+P or hit F1.

  3. In the command palette run the command Extensions: Install From VSIX.

    ../../../_images/online-installation-41.png
  4. Extensions can be found in ~/wpilib/2020/vsCodeExtensions

    ../../../_images/online-installation-51.png

Install the Extensions in this Order

  1. Cpp.vsix

  2. JavaLang.vsix

  3. JavaDeps.vsix

  4. JavaDebug.vsix

  5. WPILib.vsix

Note

After installing an extension it’s recommended to close and reopen VS Code.

Getting VS Code to use Java 11

VS Code needs to be pointed to where the WPILib Java Home is. This is simply done by running the following command WPILib: Set VS Code Java Home to FRC Home.

../../../_images/online-installation-61.png

Vulkan Installation

For the simulation GUI to run, Vulkan is required. To install Vulkan open terminal and run this command.

sudo apt-get install libvulkan1

What was just Installed

  • Visual Studio Code - The preferred and supported IDE for robot code development.

  • C++ Compiler - Toolchains required for building C++ code.

  • Java JDK/JRE - Specific version of the JDK/JRE that is used to build code.

  • Gradle - Specific version of Gradle used for building and deploying Java or C++ code

  • WPILib Tools - Tools used for robot enhancement

  • WPILib Dependencies - OpenCV, etc.

  • VS Code Extensions - WPILib extensions for robot code development

  • Vulkan - Low overhead graphics API