CorePigeon2 Class

Class description for the Pigeon 2 IMU sensor that measures orientation.

Definition

Namespace: CTRE.Phoenix6.Hardware.Core
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public class CorePigeon2 : ParentDevice
Inheritance
Object    ParentDevice    CorePigeon2

Constructors

CorePigeon2 Constructs a new Pigeon 2 sensor object.

Properties

Configurator The configurator for this device. Users may use this to refresh and apply configs, such as the Pigeon2Configuration object
ControlRequest The last applied control request. Caller can cast this to the derived class if they know what type it is, otherwise they can use the ControlInfo to get info out of it.
(Inherited from ParentDevice)
DeviceHash Hash of this device
(Inherited from ParentDevice)
DeviceID ID of this device
(Inherited from ParentDevice)
HasResetOccurred Returns true if device has reset since the previous call of this routine.
Network Network this device is on
(Inherited from ParentDevice)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAccelerationX The acceleration measured by Pigeon2 in the X direction.

This value includes the acceleration due to gravity. If this is undesirable, get the gravity vector and subtract out the contribution in this direction.

  • Minimum Value – -2.0
  • Maximum Value – 1.99993896484375
  • Default Value – 0
  • Units – g
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetAccelerationY The acceleration measured by Pigeon2 in the Y direction.

This value includes the acceleration due to gravity. If this is undesirable, get the gravity vector and subtract out the contribution in this direction.

  • Minimum Value – -2.0
  • Maximum Value – 1.99993896484375
  • Default Value – 0
  • Units – g
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetAccelerationZ The acceleration measured by Pigeon2 in the Z direction.

This value includes the acceleration due to gravity. If this is undesirable, get the gravity vector and subtract out the contribution in this direction.

  • Minimum Value – -2.0
  • Maximum Value – 1.99993896484375
  • Default Value – 0
  • Units – g
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetAccumGyroX The accumulated gyro about the X axis without any sensor fusing.
  • Minimum Value – -23040.0
  • Maximum Value – 23039.9560546875
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetAccumGyroY The accumulated gyro about the Y axis without any sensor fusing.
  • Minimum Value – -23040.0
  • Maximum Value – 23039.9560546875
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetAccumGyroZ The accumulated gyro about the Z axis without any sensor fusing.
  • Minimum Value – -23040.0
  • Maximum Value – 23039.9560546875
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetAngularVelocityX The angular velocity (ω) of the Pigeon 2 about the X axis.
  • Minimum Value – -1998.048780487805
  • Maximum Value – 1997.987804878049
  • Default Value – 0
  • Units – dps
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetAngularVelocityY The angular velocity (ω) of the Pigeon 2 about the Y axis.
  • Minimum Value – -1998.048780487805
  • Maximum Value – 1997.987804878049
  • Default Value – 0
  • Units – dps
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetAngularVelocityZ The angular velocity (ω) of the Pigeon 2 about the Z axis.
  • Minimum Value – -1998.048780487805
  • Maximum Value – 1997.987804878049
  • Default Value – 0
  • Units – dps
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetFault_BootDuringEnable Device boot while detecting the enable signal
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_BootIntoMotion Motion Detected during bootup.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_BootupAccelerometer Bootup checks failed: Accelerometer
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_BootupGyroscope Bootup checks failed: Gyroscope
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_BootupMagnetometer Bootup checks failed: Magnetometer
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_DataAcquiredLate Motion stack data acquisition was slower than expected
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_Hardware Hardware fault occurred
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_LoopTimeSlow Motion stack loop time was slower than expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_SaturatedAccelometer Accelerometer values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_SaturatedGyroscope Gyroscope values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_SaturatedMagnetometer Magnetometer values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_Undervoltage Device supply voltage dropped to near brownout levels
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_UnlicensedFeatureInUse An unlicensed feature is in use, device may not behave as expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFaultField Integer representing all faults

This returns the fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.

  • Minimum Value – 0
  • Maximum Value – 16777215
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetGravityVectorX The X component of the gravity vector.

This is the X component of the reported gravity-vector. The gravity vector is not the acceleration experienced by the Pigeon2, rather it is where the Pigeon2 believes "Down" is. This can be used for mechanisms that are linearly related to gravity, such as an arm pivoting about a point, as the contribution of gravity to the arm is directly proportional to the contribution of gravity about one of these primary axis.

  • Minimum Value – -1.000030518509476
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetGravityVectorY The Y component of the gravity vector.

This is the X component of the reported gravity-vector. The gravity vector is not the acceleration experienced by the Pigeon2, rather it is where the Pigeon2 believes "Down" is. This can be used for mechanisms that are linearly related to gravity, such as an arm pivoting about a point, as the contribution of gravity to the arm is directly proportional to the contribution of gravity about one of these primary axis.

  • Minimum Value – -1.000030518509476
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetGravityVectorZ The Z component of the gravity vector.

This is the Z component of the reported gravity-vector. The gravity vector is not the acceleration experienced by the Pigeon2, rather it is where the Pigeon2 believes "Down" is. This can be used for mechanisms that are linearly related to gravity, such as an arm pivoting about a point, as the contribution of gravity to the arm is directly proportional to the contribution of gravity about one of these primary axis.

  • Minimum Value – -1.000030518509476
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 10.0 Hz
  • CAN FD – 100.0 Hz
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetMagneticFieldX The biased magnitude of the magnetic field measured by the Pigeon 2 in the X direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetMagneticFieldY The biased magnitude of the magnetic field measured by the Pigeon 2 in the Y direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetMagneticFieldZ The biased magnitude of the magnetic field measured by the Pigeon 2 in the Z direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetNoMotionCount The number of times a no-motion event occurred, wraps at 15.
  • Minimum Value – 0
  • Maximum Value – 15
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetNoMotionEnabled Whether the no-motion calibration feature is enabled.
  • Default Value – 0
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetPitch Current reported pitch of the Pigeon2.
  • Minimum Value – -90.0
  • Maximum Value – 89.9560546875
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN – 100.0 Hz
GetQuatW The W component of the reported Quaternion.
  • Minimum Value – -1.0001220852154804
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetQuatX The X component of the reported Quaternion.
  • Minimum Value – -1.0001220852154804
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetQuatY The Y component of the reported Quaternion.
  • Minimum Value – -1.0001220852154804
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetQuatZ The Z component of the reported Quaternion.
  • Minimum Value – -1.0001220852154804
  • Maximum Value – 1.0
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetRawMagneticFieldX The raw magnitude of the magnetic field measured by the Pigeon 2 in the X direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetRawMagneticFieldY The raw magnitude of the magnetic field measured by the Pigeon 2 in the Y direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetRawMagneticFieldZ The raw magnitude of the magnetic field measured by the Pigeon 2 in the Z direction. This is only valid after performing a magnetometer calibration.
  • Minimum Value – -19660.8
  • Maximum Value – 19660.2
  • Default Value – 0
  • Units – uT
Default Rates:
  • CAN – 4.0 Hz
GetResetOccurredChecker Return a lambda that checks for device resets
GetRoll Current reported roll of the Pigeon2.
  • Minimum Value – -180.0
  • Maximum Value – 179.9560546875
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN – 100.0 Hz
GetStickyFault_BootDuringEnable Device boot while detecting the enable signal
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_BootIntoMotion Motion Detected during bootup.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_BootupAccelerometer Bootup checks failed: Accelerometer
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_BootupGyroscope Bootup checks failed: Gyroscope
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_BootupMagnetometer Bootup checks failed: Magnetometer
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_DataAcquiredLate Motion stack data acquisition was slower than expected
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_Hardware Hardware fault occurred
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_LoopTimeSlow Motion stack loop time was slower than expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_SaturatedAccelometer Accelerometer values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_SaturatedGyroscope Gyroscope values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_SaturatedMagnetometer Magnetometer values are saturated
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_Undervoltage Device supply voltage dropped to near brownout levels
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_UnlicensedFeatureInUse An unlicensed feature is in use, device may not behave as expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFaultField Integer representing all sticky faults

This returns the persistent "sticky" fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.

  • Minimum Value – 0
  • Maximum Value – 16777215
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetSupplyVoltage Measured supply voltage to the Pigeon2.
  • Minimum Value – 0.0
  • Maximum Value – 31.99951171875
  • Default Value – 0
  • Units – V
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetTemperature Temperature of the Pigeon 2.
  • Minimum Value – -128.0
  • Maximum Value – 127.99609375
  • Default Value – 0
  • Units – ℃
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetTemperatureCompensationDisabled Whether the temperature-compensation feature is disabled.
  • Default Value – 0
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetUpTime How long the Pigeon 2's been up in seconds, caps at 255 seconds.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units – s
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetVersion Full Version. The format is a four byte value.

Full Version of firmware in device. The format is a four byte value.

  • Minimum Value – 0
  • Maximum Value – 4294967295
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionBugfix App Bugfix Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionBuild App Build Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionMajor App Major Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionMinor App Minor Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetYaw Current reported yaw of the Pigeon2.
  • Minimum Value – -368640.0
  • Maximum Value – 368639.99725341797
  • Default Value – 0
  • Units – deg
Default Rates:
  • CAN – 100.0 Hz
LookupStatusSignalT(UInt16, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
(Inherited from ParentDevice)
LookupStatusSignalT(UInt16, Int32, FuncDictionaryInt32, StatusSignalT, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
(Inherited from ParentDevice)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OptimizeBusUtilization Optimizes the device's bus utilization by reducing the update frequencies of its status signals.

All status signals that have not been explicitly given an update frequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.

This function only needs to be called once on this device in the robot program. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.

To restore the default status update frequencies, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. Alternatively, the user can override individual status update frequencies using {@link BaseStatusSignal#setUpdateFrequency}.
(Inherited from ParentDevice)

ReportIfTooOld Function to call to check if the device is too old, and if so report it to the console output
(Overrides ParentDeviceReportIfTooOld)
SetControl Control motor with generic control request object.

User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode

SetControlPrivate Sets the control request to this device
(Inherited from ParentDevice)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

deviceIdentifier The unique deviceIdentifier for this device
(Inherited from ParentDevice)

See Also