Zed2 issues with GStreamer Integration on x86_64

I am trying to use the Zed2 GStreamer integration. For me, it works on the Jetson with Jetpack 4.5.

However on Ubuntu 18.04 x86_64, with CUDA 10.2, this is the error.
I am using CUDA 10.2 installed with Ubuntu 18.04.

$ gst-launch-1.0 zedsrc ! queue ! autovideoconvert ! queue ! fpsdisplaysink

Setting pipeline to PAUSED …
Setting depth_mode to ULTRA
Brightness: 4
Contrast: 4
Hue: 0
Saturation: 4
Sharpness: 4
Gamma: 8
AEC_AGC: 1
WHITEBALANCE_AUTO: 1
LED_STATUS: 1
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
terminate called after throwing an instance of ‘std::length_error’
what(): vector::_M_default_append
Aborted (core dumped)

ZED_Explorer works, so I know the camera is working.

ZEDfu gives the same error as the GStreamer source element

$ ZEDfu
terminate called after throwing an instance of ‘std::length_error’
what(): vector::_M_default_append
Aborted (core dumped)

Any suggestions on how to go about debugging this?

Thanks
mndar

Hi @mndar
this seems a CUDA issue.
Have you updated the ZED SDK or CUDA?
Can you post the output of the nvidia-smi command and of the nvcc -V command?

I am using Zed SDK 3.4 (ZED_SDK_Ubuntu18_cuda10.2_v3.4.0.run)
The system has CUDA 11.2 as reported by nvidia-smi. That’s it, isn’t it?

I got past the issue by disabling depth in the run time parameters with this code

sl::RuntimeParameters runtime_parameters;
runtime_parameters = src->zed.getRuntimeParameters();
runtime_parameters.enable_depth = 0;
ret = src->zed.grab(runtime_parameters); 

Here is the output of nvidia-smi and nvcc

# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

Hi @mndar,
as I supposed there is something wrong with your CUDA installation.
As you say the system detects CUDA 11.2 with nvidia-smi, while the nvcc compiler detects CUDA 10.2.
I suggest you uninstall CUDA and install it back from scratch.
You can force the complete removal of CUDA with the command
$ sudo apt purge nvidia*
then you can reinstall the ZED SDK, it will take care of installing the correct CUDA version for you.