This happened in the water but we can reproduce it in the shop. When the sub is powered up but not armed and we enter depth hold the sub seems to lock up. Nearly all the messages from the sub seem to stop and trying to change back to manual mode can take anywhere from 20 seconds to minutes.
Stabilize does not have this problem and the code for each mode is almost exactly the same with the exception of a call to relax_z_controller.
I’m seeing similar behavior that I can’t reliably reproduce on the bench: many (all?) MAVLink messages seem to stop after a while. The obvious problem during a dive is that the HEARTBEAT messages seem to stop and I have to restart the autopilot in BlueOS. I will try to repro with depth hold + unarmed.
Is this custom firmware built from the ArduSub 4.1.0 tag? Have you tried it with the stable 4.1.0 build from BR? I’m trying to see if my toolchain is the culprit.
Are you running BlueOS? I was thinking it might be related to mavlink-routerd and my endpoint configuration, since that is also restarted, but this might be a red herring.