[WPILIB Blog] 2022 Update Release 2 of WPILib

Posted on the WPILib Blog, 2/3/2022: 2022 Update Release 2 of WPILib — WPILib

This is the second update release of WPILib for the 2022 season. This release tracks to RoboRIO image v4.0, which fixes the Analog Devices SPI gyros issue and is required per Team Update 8. Download links and additional information are available at Release WPILib 2022.3.1 Release · wpilibsuite/allwpilib · GitHub.

Important: Reimaging the RoboRIO to 2022_v4.0 is required to use this release; this is installed by National Instruments FRC Game Tools 2022 f1 (note the “f1” in the version number). After installing 2022 f1, use the RoboRIO Imaging Tool to reimage your RoboRIO to 2022_v4.0. This release will not work with earlier 2022 RoboRIO images and will error out if a deploy is attempted to an earlier version; similarly, older versions of WPILib will not work with the v4.0 image.

Upgrading WPILib from earlier 2022 releases is easy: simply download and run the new installer and it will update your current installation. If you already have the 2022 WPILib vscode installed, it will detect it and you can simply click “next” for that installation step. After installation, vscode will prompt you when opening your robot project whether you want to upgrade it to this version.

The documentation for WPILib is located at https://docs.wpilib.org/ (if you have trouble accessing this location, FIRST Robotics Competition Control System — FIRST Robotics Competition documentation is an alternate location with the same content).

If you’re new to FRC, start with Getting Started.

If you’re returning from a previous season, check out what’s new for 2022; be sure to read through this, as a lot has changed from 2021! You will need a new RoboRIO image for 2022; this is available via the FRC Game Tools. Follow the WPILib installation guide to install WPILib.

If you’re starting from a 2020 or 2021 robot project, you will need to import your project to create a 2022 project. The import process is particularly important for 2022, as it will make a number of automated corrections for the various breaking package moves/renames that happened in 2022.

A complete list of known issues with this release can be found here. In particular, there is a warning against using the “onboard” I2C port (the MXP I2C port does not have an issue). Also, while overall AD gyro support has been fixed, there is a bug in this release in the ADIS16448 Java implementation’s no-args constructor: to work around this, use ADIS16448_IMU(ADIS16448_IMU.IMUAxis.kZ, SPI.Port.kMXP, ADIS16448_IMU.CalibrationTime._1s); instead of the no-args constructor.

WPILib is developed by a small team of volunteers and the FIRST community.

9 Likes

Does this also fix the RIO I2C issue?

No.

3 Likes

2 posts were merged into an existing topic: Seperate Thread: No Robot Code

When trying to install 2022.3.1 it fails with a unsupported compression method. This doesn’t happen woth 2022.2.1. Attempted on both Windows 10 and Windows 11 64 bit versions.

System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
at System.IO.Compression.DeflateStream.CopyToStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at System.IO.Compression.DeflateStream.CopyToStream.CopyFromSourceToDestinationAsync()
at WPILibInstaller.ViewModels.InstallPageViewModel.ExtractArchive(CancellationToken token, String[] filter)
at WPILibInstaller.ViewModels.InstallPageViewModel.ExtractJDKAndTools(CancellationToken token)
at WPILibInstaller.ViewModels.InstallPageViewModel.InstallTools(CancellationToken token)
at WPILibInstaller.ViewModels.InstallPageViewModel.RunInstall()
at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass24_0.<<-ctor>g__installFunc|0>d.MoveNext()

It looks like .NET can throw that exception for other reasons. Just to check, you’re not out of disk space, right? Also, can you delete the entire C:/Users/Public/wpilib/2022 folder and try again? Wonder if theres something already in the folder that it’s not liking.

I have plenty of disk space and I tried it on 2 separate machines. I just removed the 2020, 2021, and 2022 directories and retried with All User / Tools Only and hit the same thing.

Can you verify the md5 or sha256 hash of the file you downloaded?

I’ll have to do it later, I have to leave.

Can l only update the FRC Game Tools to 2022 f1 in the NI Package Manager? Since l don’t want to uninstall it and install the new version again.

I tried this and it seems to be functional, but I’m not sure how easily I could have messed it up so proceed at your own risk.

Thanks, is 2022.3.1 the last version of this year’s WPILIB?

Probably not (we continue to work on bugfixes and features). But it should (knock on wood) be the last required version (e.g. you won’t be required to upgrade again for competition).

1 Like

Thanks , so the WPILIB won’t release another version to update but will still fix bugs and release the new version in the 2023.x.x.

Besides, if l want to use the latest version (such as 1.64)of vscode, l can download it and install the WPILIB with it by clicking the button below. Is that right?
image

Edit: This method isn’t useful. l tried it just now.

We will probably release a 2022.4.1 in the next few weeks, but it should not be a required update.

As for vscode, no, the installer will only ever install a fixed version hardcoded in it. We do this, and disable automatic updates to ensure everyone is using a tested and known working configuration.

2 Likes

I am also unable to do the WPILib install from a downloaded ZIP file. I was able to update things by doing the online install.

I have plenty of disk space. The MD5 hash for my download matches the hash code displayed on the github release page.

Downloaded zip file? The download is a .iso (for Windows), .dmg (Mac), or .tar.gz (Linux). Can you confirm what file you downloaded?

$ md5sum WPILib_Windows64-2022.3.1.iso
8be0f176d5bf767da226c5b66d1dc944 *WPILib_Windows64-2022.3.1.iso

The WPILib install downloaded the zip file: WPILib-VSCode-1.63.2.zip

What’s the md5sum of that file? I get 0de22d001946c1795b0a415fd490fe61 *WPILib-VSCode-1.63.2.zip

1 Like