Class SwerveIMU
- java.lang.Object
-
- frc.robot.subsystems.swervedrive2.swervelib.imu.SwerveIMU
-
- Direct Known Subclasses:
NavXSwerve,Pigeon2Swerve,PigeonSwerve
public abstract class SwerveIMU extends Object
Swerve IMU abstraction to define a standard interface with a swerve drive.
-
-
Constructor Summary
Constructors Constructor Description SwerveIMU()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidclearStickyFaults()Clear sticky faults on IMU.abstract voidfactoryDefault()Reset IMU to factory default.abstract ObjectgetIMU()Get the instantiated IMU object.abstract voidgetYawPitchRoll(double[] yprArray)Fetch the yaw/pitch/roll from the IMU.abstract voidsetYaw(double yaw)Set the yaw in degrees.
-
-
-
Method Detail
-
factoryDefault
public abstract void factoryDefault()
Reset IMU to factory default.
-
clearStickyFaults
public abstract void clearStickyFaults()
Clear sticky faults on IMU.
-
setYaw
public abstract void setYaw(double yaw)
Set the yaw in degrees.- Parameters:
yaw- Yaw angle in degrees.
-
getYawPitchRoll
public abstract void getYawPitchRoll(double[] yprArray)
Fetch the yaw/pitch/roll from the IMU.- Parameters:
yprArray- Array which will be filled with {yaw, pitch, roll} in degrees.
-
getIMU
public abstract Object getIMU()
Get the instantiated IMU object.- Returns:
- IMU object.
-
-