4.1 in wsl 2.0: no camera detected

What is the status of using the zed sdk 4.1.1 in wsl 2.0? I tried using the docker image for Ubuntu 22.04, and using usbipd, lsusb sees both the camera and the hid, but when running the container, no camera is detected. When I checked /etc/udev/udev.conf in the docker container, I didn’t see any sl specific entries.

Thanks!

Does it work if you manually add the required udev rule?

Thanks for the quick reply!!! What is the required udev rule and I will try that.

This one
99-slabs.rules (4.6 KB)
it must be located in /etc/udev/rules.d/

Ok, I added that to the container (and restarted the container), and the camera was still not detected. I also added it to the wsl ubuntu /etc/… and still no luck.

Please run ZED Diagnostic and send the report file that it generates

Ok, I will need to build a container that has the sdk because the docker image from dockerhub does not include the tools (I was surprised at that).

Thanks as always for your help.

bb

See below…
bb

ZED_Diagnostic_Results.json (5.4 KB)

{
    "AI Models": {
        "info": [
            "MULTI CLASS DETECTION is not optimized",
            "MULTI CLASS MEDIUM DETECTION is not optimized",
            "MULTI CLASS ACCURATE DETECTION is not optimized",
            "HUMAN BODY FAST DETECTION is not optimized",
            "HUMAN BODY MEDIUM DETECTION is not optimized",
            "HUMAN BODY ACCURATE DETECTION is not optimized",
            "HUMAN BODY 38 FAST DETECTION is not optimized",
            "HUMAN BODY 38 MEDIUM DETECTION is not optimized",
            "HUMAN BODY 38 ACCURATE DETECTION is not optimized",
            "PERSON HEAD DETECTION is not optimized",
            "PERSON HEAD ACCURATE DETECTION is not optimized",
            "REID ASSOCIATION is not optimized",
            "NEURAL DEPTH is not optimized",
            "NEURAL PLUS DEPTH is not optimized"
        ]
    },
    "Camera Test": {
        "InternalDevicesCount": 2,
        "ZEDCount": 0,
        "error": [
            "<b>Camera not detected</b> <br/> Make sure the camera is plugged in or try another USB 3.0 port."
        ]
    },
    "Devices": {
        "CorruptedFirmware": false,
        "MCUDetected": true,
        "USBList": [
            {
                "USBMode": 3,
                "USB_path": "/1",
                "bDescriptorType": 1,
                "bDeviceProtocol": 1,
                "bLength": 18,
                "bMaxPacketSize0": 9,
                "bNumConfigurations": 1,
                "bcdDevice": "1.0",
                "bcdUSB": "3.0",
                "bcdUSBClass": 239,
                "bcdUSBSubClass": 2,
                "busNumber": 2,
                "device": "ZED mini",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 0,
                "idProduct": "0xf682",
                "idVendor": "0x2b03"
            },
            {
                "USBMode": 2,
                "USB_path": "/1",
                "bDescriptorType": 1,
                "bDeviceProtocol": 0,
                "bLength": 18,
                "bMaxPacketSize0": 64,
                "bNumConfigurations": 1,
                "bcdDevice": "2.5",
                "bcdUSB": "2.0",
                "bcdUSBClass": 0,
                "bcdUSBSubClass": 0,
                "busNumber": 1,
                "device": "ZED mini MCU",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 3,
                "idProduct": "0xf681",
                "idVendor": "0x2b03"
            }
        ],
        "USBMode": 3,
        "ZED Camera Module Detected": 63106,
        "ZED MCU Module Detected": 63105,
        "ZEDDetected": true,
        "notTested": [
            "Please connect a camera to test the USB connection."
        ]
    },
    "Graphics Card": {
        "deviceCount": 1,
        "deviceDriverVersion": 12040,
        "devices": [
            {
                "arch": "Ada Lovelace",
                "computeCapability": "8.9",
                "cores": 9728,
                "name": "NVIDIA GeForce RTX 4080",
                "totalMemoryBytes": "17170956288",
                "totalMemoryMB": 16375.5
            }
        ],
        "glx_info": "OpenGL vendor string: Mesa\nOpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)\nOpenGL core profile version string: 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2\nOpenGL core profile shading language version string: 4.50\nOpenGL core profile context flags: (none)\nOpenGL core profile profile mask: core profile\nOpenGL core profile extensions:\nOpenGL version string: 4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2\nOpenGL shading language version string: 4.50\nOpenGL context flags: (none)\nOpenGL profile mask: compatibility profile\nOpenGL extensions:\nOpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1~22.04.2\nOpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20\nOpenGL ES profile extensions:\n",
        "initResult": 0,
        "valid": [
            "<b>Graphics card: </b> NVIDIA GeForce RTX 4080"
        ]
    },
    "Processor": {
        "OS": "Ubuntu 22.04.3 LTS ",
        "avxSupported": true,
        "coreCount": "28",
        "cpu": " Intel(R) Core(TM) i7-14700K",
        "datetime": "2024-05-07 17:27:15",
        "hyperThreading": "1",
        "motherboard": ", ",
        "ramCapacity": "33.532187",
        "ramUsage": "",
        "ramUsed": "33.203290",
        "threadCount": "56",
        "valid": [
            "<b>Processor: </b>  Intel(R) Core(TM) i7-14700K"
        ]
    },
    "ZED SDK": {
        "CUDA Toolkit version": "V12.1.105 -->located in /usr/local/cuda-12.1/bin/nvcc",
        "CUDA loading": false,
        "GPU Driver Version": "Driver Version                            : 551.76",
        "GPU Performance": "    Performance State                     : P8",
        "ZED SDK Version (Diag)": "4.1.1",
        "ZED SDK Version (RT)": "4.1.1",
        "ai": {
            "checkAI": true,
            "cudaVersion": 12010,
            "cudnnCudartVersion": 12020,
            "cudnnVersion": 8907,
            "cudnnVersionExpected": 8907,
            "tensorVersion": 8601
        },
        "binFiles": [
            "libsl_ai.so",
            "libsl_zed.so",
            "libsl_zed_static.a"
        ],
        "resourcesFiles": [
        ],
        "resourcesFilesExpected": [
            "objects_performance_3.2"
        ],
        "valid": [
            "<b>ZED SDK version:</b> 4.1.1",
            "<b>CUDA version:</b> V12.1.105"
        ]
    }
}

Can you try to open the camera with cheese or guvcview to verify that the RGB stream is available?

Thanks for the suggestion. Using cheese inside the container or outside the container results in the same No Device Found, even though lsusb sees the 2 devices.

bb

This means that the UVC driver of the virtual machine is not working as expected.

Unfortunately, I cannot help you fix this type of Ubuntu problem.
Please try to search the internet to find a suitable solution for WSL2.

Yes, I think that I will need to rebuild the kernel, so outside your scope.

It would be good for stereolabs to have a support page on using the camera in wsl since this does keep coming up, even if it is a link to instructions on how to rebuild the kernel.

Thanks again for being so responsive.

bb

So… I followed the directions in this Medium post: wsl2-webcam (https://medium.com/software-dev-explore/wsl2-webcam-23c1dc9408ae ) to rebuild the wsl kernel. As someone else has said, it is straightforward if you follow the directions. Once I rebuilt the kernel per the instructions, I was able to use v4l2, so the video stream is working now (you still have to do the usbipd stuff). So progress.

I now am having USB issues with the device. I have attached the report from Diagnostics. Any ideas?

Yes, I think that I will need to rebuild the kernel, so outside your scope.

It would be good for stereolabs to have a support page on using the camera in wsl since this does keep coming up, even if it is a link to instructions on how to rebuild the kernel.

Thanks again for being so responsive.

bb

Hi,
I guess now the problem is related to udev.
The SDK cannot access the HID device and reports a USB error.

Best regards

Walter

Walter Lucetti
Senior Computer Engineer
SDK / Robotics / HW
Stereolabs Support