Hey I am Timo,
I am new to the stereocamera and have only some python experience. I am trying to make a pointcloud of the surface captured by my stereocamera. I used the code provided by stereolabs to create a live point cloud. This code can be found under samples → depth_sensing for python. I have installed all required packages, but the code does not run and gives the below output. I am not very good at python, but how do I fix this issue so that I can retrieve my depth map? Thanks in advance.
PS C:\Users\Timod\Documents\bestanden\TU Delft\zed\Zed python> & C:/Users/Timod/anaconda3/envs/zedpy/python.exe “c:/Users/Timod/Documents/bestanden/TU Delft/zed/Zed python/depth_sensingmap.py”
Running Depth Sensing sample … Press ‘Esc’ to quit
Press ‘s’ to save the point cloud
[Sample] Using default resolution
Traceback (most recent call last):
File “c:\Users\Timod\Documents\bestanden\TU Delft\zed\Zed python\depth_sensingmap.py”, line 121, in
main()
^^^^^^
File “c:\Users\Timod\Documents\bestanden\TU Delft\zed\Zed python\depth_sensingmap.py”, line 90, in main
viewer.init(1, sys.argv, camera_model, res)
File “c:\Users\Timod\Documents\bestanden\TU Delft\zed\Zed python\viewer.py”, line 229, in init
glutInit(_argc, _argv)
File “C:\Users\Timod\anaconda3\envs\zedpy\Lib\site-packages\OpenGL\GLUT\special.py”, line 333, in glutInit
_base_glutInit( ctypes.byref(count), holder )
File “C:\Users\Timod\anaconda3\envs\zedpy\Lib\site-packages\OpenGL\platform\baseplatform.py”, line 423, in call
raise error.NullFunctionError(
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling
Thank you very much for your answer. Unfortunately, I have downloaded the right version of PyOpenGL and I tested this with a friend of mine, but still the same error occurs. How can I check which version I have installed, maybe that way I can double check. If I do have the correct version, is there something else that could be wrong?
Thank you very much,
Timo
Hello,
I checked and the pyopengl version I have is 3.1.7. and the python version that I use is 3.11.8. I am trying to run the SDK sample. The depth_sensing sample I am trying to get working is from the following link: zed-sdk/depth sensing/depth sensing/python at master · stereolabs/zed-sdk · GitHub
I did not modify it or anything. I am only trying to run the unedited file. I have also copied the ogl_viewer file so that is also in the same folder as the code. Hopefully this helps you to understand the problem.
Thank you, hopefully you know what to do next,
Timo
I quickly checked on my side and while I don’t have a definite fix, for some reason it works with Python 3.10 but not Python 3.11.
Can you try with a 3.10 version in your environment?