Interface FriendlyIMU
- All Known Implementing Classes:
FriendlyIMUBlank
,FriendlyIMUImpl
,MockFriendlyIMU
public interface FriendlyIMU
Represents the IMU built into the control hub. Currently only supports the BNO055, but there is a task on the board
(albeit of very low priority) to use the newer IMU interface instead. Wraps the IMU already available in the SDK,
making pitch, roll, and yaw easily accessible as methods rather than the SDK's more complicated ways of obtaining
them.
AxesOrder is ZYX, because most of our uses for the IMU rely on accurate yaw (Z axis) information.
Unless an AngleUnit is specified, returned values will be in degrees.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
pitch()
X rotationdouble
pitch
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) X rotationdouble
pitchVel()
Velocity of X rotationdouble
pitchVel
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of X rotationdouble
roll()
Y rotationdouble
roll
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Y rotationdouble
rollVel()
Velocity of Y rotationdouble
rollVel
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of Y rotationvoid
update()
Called by robot.update().double
yaw()
Z rotationdouble
yaw
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Z rotationdouble
yawVel()
Velocity of Z rotationdouble
yawVel
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of Z rotation
-
Method Details
-
pitch
double pitch()X rotation -
pitchVel
double pitchVel()Velocity of X rotation -
roll
double roll()Y rotation -
rollVel
double rollVel()Velocity of Y rotation -
yaw
double yaw()Z rotation -
yawVel
double yawVel()Velocity of Z rotation -
update
void update()Called by robot.update(). You do not need to call this method.
-