NavX MXP Gyro Drift and Swerve

Our team is using the NavX MXP as our gyro and has used it in the past. Our coach has said there have been issues with drift in the past but this year we are using swerve drive and we believe the gyro is drifting and causing our swerve to not drive straight.

Are there any tips for keeping the gyro from drifting?
Is there a better gyro that teams have used?

We just got our swerve up and running and we are trying to figure out what’s wrong. Our robot does a good job of driving straight for several minutes and then we start to notice drift so we don’t believe it is an encoder offset issue. We are also using getFusedHeading() for our angle if that makes a difference.

Thanks in advance!

Heading drift is a fact of life for gyros in the price range we use for FRC. All of the common ones these days will hold +/- a degree or two for a few minutes. As time goes on, they’ll continue to drift away from true zero. Luckily a match is only 2:30, so you shouldn’t really need to worry about that. If you’re practicing for longer than a match length, you may need to re-zero your gyros every few minutes to cancel out the drift.

Thank you! Do you have any tips if it is starting to drift significantly? Just in case we happen to run into it.

Have a button to zero the gyros. This eliminates the problem.

Not sure when your NavX was manufactured but some shipped last year with the “scale factor” not properly tuned. I believe this was the result of using a different chip supplier due to supply chain issues.

See this thread for a discussion.

We had to tune/calibrate last year with this exact issue. The symptom is a 360 degree spin wasnt registering as 360 but a little more or less. If you “pull donuts” always turning 1 way the error can accumulate.

How did you fix this?

If using this for field centered driving, make sure you are in the proper orientation when you hit that button.

We always call the NavX reset() function in RobotInit(). We usually call it in autonomousInit() as well. We don’t call it in teleopInit(), though, because we never know what orientation we will actually be in at the end of autonomous. Ideally, we are pretty sure that we know where we will end up, but things don’t always work out that way.

We always had a manual reset button when using our meccanum drives, but we never had to use it during a competition. The NavX drift was never enough to mess it up during a match.

Follow these directions provided by Kauai Labs. You need to download the Advanced Configuration Tool from their site. The section you want is “Gyroscope Scale Factor Ratio”. We didn’t touch any other settings!

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