I have encountered some problems after upgrading to version 4.0

Hi, Zed team,
I encountered an error when using the example from “zed-sdk/object detection/custom detector/python/pytorch_yolov5 at master · stereolabs/zed-sdk · GitHub” after upgrading to version 4.0. The error message is “point_cloud_res = sl.Resolution(min(camera_infos.camera_resolution.width, 720), AttributeError: ‘pyzed.sl.CameraInformation’ object has no attribute ‘camera_resolution’”

Hello,
We have a bug in our wrapper and in the sample. I’m investigating it.
Sorry for that.

Hi again,

The sample is outdated, I don’t think there is a bug in the wrapper. camera_infos do not contains resolutions anymore.
Can you replace

point_cloud_res = sl.Resolution(min(camera_infos.camera_resolution.width, 720)

with

point_cloud_res = sl.Resolution(min(camera_infos.camera_configuration.resolution.width, 720)

Besides, there are also other error messages like ‘AttributeError: ‘pyzed.sl.CameraConfiguration’ object has no attribute ‘camera_fps’’ and I think I’ve seen ‘pyzed.sl.CameraConfiguration’ object has no attribute ‘calibration_parameters’ somewhere else.

1 Like

I was also facing the same problems but I found a solution.

For the camera_fps you need to access the parameter via:

camera_infos.camera_configuration.fps

And for the calibration_parameters you have to access the parameter via:

camera_config.calibration_parameters

The problem is that you can not really see it in the IDEs where these parameters were moved to in the newest SDK.

The situation is worse when you have no automatic completion. We have a lot of documentation to catch up, and, now that 4.0 is out, you will not see this kind of breaking changes anytime soon.

Sorry again !

Thank you, I have made the changes to the code according to your suggestions, and the code is running again

1 Like