Class GyroIOPigeon2

java.lang.Object
com.marslib.swerve.GyroIOPigeon2
All Implemented Interfaces:
GyroIO

public class GyroIOPigeon2 extends Object implements GyroIO
Real hardware implementation of the gyro IO layer using a CTRE Pigeon2 IMU.

Students: The Pigeon2 is a 3-axis gyroscope connected over CAN bus. This class reads the yaw (heading) at 250Hz for high-frequency odometry and the yaw velocity at 100Hz for general telemetry.

  • Constructor Details

    • GyroIOPigeon2

      public GyroIOPigeon2(int canId, String canbus, SwerveConfig config)
      Constructs a Pigeon2 gyro IO layer.
      Parameters:
      canId - The CAN ID of the Pigeon2.
      canbus - The CAN bus name (e.g. "rio" or "canivore").
  • Method Details