Due to space restrictions, we mounted our RoboRio and navX module sideways on our robot, expecting that any gyro-related problems would be solvable with code. Unfortunately, this turned out to be horribly wrong when we tried to write autonomous routines using the gyro for odometry. Turns out, the KauaiLabs navX module is incapable of resetting pitch or roll, only yaw since the sensor assumes it is mounted horizontally and therefore yaw should be the only axis which cannot be calculated from the direction gravity points in.
Is there a way to tell the navX to treat a specific axis as yaw? Or really, any solutions to this problem besides repositioning the navX properly?
In addition to the fine suggestions already posted, if you’re using a navX2 sensor, and especially since it’s being mounted in a non-horizontal position, you should update the firmware. Version 4.0.433 is available for those teams using the “Omnimount” feature to enable vertical mounting of a navX2-MXP sensor.
This firmware update is available for download via the “Download” button on the navX2-MXP sensor software page . Instructions for updating the firmware can be found here .
Additionally, it’s highly recommended to calibrate the Gyro Scale Factor Ratio using the navXConfig tool.
With some navX2 sensors, several teams have reported issues with significant yaw angle inaccuracy. Kauai Labs has verified an inaccuracy due to incorrect values of the navX2-sensor’s Gyro Scale Factor Ratio.