SparkFun Optical Tracking Odometry Sensor (OTOS) - Heading Continually Changing

Last night, we started fine-tuning the angular and linear scalars for our FTC robot, but we observed some odd behavior with the OTOS sensor. While the x and y positional values worked as intended, the heading value continually increased despite no movement. At first, we observed this with a custom OpMode, but we confirmed that this also happened with the provided OpModes for the sensor.

Thinking that this might have been a chip-specific issue, we switched to our backup sensor and observed the same behavior. We did not notice this behavior when we first tested out the chip at the beginning of the FTC season (September).

A few notes:

  • The IMU is being calibrated in our custom code and the provided code.
  • The industrial space where our team meets does not have adequate heating at this time. We are using space heaters near the area where we are working on the robot. We were curious if significant temperature changes from one spot to another might be a factor in this issue.

I was curious if anyone else has observed similar behavior.

How long of a running time are we talking about? And just how chilly is this industrial space?

We haven’t seen this specifically, but here are some other threads to poke through
This was mounting issue
This one ended being a bad sensor
Thread with linear scalar issues (probably not as helpful, but posting in case something comes from that since it is recent)

How fast is it changing? Some drift is expected (no IMU is perfect), but our testing has shown the measured angle typically stays within 1 degree over a ~5 minute period. And if you’re only using it for autonomous, then you really only need the heading to be accurate for 30 seconds.

The IMU on the OTOS is susceptible to temperature changes, there’s no temperature compensation unfortunately. The datasheet states the gyroscope rate can change by ±0.010 dps/°C (page 9, parameter G_OffDr), so a 1°C change could cause the angle to be off by 0.6 degrees after 60 seconds. However this is only caused by changing temperature, so if you’re seeing large drift in the measured angle during operation, you may get better results by turning off your space heaters. I know, no one likes cold fingers, but if it’s really affecting your robot performance that much, this could help.

Hope this helps!