Spatial Mapping Model optimization failed

Hello, I’m getting an error while trying to run a script and am getting the following error:

[2024-05-04 19:21:25 UTC][ZED][WARNING] 6: [libLoader.cpp::Impl::293] Error Code 6: Internal Error (Unable to load library: libnvinfer_builder_resource.so.8.6.1: libnvinfer_builder_resource.so.8.6.1: cannot open shared object file: No such file or directory)

[2024-05-04 19:21:26 UTC][ZED][ERROR] Model optimization failed

Any idea?

Already giving a follow up question:

Am I able to wireless broadcast the camera feed to another device within the same network with the zed.enableStreaming(); and init_params.input.setFromStream();?

Hi,

The installer should have run this, but you can manually create the symlink so that the lib can be found;

sudo ln -s /usr/local/cuda/lib64/libnvinfer_builder_resource.so.8.6.1 /usr/lib/x86_64-linux-gnu/

Yes, you can stream the camera feed through the local network wirelessly using these methods, although this requires a bit of bandwidth so a reliable connection is necessary to avoid issues.

Not working :confused:

Another follow up regarding the streaming
The connection seems to be working as the two devices connect (I also got feedback on the sender machine). But for some reason it breaks after connecting. Could this be related to the bandwith? I’m currently working on wi-fi.

Hi @Rengo
I recommend you try to reinstall the ZED SDK.
Please consider downloading the latest v4.1.1.

If the error persists after the update, please run the ZED Diagnostic tool and send the report file that it generates.

Is there any guide to do this? Sorry fairly new to ZED and linux

  • Open a console (Ctrl+Alt+t)
  • Enter the command ZED_Diagnostic
  • start the process
  • save the log file
  • send the log

I’ve updated the SDK to 4.1.1 and I’m now getting a different error (progress i think :smiling_face_with_tear: )

Getting this error when running the spatial mapping cpp script from the zed-sdk github:

[2024-05-08 19:40:42 UTC][ZED][INFO] Logging level INFO
[2024-05-08 19:40:43 UTC][ZED][INFO] Using USB input... Switched to default resolution HD720
[2024-05-08 19:40:44 UTC][ZED][INFO] [Init]  Depth mode: NEURAL
[2024-05-08 19:40:45 UTC][ZED][INFO] [Init]  Camera successfully opened.
[2024-05-08 19:40:45 UTC][ZED][INFO] [Init]  Camera FW version: 1523
[2024-05-08 19:40:45 UTC][ZED][INFO] [Init]  Video mode: HD720@60
[2024-05-08 19:40:45 UTC][ZED][INFO] [Init]  Serial Number: S/N 31506319
Shortcuts
	- 'l' to enable/disable current live point cloud display
	- 'w' to switch mesh display from faces to triangles
	- 'd' to switch background color from dark to light
Error: CUDA - OpenGL Interop failed (999)
Segmentation fault (core dumped)

I’ve also run the ZED Diagnostic tool and got the following:

Json output:

{
    "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": 1,
        "camera": {
            "Device ID": 0,
            "Firmware": 1523,
            "Init Output": "OK",
            "Model": "ZED 2i",
            "Serial Number": 31506319,
            "valid": [
                "<b>Camera: </b>ZED 2i",
                "<b>Firmware: </b>1523"
            ]
        },
        "resolutions": {
            "HD1080@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD1080@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD2K@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1242,
                "height (output)": 1242,
                "initialization": "OK",
                "status": true,
                "width (input)": 2208,
                "width (output)": 2208
            },
            "HD720@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@60": {
                "dropCount": -1,
                "fps (input)": 60,
                "fps (output)": 58,
                "height (input)": 720,
                "height (output)": 720,
                "imageCount": 502,
                "initialization": "OK",
                "status": true,
                "tearingCount": 0,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "VGA@100": {
                "fps (input)": 100,
                "fps (output)": 100,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@60": {
                "fps (input)": 60,
                "fps (output)": 60,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            }
        },
        "sensors": {
            "Firmware": 777,
            "Init Output": "OK",
            "Model": "ZED 2i (MCU)",
            "Serial Number": 31506319
        }
    },
    "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": 4,
                "device": "ZED2i",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 4,
                "idProduct": "0xf880",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/8",
                "idProduct": "0xb729",
                "idVendor": "0x04f2"
            },
            {
                "USBMode": 2,
                "USB_path": "/5/2",
                "bDescriptorType": 1,
                "bDeviceProtocol": 0,
                "bLength": 18,
                "bMaxPacketSize0": 64,
                "bNumConfigurations": 1,
                "bcdDevice": "3.9",
                "bcdUSB": "2.0",
                "bcdUSBClass": 0,
                "bcdUSBSubClass": 0,
                "busNumber": 3,
                "device": "ZED2i MCU",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 3,
                "idProduct": "0xf881",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/5",
                "idProduct": "0x2514",
                "idVendor": "0x0424"
            },
            {
                "USB_path": "/10",
                "idProduct": "0x0033",
                "idVendor": "0x8087"
            }
        ],
        "USBMode": 3,
        "ZED Camera Module Detected": 63616,
        "ZED MCU Module Detected": 63617,
        "ZEDDetected": true,
        "valid": [
            "<b>USB Bandwidth: </b> OK"
        ]
    },
    "Graphics Card": {
        "deviceCount": 1,
        "deviceDriverVersion": 12040,
        "devices": [
            {
                "arch": "Ada Lovelace",
                "computeCapability": "8.9",
                "cores": 3072,
                "name": "NVIDIA GeForce RTX 4060 Laptop GPU",
                "totalMemoryBytes": "8318484480",
                "totalMemoryMB": 7933.125
            }
        ],
        "glx_info": "OpenGL vendor string: Intel\nOpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)\nOpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2\nOpenGL core profile shading language version string: 4.60\nOpenGL core profile context flags: (none)\nOpenGL core profile profile mask: core profile\nOpenGL core profile extensions:\nOpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2\nOpenGL shading language version string: 4.60\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 4060 Laptop GPU"
        ]
    },
    "Processor": {
        "OS": "Ubuntu 22.04.4 LTS ",
        "avxSupported": true,
        "coreCount": "16",
        "cpu": " 12th Gen Intel(R) Core(TM) i5-12500H",
        "datetime": "2024-05-08 20:31:43",
        "hyperThreading": "1",
        "motherboard": "G5 KF, GIGABYTE",
        "ramCapacity": "16,464994",
        "ramUsage": "",
        "ramUsed": "10,845352",
        "threadCount": "32",
        "valid": [
            "<b>Processor: </b>  12th Gen Intel(R) Core(TM) i5-12500H",
            "<b>Motherboard: </b> G5 KF, GIGABYTE"
        ]
    },
    "ZED SDK": {
        "CUDA loading": false,
        "GPU Driver Version": "Driver Version                            : 550.54.15",
        "GPU Performance": "    Performance State                     : P3",
        "ZED SDK Version (Diag)": "4.1.1",
        "ZED SDK Version (RT)": "4.1.1",
        "[Warning] Other cuda version N°0": "V12.4.131-->located in  in /usr/local/cuda-12.4/bin/nvcc",
        "ai": {
            "checkAI": true,
            "cudaVersion": 12040,
            "cudnnCudartVersion": 12020,
            "cudnnVersion": 8907,
            "cudnnVersionExpected": 8907,
            "tensorVersion": 8601
        },
        "binFiles": [
            "libsl_ai.so",
            "libsl_zed.so",
            "libsl_zed_static.a"
        ],
        "error": [
            "<b>CUDA 12.1 not detected</b> <br/> Make sure CUDA is installed and restart your computer. <a href='https://download.stereolabs.com/cuda12_1_web' style='color: #d9ff42;' >Download</a>."
        ],
        "resourcesFiles": [
            "neural_depth_3.6.model",
            "objects_accurate_3.2.model",
            "objects_medium_3.2.model",
            "objects_performance_3.2.model",
            "person_head_accurate_2.4.model",
            "person_head_performance_2.4.model",
            "person_reid_1.4.model",
            "skeleton_body18_3.2.model",
            "skeleton_body38_3.5.model"
        ],
        "resourcesFilesExpected": [
            "objects_performance_3.2"
        ],
        "valid": [
            "<b>ZED SDK version:</b> 4.1.1"
        ]
    }
}

Also, when running nvidia-smi on console I get the following:

Is the ZED sdk wait for a specific version of cuda? If so how can I change it?

Thanks!
(Sorry for the long post)

Hi @Rengo
it seems indeed that CUDA is not installed.

Please reboot and launch again the ZED SDK v4.1.1 installer.
It will guide you installing the required CUDA version.

Hello @Myzhar !
After trying some attempts somehow I got it to work. This is weird because I still keep getting the CUDA not detected error even though I have 12.4 installed according to NVIDIA-smi.

Nevertheless thank you so much to bear with me :slight_smile:

Please note that nvidia-smi shows the newer runtime version of CUDA compatible with the driver, not the installed CUDA toolkit version.
To check the current version of CUDA installed you must use the command /usr/local/cuda/bin/nvcc -V

Got this response with that command:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

Seems ok no?

Do ZED Explorer or ZED Depth Viewer work?

I’ve only tested ZED Spatial Mapping and working completely fine.

1 Like