Unconventional navX mounting causing code problems

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?

1 Like

NavX has an “OmniMount” feature that can be used to reconfigure which axis is the yaw axis. See the User Guide.

Alternatively, you can never use the reset function of the device and instead maintain an offset in your robot code and do the subtraction yourself.

1 Like

Just like @Peter_Johnson said, see page 21: https://andymark-weblinc.netdna-ssl.com/media/W1siZiIsIjIwMTkvMDcvMTIvMTEvNTUvMjcvNzk5MjJlNWEtYWJmOC00YTFhLWJiYjEtNjU4NDUxMTczZTAzL25hdlgtTVhQIFJvYm90aWNzIE5hdmlnYXRpb24gU2Vuc29yIFVzZXIgR3VpZGUucGRmIl1d/navX-MXP%20Robotics%20Navigation%20Sensor%20User%20Guide.pdf?sha=91f86dbf3ff65c35

My team had to do this just last week. After you re-calibrate, the .getAngle and .getYaw will work how you expect

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.

To address this, Gyro Scale Ratio Factor calibration, using the navXConfig utility’s Sensor Fusion Tab; this is discussed in the article “Optimizing Accuracy of a Generation 2 navX-Sensor ”.

Note: the navXConfig Utility also contains other useful features including Advanced Accelerometer Calibration and adjusting of sensing ranges.

The recommended order of doing these steps for a navX2-sensor is:

  • update firmware
  • rerun factory calibration (in the final mounting orientation)
  • perform gyro scale factor ratio calibration

Sorry for the late reply
Thank you so much for your help, everything works just fine after we ran the OmniMount procedure.

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