Package swervelib.imu
Class SwerveIMU
java.lang.Object
swervelib.imu.SwerveIMU
- Direct Known Subclasses:
ADIS16448Swerve,ADIS16470Swerve,ADXRS450Swerve,AnalogGyroSwerve,NavXSwerve,Pigeon2Swerve,PigeonSwerve
Swerve IMU abstraction to define a standard interface with a swerve drive.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidClear sticky faults on IMU.abstract voidReset 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.
-
Constructor Details
-
SwerveIMU
public SwerveIMU()
-
-
Method Details
-
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
Get the instantiated IMU object.- Returns:
- IMU object.
-