Guide d’installation WPILib

Ce guide est destiné aux équipes programmant en Java et C++. Les équipes LabVIEW peuvent passer à la section Installation de LabVIEW pour FRC. En outre, le didacticiel ci-dessous montre le cas d’une installation sous Windows 10, mais les étapes sont identiques pour tous les systèmes d’exploitation. Les notes différenciant les systèmes d’exploitation seront affichées.

Prérequis

Supported Operating Systems and Architectures:
  • Windows 10 & 11, 64 bit only. 32 bit and Arm are not supported

  • Ubuntu 22.04, 64 bit. Other Linux distributions with glibc >= 2.34 may work, but are unsupported

  • macOS 11 or higher, both Intel and Arm for Java. C++ requires macOS 12 or higher with Xcode 14.

Avertissement

The following OSes are no longer supported: macOS 10.15, Ubuntu 18.04 & 20.04, Windows 7, Windows 8.1, and any 32-bit Windows.

WPILib est conçu pour s’installer dans différents dossiers correspondant à différentes années, de sorte qu’il n’est pas nécessaire de désinstaller une version précédente avant d’installer la version WPILib de l’année en cours.

Downloading

WPILib Installer

WPILib 2024.1.1 Beta 2 Release - October 20, 2023

Downloads

Downloads for other platforms

Release Notes

This is the second beta release of WPILib for the 2024 season. Please join the discussions regarding beta testing at https://github.com/wpilibsuite/2024Beta/discussions.

This release requires the 2024_v1.1 beta roboRIO image to use on a robot. This image is included in the NI 2024 Beta 1 Game Tools.

Getting Started

Check out what's new for 2024 and jump directly to the WPILib installation guide.

If you're starting from a 2023 robot project, you will need to import it to create a 2024 project.

Downloads

For 2024, we are considering different options for our downloads due to GitHub file size limitations, and are testing this during the beta. Download links from alternate hosting are below; alternatively in Beta 2 we are providing "split" zip files in the GitHub release--you will need to download both the .zip and .z01 files and then unzip them to get the installer image (this can be done in Windows Explorer by selecting both files and running "Extract All"). Feedback regarding this change is welcome on the beta forum.

What's Changed Since Beta 1

Major new features

  • Bundled AdvantageScope in installer (v3.0.0-beta-3)
  • Added support for serialization/deserialization of protobuf and fixed-size structs to NT and DataLog by @PeterJohnson. Documentation/examples are in work. More information in #5391.
  • Added Exponential motion profile by @jlmcmchl in https://github.com/wpilibsuite/allwpilib/pull/5720

NetworkTables

  • Fixed crashes in networking on Windows by @PeterJohnson in https://github.com/wpilibsuite/allwpilib/pull/5788

Math

  • Added overloads for Transform2d and Transform3d by @anitmangal in https://github.com/wpilibsuite/allwpilib/pull/5757
  • Fixed hardcoded module count in SwerveDriveKinematics.resetHeading() by @calcmogul in https://github.com/wpilibsuite/allwpilib/pull/5762
  • Added DCMotor functions for Kraken X60 and Neo Vortex by @jlmcmchl in https://github.com/wpilibsuite/allwpilib/pull/5759
  • Added LinearSystemId DCMotorSystem overload by @narmstro2020 in https://github.com/wpilibsuite/allwpilib/pull/5770
  • Added ChassisSpeeds.fromRobotRelativeSpeeds() by @BlueZeeKing in https://github.com/wpilibsuite/allwpilib/pull/5744
  • Made Vector-Vector binary operators return Vector by @calcmogul in https://github.com/wpilibsuite/allwpilib/pull/5772

Examples

  • Make swerve examples multiply desired module speeds by cosine of heading error by @ori-coval in https://github.com/wpilibsuite/allwpilib/pull/5758

Other bug fixes

  • Workaround implemented for the beta v1.1 image missing the FRC_ prefix in the image name
  • [wpilib] Close sim device in ADIS IMUs by @calcmogul in https://github.com/wpilibsuite/allwpilib/pull/5776
  • [wpilib] Make physics sim setState() functions public by @calcmogul in https://github.com/wpilibsuite/allwpilib/pull/5779
  • [commands] Add requirements parameter to Commands.idle() by @rzblue in https://github.com/wpilibsuite/allwpilib/pull/5774
  • [wpilibj] Fix RobotBase.isSimulation() by @PeterJohnson in https://github.com/wpilibsuite/allwpilib/pull/5783
  • [wpilib] Counter: fix default distance per pulse, give c++ parity by @rzblue in https://github.com/wpilibsuite/allwpilib/pull/5796

Dependency updates

  • Updated C++ JSON to 3.11.2 by @pjreiniger in https://github.com/wpilibsuite/allwpilib/pull/5680
  • Updated EJML to 0.43.1 by @calcmogul in https://github.com/wpilibsuite/allwpilib/pull/5778

Full Changelog: https://github.com/wpilibsuite/allwpilib/compare/v2024.1.1-beta-1...v2024.1.1-beta-2

Errata

  • AdvantageScope fails the GateKeeper check on Mac

New contributors

WPILib is developed by a small team of volunteers and the FIRST community. Thanks to the following new contributors (since the beta-1 release) for helping make WPILib better for all teams!

  • @ori-coval made their first contribution in https://github.com/wpilibsuite/allwpilib/pull/5758
  • @anitmangal made their first contribution in https://github.com/wpilibsuite/allwpilib/pull/5757
  • @BlueZeeKing made their first contribution in https://github.com/wpilibsuite/allwpilib/pull/5744

MD5 Hashes

1debcd7d7f4ce61e6eea7f416ea851b2 WPILib_Linux-2024.1.1-beta-2.tar.gz
fe761aadc59aae329837176118009893 WPILib_Windows-2024.1.1-beta-2.iso
5246df73a8298527bbb403a3ce3ff821 WPILib_macOS-Intel-2024.1.1-beta-2.dmg
4d7cf833cf758cad6d2f335a17bbcc4a WPILib_macOS-Arm64-2024.1.1-beta-2.dmg
6e25e45d55d6deaeed131e63fabb672e WPILib_Linux-2024.1.1-beta-2.z01
bc5e14c94a9d5fbf1cf386b43c81fb76 WPILib_Linux-2024.1.1-beta-2.zip
e0fac709528b6f0618e7a4a6b4de413a WPILib_Windows-2024.1.1-beta-2.z01
ad485c5fec801eeb8631326c8c20c599 WPILib_Windows-2024.1.1-beta-2.zip
c5efe5a466c9ab67420bb8a5c424ec6c WPILib_macOS-Arm64-2024.1.1-beta-2.z01
b43d4f439867df2b44256a43d2d55065 WPILib_macOS-Arm64-2024.1.1-beta-2.zip
cada09d2cdb04fd9d9810215956d708f WPILib_macOS-Intel-2024.1.1-beta-2.z01
b39f18e4fe4b29a8fc419ac3ca9a8353 WPILib_macOS-Intel-2024.1.1-beta-2.zip

SHA256 Hashes

ff096dbef435701537946a88224f614bbffd970996b1d858436d56ccafbfa727 WPILib_Linux-2024.1.1-beta-2.tar.gz
e4107d683079e687fd38fcdf122fbe0e788384a24c88c64a0fd28a2bae7ccac3 WPILib_Windows-2024.1.1-beta-2.iso
0b70087a05c38ca2368cc13e2aafe1894abed3e322a6373568410167b7761ebc WPILib_macOS-Intel-2024.1.1-beta-2.dmg
f302deeec66a3d1430ae685e81ed21c53eeaeb7585b965ec9ba0e31ee81d0b7e WPILib_macOS-Arm64-2024.1.1-beta-2.dmg
4427cf1c51cf6904beaccfeac12ab70d017c9d69ad0d8b24c0266425133035e3 WPILib_Linux-2024.1.1-beta-2.z01
117e1b86384f5ae569d015dd3d69778764b350af4d60dab24e0a2dbb96a69876 WPILib_Linux-2024.1.1-beta-2.zip
a49c2d7c7e53e913157e716fe4a4a819763744cc879f14023bd627e52b951dea WPILib_Windows-2024.1.1-beta-2.z01
8f67a61358d2d7ff745a53f231456488284ffcbc5ccb8312626acff6492c53a8 WPILib_Windows-2024.1.1-beta-2.zip
5e684fd7001bd54c7d0e9b106e0bf4adfe5bfaad1d73e7286ec9a5427d43f8e5 WPILib_macOS-Arm64-2024.1.1-beta-2.z01
e7606da87de3ca757100e0de9717afdb272b666c4d4a0d0403f4d788d11e2f0a WPILib_macOS-Arm64-2024.1.1-beta-2.zip
e9801d884e73fd8538d85d450c42cdedaf2316c7c7ce464725c7008f7fa7cee0 WPILib_macOS-Intel-2024.1.1-beta-2.z01
14ec13851738a660224c4451631b3e8be9de893619fb6eb1d4c0eeaf26832f75 WPILib_macOS-Intel-2024.1.1-beta-2.zip

You can download the latest release of the installer from GitHub.

Once on the GitHub releases page, scroll to the Downloads section.

Latest WPILib release page on GitHub

Then click on the correct binary for your OS and architecture to begin the download.

Extraction de l’installateur

Lorsque vous téléchargez l’installateur WPILib, celui-ci est distribué sous la forme d’un fichier d’image de disque .iso pour Windows, .tar.gz pour Linux, et distribué sous la forme de DMG pour MacOS.

Windows 10+ users can right click on the downloaded disk image and select Mount to open it. Then launch WPILibInstaller.exe.

Le menu après un clic droit sur un fichier .iso pour choisir "Mount".

Note

Other installed programs may associate with iso files and the mount option may not appear. If that software does not give the option to mount or extract the iso file, then follow the directions below.

You can use 7-zip to extract the disk image by right-clicking, selecting 7-Zip and selecting Extract to…. Windows 11 users may need to select Show more options at the bottom of the context menu.

Après avoir cliqué sur le bouton droit de la souris sur le fichier .iso allez dans "7-Zip" puis "Extract to....".

After opening the .iso file, launch the installer by opening WPILibInstaller.exe.

Note

After launching the installer, Windows may display a window titled « Windows protected your PC ». Click More info, then select Run anyway to run the installer.

For this release, macOS users will need to have the Xcode Command Line Tools installed before running the installer; we are working on removing this requirement in a future release. This can be done by running xcode-select --install in the Terminal.

Les utilisateurs du système macOS peuvent cliquer deux fois sur le DMG téléchargé, puis sélectionnez WPILibInstaller pour lancer l’application.

Affichez l’écran macOS après avoir double-cliqué sur le fichier DMG.

Les utilisateurs de Linux devraient extraire le .tar.gz téléchargé, puis lancer WPILibInstaller. Ubuntu traite les fichiers exécutables dans l’explorateur de fichiers comme des libairies partagées, de sorte qu’en les double-cliquant, on ne les exécutera pas. À la place, exécutez les commandes suivantes dans un terminal avec <version> remplacé par la version que vous êtes en train d’installer.

$ tar -xf WPILib_Linux-<version>.tar.gz
$ cd WPILib_Linux-<version>/
$ ./WPILibInstaller

Exécution de l’installateur

Lors de l’ouverture de l’installateur, l’écran ci-dessous vous sera présenté. Procédez et appuyez sur Start.

Démarrage du programme d’installationSurvol des options d’installation

Cela présente une liste d’options incluses avec l’installation de WPILib.

  • Tools Only installe uniquement les outils WPILib (Pathweaver, Shuffleboard, RobotBuilder, SysID, Glass et OutlineViewer) et le JDK.

  • Everything installe l’environnement de développement complet (VS Code, extensions, toutes les dépendances), les outils WPILib et le JDK.

Vous remarquerez deux boutons, Install for this User et Install for all Users. Install for this User ne l’installe que sur le compte utilisateur actuel et ne nécessite pas de privilèges d’administrateur. Cependant, Install for all Users installe les outils pour tous les comptes système et nécessitera un accès administrateur. Install for all Users n’est pas une option pour macOS et Linux.

Note

Si vous sélectionnez Install for all Users, Windows vous demandera un accès administrateur via le contrôle de compte d’utilisateur pendant l’installation.

Sélectionnez l’option qui vous convient et l’écran d’installation suivant vous sera présenté.

Cet écran suivant concerne le téléchargement de VS Code. Malheureusement, pour des raisons de licence, VS Code ne peut pas être intégré dans l’installateur.

Vue d’ensemble des options de téléchargement de VS Code
  • Télécharger pour cet ordinateur uniquement

    • Cette option télécharge VS Code uniquement pour la plate-forme actuelle, ce qui correspond également au plus petit téléchargement.

  • Ignorer et ne pas utiliser VS Code

    • Ignore l’installation de VS Code. Cette option est utile pour les installations ou les configurations avancées. Généralement pas recommandé.

  • Select existing VS Code archive for offline install on this computer

    • La sélection de cette option fera apparaître une invitation vous permettant de sélectionner un fichier zip préexistant de VS Code qui a été téléchargé précédemment par le programme d’installation. Cette option ne vous permet pas de sélectionner une copie déjà installée de VS Code sur votre machine.

  • Create VS Code archives to share with other computers/OSes for offline install

    • Cette option télécharge et enregistre une copie de VS Code pour toutes les plates-formes, ce qui est utile pour partager la copie du programme d’installation.

Go ahead and select Download for this computer only. This will begin the download process and can take a bit depending on internet connectivity (it’s ~100MB). Once the download is done, select Next. You should be presented with a screen that looks similar to the one below.

Barre de progression du programme d’installation

Une fois l’installation terminée, l’écran de fin d’installation vous sera présenté.

Écran de fin d'activité de l'installeur.

Important

WPILib installe une version distincte de VS Code. Il n’utilise pas une installation déjà existante. Chaque année a sa propre copie des outils ajoutés avec l’année. IE: WPILib VS Code 2022. Veuillez lancer le VS Code WPILib non une copie installée du système!

Félicitations, l’environnement de développement et les outils WPILib sont maintenant installés sur votre ordinateur! Appuyez sur Terminer pour quitter le programme d’installation.

Après l’installation

Certains systèmes d’exploitation nécessitent une dernière action pour terminer l’installation.

Après l’installation, l’installateur ouvre le dossier WPILib VS Code. Faites glisser l’application VS Code sur le dock. Éjectez l’image WPILibInstaller du bureau.

Certaines versions de Linux (par exemple Ubuntu 20.04) vous obligent à donner au raccourci de bureau la possibilité de démarrer. Cliquez à droite sur l’icône de bureau et sélectionnez Allow Launching.

Menu qui apparaît après avoir cliqué sur le bouton droit de la souris sur l’icône du bureau sous Linux.

Note

Installing desktop tools and rebooting will create a folder on the desktop called YYYY WPILib Tools, where YYYY is the current year. Desktop tool shortcuts are not available on Linux and macOS.

Installation C++ supplémentaire pour la simulation

C++ robot simulation requires that a native compiler to be installed. For Windows, this would be Visual Studio 2022 (not VS Code), macOS requires Xcode 14 or later, and Linux (Ubuntu) requires the build-essential package.

Assurez-vous que l’option Desktop Development with C++ est cochée dans le programme d’installation de Visual Studio pour la prise en charge de la simulation.

Capture d’écran de l’option outils de compilation de Visual Studio

Qu’est-ce qui a été installé?

Le programme d’installation hors ligne installe les composants suivants:

  • Visual Studio Code - L’IDE pris en charge à partir de 2019 et en montant pour le développement du code robot. L’installateur hors ligne définit une copie distincte de VS Code pour le développement WPILib, même si vous avez déjà VS Code sur votre ordinateur. Cela est possible car certains des paramètres pour la configuration et le bon fonctionnement de la WPILib peuvent briser les flux de travail existants si vous utilisez VS Code pour d’autres projets.

  • C++ Compiler - Les chaînes de compilation pour la création du code C++ pour le roboRIO

  • Gradle - La version spécifique de Gradle utilisée pour la création/déploiement du code robot C++ ou Java

  • Java JDK/JRE - Une version spécifique de Java JDK/JRE qui est utilisée pour construire le code robot Java et pour exécuter l’un des outils basés sur Java (Dashboard, etc.). Celle-ci cohabite avec les installations JDK déjà existantes et n’écrase pas la variable JAVA_HOME

  • Outils WPILib - SmartDashboard, Shuffleboard, RobotBuilder, Outline Viewer, Pathweaver, Glass, SysID

  • WPILib Dependencies - OpenCV, etc.

  • VS Code Extensions - Extensions WPILib pour le développement du code robot sous VS Code

Désinstallation

WPILib est conçu pour être installé dans différents dossiers pendant différentes années, de sorte qu’il n’est pas nécessaire de désinstaller une version précédente avant d’installer le WPILib de cette année courante. Cependant, les instructions suivantes peuvent être utilisées pour désinstaller WPILib si vous le souhaitez.

  1. Delete the appropriate wpilib folder (c:\Users\Public\wpilib\YYYY where YYYY is the year to uninstall)

  2. Supprimez les icônes du bureau dans C:\Users\Public\Public Desktop

  1. Delete the appropriate wpilib folder (~/wpilib/YYYY where YYYY is the year to uninstall)

  1. Delete the appropriate wpilib folder (~/wpilib/YYYY where YYYY is the year to uninstall). eg rm -rf ~/wpilib/YYYY

Dépannage

En cas de défaillance de l’installateur, signalez le problème dans le dépôt de l’installateur. Un lien est disponible ici. L’installateur doit signaler un message relatif à la cause de l’erreur, s’il vous plaît l’inclure dans la description de votre problème.