Skip to content

3061 Lib v2024.0.0

Compare
Choose a tag to compare
@gcschmit gcschmit released this 14 Jan 18:00
· 16 commits to main since this release

This is our initial release for the 2024 Crescendo season based on 2024 software components.

We will continue to develop, test, and tune 3061-lib for a couple of weeks before moving to the frc-software-2024 repository, which is also publicly accessible. The intention is that 3061-lib contains features that may be relevant to any FRC game, while frc-software-2024 will contain features specific to Crescendo.

The changes since the v2023.2.0 release are categorized by topic in rough order of significance.

Drivetrain Subsystem

  • these changes are in addition to the Phoenix 6 changes released in v2023.2.0
  • add Drivetrain subsystem with corresponding DrivetrainIO interface
  • add DrivetrainIOCTRE class which extends CTRE's SwerveDrivetrain class in order to benefit from all their optimizations, including 250 Hz odometry updates
  • add DrivetrainIOGeneric class which can be customized for a variety of swerve motors, encoders, and gyros in the same manner as previous releases
  • update RobotOdometry to support another class managing the odometry (e.g., CTRE's SwerveDrivetrain)

PhotonVision and PhotonLib

  • leverage PhotonVision's new MULTI_TAG_PNP_ON_COPROCESSOR feature which replaces our custom multi-tag support that ran on the RIO

Static Field Origin

  • in a manner consistent with PathPlanner, the origin of the field will always be the corner to the right of the blue alliance driver station, regardless of which alliance we are
  • add 2024 Crescendo AprilTag file and update the Vision subsystem to use this file
  • add shouldFlipAutoPath method to Drivetrain class which is invoked by PathPlanner immediately before running an auto to flip the auto across the center of the field
  • update drive method of the Drivetrain class such that, in field-relative mode, pushing the joystick forward always moves the robot away from the driver and pushing the joystick left always moves the robot to the driver's left
  • remove all code related to changing the field origin, which was the 2023 approach

Phoenix 6 Pro TorqueCurrentFOC

  • add getSwerveDriveControlMode and getSwerveSteerControlMode methods to RobotConfig. By default, these methods return SWERVE_CONTROL_MODE.VOLTAGE, which is the same control mode as supported previously.
  • Classes that implement RobotConfig may return TORQUE_CURRENT_FOC to that control mode for either steer or drive motors. We have config classes for both approaches at the moment as we are still testing and tuning this new control mode and don't yet have the performance we expect. Keep in mind that the associated kS, kV, kA, kP, kI, kD values are different for these two control modes, which is why separate config classes are helpful.

Fault Reporter

  • update to detect missing CTRE devices with Phoenix 6 and report faults
  • add support for SparkMAX to FaultReporter

Serve Tuning

  • add a new "auto" to tune swerve rotation
  • log closed loop reference for swerve modules to facilitate tuning

API Changes

  • update to accommodate API changes in all dependencies (WPILib, AdvantageKit, PathPlanner, PhotonLib)

Highlighted Outstanding Issues

  • update FieldConstants and FieldRegionConstants classes for the 2024 field
  • add LED subsystem (needs more testing)

What's Changed

Full Changelog: v2023.2.0...v2024.0.0