Confusion of using Object detection or pose tracking

Hello All,
I am new to ZED 2i camera usage and also I am not a programmer.
I am currently working on a project and are planning to try certain implementation as discussed below. The idea of objection detection and pose tracking was sorted. But I have no idea how this works or is implemented.

Background: We want to use a steady camera (we have ZED2i) that is either mounted on robot arm or is fixed at one place(may be mounted on center) in a cell. We have a box that is filled with sand and had hidden object looks similar to sand in terms of colour but is hard and can be picked by robot gripper. I have CAD model of the object in the sand. And also have idea of the placement of object in sand. But this can move when blowing the sand.

Idea: The robot arm is used to blow the sand. The idea is to detect the object in the sand dust and protect the robot arm from collision with object. Also the robot arm should change the air blowing path if it detects the object in way. Reading online, we found one can use object detection and pose tracking. I have no knowledge or background on how to implement it or am i on right track.

I see that zed 2i camera offers object detection and pose tracking. I also read something to do with real time point cloud data.

Can any one help me here? or guide me on how to start?

Looking forward for the support and thank you in advance.
Regards.

Hi @tmehta , welcome to the forums!

I think you’re on the right track, what I can help you with is getting information out of the ZED SDK for pose tracking, object detection, or point cloud/depth data.

First thing I recommend is getting familiar with the SDK a little bit, via the documentation:

These pages include code snippets to get a peek at the code.

Then, or at the same time, you can get familiar with the ZED SDK samples. They come along with the SDK installation (see the install folder) or can be downloaded from our dedicated GitHub repository. You’ll find samples about the three modules there.

Then, you can start working out how to take parts from the samples and merge them into your final app, or start from a sample and build your app around it.

I don’t know much about robots and communication with them, but we also have a ROS2 integration that you can check out that makes it possible to use the three modules within ROS2.

We’ll be happy to help you with more specific questions about the SDK once you get started with this!

Thank you @JPlou. I am going through this modules and will check it.

Hello @JPlou Can you help me with this error?
PS C:\Program Files (x86)\ZED SDK> & C:/Users/UserName/AppData/Local/Microsoft/WindowsApps/python3.11.exe “c:/Program Files (x86)/ZED SDK/samples/tutorials/tutorial 6 - object detection/python/object_detection.py”
[2024-07-30 08:53:20 UTC][ZED][INFO] Logging level INFO
[2024-07-30 08:53:22 UTC][ZED][INFO] Using USB input… Switched to default resolution HD720
[2024-07-30 08:53:23 UTC][ZED][INFO] [Init] Depth mode: PERFORMANCE
[2024-07-30 08:53:24 UTC][ZED][INFO] [Init] Camera successfully opened.
[2024-07-30 08:53:24 UTC][ZED][INFO] [Init] Camera FW version: 1523
[2024-07-30 08:53:24 UTC][ZED][INFO] [Init] Video mode: HD720@60
[2024-07-30 08:53:24 UTC][ZED][INFO] [Init] Serial Number: S/N 35084232
Object Detection: Loading Module…
[2024-07-30 08:53:25 UTC][ZED][ERROR] [Object Detection] cuDNN library not found
[2024-07-30 08:53:25 UTC][ZED][ERROR] [ZED] [Object Detection] CUDNN NOT FOUND
Enable object detection : CORRUPTED SDK INSTALLATION. Exit program.
[2024-07-30 08:53:25 UTC][ZED][WARNING] CORRUPTED SDK INSTALLATION in enum sl::ERROR_CODE __cdecl sl::camera::enableObjectDetection(struct sl::ObjectDetectionParameters)

I have CUDA 12.5 installed.

Several things to try, the first is getting a ZED Diagnostic report and sending it here so we can take a look.

  • Does ZED Depth Viewer run correctly?
    • If you set the NEURAL depth mode in its settings?

ZED_Diagnostic_Results.json (14.2 KB)

I have cuda 12.5 installed in my laptop

Did you restart your computer after the ZED SDK installation?

yes I did restart the PC

Every other example works but object detection and body tracking gives the same error. Also the depth viewer works in neutral mode but the output is as below

An issue probably happened with the CUDA installation process.

Please try uninstalling CUDA completely, restart, then reinstall the ZED SDK (which will prompt you to install CUDA, so do so), and restart. There should be no compatibility issue with CUDA 12.5, so I think this process will fix the issue.

Hello @JPlou,
The result is still the same.

@tmehta do you have other versions of CuDNN or TensorRT installed on your PC?
Are you installing CUDA manually or are you letting the ZED SDK installer guide you in the process?
Please run the ZED Diagnostic tool and send the diagnostic report that it generates.

Even after completely deleting the cuda toolkit from my pc. The zed sdk just gets installed without asking for installing cuda. I dont know why.

ZED_Diagnostic_Results.json (14.3 KB)

@tmehta I see that CUDA v12.5 is still installed and CUDA v12.1 is not correctly initialized.
Unless you need CUDA v12.5 for specific reasons, I recommend you follow this procedure:

  • uninstall all the versions of CUDA installed on your PC
  • eventually remove all the “NVIDIA” folders in C:/Program Files
  • upgrade the NVIDIA GPU Driver to the latest version (DO NOT INSTALL CUDA)
  • uninstall the ZED SDK
  • reboot
  • launch the ZED SDK installer and let it guide you to install the recommended version of CUDA
  • reboot

Then launch ZED Explorer and ZED Depth Viewer to check that the SDK is finally correctly working

Hello @Myzhar,
I did exactly as you said but the problem is still consistent. I am attaching new Diagnostic test report and Screenshot of the error again.

ZED_Diagnostic_Results.json (14.1 KB)

Hello All,
Can you please me here?
Regards

Hi @tmehta,

Sorry for the delay, can you please verify that CUDNN is installed on your system, at: C:\Program Files\NVIDIA\CUDNN ?

Hello @mattrouss, The CUDNN was not installed with CUDA. I had to download CUDNN 9.2. Now it is in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN.
But still getting same error. Even I added the path in env. variable but made no difference.

I see users getting the same error in past as there is no resolution provided. Also it goes the same for another colleague of mine who tried to install the sdk and cuda in his PC.

Regards.

Hi @tmehta
Some time ago I had the same problem and thing that finally solved it for me was changing Python version to 3.8 and reinstalling SDK.
I don’t exactly know what is cause of it, but for some reason any higher version resulted in this error.
Hope it helps.

Regards