Class CustomPigeon

java.lang.Object
lib.custom.sensors.CustomPigeon
All Implemented Interfaces:
IMU

public class CustomPigeon extends Object implements IMU
Pigeon should be mounted to robot according to WPILib coordinates: +X is forward, +Y is left, +Z is up
  • Field Details

    • pigeon

      protected final com.ctre.phoenix6.hardware.Pigeon2 pigeon
  • Constructor Details

    • CustomPigeon

      public CustomPigeon(int deviceId)
  • Method Details

    • getYaw

      public double getYaw()
      Specified by:
      getYaw in interface IMU
      Returns:
      current yaw in rotations; positive = counterclockwise
    • getPitch

      public double getPitch()
      Specified by:
      getPitch in interface IMU
      Returns:
      current pitch in rotations; positive = front up
    • getRoll

      public double getRoll()
      Specified by:
      getRoll in interface IMU
      Returns:
      current roll in rotations; positive = left side up, right side down
    • zeroYaw

      public void zeroYaw(double offset)
      Description copied from interface: IMU
      Set the current yaw to the provided rotation
      Specified by:
      zeroYaw in interface IMU
    • getTemperature

      public double getTemperature()
      Description copied from interface: IMU
      Get current hardware temperature in freedom units (°F)
      Specified by:
      getTemperature in interface IMU