Class DriveBaseIOYagsl
java.lang.Object
frc.robot.subsystems.drivebase.io.DriveBaseIOYagsl
- All Implemented Interfaces:
DriveBaseIO
YAGSL-backed implementation that pulls pose, module states, and gyro data from the configured swerve drive.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.drivebase.io.DriveBaseIO
DriveBaseIO.DriveBaseIOInputs -
Constructor Summary
ConstructorsConstructorDescriptionDriveBaseIOYagsl(swervelib.SwerveDrive swerveDrive) Creates an IO bridge that mirrors telemetry from the provided YAGSL swerve drive into AdvantageKit. -
Method Summary
Modifier and TypeMethodDescriptionvoidresetRawOdometry(edu.wpi.first.math.geometry.Pose2d pose) Resets the raw odometry tracker to a given pose.voidRefreshes the inputs structure with the latest state from the drive base sensors.
-
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
Description copied from interface:DriveBaseIORefreshes the inputs structure with the latest state from the drive base sensors.- Specified by:
updateInputsin interfaceDriveBaseIO- 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
-