Skip to content

Latest commit

 

History

History
187 lines (135 loc) · 6.68 KB

navx.md

File metadata and controls

187 lines (135 loc) · 6.68 KB
description
Calibrating a NavX 2

NavX

The NavX2 is the latest iteration of the NavX series by Studica (formally by KauiLabs) and offers excellent readings and documentation on how to calibrate and really get the most out of your gyroscope.

{% embed url="https://www.studica.ca/en/navx-2-mxp-robotics-navigation-sensor" %}

Getting started

You now have a NavX, congratulations! Time to configure and calibrate it, if you do not follow these steps it will not work as good as possible.

The java class for the NavX is AHRS imported from import com.kauailabs.navx.frc.AHRS;

NavX Omni-Mount

NavX can reconfigure the yaw to any position! Here is their guide one how.

{% embed url="https://pdocs.kauailabs.com/navx-mxp/installation/omnimount/" %}

NavXUI Installation

Java 1.7 or higher is required

{% embed url="https://pdocs.kauailabs.com/navx-mxp/software/navx-mxp-ui/" %}

{% embed url="https://www.kauailabs.com/public_files/navx-mxp/navx-mxp.zip" %} Installation ZIP {% endembed %}

Useful for advanced calibration to ensure optimal accuracy on the robot.

Calibration

Full documentation for calibration is here. The original calibration is done at the factory in Hawaii so it is highly reccommended you do this at least once!

{% embed url="https://pdocs.kauailabs.com/navx-mxp/guidance/gyroaccelcalibration/" %}

We will provide a brief summary here.

Gyroscopes are sensitive to ambient temperature, so it is imperative that you recalibrate them upon reception AND at events. NavX instructions are as follows.

  1. Place them NavX on a still platform parallel to the earth's surface (use a level!).
  2. Press and hold the CAL button for at least 10 seconds.
  3. When you release the CAL button ensure that the CAL led flashes briefly.
  4. Press the RESET button.
  5. Wait up to 15 seconds.
  6. yaw accuracy may be diminished until the next On-the-fly Gyro calibration completes. (which means your first autonomous may not act right!)

YAGSL Checklist

  • Update to the latest available firmware.
  • Level the NavX parallel to the earth.
  • Calibrate the NavX.
  • Select the connection/communication method you want to use.

Connection Methods

SPI (navx, navx_spi)

YAGSL supports the NavX SPI communication over the roboRIO MXP. This is the recommended method of communicating with NavX devices.

{
  "imu": {
    "type": "navx_spi",
    "id": 0,
    "canbus": null
  },
  "invertedIMU": true,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}
{
  "imu": {
    "type": "navx",
    "id": 0,
    "canbus": null
  },
  "invertedIMU": true,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}

Serial (navx_mxp_serial, navx_usb)

Serial communication is slower than SPI communication and could be more prone to interference however this is the only out of the box way to communicate with the NavX2 micro (navx_usb) so this must be selected if you are using one. The MXP serial communication can be used incase the SPI MXP communication is not working at the moment.

{
  "imu": {
    "type": "navx_mxp_serial",
    "id": 0,
    "canbus": null
  },
  "invertedIMU": true,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}
{
  "imu": {
    "type": "navx_usb",
    "id": 0,
    "canbus": null
  },
  "invertedIMU": true,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}

I2C (navx_i2c)

I2C communication on the MXP is supported however this is known to cause permanent lockouts on the roboRIO randomly, this issue has been thoroughly investigated and no known cause can be found. It is encouraged to avoid using this option at all costs!!

{
  "imu": {
    "type": "navx_i2c",
    "id": 0,
    "canbus": null
  },
  "invertedIMU": true,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}

NavX Micro

NavX micro from andymark

If you are using the NavX micro please select the type of navx_usb to indicate you are communicating over serial via the USB or else the gyrscope will not work with YAGSL!