Multi processes - Multi cameras

Hello,

When trying to run multiple cameras, each within its own Python process (or each within its own docker container), I am experiencing more frequent CAMERA NOT DETECTED issue (on camera.open()) than when running all camera in a single Python process/container. The issue only happens on camera.open().

When getting into this issue, a power reset of the camera (unplug/replug) is required to be able to connect again to the faulty camera(s).

The common setup is two ZED2i running in 2k with Neural Depth Mode.
The GPU I use has more than enough VRAM to handle these.
The opening timeout is large enough (60s) so that it is not the reason for failing to connect.

The issue is less likely to appear after rebooting the computer.
The more I open/close my processes, the more likely is the issue to appear.
The more I open/close my processes, the longer it seems to take for camera.open() to return.

Though I can’t connect to them using ZED SDK, the devices remain listed under /dev/video*.

Do you have any suggestions on what could cause these issues, and which steps I should follow to stop them from happening? It’s not viable long term to have to plug/unplug cameras when they are in a “dirty state”

I already read similar topics on the forums and tried most UNIX based commands for resetting the usb connections, without success.

Best

3 Likes

Hi @nfntn
Welcome to the Stereolabs community.

Unfortunately, we recently discovered an SDK bug preventing the simultaneous opening of multiple cameras from different processes.
The SDK team is hardly working on solving the issue and a patch will be released as soon as possible.

The only current workaround is to add a delay between camera openings to be sure that the resources are not accessed simultaneously by different processes.

Hi @Myzhar,

Thank you for answering quickly and sharing a workaround!
I’ll be impatiently waiting for the fix and will try the workaround in the meantime

1 Like