Hi @JC3
what version of the ZED SDK are you using?
Have you checked that the cable screws are strongly strengthened?
You can avoid unplugging and replugging the camera by calling the sl::Camera::reboot function.
Last night I had a camera running that spuriously lost its connection for no reason that I can understand, and failed to recover the motion sensors:
[ZED][Grab] Detected Connection Failure. Trying to recover the camera with sn 37175491 ...
............[2023-10-31 20:52:49 UTC][ZED][ERROR] [Grab] Failed to recover image capture... Cannot communicate with camera.
[2023-10-31 20:52:49 UTC][ZED][WARNING] CAMERA MOTION SENSORS NOT DETECTED in sl::ERROR_CODE sl::Camera::grab(sl::RuntimeParameters)
37175491: Grab failed: CAMERA MOTION SENSORS NOT DETECTED
My software was set up to auto reboot in response to too many errors but even this did not recover the camera:
[ZED][Grab] Detected Connection Failure. Trying to recover the camera with sn 32182788 ...
............[2023-11-01 13:03:46 UTC][ZED][ERROR] [Grab] Failed to recover image capture... Cannot communicate with camera.
[2023-11-01 13:03:46 UTC][ZED][WARNING] CAMERA MOTION SENSORS NOT DETECTED in sl::ERROR_CODE sl::Camera::grab(sl::RuntimeParameters)
32182788: Grab failed: CAMERA MOTION SENSORS NOT DETECTED
32182788: Rebooting camera...
[2023-11-01 13:03:46 UTC][ZED][WARNING] CAMERA NOT DETECTED in static sl::ERROR_CODE sl::Camera::reboot(int, bool)
32182788: Reboot result: CAMERA NOT DETECTED
[ZED][Grab] Detected Connection Failure. Trying to recover the camera with sn 32182788 ...
So it does not appear that there is any good way to recover from this state. This is one of a number of various stability issues we’ve been seeing with the ZED 2i.
This is Ubuntu 22 with SDK 4.0.7 and the Python API.