Sparkfun OTOS sensor heading drift

I’m a mentor for an FTC team and we want to use a SparkFun OTOS for odometry. Our team are absolute newbies when it comes to odometry.

We have mounted the sensor on the robot as per the instructions and when initialized our X and Y readings are very stable. They start at 0 and when we move the robot around the field and measure with a ruler, the distances are relatively accurate.

However, the heading is wildly off while the robot is stationary. Within 30 seconds of starting the program, the OTOS Heading drifts to -20 degrees. And it continues to drift. Meanwhile, X and Y are stable at 0 or near 0.

Could there be something wrong with the sensor?

– Nilay

I’d double-check that then sensor lens is clean and free of debris and has an unobstructed view and that the mounting is level/square

Are there any nearby sources of EMF, large motors, or similar around?

Thanks for the quick reply! The sensor is clean (in fact - it’s brand new and I’m running it for the first time.) The fact that the X and Y are working without problems suggests that, right?

No, no EMF, large motors or anything like that. I’m running it inside my house.