CTRE Phoenix Pro C++ 23.0.12
|
Class description for the Pigeon 2 IMU sensor that measures orientation. More...
#include <ctre/phoenixpro/Pigeon2.hpp>
Public Member Functions | |
Pigeon2 (int deviceId, std::string canbus="") | |
Constructs a new Pigeon 2 sensor object. More... | |
~Pigeon2 () | |
void | InitSendable (wpi::SendableBuilder &builder) override |
void | Calibrate () final |
This function does nothing; it exists to satisfy the WPILib Gyro interface. More... | |
void | Reset () final |
double | GetAngle () const override |
double | GetRate () const override |
frc::Rotation2d | GetRotation2d () const override |
Public Member Functions inherited from ctre::phoenixpro::hardware::core::CorePigeon2 | |
CorePigeon2 (int deviceId, std::string canbus="") | |
Constructs a new Pigeon 2 sensor object. More... | |
CorePigeon2 (CorePigeon2 const &)=delete | |
CorePigeon2 & | operator= (CorePigeon2 const &)=delete |
bool | HasResetOccurred () |
configs::Pigeon2Configurator & | GetConfigurator () |
Gets the configurator for this Pigeon2. More... | |
configs::Pigeon2Configurator const & | GetConfigurator () const |
Gets the configurator for this Pigeon2. More... | |
sim::Pigeon2SimState & | GetSimState () |
Get the simulation state for this device. More... | |
StatusSignalValue< int > & | GetVersionMajor () |
App Major Version number. More... | |
StatusSignalValue< int > & | GetVersionMinor () |
App Minor Version number. More... | |
StatusSignalValue< int > & | GetVersionBugfix () |
App Bugfix Version number. More... | |
StatusSignalValue< int > & | GetVersionBuild () |
App Build Version number. More... | |
StatusSignalValue< int > & | GetVersion () |
Full Version. More... | |
StatusSignalValue< int > & | GetFaultField () |
Integer representing all faults. More... | |
StatusSignalValue< int > & | GetStickyFaultField () |
Integer representing all sticky faults. More... | |
StatusSignalValue< units::angle::degree_t > & | GetYaw () |
Current reported yaw of the Pigeon2. More... | |
StatusSignalValue< units::angle::degree_t > & | GetPitch () |
Current reported pitch of the Pigeon2. More... | |
StatusSignalValue< units::angle::degree_t > & | GetRoll () |
Current reported roll of the Pigeon2. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetQuatW () |
The W component of the reported Quaternion. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetQuatX () |
The X component of the reported Quaternion. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetQuatY () |
The Y component of the reported Quaternion. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetQuatZ () |
The Z component of the reported Quaternion. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetGravityVectorX () |
The X component of the gravity vector. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetGravityVectorY () |
The Y component of the gravity vector. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetGravityVectorZ () |
The Z component of the gravity vector. More... | |
StatusSignalValue< units::temperature::celsius_t > & | GetTemperature () |
Temperature of the Pigeon 2. More... | |
StatusSignalValue< bool > & | GetNoMotionEnabled () |
Whether the no-motion calibration feature is enabled. More... | |
StatusSignalValue< units::dimensionless::scalar_t > & | GetNoMotionCount () |
The number of times a no-motion event occurred, wraps at 15. More... | |
StatusSignalValue< bool > & | GetTemperatureCompensationDisabled () |
Whether the temperature-compensation feature is disabled. More... | |
StatusSignalValue< units::time::second_t > & | GetUpTime () |
How long the Pigeon 2's been up in seconds, caps at 255 seconds. More... | |
StatusSignalValue< units::angle::degree_t > & | GetAccumGyroX () |
The accumulated gyro about the X axis without any sensor fusing. More... | |
StatusSignalValue< units::angle::degree_t > & | GetAccumGyroY () |
The accumulated gyro about the Y axis without any sensor fusing. More... | |
StatusSignalValue< units::angle::degree_t > & | GetAccumGyroZ () |
The accumulated gyro about the Z axis without any sensor fusing. More... | |
StatusSignalValue< units::angular_velocity::degrees_per_second_t > & | GetAngularVelocityX () |
The angular velocity (ω) of the Pigeon 2 about the X axis. More... | |
StatusSignalValue< units::angular_velocity::degrees_per_second_t > & | GetAngularVelocityY () |
The angular velocity (ω) of the Pigeon 2 about the Y axis. More... | |
StatusSignalValue< units::angular_velocity::degrees_per_second_t > & | GetAngularVelocityZ () |
The angular velocity (ω) of the Pigeon 2 about the Z axis. More... | |
StatusSignalValue< units::acceleration::standard_gravity_t > & | GetAccelerationX () |
The acceleration measured by Pigeon2 in the X direction. More... | |
StatusSignalValue< units::acceleration::standard_gravity_t > & | GetAccelerationY () |
The acceleration measured by Pigeon2 in the Y direction. More... | |
StatusSignalValue< units::acceleration::standard_gravity_t > & | GetAccelerationZ () |
The acceleration measured by Pigeon2 in the Z direction. More... | |
StatusSignalValue< units::voltage::volt_t > & | GetSupplyVoltage () |
Measured supply voltage to the Pigeon2. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetMagneticFieldX () |
The biased magnitude of the magnetic field measured by the Pigeon 2 in the X direction. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetMagneticFieldY () |
The biased magnitude of the magnetic field measured by the Pigeon 2 in the Y direction. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetMagneticFieldZ () |
The biased magnitude of the magnetic field measured by the Pigeon 2 in the Z direction. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetRawMagneticFieldX () |
The raw magnitude of the magnetic field measured by the Pigeon 2 in the X direction. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetRawMagneticFieldY () |
The raw magnitude of the magnetic field measured by the Pigeon 2 in the Y direction. More... | |
StatusSignalValue< units::magnetic_field_strength::microtesla_t > & | GetRawMagneticFieldZ () |
The raw magnitude of the magnetic field measured by the Pigeon 2 in the Z direction. More... | |
StatusSignalValue< bool > & | GetFault_Hardware () |
Hardware fault occurred. More... | |
StatusSignalValue< bool > & | GetStickyFault_Hardware () |
Hardware fault occurred. More... | |
StatusSignalValue< bool > & | GetFault_Undervoltage () |
Device supply voltage dropped to near brownout levels. More... | |
StatusSignalValue< bool > & | GetStickyFault_Undervoltage () |
Device supply voltage dropped to near brownout levels. More... | |
StatusSignalValue< bool > & | GetFault_BootDuringEnable () |
Device boot while detecting the enable signal. More... | |
StatusSignalValue< bool > & | GetStickyFault_BootDuringEnable () |
Device boot while detecting the enable signal. More... | |
StatusSignalValue< bool > & | GetFault_BootupAccelerometer () |
Bootup checks failed: Accelerometer. More... | |
StatusSignalValue< bool > & | GetStickyFault_BootupAccelerometer () |
Bootup checks failed: Accelerometer. More... | |
StatusSignalValue< bool > & | GetFault_BootupGyroscope () |
Bootup checks failed: Gyroscope. More... | |
StatusSignalValue< bool > & | GetStickyFault_BootupGyroscope () |
Bootup checks failed: Gyroscope. More... | |
StatusSignalValue< bool > & | GetFault_BootupMagnetometer () |
Bootup checks failed: Magnetometer. More... | |
StatusSignalValue< bool > & | GetStickyFault_BootupMagnetometer () |
Bootup checks failed: Magnetometer. More... | |
StatusSignalValue< bool > & | GetFault_BootIntoMotion () |
Motion Detected during bootup. More... | |
StatusSignalValue< bool > & | GetStickyFault_BootIntoMotion () |
Motion Detected during bootup. More... | |
StatusSignalValue< bool > & | GetFault_DataAcquiredLate () |
Motion stack data acquisition was slower than expected. More... | |
StatusSignalValue< bool > & | GetStickyFault_DataAcquiredLate () |
Motion stack data acquisition was slower than expected. More... | |
StatusSignalValue< bool > & | GetFault_LoopTimeSlow () |
Motion stack loop time was slower than expected. More... | |
StatusSignalValue< bool > & | GetStickyFault_LoopTimeSlow () |
Motion stack loop time was slower than expected. More... | |
StatusSignalValue< bool > & | GetFault_SaturatedMagneter () |
Magnetometer values are saturated. More... | |
StatusSignalValue< bool > & | GetStickyFault_SaturatedMagneter () |
Magnetometer values are saturated. More... | |
StatusSignalValue< bool > & | GetFault_SaturatedAccelometer () |
Accelerometer values are saturated. More... | |
StatusSignalValue< bool > & | GetStickyFault_SaturatedAccelometer () |
Accelerometer values are saturated. More... | |
StatusSignalValue< bool > & | GetFault_SaturatedGyrosscope () |
Gyroscope values are saturated. More... | |
StatusSignalValue< bool > & | GetStickyFault_SaturatedGyrosscope () |
Gyroscope values are saturated. More... | |
ctre::phoenix::StatusCode | SetControl (controls::ControlRequest &request) |
Control motor with generic control request object. More... | |
ctre::phoenix::StatusCode | SetControl (controls::ControlRequest &&request) |
Control motor with generic control request object. More... | |
ctre::phoenix::StatusCode | SetYaw (units::angle::degree_t newValue, units::time::second_t timeoutSeconds) |
The yaw to set the Pigeon2 to right now. More... | |
ctre::phoenix::StatusCode | SetYaw (units::angle::degree_t newValue) |
The yaw to set the Pigeon2 to right now. More... | |
ctre::phoenix::StatusCode | ClearStickyFaults (units::time::second_t timeoutSeconds) |
Clear the sticky faults in the device. More... | |
ctre::phoenix::StatusCode | ClearStickyFaults () |
Clear the sticky faults in the device. More... | |
Public Member Functions inherited from ctre::phoenixpro::hardware::ParentDevice | |
ParentDevice (int deviceID, std::string model, std::string canbus) | |
int | GetDeviceID () const |
const std::string & | GetCANBus () const |
std::shared_ptr< const controls::ControlRequest > | GetAppliedControl () const |
Get the latest applied control. More... | |
std::shared_ptr< controls::ControlRequest > | GetAppliedControl () |
Get the latest applied control. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from ctre::phoenixpro::hardware::ParentDevice | |
static constexpr double | kDefaultControlRatePeriodsSec = 0.010 |
Protected Member Functions inherited from ctre::phoenixpro::hardware::ParentDevice | |
virtual void | ReportIfTooOld ()=0 |
virtual ctre::phoenix::StatusCode | SetControlPrivate (controls::ControlRequest &request) |
template<typename T > | |
StatusSignalValue< T > & | LookupStatusSignalValue (uint16_t spn, std::string signalName, bool reportOnConstruction) |
template<typename T > | |
StatusSignalValue< T > & | LookupStatusSignalValue (uint16_t spn, uint16_t mapper_iter, std::function< std::map< int, StatusSignalValue< T > >()> map_filler, std::string signalName, bool reportOnConstruction) |
template<typename T , typename U > | |
StatusSignalValue< T > | LookupDimensionlessStatusSignalValue (uint16_t spn, std::string signalName) |
Returns a unitless version of the StatusSignalValue by value. More... | |
void | ReportIfTooOld (int minMajor, int minMinor, int minBugfix, int minBuild) |
Protected Attributes inherited from ctre::phoenixpro::hardware::ParentDevice | |
DeviceIdentifier | deviceIdentifier |
Class description for the Pigeon 2 IMU sensor that measures orientation.
ctre::phoenixpro::hardware::Pigeon2::Pigeon2 | ( | int | deviceId, |
std::string | canbus = "" |
||
) |
Constructs a new Pigeon 2 sensor object.
deviceId | ID of the device, as configured in Phoenix Tuner. |
canbus | Name of the CAN bus this device is on. Possible CAN bus strings are:
|
ctre::phoenixpro::hardware::Pigeon2::~Pigeon2 | ( | ) |
|
inlinefinal |
This function does nothing; it exists to satisfy the WPILib Gyro interface.
Pigeon 2 does not require manual calibration.
|
override |
|
override |
|
override |
|
override |
|
final |