I finally got SITL running in a VM of Ubuntu and got my custom program connected. My navigation commands were going absolutely crazy and not making any sense at all. Finally, I gave up on my program and started to explore just driving the ROV around using a Xbox controller and found some weirdness. In manual mode, it operates just fine as expected. As soon as I switch to Stabilize or Depth Hold Mode the simulation goes nuts and the ROV starts going deep and driving in circles. Guess it isn’t my code that is the problem but something with SITL.
At first I thought it might be that I didn’t load the correct parameters and did the load default parameters for the BlueROV2 Heavy (also tried regular with same results). That didn’t help. I think it has something to do with the Roll90 on the autopilot. When you put it in stabilize mode it immediately tries to level the horizon and then it just spins out of control. I have tried to calibrate it like you would with a physical ROV and both the Accelerometer and Level Horizon calibrations just fail.
Any ideas? I can’t really do any testing until I can get this figured out as I really want to operate in Depth Hold mode.