Inertial sensor heading reading incorrect

When I installed the V5 inertial sensor onto the robot, it was working fine. But after taking in 2 mobile goals, then rerunning the autonomous program, the inertial sensor fails to find the 40 deg heading.
I went into the devices menu and tested the inertial sensor, and when I turned the robot 90 degrees, the sensor showed me it only detected 15-30 degrees.

I used Drivetrain.setHeading(0,degrees) in the code to calibrate the sensor
I used Drivetrain.turnToHeading(40,degrees) in the code to turn

the gyro drift if a common issue. In pre auton I would suggest tuning the calibration command so that your auton starts with a heading of 0/ what ever angle you want it to think it is. Banging the sensor around and into thing often makes the drift a lot worse but it will still drift.

1 Like

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