luxonis / depthai-python

DepthAI Python Library
MIT License
362 stars 192 forks source link

error in tof_depth.py code #1025

Closed halakhazer closed 6 months ago

halakhazer commented 6 months ago

hello when i run the tof_depth.py code from the examples i get the following error, it is from the original code i did not make any changes on it: Traceback (most recent call last): File "/home/admin1/Downloads/FoundationPose-main/tof_depth.py", line 51, in pipeline, tofConfig = create_pipeline() File "/home/admin1/Downloads/FoundationPose-main/tof_depth.py", line 28, in create_pipeline tofConfig.enableTemperatureCorrection = False # Not yet supported AttributeError: 'depthai.RawToFConfig' object has no attribute 'enableTemperatureCorrection'

moratom commented 6 months ago

Hi @halakhazer - were you running on latest main/develop and have depthai==2.26.0.0 installed?

I tested with now with the latest release and it seems to be working fine for me.

halakhazer commented 6 months ago

yes that error stopped showing after upgrading to 2.26.0.0, however after running the code i got this result, i am currently using oak-d pro camera. [1944301071F8992E00] [1.9] [28.418] [ToF(0)] [error] Unexpected input image size 1920 x 1080, maybe connected camera is not ToF?

halakhazer commented 6 months ago

i am trying to get the depth map for the camera view, is Tof the right choice?

moratom commented 6 months ago

Depends on what device are you using.

Would you mind sharing more about the device you have? (OAK-D, OAK-D-SR, ...)

Erol444 commented 6 months ago

Hi @halakhazer , oak-d pro does not have ToF sensor. Only OAK-D-SR-POE has ToF sensor integrated. For OAK-D-Pro you should check StereoDepth examples.