Cannot run Unity plugin in Ubuntu 18

OS: Ubuntu 18
CUDA: 11.7
SDK: 3.8.2
Unity plugin: 3.8
Unity: 2021.3.21f1 or 2022.2.11f1

Tried to get the ZED plugin running, but could not make it. I followed the instructions on Git (GitHub - stereolabs/zed-unity: ZED SDK Unity plugin), but did not work. I tried setting up a new project for 2D/3D UVP and also HDRP. Nothing worked. It says that the ZED plugin import failed to load, I should check my SDK version.
Following (ZED SDK 3.3/ CUDA 11.1/Unity/Ubuntu 18.04 - #8 by IshanBhatnagar14), I did

“Run ldd libsl_unitywrapper.so in a terminal at the location of the lib”

with the output being

linux-vdso.so.1 (0x00007fff7fedd000)
libsl_zed.so => /usr/local/zed/lib/libsl_zed.so (0x00007f5f776da000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f5f759f1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5f757d2000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5f755ce000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5f753c6000)
libusb-0.1.so.4 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5f7503d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5f74c9f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5f74a87000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5f74696000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5f80112000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f5f74464000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5f74247000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f5f73fdf000)
libturbojpeg.so.0 => /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 (0x00007f5f73d6e000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f5f73b56000)
libnvcuvid.so.1 => /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1 (0x00007f5f7308c000)
libnvidia-encode.so.1 => /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1 (0x00007f5f72e53000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f5f72c24000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f5f72a06000)

Diagnostics yields:

{
“AI Models”: {
“info”: [
“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”,
“PERSON HEAD DETECTION is not optimized”,
“PERSON HEAD ACCURATE DETECTION is not optimized”
],
“valid”: [
“MULTI CLASS DETECTION is optimized”,
“REID ASSOCIATION is optimized”,
“NEURAL DEPTH is optimized”
]
},
“Camera Test”: {
“InternalDevicesCount”: 2,
“ZEDCount”: 1,
“camera”: {
“Device ID”: 0,
“Firmware”: 1523,
“Init Output”: “OK”,
“Model”: “ZED 2”,
“Serial Number”: 27651244,
“valid”: [
Camera: ZED 2”,
Firmware: 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”: 2,
“fps (input)”: 60,
“fps (output)”: 60,
“height (input)”: 720,
“height (output)”: 720,
“imageCount”: 498,
“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”: 776,
“Init Output”: “OK”,
“Model”: “ZED 2 (MCU)”,
“Serial Number”: 27651244
}
},
“Graphics Card”: {
“deviceCount”: 1,
“deviceDriverVersion”: 12010,
“devices”: [
{
“arch”: “Ampere”,
“computeCapability”: “8.6”,
“cores”: 3584,
“name”: “NVIDIA GeForce RTX 3060”,
“totalMemoryBytes”: “12626493440”,
“totalMemoryMB”: 12041.5625
}
],
“initResult”: 0,
“valid”: [
Graphics card: NVIDIA GeForce RTX 3060”
]
},
“Processor”: {
“OS”: “Ubuntu 18.04.6 LTS “,
“avxSupported”: true,
“coreCount”: “8”,
“cpu”: " Intel(R) Core™ i7-9700 CPU @ 3.00GHz”,
“datetime”: “2023-03-19 10:26:56”,
“hyperThreading”: “0”,
“motherboard”: “PRIME Z370-P II, ASUSTeK COMPUTER INC.”,
“ramCapacity”: “33,608159”,
“ramUsage”: “”,
“ramUsed”: “18,591322”,
“threadCount”: “8”,
“valid”: [
Processor: Intel(R) Core™ i7-9700 CPU @ 3.00GHz”,
Motherboard: PRIME Z370-P II, ASUSTeK COMPUTER INC.”
]
},
“USB”: {
“CorruptedFirmware”: false,
“MCUDetected”: true,
“USBList”: [
{
“USBMode”: 3,
“USB_path”: “/8”,
“bDescriptorType”: 1,
“bDeviceProtocol”: 1,
“bLength”: 18,
“bMaxPacketSize0”: 9,
“bNumConfigurations”: 1,
“bcdDevice”: “1.0”,
“bcdUSB”: “3.0”,
“bcdUSBClass”: 239,
“bcdUSBSubClass”: 2,
“busNumber”: 2,
“device”: “ZED2”,
“iManufacturer”: 1,
“iProduct”: 2,
“iSerial”: 0,
“idProduct”: “0xf780”,
“idVendor”: “0x2b03”
},
{
“USBMode”: 2,
“USB_path”: “/8/2”,
“bDescriptorType”: 1,
“bDeviceProtocol”: 0,
“bLength”: 18,
“bMaxPacketSize0”: 64,
“bNumConfigurations”: 1,
“bcdDevice”: “3.8”,
“bcdUSB”: “2.0”,
“bcdUSBClass”: 0,
“bcdUSBSubClass”: 0,
“busNumber”: 1,
“device”: “ZED2 MCU”,
“iManufacturer”: 1,
“iProduct”: 2,
“iSerial”: 3,
“idProduct”: “0xf781”,
“idVendor”: “0x2b03”
},
{
“USB_path”: “/8”,
“idProduct”: “0x2512”,
“idVendor”: “0x0424”
},
{
“USB_path”: “/7”,
“idProduct”: “0x2510”,
“idVendor”: “0x093a”
},
{
“USB_path”: “/6”,
“idProduct”: “0x1113”,
“idVendor”: “0x04f2”
}
],
“USBMode”: 3,
“ZED Camera Module Detected”: 63360,
“ZED MCU Module Detected”: 63361,
“ZEDDetected”: true,
“valid”: [
USB Bandwidth: OK”
]
},
“ZED SDK”: {
“CUDA Toolkit version”: “V11.7.99 -->located in /usr/local/cuda-11.7/bin/nvcc”,
“CUDA loading”: false,
“GPU Driver Version”: “Driver Version : 530.30.02”,
“GPU Performance”: " Performance State : P8”,
“ZED SDK Version (Diag)”: “3.8.2”,
“ZED SDK Version (RT)”: “3.8.2”,
“ai”: {
“checkAI”: true,
“cudaVersion”: 11070,
“cudnnCudartVersion”: 11060,
“cudnnVersion”: 8401,
“cudnnVersionExpected”: 8401,
“tensorVersion”: 8402
},
“binFiles”: [
“libsl_ai.so”,
“libsl_zed.so”,
“libsl_zed_static.a”
],
“resourcesFiles”: [
“neural_depth_1.4.model”,
“objects_accurate_2.2.model”,
“objects_medium_2.2.model”,
“objects_performance_2.2.model”,
“person_head_accurate_2.4.model”,
“person_head_performance_2.4.model”,
“person_reid_1.4.model”,
“skeleton_accurate_2.0.model”,
“skeleton_medium_2.1.model”,
“skeleton_performance_2.1.model”
],
“resourcesFilesExpected”: [
“objects_performance_2.2”
],
“valid”: [
ZED SDK version: 3.8.2”,
CUDA version: V11.7.99”
]
}
}

Could you point me to some solution?

I tried to import a project running in Windows (was a pain to get that to run, too, and I honestly just tried out a bunch of stuff and I don’t know what made to run) to Linux, but this also does not work.

The error is NullReferenceException: Object reference not set to an instance of an object
ZEDRenderingPlane.SRPStartFrame (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] rendcam) (at Assets/ZED/SDK/Helpers/Scripts/Display/ZEDRenderingPlane.cs:1333)

The projects were done with the Unity and SDK version. Cuda is same (11.7.x for Windows and 11.7.y for Linux).

Could you please help me?

Hi,

According to your first message, you are missing the libusb-0.1.so.4 lib, can you install it and try again?

Stereolabs Support

Yes, this work. I was too blind to notice that…
Thank you!