I’ve been having problems with the inertial sensor in my robot in which after a few runs of autonomous the heading is completely off and sometimes the heading keeps constantly changing afterwards, even when the robot is stationary. Does anyone know how to fix this or negate it?
Give your inertial sensor time to calibrate before runs, in practice add a wait before your code and at a tournament plug in your controller and run your program early. Do this before every run.
Calibrate and reset the heading and rotation every program startup if it persists try a factory calibrate (Vex has a good guide to this here: Understanding the Alignment of the V5 Inertial Sensor – VEX Library).