ZED camera with CUDA on TX2

Hello,

I’m trying to use the ZED camera through the Jetson TX2, however I’m running into a few issues. On the TX2, I currently have CUDA 9.0.252 installed (from the flash installation via Jetpack), and am using ZED SDK 2.3.3 which is supposed to “support CUDA 9.1”. However, when I follow a basic provided ZED tutorial (https://github.com/stereolabs/zed-examples/tree/master/tutorials/tutorial%202%20-%20image%20capture), I get the following error when cmake-ing:

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find CUDA: Found unsuitable version "9.0", but required is exact
  version "8" (found /usr/local/cuda)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)
  /usr/local/zed_previous/zed-config.cmake:42 (find_package)
  CMakeLists.txt:12 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/nvidia/zed-examples/tutorials/tutorial 2 - image capture/build/CMakeFiles/CMakeOutput
.log".

Which says that I need CUDA version 8. I do, however have the correct Zed SDK version installed (verified by looking in /usr/local/zed).

What is wrong here, and what kind of set up should I be looking for?

Thank you!

May be you should use https://download.stereolabs.com/zedsdk/2.3/tegrax2_jp32 ?
However, the latter appears to support cuda =<9.1. But I did not try the github example. You may rise an issue at github.

This version of Zed SDK only works for CUDA 8.0, but I have CUDA 9.0 which is what I installed from the most recent Jetpack version 3.2 (https://developer.nvidia.com/embedded/jetpack)

Quotation start:
[i]“To clarify, the Jetpack for TX1 has been updated to 3.2 with CUDA 9.0 as well but there is no download for Zed SDK on the TX1 that supports CUDA 9.0. I’ve tried running both CUDA 8.0 and 9.0 side by side but none of the Zed examples seem to work.”

" The support for the new Jetpack 3.2 for TX1 will be included in the upcoming version of the ZED SDK (2.4.0)"[/i]
Quotation end

You may use as reference Found CUDA 9.0 but the ZED SDK requires 8.0 · Issue #26 · stereolabs/zed-python-api · GitHub

Andrey, do you recommend I try to install Cuda 8 using Jetpack 3.1 instead, to use the older version Zed SDK 2.2.1?
Any idea why Cuda 9.0 doesn’t work with Zed SDK 2.3.3 even though it should (ZED SDK 2.3 - Download | Stereolabs)?

In my opinion, Jetpack 3.1 will work with cuda 8 with the zed example.
And the compatibility issue will persist until they release zed sdk 2.4.0, in my opinion. But I did work with zed sdk and examples. May be other folks who dealt with zed will contribute to the discussion. Otherwise You may try reinstall the zed sdk 2.3.3 or post to Issues · stereolabs/zed-python-api · GitHub
More reference:
ERROR : Found CUDA 8.0 but the ZED SDK requires 9.0 · Issue #34 · stereolabs/zed-python-api · GitHub

I think in a day or a week 2.4.0 release will emerge and resolve the issue if hasn’t been resolved yet.

Thank you for that issue, Andrey. I will wait a few days for zed sdk 2.4 to be released, but for now am trying to get Jetpack 3.1 with cuda 8 to work. Side note: I am running into this issue https://devtalk.nvidia.com/default/topic/987525/ and am having a hard time resolving that one, but will keep trying.

Thanks again!

The issue you are referring to seems to be related to internet connection.

I am using Zed with JetPack 3.2 with CUDA 9.
There are two different downloads, one for CUDA 8 and one for CUDA 9, on their website.
Just get the download that matches your JetPack and you should be good.

My JetPack3.2 installed CUDA 9 which works for the ZED. StereoLabs does have a new release coming out which (if you apply the firmware update from that release) should improve some issues, e.g., USB3 bandwidth.

EDIT: I see my PC host is CUDA 9.1, the R28.2 TX2 (JetPack3.2) is 9.0.

I just installed ZED,
it seems to install files to

/usr/local/zed$ ll
total 48
drwx------ 10 nvidia root   4096 Apr 12 23:56 ./
drwxr-xr-x 12 root   root   4096 Apr 12 23:55 ../
drwx------  4 nvidia nvidia 4096 Apr 12 23:56 doc/
drwx------  4 nvidia nvidia 4096 Apr 12 23:56 firmware/
drwx------  5 nvidia nvidia 4096 Apr 12 23:56 include/
drwx------  2 nvidia nvidia 4096 Apr 12 23:56 lib/
drwx------  8 nvidia nvidia 4096 Apr 12 23:56 sample/
drwxrwxrwx  2 root   root   4096 Apr 12 23:56 scripts/
drwx------  2 nvidia nvidia 4096 Apr 12 23:56 settings/
drwx------  3 nvidia nvidia 4096 Apr 12 23:56 tools/
-rw-------  1 nvidia nvidia 2520 Apr 12 23:56 zed-config.cmake
-rw-------  1 nvidia nvidia  368 Apr 12 23:56 zed-config-version.cmake

from where we can start executable from the list:

/usr/local/zed/tools$ ll
total 14220
drwx------  3 nvidia nvidia    4096 Apr 12 23:56 ./
drwx------ 10 nvidia root      4096 Apr 12 23:56 ../
drwx------  3 nvidia nvidia    4096 Apr 12 23:56 lib/
-rw-------  1 nvidia nvidia      87 Apr 12 23:56 qt.conf
-rwx------  1 nvidia nvidia 6613352 Apr 12 23:56 ZED Calibration*
-rwx------  1 nvidia nvidia 1690144 Apr 12 23:56 ZED Depth Viewer*
-rwx------  1 nvidia nvidia 1568688 Apr 12 23:56 ZED Diagnostic*
-rwx------  1 nvidia nvidia 1745040 Apr 12 23:56 ZED Explorer*
-rwx------  1 nvidia nvidia 1588712 Apr 12 23:56 ZEDfu*
-rwx------  1 nvidia nvidia 1330824 Apr 12 23:56 ZED SVOEditor*

However first thing I am asked to do is to upgrade the firmware with ZED explorer.
Well, upgrading…
It seems to require a somewhat *.bin firmware.
That is not obvious where to download from.
Hopefully the guide/ walk-through can be found here Stereolabs ZED Camera - NVIDIA Jetson TX2 - JetsonHacks

The firmware flash is only from Windows. I did ask about that, the flash tools will not actually flash from Linux even if you extract the file from the Windows package. You’ll need to use ZED Explorer from Windows.

I was told the flash software for the ZED does not need CUDA, but I had to install CUDA on Windows before the software would allow install. I tried first with just the CUDA runtime, but this failed to work…I ended up just doing a full install of CUDA on Windows (minus eclipse I think).

By default on my Windows 7 install the firmware was made available at:

C:\Program Files (x86)\ZED SDK\firmware\ZED\

At this moment the most recent firmware is:

zed_fw_v1142_spi.bin

The StereoLabs people indicated there is a new release coming up quite soon which will improve USB.

Thank you for sharing.
So far I tried with Windows 10 VM virtualbox without cuda and it failed.
I shall approach regular system wide windows installation for getting the firmware upgraded.
Thank you linuxdev.

The issue turned out that my Host PC doesn’t have usb 3.0. And that prevents Zed explorer from upgrading the firmware under Windows. While Jetson where I have usb 3.0 can not upgrade the firmware because the zed is “unstable” under jetson.
Hopefully something will come up soon.

May be I can manage to mount usb 3.0 of jetson to the Host PC somehow in a way the camera is connected to usb 3.0, but software accesses it from Host PC?
Update 1: Found a laptop with usb 3.0, attempted installation of zed stereolabs only. The outcome is mfc140u.dll error
Update 2 —approaching without cuda, but with visual c++ 2015
Update 3: Finally without cuda installation, but with installation of visual c++ the firmare has been upgraded and zed camera works at jetson /ubuntu.
Thank you

If it still matters, for those who say they have Zed working with Cuda 9:
I am able to use Zed Depth Viewer, Zed Explorer, etc. Those programs all work fine. BUT I am unable to “cmake” the stereolab projects (specifically the tutorial projects). I’m not sure how this relates.

Either way, I’m waiting for the new zed sdk to come out…

FWIW, I don’t use cmake, I just put together my own makefile.

Here are the important bits:

LFLAGS:=-L/usr/local/zed/lib -L/usr/local/cuda/lib64 -lsl_core -lsl_zed -lsl_input -lpthread -lcudart -lnpps -g
CFLAGS:=-O0 -g -std=gnu++14 -I/usr/local/zed/include -I/usr/local/cuda/include

You might want to tweak them as appropriate for your project.

Update: StereoLabs released version 2.4.0 which fixes some USB issues. I have not yet loaded this, but it is now available.

ZED SDK 2.3 - Download | Stereolabs only shows 2.3.3.
Maybe 2.4 is on Github, and will make it to the download page in time?