I highly encourage anyone who wants to help make YAGSL better to create pull requests with any modifications you have made that increases your quality of life.
{% embed url="https://github.com/BroncBotz3481/YAGSL-Example/pulls?q=is%3Apr+is%3Aclosed" %}
YAGSL development is done on the dev
branch of the YAGSL-Example repository here at src/main/java/swervelib
.
{% embed url="https://github.com/BroncBotz3481/YAGSL-Example/tree/dev" %} YAGSL-Example dev branch {% endembed %}
All PR's should be based off of and merged into here. YAGSL is propagated often to the other repositories.
- Fixed
swerve/measuredChassisSpeeds
to report both vx and vy. - Fixed
SwerveInputStream.robotRelative
by Team 151 - Fixed
SwerveDrive.drive
fieldOriented
parameter to be applied. Bug cuaght by WispySparks from team 2508! - Added
SwerveInputStream.headingOffset
- Fixed optimization using the relative encoder
- Fix absolute encoders detection in
SparkMaxSwerve.isAbsoluteEncoderAttached()
by changing null check toOptional.isPresent()
(Discovered by Team 217!) - Changed
absoluteEncoder
to anOptional
for SparkMax's (by Team 217) - Added a way to sysId while spinning in place, changed parameters to
SwerveDriveTest.setDriveSysIdRoutine(new Config(),this, swerveDrive, 12, true)
- Disabled kA for the drive motor feedforward by default.
- Fix getMaxVelocity used in feedforward by @jwt388 in #286
- Maximum speed settings do not allow limiting robot to less than full speed by @clrozeboom in #277
- Sim modules SysId routines & New maple-sim version by @catr1xLiu in #288
- Fixed
Adjusted IMU Yaw
and set it to publish underSmartDashboard
- Added simulation velocities and readings to module output.
- Added
srxmag_standalone
absolute encoder type for SRX Mag Encoders attached to a stand alone TalonSRX.
- Updated to WPILib 2025.1.1
- Updated CTRE/REV/Studica/Redux vendordeps.
- Fixed some javadocs failures.
- Touched up comments by @yapplejack in #278
- Fixed telemetry publishing problem. Telemetry is now published under the
SmartDashboard
network table. - Throw an error when SparkMAX or SparkFlex configuration changes are done while the robot is enabled.
- Changed example to not set the drive motor idle mode.
- Added ThirftyNova support.
- Added
SwerveInputStream.robotRelative
andSwerveInputStream.allianceRelativeControl
- Added configuration redundancy for SparkMAX, and SparkFlex.
- Fix loop time and use field oriented control for driveWithSetpointGenerator (PR #271 by @jwt388)
- Added cycle times to telemetry.
- Optimized telemetry to only post settings when
SwerveDriveTelemetry.updateSettings
istrue
. - Reduced retry delay for SparkMAX and SparkFlex to 5ms from 10ms.
- Reduced on the fly configuration delay to 10ms from 100ms.
- Added warning for on the fly configuration delay past init.
- Fixed
SimpleMotorFeedForward.calculate
to use only the velocity. This ignores acceleration unfortunately. - Changed
SmartDashboard.put
to NT4 Publishers - Removed
IMUVelocity
in favor of using library velocity fetches. - Renamed
SwerveIMU.getRate()
->SwerveIMU.getYawAngularVelocity()
and made it return anAngularVelocity
object. - Added
SwerveInputStream
object for easy controller conversions.
- Fixed vision file null-ptr exception.
- Updated to Maple-Sim 0.2.4; added
SwerveDrive.getMapleSimDrive()
by @catr1xLiu in #262 - Fixed spark max brushed motor controller encoder null-ptr exceptions
- Fixed
SwerveMath.scaleTranslation
issue - Fixed
Vision
update withresultLists
check by @jwt388 FRC Team 151 - Changed
SwerveDrive.getMaximumVelocity()
->SwerveDrive.getMaximumChassisVelocity()
- Changed
SwerveDrive.getMaximumAngularVelocity()
->SwerveDrive.getMaximumChassisAngularVelocity()
- Used known motor types to calculate the drive motor feedforward.
- Extended the parser to know the motor type attached to the motor controller. (Except brushed)
- Separated chassis maximum velocity from module maximum velocity.
- Added
navx_mxp_serial
back. - Added motor specifiers
krakenx60foc
,krakenx60
,falcon500foc
,falcon500
,sparkmax_neo550
,sparkmax_neo
,sparkflex_neo
,sparkflex_vortex
,sparkflex_neo550
- Create the drive motor feedforward in
SwerveModule
constructor. - Added module max speeds to
SwerveModule.maxDriveVelocity
andSwerveModule.maxAngularVelocity
- Updated the web configuration
- AHRS imu variable is lost after constructor scope ends by @clrozeboom in #254
- Add Maple-Sim by @catr1xLiu in #251
- Implement support for kA by @Etaash-mathamsetty in #258
- Update to WPILIb 2025 Beta-2 by @thenetworkgrinch in #257
- Add support to Talon SRX for an integrated absolute encoder by @WispySparks in #208
- Implemented Path Planner DriveFeedForward using DCMotor modeling by @catr1xLiu in #260
- Fixed NavX inversion.
- Fixed Absolute Encoder issue on MAXSwerve with help from Team 457 Grease Monkeys
- Added inversion redundancy check to SparkMAX and SparkFlex.
- Add Warmup for Pathfinding (PR #241 by TechnologyMan00)
- Added
Canandgyro
support. - A tiny bug fix in the aim-at-speaker command of the example swerve subsystem code by (PR #239 by catr1xLiu)
- Merge Swerve configuration test changes (PR #228 by clrozeboom)
- Angular velocity correction (huge update that massively improves YAGSL!) (PR #231 by yapplejack)
- Sparkmax optimizations, changes to avg filter etc (PR #233 by yapplejack)
- Addded
sparkmax_analog5v
as a valid absolute encoder type. - Suggestion for desaturateWheelSpeeds() to use desiredChassisSpeeds (PR #232 by yapplejack)
- Made auto synchronization optional and configurable by
SwerveDrive.setModuleEncoderAutoSynchronize
- Fixed configurator problem for
TalonFXSwerve
- Added PhotonVision
Vision
class to example and integrate it with the example code. - Added
getAprilTagPose
method toVision
(PR #226 by kreidljj) - Update the vision simulation on
Vision.updatePoseEstimation
(PR #224 by brandonzx3) - Add Standard Deviations for YAGSL SwerveDrive Pose Estimator (PR #222 by maxikyuu)
- Updating Vendordeps and renaming CanandCoders to CanandMags (PR #219 by Turbojax07 and YAGSL devs)
- Fixed documentation issue with
SwerveDriveTelemetry
(Issue #233 by DanPeled ) - Fixed AbsoluteEncoders attached to the SparkMAX like Throughbores.
- Fixed
SparkMaxAnalogEncoder
wrapper to work. The expected read values are in volts, 3.3v max. (Found and fixed by team Austin from team 2377) - Fixed
CanandCoder
toCanandMag
due to product rename. (Credit to TurboJax07) - Changed default behavior of setting an attached absolute encoder up without calling
SwerevDrive.pushOffsetsToEncoders
which is now an optional optimization for MAX Swerve modules instead of a requirement. MAX Swerve no longer need to use360
as the conversion factor IF they do not useSwerveDrive.pushOffsetsToEncoders
- Added
SwerveDrive.setVisionMeasurementStdDevs(Matrix<N3, N1> visionMeasurementStdDevs)
- Add ability to get the rotation rate from the IMU (PR #216 by @clrozeboom)
- Changed input scaling to utilize Polar coordinate magnitude multiplication.
- Simplify placeInAppropriate0To360Scope (PR #213 by GoldenStack)
- Added auto-centering modules setting.
- Added back composite conversion factors.
- Increased logging verbosity to introduce logging modes for the field and data. (PR #185 by 5010)
- Added
SwerveDrive.setChassisDiscretization
to allow for changing of the discrete value between cycle times which can be tuned to reduce drift. (PR #194 by TechnologyMan00) - Renamed
SwerveDrive.pushOffsetsToControllers
toSwerveDrive.pushOffsetsToEncoders
. (PR #194 by TechnologyMan00) - Changed
Module[...]
toswerve/modules
in Telemetry.
- Added PIDF helper functions
SwerveModule.setDrivePIDF
andSwerveModule.setAnglePIDF
alongsideSwerveModule.getDrivePIDF
andSwerveModule.getAnglePIDF
. - Changed feedforward around to use
SwerveModule.setFeedforward
instead of directly modifyingSwerveModule.feedforward
- Renamed
SwerveModule.feedforward
toSwerveModule.driveFeedforward
. - Added anti-jitter disabling option via
SwerveModule.setAntiJitter
which also modifies the encoder offsets that are pushed to the motor controllers. - Updated vendordeps
- Fixed NavX inversion state not taking any affect on the robot.
- Updated anti jitter to run before cosine compensation.
- Updated
Pigeon2Swerve
to useimu.getRotation3d()
instead of handling the CAN timeouts. - Massively reduced memory footprint required. (with help from @TheGamer1002)
- Made CTRE wait for status times static for user modification.
CANCoderSwerve.STATUS_TIMEOUT_SECONDS
,TalonFXSwerve.STATUS_TIMEOUT_SECONDS
, andPigeon2Swerve.STATUS_TIMEOUT_SECONDS
can be modified for desired use case.
- Added
SwerveDrive.setCosineCompensation
function which can enable and disable cosine compensation as desired, disabled by default in sim because of discrepancies with real robots.
- Added SysId support. (PR #160 and #165 by Team 5010)
-
waitForStatusUpdate
is used instead ofrefresh
with default timeouts of 20ms. - Added
Cache
class to cache variables over avalidityPeriod
which will speed up processing and reduce CAN utilization. - Added
SwerveDrive.updateCacheValidityPeriods
so the user can change the cache validity period to their hearts desire. - Added
SwerveDrive.getModuleMap()
which will fetch all of theSwerveModule
's as a HashMap where the key is the module's filename without.json
sofrontleft.json
would have the key offrontleft
.
- Modules will stay in the previous position if the desired velocity is 0.
- Cosine compensation is now reported through telemetry as expected.
- Updated heading correction to use
getOdometryHeading()
instead ofgetYaw()
(PR #150 by @Blargleflakes) This does impact heading correction PID values incontrollerproperties.json
and may NEED these value's increased by 50x. - Added ability to disable the cosine compensator via config files. (PR #148 by @fovea1959)
- Added
SwerveDrive.getGyro()
to returnSwerveIMU
. - Added
SwerveMotor.setVoltage
andSwerveMotor.getVoltage
andSwerveMotor.getAppliledOutput
to theSwerveMotor
wrapper for future use with SysId. - Added functions to test setting voltage of all swerve module motor.
- Added function to find coupling ratio of all swerve modules.
- Added function to set steering/azimuth/angle using of all swerve modules.
- Added function to find kV for drive motors to move.
- Set the angle motor relative encoder position AFTER changing the conversion factor. (Issue #155)
- Fixed module open loop control by sending
maxSpeed
to the module. (by @nstrike and @MarshallTappen) - Fixed Pigeon2Swerve only using X acceleration (PR #146 by @dezash123)
- Prevent drive motors from moving when
absoluteEncoderOffset
is not tuned. (Found by @fovea1959) - Updated javadocs for
SwerveDrive.addVisionMeasurement
so that they reflect the latest changes.
- Fixed
SwerveDrive.resetOdometry
and utilize the pose estimation instead. (PR #142 by @MarshallTappen and @nstrike commit) - Functionalize IMU inversion (PR #140 by @TechnologyMan00 and @nstrike)
- Added
SwerveDrive.getOdometryHeading()
- Fixed
SwerveDrive.addVisionMeasurement
with vision standard deviations. - Added IMU readings to SmartDashboard via
Raw IMU Yaw
(gyro with invert applied) andAdjusted IMU Yaw
(pose estimation rotation). - Changed
navx_mxp
tonavx_mxp_serial
to notate that it's serial over MXP. - Added warning when using
navx_mxp_serial
ornavx_usb
. - Added back wheel speed desaturation.
- Simplified
SwerveMath.calculateDegreesPerRotation
andSwerveMath.calculateMetersPerRotation
to exclude encoder resolution and add a default. - Changed
Module[...] Raw Motor Encoder
toModule[...] Raw Angle Encoder
. - Added
Module[...] Raw Drive Encoder
- Fix for TalonFX Angle motor control (by @bhall-ctre, and @Wackyvert 2225 Mentor) .
- TalonFX's needed to use conversion factor as gear ratio rather than gear ratio + unit conversion.
- Conversion factor needed to be inverted.
- setPosition update to reflect current position.
- Changed
ma3
encoders to be read via analog input. (Discovered by @CoZm0) - Support 3 wheel swerve module setups with PathPlanner helper function. (PR #139 by @TechnologyMan00)
- Added
SwerveModule.getAbsoluteEncoder()
SwerveDrive.getMaximumVelocity()
andSwerveDrive.getMaximumAngularVelocity()
. - Reccommend Tuner X when a compatible Tuner X config is used.
- Added ability to change heading correction deadband.
- Added feedforward to SparkMAX's.
- Added Network Alerts (made by @TheGamer1002 PR #136)
- Added feedforward to TalonFX's
- Fixed TalonFX conversion factor (made by @jkbo6 PR #128)
- CanAndCoder tweaks (made by @guineahawk PR #134)
- Added missing SparkMAX status frame's (made by @RoboPenguin7 PR #130)
- Heading Correction update to make it less sensitive (made by @balien-12 PR #132)
- Fixed cosine compensator error (made by @jkbo6 PR #129)
- Updated PathPlanner path based off of alliance (made by @MarshalTappen PR #122)
- Fixed Rotation being off, update getDriveBaseMeters (made by @TechnologyMan00)