ADIS16448 drifts like mad

It’s been a couple of years since we used our ADIS16448 and I see it’s now in WPIlib. However it’s drifting like crazy, as in degrees per second. We swapped units and still doing it, so it makes me think we need to do some kind of calibration or setup other than just instantiating the object.

We’re just creating the object with private ADIS16448_IMU gyro = new ADIS16448_IMU(); and then calling .reset(). We’ve also tried calling .calibrate() though I know (and can see from the logs) that it calibrates itself on startup. We’re just asking for the angle with .getAngle().

I feel like I’m missing something obvious here… Is there anything we should be looking at?



Are you ensuring that the robot / IMU is still during that calibration process?

Hey thanks for the response. Yes, we’re all staring at the computer waiting for the bot to come up. But a good reminder for me to explain to the team how important it is not to touch the robot at that time.


Alright, I’m really not sure what would cause that, could you upload your code somewhere so we can look at it.

Next time I’m at the build site I was going to come up with a minimum example, will share it here too.

This was bugging me and I didn’t want to wait until Saturday.

We thought something was up with the gyro because our field pose showed the robot spinning even when we were sitting still. It was the end of the meeting so our parting thoughts were something is up with the gyro because it gets wired straight into odometry, so what could be wrong there?

When I display the raw output of the gyro on a skeleton robot, the drift was roughly half a degree in 15 seconds, so nothing terrible. Added in the odometry code and the Pose2d was spinning again.

Turns out the default constructor of Rotation2d is radians, not degrees. :man_facepalming:

It’s working fine now :slight_smile:

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