Kinect / PyKinect2

Wrapper to expose Kinect for Windows v2 API in Python
MIT License
496 stars 236 forks source link

PyKinectBodyGame just shows black screen #44

Closed ChrisErgo closed 6 years ago

ChrisErgo commented 6 years ago

I have a Kinect V2 that works with Processing, but I would like to use it with Python 3 Anaconda 64-bit. I realize that 64-bit is not very well tested, but has anyone gotten it to work?

TheSOMGuy commented 6 years ago

Yepp.

I use a 64 bit version of Anaconda ( 4.3.1 ) on my windows notebook as base for a virtual environment where the pykinect/pyGame example is running with Kinect V2 and Python 3.6.1 ( the one shipped with the Anacondapackage ) . Can you explain what your problem is?

ChrisErgo commented 6 years ago

I started with trying to get PyKinectBodyGame to work. It opens a large black window with the title "Kinect for Windows v2 Body Game", and that's all it does.

"pip install pykinect2" didn't get the latest versions of PyKinectRuntime.py and PyKinectV2.py, leading to a failed assertion for "assert sizeof(tagSTATSTG)..." so I copied those files in manually to get past that.

TheSOMGuy commented 6 years ago

Did you follow the installation instructions on the pyKinect2 github site? As they state on their page

( pyKinect ) Enables writing Kinect applications, games, and experiences using Python

This means that this is just an python interface for the Windows SDK v2. But it doesn't solve the question for the pyKinectRuntime and the pyKinectV2. It's a bit strange, but you have to download them manually from the github repo ( i remember that i does it ).

And by the way, did you install the latest Windows Kinect v2 SDK? It sounds as your Kinect isn't connected properly . If the pyKinectBodyGame example is running ( and the black screen with the correct title bar implicates that ) it's probably the connection to the cam which is broken. Did you try the examples which are shipped with the Windows Kinect SDK?

ChrisErgo commented 6 years ago

The game works now. Thank you for the tips. You made me realize that I had previously installed libusbK drivers (using zadig) to get the Kinect to work with Processing. Uninstalling those and letting the SDK drivers install themselves fixed the problem. That should get me rolling with my own development. Thank you.