Does Pigeon IMU have an equivalent to NAVX getrate()

I’m trying to convert our trajectory code from using the NAVX to a pigeon IMU. I’m stuck on replacing the AHRS.getrate() call. I’m looking at the CTRE API at https://www.ctr-electronics.com/downloads/api/cpp/html/classctre_1_1phoenix_1_1sensors_1_1_pigeon_i_m_u.html

There is no mention of “getrate()” or angular velocity. Do we need to calculate this ourselves now?

What am I missing here?

GetRawGyro()
int ctre::phoenix::sensors::PigeonIMU::GetRawGyro ( double xyz_dps[3] )

Get Raw Gyro data.

Parameters
xyz_dps Array to fill with x[0], y[1], and z[2] data in degrees per second.

Returns
The last ErrorCode generated.

Does the bolded appear to be what you need?

2 Likes

That’s it. Thanks!

I had been scanning the documentation and examples for references to “rate” “angular velocity” with no luck.

If the pigeon is the selected sensors for a talon, , you can also use getselectedSensorvelocity. We got the angular rate in pigeon units per 100 ms.

We were using the pigeon to do a controller rotate under motion Magic, and that let us pull the angular rate the talons were using for the motion Magic calculations.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.