If the navX-MXP default yaw axis orientation isn’t sufficient for your needs, you can use the OmniMount feature to re-configure the navX-MXP yaw axis, allowing high-accuracy yaw axis readings when navX-MXP is mounted horizontally, vertically, or even upside down.
Important Note: The OmniMount feature requires navX-MXP firmware version 1.1 or higher, so you may need to update your navX-MXP firmware.
In certain cases, the navX-MXP axes (Board Frame) may not be oriented exactly as that of the Robot (Body Frame). For instance, if the navX-MXP circuit board is plugged directly into the RoboRIO-MXP connector, and the top of the RoboRIO (the edge on which the USB connectors are mounted) is pointing up with the top side of the RoboRio pointing towards the front of the robot, the navX-MXP axes will not be oriented identically to the Robot. This configuration is shown in the diagram below:
Transforming navX-MXP Board Frame to Body Frame with OmniMount
The navX-MXP’s “OmniMount” feature can transform the navX-MXP X, Y and Z axis sensor data (Board Frame) into Robot Orientation (Body Frame) by detecting which of its three axes is perpendicular to the earth’s surface. [NOTE: this requires navX-MXP firmware revision 1.1.37 or later].
This is similar to how a modern smart phone will rotate the display based upon the phone’s orientation. However unlike a smart phone, the OmniMount detection of orientation does not happen all the time – since the orientation should not change while the robot is moving. Rather, each time OmniMount configuration occurs, navX-MXP records this transformation in persistent flash memory, and will continue to perform this transformation until the transform is reconfigured.
To configure OmniMount, follow these simple steps:
- Install the navX-MXP onto your robot. ENSURE that one of the navX-MXP axes (as shown on the navX-MXP circuit board) is perpendicular to the earth’s surface. This axis will become the yaw (Z) axis. Note that this axis can either be pointing away from the earth’s surface, or towards the earth’s surface.
- Press the ‘CAL’ button on the navX-MXP Circuit board AND HOLD THE BUTTON DOWN FOR AT LEAST 5 SECONDS.
- Release the ‘CAL’ button, and verify that the orange ‘CAL’ light flashes for 1 second and then turns off.
- Press the ‘RESET’ button on the navX-MXP circuit board, causing it to restart.
- The navX-MXP circuit board will now begin OmniMount auto-calibration. During this auto-calibration period, the orange ‘CAL’ LED will flash repeatedly. This process takes approximately 15 seconds, and requires two things:
- 1. During auto-calibration, one of the navX-MXP axes MUST be perpendicular to the earth’s surface.
- 2. During auto-calibration, navX-MXP must be held still.
- If either of the above conditions is not true, the ‘CAL’ LED will be flashing quickly, indicating an error. To resolve this error, you must ensure that conditions 1 and 2 are met, at which point the ‘CAL’ LED will begin flashing slowly, indicating calibration is underway.
- Once navX-MXP auto-calibration is complete, the Board Frame to Body Frame Transform will be stored persistently into navX-MXP flash memory and used until auto-calibration is run once again.