ZedX with Zed Box Orin NX INVALID RESOLUTION using Python Samples

Hello,

I keep getting errors when trying to run the python samples. Currently the only sample that works is the body tracking and all other python samples give me an error similar to this or none at all.
“[Sample] Using default resolution
Camera Open INVALID RESOLUTION Exit program.”

I also noticed similar behavior with the python tutorials.
I’ve updated SDK to 4.0 and all drivers are up to date too. I’ve installed the python API, updated the OS, rebooted, and still have no luck.
Any advice on fixing this wold be helpful so I can start learning with the ZED X and ZED BOX

Thank you

Hi,

What sample version are you using ? Invalid resolution is pretty easy issue to resolve for ZED X only these resolution are available : Camera Controls | Stereolabs

Thank you for the documentation on supported camera resolution on the ZED X

I downloaded the samples when I updated the ZED Box Orin NX to ZED SDK for JetPack 5.1.1 (L4T 35.3)4.0

I’m I would assume this is the latest version of the samples. Let me know if that’s not the case.

The samples are shipped with the SDK, indeed. You mention 4.0, I assume it’s 4.0.6 (the latest). In this case, you have the latest samples.
Let’s take the problem step by step. For example, you mentioned the tutorials. I checked the tutorial 2 and saw that it will work directly on ZED X. Can you be more specific about what tutorial / sample are you testing ?

Yes that’s correct 4.0.6 is the current. Another issue i’m getting is with camera connection. I get “Camera not detected” and it says I have 0 cameras connected in the json file. This seems to get solved after running sudo systemctl restart zed_x_daemon to restart the zed x, but I usually have to make this command more then once before the zed x actually restarts…, but I can eventually get it to connect, so If we can focus first on just the Samples that would be most helpful and then I can start another conversation about the other connection issue. From the downloaded samples this is what I get.

  1. The code sample in body tracking/body tracking/python/body_tracking.py runs correctly. It starts up the camera and starts body tracking sample however when I quit out using q to exit like it indicates to do, I get a segmentation fault maybe a memory management issue in the C++ code?
  2. camera control/python/camera_control.py does not run. I get a "Camera open : INVALID RESOLUTION. Exit program.
  3. depth sensing/depth sensing/python/depth_sensing.py does not run. I get a
    “Running Depth Sensing sample … press ‘Esc’ to quit
    Press ‘s’ to save the point cloud
    [sample] using default resolution
    INVALID RESOLUTION”
  4. object detection/birds eye viewer/python/object_detection_birds_view.py does not run. I get a “Running object detection … Press ‘Esc’ to quit
    INVALID RESOLUTION”
    5… etc. Similar if not the exact output on all the other python samples. the only one that works seems to be the body tracking.

In between testing each sample I opened a new ZED_Diagnostic to make sure everything is still in the green, just to rule out any issues between tests. Each time the Diagnostic come back clean with no issues. I couldn’t upload the file as a new user, so I’ll just post it in the reply.
{ "AI Models": { "valid": [ "MULTI CLASS DETECTION is optimized", "MULTI CLASS MEDIUM DETECTION is optimized", "MULTI CLASS ACCURATE DETECTION is optimized", "HUMAN BODY FAST DETECTION is optimized", "HUMAN BODY MEDIUM DETECTION is optimized", "HUMAN BODY ACCURATE DETECTION is optimized", "HUMAN BODY 38 FAST DETECTION is optimized", "HUMAN BODY 38 MEDIUM DETECTION is optimized", "HUMAN BODY 38 ACCURATE DETECTION is optimized", "PERSON HEAD DETECTION is optimized", "PERSON HEAD ACCURATE DETECTION is optimized", "REID ASSOCIATION is optimized", "NEURAL DEPTH is optimized" ] }, "Camera Test": { "InternalDevicesCount": 0, "ZEDCount": 1, "camera": { "Device ID": 0, "Firmware": 2001, "Init Output": "OK", "Model": "ZED-X", "Serial Number": "REMOVED BY ME", "valid": [ "<b>Camera: </b>ZED-X", "<b>Firmware: </b>2001" ] }, "resolutions": { "HD1200@30": { "fps (input)": 30, "fps (output)": 30, "height (input)": 1200, "height (output)": 1200, "initialization": "OK", "status": true, "width (input)": 1920, "width (output)": 1920 }, "HD1200@60": { "fps (input)": 60, "fps (output)": 60, "height (input)": 1200, "height (output)": 1200, "initialization": "OK", "status": true, "width (input)": 1920, "width (output)": 1920 }, "SVGA@120": { "fps (input)": 120, "fps (output)": 120, "height (input)": 600, "height (output)": 600, "initialization": "OK", "status": true, "width (input)": 960, "width (output)": 960 } }, "sensors": { } }, "Devices": { "CorruptedFirmware": false, "GMSLList": [ { "Serial": "REMOVED BY ME", "Sub Model": "ZED-XG 120mm", "id": 0, "path": "/dev/i2c-30", "state": "Available" } ], "USBList": [ { "USB_path": "/2/4/3", "idProduct": "0x6015", "idVendor": "0x0403" }, { "USB_path": "/2/4/2", "idProduct": "0x6015", "idVendor": "0x0403" }, { "USB_path": "/2/4/1", "idProduct": "0x01a9", "idVendor": "0x1546" }, { "USB_path": "/2/4", "idProduct": "0x0608", "idVendor": "0x05e3" }, { "USB_path": "/2/3", "idProduct": "0x0029", "idVendor": "0x8087" }, { "USB_path": "/2/2", "idProduct": "0xc52b", "idVendor": "0x046d" }, { "USB_path": "/2/1", "idProduct": "0xc52b", "idVendor": "0x046d" }, { "USB_path": "/2", "idProduct": "0x0608", "idVendor": "0x05e3" } ] }, "Graphics Card": { "deviceCount": 1, "deviceDriverVersion": 11040, "devices": [ { "arch": "Ampere", "computeCapability": "8.7", "cores": 512, "name": "Orin", "totalMemoryBytes": "16136019968", "totalMemoryMB": 15388.5078125 } ], "initResult": 0, "valid": [ "<b>Graphics card: </b> Orin" ] }, "Processor": { "OS": "Ubuntu 20.04.6 LTS ", "avxSupported": false, "coreCount": "8", "cpu": " ARMv8 Processor rev 1 (v8l)", "datetime": "2023-09-21 12:40:09 AM", "hyperThreading": "0", "motherboard": "NVIDIA Orin NX Developer Kit, Unknown", "ramCapacity": "16.136020", "ramUsage": "", "ramUsed": "6.089564", "threadCount": "8", "valid": [ "<b>Processor: </b> ARMv8 Processor rev 1 (v8l)", "<b>Motherboard: </b> NVIDIA Orin NX Developer Kit, Unknown" ] }, "ZED SDK": { "CUDA Toolkit version": "V11.4.315 -->located in /usr/local/cuda-11.4/bin/nvcc", "CUDA loading": false, "ZED SDK Version (Diag)": "4.0.6", "ZED SDK Version (RT)": "4.0.6", "ai": { "checkAI": true, "cudaVersion": 11040, "cudnnCudartVersion": 11040, "cudnnVersion": 8600, "cudnnVersionExpected": 8600, "tensorVersion": 8502 }, "binFiles": [ "libsl_ai.so", "libsl_zed.so", "libsl_zed_static.a" ], "resourcesFiles": [ "neural_depth_2.0.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.0.6", "<b>CUDA version:</b> V11.4.315" ] } }

Hi,

The error appears because the Python samples in question use the default camera resolution HD720 which is not available for ZED X (Camera Controls | Stereolabs).
We will correct it in the next release.

In the meantime, you can use the samples by setting the resolution to AUTO, HD1200, HD1080, or SVGA.
We are sorry for the inconvenience.

Thank you, changing the resolution helped make most of these samples work. There may still be some issues however, because I couldn’t get all the resolutions to work on each sample. Most of them required I use HD1080, but did not work with each resolution.

It’s because the ZED X does not support all resolutions in the ENUM (nor does ZED2i).