Pigeon2Gyro

class Pigeon2Gyro(port: Int, val pitchOffset: Double, val rollOffset: Double) : GenericGyro

A gyro that uses the Pigeon2 IMU.

Parameters

port

The port the Pigeon2 is plugged into.

pitchOffset

The offset of the pitch axis.

rollOffset

The offset of the roll axis.

Constructors

Link copied to clipboard
constructor(port: Int, pitchOffset: Double, rollOffset: Double)

Functions

Link copied to clipboard
open override fun getPitch(): Double
Link copied to clipboard
open override fun getRoll(): Double
Link copied to clipboard
open override fun getYaw(): Double

Gets the angle the gyro is currently facing.

Link copied to clipboard
open override fun getYawRotation2d(): Rotation2d
Link copied to clipboard
open override fun mergePitchRoll(): Vector2
Link copied to clipboard
open override fun setYawOffset(currentPos: Double)

Sets the angle offset of the gyro to the current direction.

Properties

Link copied to clipboard
val gyro: Pigeon2
Link copied to clipboard
Link copied to clipboard