2023 için yeni
2023 yılı için FRC® Kontrol Sistemi yazılımında bir takım iyileştirmeler yapılmıştır. Bu makale, Java/C++ WPILib değişiklikleri için daha eksiksiz bir değişiklik günlüğünün yanı sıra yeni değişiklikler ve özellikler hakkında kısa bir bakış sunacak ve sağlayacaktır. Bu belge yalnızca son kullanıcılar için ilgili değişiklikleri içerir, değişikliklerin tam listesi çeşitli WPILib GitHub depolarında görüntülenebilir.
It’s recommended to also review the list of known issues.
Önceki Yıllardaki Projeleri İçe Aktarmak
Dahili GradleRIO değişiklikleri nedeniyle, önceki yılların projelerini güncellemek gerekir. Installing WPILib for 2023 yüklendikten sonra, uyumlu olması için herhangi bir 2022 projesinin imported olması gerekir.
Büyük Değişiklikler (Java/C++)
Bu değişiklikler, kitaplıkta yapılan ve kullanıcının bilmesi gereken önemli değişikliklerden bazılarını içerir. Bu bütün büyük değişiklikleri içermez, daha fazla değişiklik görmek için bu belgenin diğer kısımlarına bakın.
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
LiveWindow
telemetrisi artık varsayılan olarak devre dışı. Bu telemetri, loop overrun uyarılarının devamlı bir kaynağı olarak gözlemlenmiştir. Önceki davranışı geri getirmek içinLiveWindow.enableAllTelemetry
kullanınAprilTag library has been added
Paketlenmiş Java sürümü 11’den 17’ye yükseltildi
C++ 20 destekleyen GCC 12.1. Windows üzerinden C++ Simülasyonu çalıştırmak için Visual Studio 2022 gereklidir
CameraServer now supports USB cameras on Mac operating systems
- Desteklenen İşletim Sistemleri ve Mimariler:
Windows 10 & 11, 64 bit. 32 bit ve Arm desteklenmiyor
Ubuntu 22.04,64 bit. Glibc >= 2.32 yüklü olan diğer Linux dağıtımları çalışabilir ancak desteklenmemektedir.
macOS 11 or later, Intel and Arm.
Uyarı
Artık desteklenmeyen işletim sistemleri: macOS 10.15, Ubuntu 18.04 & 20.04, Windows 7, Windows 8.1 ve herhangi bir 32-bit Windows sürümü.
WPILib
Genel Kütüphane
Deprecated
PerpetualCommand
/perpetually()
, useRepeatCommand
/repeatedly()
insteadRenamed
withInterrupt(BooleanSupplier)
tountil()
Added
InterpolatedTreeMap
Added
RepeatCommand
and matchingrepeatedly
decoratorAdded
unless(BooleanSupplier)
decoratorAdded
ignoringDisable(boolean)
decorator to set therunsWhenDisabled
property of a commandAdded
finallyDo(BooleanConsumer)
andhandleInterrupt(Runnable)
decoratorsAdded static command factories in Commands
Added
ComputerVisionUtil
Added
EventLoop
andBooleanEvent
, an expansion of the existing Trigger framework encompassing non-commandbasedAdded
BooleanEvent
-returning factory methods to the HID classesAdded command-based versions of HID classes (
CommandXboxController
etc.) withTrigger
-returning factory methodsAdded LTV unicycle controllers
Added
Rotation2d
factory method that uses rotations and radians;fromRotations()
andfromRadians()
HolonomicDriveController
now uses continuous input on heading PIDAdded various 3d geometry classes
Pose3d
Quaternion
Rotation3d
Transform3d
Translation3d
Twist3d
CoordinateAxis
CoordinateSystem
Added various pneumatic sim classes
CTREPCMSim
DoubleSolenoidSim
REVPHSim
SolenoidSim
Added
getAngle()
toTranslation2d
Deprecated
Compressor.enable()
. UseisEnabled
insteadAdd missing
PS4Controller
triangle methodsAdd method to disable LW actuator control in test mode
Enhanced
Sendable
representation of commandsDeprecated
CommandGroupBase
; the static factories have been moved toCommands
Refactor SelectCommand’s Supplier<Command> constructor and ProxyScheduleCommand into ProxyCommand
Remove isFinished check for default commands
Add method to remove default commands
Trigger
andButton
methods were renamed to be consistent andButton
class deprecated.Trigger
’s bindings are changed to useTrue
/False
terminology, as it should be unambiguous. Each binding type has bothTrue
andFalse
variants; for brevity, only theTrue
variants are listed here:onTrue
(replaceswhenActive
andwhenPressed
): 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
/RepeatCommand
or 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 likewhileActiveContinuously
is still possible, though might not be intuitive.
Precompile common template instantiations to improve C++ compile times.
Son Dakika Değişiklikler
Önemli
2023 sürümü artık eski komut tabanlı framework içermiyor. Kullanıcılar, yeni komut tabanlı framework kullanmak için mevcut kodu yeniden düzenlemelidir.
Tehlike
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
GenericEntry
instead ofNetworkTableEntry
; asGenericEntry
provides nearly all the same methods, a simple textual replacement of the class name should suffice. Also, theforce
setters have been removed. See the NT4 migration guide for more information.Removed deprecated
MakeMatrix()
fromStateSpaceUtil
Removed deprecated
KilloughDrive
classRemoved
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::Vector2d
from<Eigen/Core>
orTranslation2d
from<frc/geometry/Translation2d.h>
instead.Removed deprecated
SpeedController
andSpeedControllerGroup
classes. Use MotorController and MotorControllerGroup insteadRemoved deprecated
MatrixUtils
classRemoved various deprecated overloads that used above mentioned classes
Removed various deprecated
getInstance()
functions. Static functions are available insteadRemoved various deprecated functions in
SimDevice
Refactored command
interruptible
to 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 commandsSwerveDriveOdometry
andSwerveDrivePoseEstimator
now use wheel distances instead of wheel speeds; UseSwerveModulePosition
to represent a swerve module’s angle and distance driven.SwerveDriveOdometry
andSwerveDrivePoseEstimator
now take in the wheel distances in an array rather than as a variadic parameter.MecanumDriveOdometry
andMecanumDrivePoseEstimator
now use wheel distances instead of wheel speeds; UseMecanumDriveWheelPositions
to represent the wheel distances.Constructors and
resetPosition
methods 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::numbers
instead ofwpi::numbers
(include<numbers>
)Use
std::span
instead ofwpi::span
(include<span>
)
Removed template argument from
ElevatorFeedforward
in C++.
Simülasyon
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
Önemli
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
WPILib Hepsi Bir Arada Yükleyici
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 Kod Uzantısı
Update templates to JUnit 5.8.2
Add copy button from project versions dialog
Allow importing Romi projects
RobotBuilder
Önemli
With the removal of old command-based, the legacy RobotBuilder install has been removed.
Uyarı
Due to project file changes, Robotbuilder will not import yaml save files from 2022 or earlier.
Add support for
DoubleSupplier
andstd::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 Units
option not overriding units per rotations
Romi
Büyük değişiklikler yok