I’m trying to get my Swerve running in a field-relative mode. The problem I’m running into is that the NavX always reports as calibrating. I’ve implemented a command to zero the gyro when I press a Joystick button, which gets ignored because it’s always calibrating. I used the REV MAXSwerve template, with changes to chassis configuration, CANIds, and the gyroscope. Any help is appreciated!
EDIT: The Gyro-Fixing branch is the one I’m working on.
Here is the Github Repository: (Mainly look at DriveSubsystem and RobotContainer)
I didn’t take the NAVx off the robot, but when I plugged it into it using NavXUI and shook it a bit, it was pretty accurate. “Accurate” meaning it wasn’t continuously calibrating and was giving updated measurements.
When you say that the NavX is continuously calibrating, what happens? Do you see the orange CAL LED steady or flashing? If so, is it a slow or fast blink?
The CAL light stays off. I have a button bound in the code that’s supposed to call the gyro.reset() method which zeroes the heading of the robot. However, every time I do this it gives me the message “NavX: Yaw Reset request ignored - startup calibration is currently in progress.”
I also called the isCalibrating() method in the periodic block, which continuously returned true.
This is the NavX during TeleOp: