New for 2023
A number of improvements have been made to FRC® Control System software for 2023. This article will describe and provide a brief overview of the new changes and features as well as a more complete changelog for Java/C++ WPILib changes. This document only includes the most relevant changes for end users, the full list of changes can be viewed on the various WPILib GitHub repositories.
It’s recommended to also review the list of known issues.
Importing Projects from Previous Years
Due to internal GradleRIO changes, it is necessary to update projects from previous years. After Installing WPILib for 2023, any 2022 projects must be imported to be compatible.
Cambios importantes (Java/C++)
Estos cambios contienen algunos de los principales cambios en la biblioteca que es importante que el usuario reconozca. Esto no incluye todos los cambios de ruptura, ver las otras secciones de este documento para más cambios.
NetworkTables has been completely rewritten as version 4.0. This introduces pub/sub semantics to NetworkTables and adds a number of new features, including timestamped updates. Its wire protocol is also now WebSockets-based for easier use by browser applications. While most of the changes should be transparent to users who don’t use the new features, there are several breaking changes. NetworkTables V3 clients are still compatible, but V2 support has been dropped.
Added support for on-robot telemetry recording into data logs
LiveWindowtelemetry is now disabled by default. This has been observed as a consistent source of loop overruns. UseLiveWindow.enableAllTelemetryto restore the previous behaviorAprilTag library has been added
Bundled Java version has been bumped to 17 from 11
GCC 12.1 with C++ 20 support. Visual Studio 2022 is required for running C++ Simulation on Windows
CameraServer now supports USB cameras on Mac operating systems
- Supported Operating Systems and Architectures:
Windows 10 & 11, 64 bit. 32 bit and Arm are not supported
Ubuntu 22.04, 64 bit. Other Linux distributions with glibc >= 2.32 may work, but are unsupported
macOS 11 or later, Intel and Arm.
Advertencia
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
Librería General
Deprecated
PerpetualCommand/perpetually(), useRepeatCommand/repeatedly()insteadRenamed
withInterrupt(BooleanSupplier)tountil()Added
InterpolatedTreeMapAdded
RepeatCommandand matchingrepeatedlydecoratorAdded
unless(BooleanSupplier)decoratorAdded
ignoringDisable(boolean)decorator to set therunsWhenDisabledproperty of a commandAdded
finallyDo(BooleanConsumer)andhandleInterrupt(Runnable)decoratorsAdded static command factories in Commands
Added
ComputerVisionUtilAdded
EventLoopandBooleanEvent, an expansion of the existing Trigger framework encompassing non-commandbasedAdded
BooleanEvent-returning factory methods to the HID classesAdded command-based versions of HID classes (
CommandXboxControlleretc.) withTrigger-returning factory methodsAdded LTV unicycle controllers
Added
Rotation2dfactory method that uses rotations and radians;fromRotations()andfromRadians()HolonomicDriveControllernow uses continuous input on heading PIDAdded various 3d geometry classes
Pose3dQuaternionRotation3dTransform3dTranslation3dTwist3dCoordinateAxisCoordinateSystem
Added various pneumatic sim classes
CTREPCMSimDoubleSolenoidSimREVPHSimSolenoidSim
Added
getAngle()toTranslation2dDeprecated
Compressor.enable(). UseisEnabledinsteadAdd missing
PS4Controllertriangle methodsAdd method to disable LW actuator control in test mode
Enhanced
Sendablerepresentation of commandsDeprecated
CommandGroupBase; the static factories have been moved toCommandsRefactor SelectCommand’s Supplier<Command> constructor and ProxyScheduleCommand into ProxyCommand
Remove isFinished check for default commands
Add method to remove default commands
TriggerandButtonmethods were renamed to be consistent andButtonclass deprecated.Trigger’s bindings are changed to useTrue/Falseterminology, as it should be unambiguous. Each binding type has bothTrueandFalsevariants; for brevity, only theTruevariants are listed here:onTrue(replaceswhenActiveandwhenPressed): schedule on rising edge.whileTrue(replaceswhileActiveOnce): schedule on rising edge, cancel on falling edge.toggleOnTrue(replacestoggleWhenActive): on rising edge, schedule if unscheduled and cancel if scheduled.
Two binding types are completely deprecated:
cancelWhenActive: this is a fairly niche use case which is better described as having the trigger’s rising edge (Trigger.rising()) as an end condition for the command (usingCommand.until()).whileActiveContinuously: however common, this relied on the no-op behavior of scheduling an already-scheduled command. The more correct way to repeat the command if it ends before the falling edge is usingCommand.repeatedly/RepeatCommandor aRunCommand– the only difference is if the command is interrupted, but that is more likely to result in two commands perpetually canceling each other than achieve the desired behavior. Manually implementing a blindly-scheduling binding likewhileActiveContinuouslyis still possible, though might not be intuitive.
Precompile common template instantiations to improve C++ compile times.
Cambios Importantes
Importante
The 2023 release no longer includes the old command-based framework. Users must refactor existing code to use the new command-based framework
Peligro
Updated DifferentialDrive and MecanumDrive classes to use North-West-Up axis conventions to match the rest of WPILib. The Z-axis (i.e. turning) will need to be inverted to restore the old behavior.
NetworkTables 4.0 (NT4) introduced several breaking changes. Shuffleboard classes now return
GenericEntryinstead ofNetworkTableEntry; asGenericEntryprovides nearly all the same methods, a simple textual replacement of the class name should suffice. Also, theforcesetters have been removed. See the NT4 migration guide for more information.Removed deprecated
MakeMatrix()fromStateSpaceUtilRemoved deprecated
KilloughDriveclassRemoved
Vector2d, which was an implementation detail of MecanumDrive and KilloughDrive. In Java, useVector<N2>(edu.wpi.first.math.Vector) orTranslation2d(edu.wpi.first.math.geometry.Translation2d) instead. In C++, useEigen::Vector2dfrom<Eigen/Core>orTranslation2dfrom<frc/geometry/Translation2d.h>instead.Removed deprecated
SpeedControllerandSpeedControllerGroupclasses. Use MotorController and MotorControllerGroup insteadRemoved deprecated
MatrixUtilsclassRemoved various deprecated overloads that used above mentioned classes
Removed various deprecated
getInstance()functions. Static functions are available insteadRemoved various deprecated functions in
SimDeviceRefactored command
interruptibleto be an enum property (getInterruptionBehavior()) of the command object rather than a boolean flag when scheduling; thewithInterruptBehavior(InterruptBehavior)decorator can be used to set this propertyCommand lifecycle methods of command groups cannot be overridden
[C++ only] Command Decorators changed to return
CommandPtr– a new move-only value type for holding commandsSwerveDriveOdometryandSwerveDrivePoseEstimatornow use wheel distances instead of wheel speeds; UseSwerveModulePositionto represent a swerve module’s angle and distance driven.SwerveDriveOdometryandSwerveDrivePoseEstimatornow take in the wheel distances in an array rather than as a variadic parameter.MecanumDriveOdometryandMecanumDrivePoseEstimatornow use wheel distances instead of wheel speeds; UseMecanumDriveWheelPositionsto represent the wheel distances.Constructors and
resetPositionmethods on all odometry and pose estimation classes now have mandatory wheel distance parameters.Odometry and pose estimator constructor and function arguments have been rearranged to be consistent between implementations. Users should consult the API documentation for the particular class they’re using and update the method calls accordingly.
Removed wpi versions of C++20 methods
Use
std::numbersinstead ofwpi::numbers(include<numbers>)Use
std::spaninstead ofwpi::span(include<span>)
Removed template argument from
ElevatorFeedforwardin C++.
Simulación
Added precision setting for NetworkTables decimal values
Added docking support for GUI elements
Save secondary Y axis in plots
Shuffleboard
Added vertical orientation option to number bar widget
Fixed Field2d widget not auto populating
Update PowerDistribution Widget to support 24 channels
Added 2023 Charged Up field image
Update PID widget to remove features no longer supported by PIDController (kF and enable)
SmartDashboard
Importante
SmartDashboard is not supported on Apple Silicon (Arm64) Macs.
Update PowerDistribution Widget to support 24 channels
Add option to clear all plots
Update PID widget to remove features no longer supported by PIDController (kF and enable)
Glass
Added precision setting for NetworkTables decimal values
Added docking support for GUI elements
Save secondary Y axis in plots
PathWeaver
Added 2023 Charged Up field image
GradleRIO
Upgrade to Gradle 7.5.1
Fixed issue where start-up scripts could get damaged if roboRIO powered off during deploy
cscore
Update to opencv 4.6.0
Added ArUco module
OutlineViewer
Added precision setting for NetworkTables decimal values
Instalador de WPILib todo en uno
Apple Silicon (Arm64) Macs are now supported
Update to VS Code 1.74
Update to use .NET 7
Add links to changelog and known issues
Visual Studio Code Extension
Update templates to JUnit 5.8.2
Add copy button from project versions dialog
Allow importing Romi projects
RobotBuilder
Importante
With the removal of old command-based, the legacy RobotBuilder install has been removed.
Advertencia
Due to project file changes, Robotbuilder will not import yaml save files from 2022 or earlier.
Add support for
DoubleSupplierandstd::function<double>parametersAdd option to put commands tied to Joystick Buttons to SmartDashboard
Add PS4 Controller
Validate Team Number
SysID
Added Pigeon 2 support
User can now specify a measurement delay of 0
Fixed
Override Unitsoption not overriding units per rotations
Romi
No major changes