This is an update release of WPILib for the 2021 season.
The documentation for WPILib is located at https://docs.wpilib.org/ (if you have trouble accessing this location, https://frcdocs.wpi.edu/ 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 2021 and jump directly to the WPILib installation guide.
A list of known issues with this release can be found here.
What's New in 2021.3.1 (since 2021.2.2)
WPILib
- HolonomicDriveController: Fixed atReference() behavior (#3163), fixed initial heading behavior (#3290)
- (C++) Added RobotController::GetBatteryVoltage(); this already existed in Java (#3179)
- Added SimDeviceSim constructor overloads (#3134)
- Added DoubleSolenoidSim and SolenoidSim classes (#3177)
- Require non-zero positive value for PIDController period (#3175)
- Change KOP drivetrain simulation weight to 60 lbs (#3228)
- Fixed Compressor sendable properties (#3269)
- FieldObject2d: added setTrajectory() method (#3277)
- AnalogEncoder: added channel constructor (#3273)
Math
- Added methods to concatenate trajectories (#3139)
- (Java) Significantly speed up trajectory loading (#3257)
- (Java) Added kg-lb conversions to Units.java (#3203)
- Added custom residual support to EKF (#3148)
- Added pose estimator overload for vision and std dev measurement (#3200)
- Fixed order of setting the gyro offset in pose estimators (#3176)
- Fixed typo in quintic spline basis matrix
- Removed ControllerUtil (#3169)
Commands
- RamseteCommand: Output zero if command is interrupted (#3216)
- (Java) Change CommandBase.withName() to return CommandBase (#3209)
Examples
- Fixed Ramsete Controller example (#3142)
- Made DriveDistanceOffboard example work in simulation (#3199)
- Used more logical elevator setpoints in GearsBot example (#3198)
- Fixed odometry update in SwerveControllerCommand example (#3310)
CameraServer
- Added polled support to listeners; Java VideoListener now uses a Java thread (#3133)
- Added USB camera change event (#3123)
HAL
- Added function for changing HAL Notifier thread priority (#3218)
Glass / Simulation GUI
- Plots
- Field2d enhancements (#3234)
- Added support for pose lists > 255/3 in length
- Improved drag selection, especially with closely overlapping objects
- Drag selection of corner now also highlights center of object with smaller circle
- Added multiple object display styles (box, line, closed line, track)
- Line and arrow settings (color, weight) are now configurable
- Added tooltip for object name, index, x, y, rotation
- Added context menu for pose edit/add/remove
- Can now view/edit in feet or inches as well as meters
- Object selectability is now configurable
- Fixed duplicate names (#3233)
- NetworkTables
- Fixed crash on Windows caused by long double arrays (#3242)
- Fixed setting of empty double array (#3208)
- String chooser: Clear value of deleted entries (#3178)
- Don't block GUI when changing settings (#3226)
- Allow disable of server option in settings (#3227)
- Added "copy to clipboard" button in log view (#3274)
- Ensure window will be initially visible on screen (#3256)
- Sim GUI
PathWeaver
- Added the 2021 field image (wpilibsuite/PathWeaver#208)
- Added an option to go back to the Welcome screen (wpilibsuite/PathWeaver#222)
- The default path now defaults to 25% of the field width and height (wpilibsuite/PathWeaver#226)
- Waypoint properties Y coordinate now matches WPILib coordinates (bottom left is 0,0) (wpilibsuite/PathWeaver#217)
- Editing waypoint properties now no longer results in a save popup if nothing is changed (wpilibsuite/PathWeaver#229)
- When a new path is clicked on, the first waypoint is now selected (wpilibsuite/PathWeaver#218)
- Added dark mode (wpilibsuite/PathWeaver#231)
- Drag and drop fixes (wpilibsuite/PathWeaver#256), (wpilibsuite/PathWeaver#251)
- Work around , separator issue in some locales by forcing US locale (wpilibsuite/PathWeaver#257)
- Resize alert dialogs to fit contents (wpilibsuite/PathWeaver#240)
- Renamed "Path Group" to "Autonomous Routines" (wpilibsuite/PathWeaver#219)
- "Reverse" now reverse the waypoints in the path to make the robot go backwards, rather than altering the waypoint order (wpilibsuite/PathWeaver#227)
- Fixed bug with exporting non-meter units as meters (wpilibsuite/PathWeaver#259)
GradleRIO
- Updated image mismatch error to be more user-friendly (wpilibsuite/GradleRIO#495)
VS Code
- Require a valid folder name and team number when creating a project (wpilibsuite/vscode-wpilib#443)
RobotBuilder
- (C++) Fixed export of Xbox button (wpilibsuite/RobotBuilder#380)
- (Java) Fixed declaration of SpeedControllerGroup (wpilibsuite/RobotBuilder#385)
- (C++) Removed duplicate subsystem includes in RobotContainer (wpilibsuite/RobotBuilder#386)
- (C++) Fixed type detection (wpilibsuite/RobotBuilder#387)
Installer
- Use new location for downloading VS Code (wpilibsuite/WPILibInstaller-Avalonia#164) (also fixed in 2021.2.2 updated artifacts)
Hashes
MD5 Hashes
e0c152da3834a22093aa3c475e565a27 WPILib_Linux-2021.3.1.tar.gz
47682d4a782135cc40227cdb40401503 WPILib_macOS-2021.3.1.dmg
b1657cdb177ec7969a1f83500b3ac7ad WPILib_Windows32-2021.3.1.iso
298d52a77aedea9d50c74d0a8e0fe990 WPILib_Windows64-2021.3.1.iso
SHA256 Hashes
1443a74be28e25d254720532fcad26e1742d5c2830fdf335e72d524bfba72d73 WPILib_Linux-2021.3.1.tar.gz
4e30c81a3e898551d07aff90d7b0f26bdc4cfb646f133c7b904926c7dc29bb2c WPILib_macOS-2021.3.1.dmg
0d6d9af9c8579fbf0e1c88f8d4596982d28bedd447855573504d462f846ea7e1 WPILib_Windows32-2021.3.1.iso
b56c3b9dd9d26393015c71ede8033ee4b1ec85f65b871a7e6f17258dbc8e54b8 WPILib_Windows64-2021.3.1.iso