Unable to calibrate compass

I get the following error:

“Calibration Failed: Error: Time out waiting for answer for mav_cmd_do_start_mag_cal”

I’ve been trying to calibrate the two compasses/magnetometers in my BlueROV2 to follow the advice in this thread

This failure occurs whether I try to do the “quick calibration” or “learn calibration” I’m able to calibrate the gyros and other sensors without any issue so far. Any ideas on what might be causing this? I have the vehicle connected to GPS during testing, though I’ve also tried this without the GPS and there was no change.

I should add that I’m using Ardusub 4.5.0 and the latest version of BlueOS

I realized one issue might have been having QGC open, which if this needs to be closed should be mentioned in the BlueOS calibration window.

I can now get the compass to do a quick calibration, but when I try to do a “compass calibration learning” it initialized but doesn’t finish. How long should I expect this step to take? How large of an area do I need to move the vehicle through? The vehicle is out of water on a mobile cart, so I am walking it around a parking lot. Will it work in this scenario, or do I need to have the vehicle in the water and be actively driving it with the motors for this kind of calibration to work?

Hi @JoshuaElliott -
The learning mode of compass calibration is intended for vehicles to navigate around, with gps lock, under their own power - usually this is done with ArduRover and the BlueBoat, and should not be necessary for ArduSub and the BlueROV2- even if you have a GPS available. A standard calibration, rotating the vehicle through all axis, is sufficient!

@tony-white So it sounds like my options are the quick calibration (can do while stationary) or the full calibration (rotate vehicle through three axes)?

The issue is our vehicle + sensor system is 120 lbs and quite large, so I was hoping for an in-between that only required changes to heading.

Will the learning calibration only work if moving the vehicle under it’s own power, or should it be able to work if moving it around on a cart? I’m partly wondering if there is some configuration issue preventing things from working that we could get past, as the learning calibration seems best for my application

Hi @JoshuaElliott -
Yes, those are your options! If the vehicle is awkward to move, you could suspend it with a rope to perform the full calibration? This is typically the best solution for calibration performance, compared to all other options…

The compass learn does prefer that the vehicle is moving under it’s own power. However if you arm the vehicle and collect a .BIN log file of the vehicle moving around with GPS lock, this log file can be processed for calibration parameters as well.