Class DriveBaseIOYagsl

java.lang.Object
frc.robot.subsystems.drivebase.io.DriveBaseIOYagsl
All Implemented Interfaces:
DriveBaseIO

public class DriveBaseIOYagsl extends Object implements DriveBaseIO
YAGSL-backed implementation that pulls pose, module states, and gyro data from the configured swerve drive.
  • Constructor Details

    • DriveBaseIOYagsl

      public DriveBaseIOYagsl(swervelib.SwerveDrive swerveDrive)
      Creates an IO bridge that mirrors telemetry from the provided YAGSL swerve drive into AdvantageKit.
      Parameters:
      swerveDrive - active YAGSL swerve drive instance supplying sensor data
  • Method Details

    • updateInputs

      public void updateInputs(DriveBaseIO.DriveBaseIOInputs inputs)
      Description copied from interface: DriveBaseIO
      Refreshes the inputs structure with the latest state from the drive base sensors.
      Specified by:
      updateInputs in interface DriveBaseIO
      Parameters:
      inputs - mutable inputs container to populate for logging
    • resetRawOdometry

      public void resetRawOdometry(edu.wpi.first.math.geometry.Pose2d pose)
      Resets the raw odometry tracker to a given pose.

      Call this whenever the main odometry is reset so the two trackers stay in sync at the start.

      Parameters:
      pose - pose to reset the raw odometry to in meters and radians