Interface IMU

All Known Implementing Classes:
CustomNavx, CustomPigeon

public interface IMU
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
    default edu.wpi.first.math.geometry.Rotation2d
     
    default edu.wpi.first.math.geometry.Rotation3d
     
    double
    Get current hardware temperature in freedom units (°F)
    double
     
    static double
    wrapAngleHalf(double angle)
    Wrap an angle in rotations to the range [-1/2, 1/2)
    static double
    wrapAnglePositive(double angle)
    Wrap an angle in rotations to the range [0, 1)
    default void
    Set the zero position to the current yaw
    void
    zeroYaw(double offset)
    Set the current yaw to the provided rotation
  • Method Details

    • wrapAnglePositive

      static double wrapAnglePositive(double angle)
      Wrap an angle in rotations to the range [0, 1)
    • wrapAngleHalf

      static double wrapAngleHalf(double angle)
      Wrap an angle in rotations to the range [-1/2, 1/2)
    • getYaw

      double getYaw()
      Returns:
      current yaw in rotations; positive = counterclockwise
    • getPitch

      double getPitch()
      Returns:
      current pitch in rotations; positive = front up
    • getRoll

      double getRoll()
      Returns:
      current roll in rotations; positive = left side up, right side down
    • getRotation2d

      default edu.wpi.first.math.geometry.Rotation2d getRotation2d()
      Returns:
      current yaw as a Rotation2d
    • getRotation3d

      default edu.wpi.first.math.geometry.Rotation3d getRotation3d()
      Returns:
      current rotation as a Rotation3d
    • zeroYaw

      default void zeroYaw()
      Set the zero position to the current yaw
    • zeroYaw

      void zeroYaw(double offset)
      Set the current yaw to the provided rotation
    • getTemperature

      double getTemperature()
      Get current hardware temperature in freedom units (°F)