If the navX2-MXP default yaw axis orientation isn’t sufficient for your needs, you can use the OmniMount feature to re-configure the navX2-MXP yaw axis, allowing high-accuracy yaw axis readings when navX2-MXP is mounted horizontally, vertically, or even upside down.
In certain cases, the navX2-MXP axes (Board Frame) may not be oriented exactly as that of the Robot (Body Frame). For instance, if the navX2-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 navX2-MXP axes will not be oriented identically to the Robot. This configuration is shown in the diagram below:
Transforming navX2-MXP Board Frame to Body Frame with OmniMount
The navX2-MXP’s “OmniMount” feature can transform the navX2-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.
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, navX2-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 navX2-MXP circuit board onto your robot. ENSURE that one of the navX2-MXP axes (as shown on the navX2-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 navX2-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 navX2-MXP circuit board, causing it to restart.
- The navX2-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 navX2-MXP axes MUST be perpendicular to the earth’s surface.
- 2. During auto-calibration, navX2-MXP must be held still.
- If either of the above conditions is not true, the ‘CAL’ LED will flash 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 navX2-MXP auto-calibration is complete, the Board Frame to Body Frame Transform will be stored persistently into navX2-MXP flash memory and used until auto-calibration is run once again.