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’”
Hi, Zed team,
We have a bug in our wrapper and in the sample. I’m investigating it.
Sorry for that.
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)
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.
I was also facing the same problems but I found a solution.
camera_fps you need to access the parameter via:
And for the
calibration_parameters you have to access the parameter via:
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