There have been some questions about how to properly calibrate the IMU on the OpenROV. I wanted to make this quick tutorial to let you know how the system works.
Just like a smartphone that needs to be calibrated before the compass works, the ROV needs to be moved around in order to be calibrated.
Before Calibration: BNO055.CALIB_SYS 0
Moving ROV around
After Calibration: BNO055.CALIB_SYS 3
The compass also uses two different systems in order to remain accurate. The compass uses both a magnetometer as well as a gyro. After the system is calibrated it has a magnetometer value. When the motors are running there is interference between the magnetometer and the motors so the compass switches into a gyro mode. This eliminates the interference. The problem with gyro based compasses is that they drift over time. In order to counteract this when the motors are turned off for more than 5 seconds, the system re-engages the magnetometer and pulls a true value. When the motors start running, it switches back to the gyro mode. This eliminates the drift associated with long period of gyro usage.
In the video you can see the BNO055.CALIB_MAG go from 0 (not calibrated) to 3 (calibrated)
You should calibrate the IMU using this procedure every time the ROV is turned on.