PyOpenVR external python module framedrop

Hello!

I’m trying to use PyOpenVR python module and Triad_OpenVR wrapper in touchdesigner to extend functionality of OpenVR chop (connect more than 6 trackers, send signal to tracker’s digital output, get battery status).

I’ve tryed to use Script CHOP and Execute DAT (frame start or frame end) to to get tracker position, but i get huge frame drop, from 60 to around 6 FPS. Same time it doesn’t looks like it because of performence issue (CPU is about 15% load, and lot of RAM available). My guess it happens because script imports module each frame…

Could someone advise right way to get continiuous data stream with trackers position from external library?


The module shouldn’t be getting imported every frame, so I think that’s ok.
However likely a part of the slowdown is calling triad_openvr.triad_openvr() every frame. Which is probably doing some shutdown/startup.
Also print() is pretty expensive also so that’ll show some slowdowns.
Are there other limitations than what you’ve listed that you are trying to get access to?

We have increased the number of allowed devices (ie. controllers or trackers) in the OpenVR CHOP from 6 to 16. This will be in the next Official build.

Thank you Malcom, you where right about triad_openvr.triad_openvr() this function was caused framedrop.

Thank you, Erick for such quick respond, waiting for next build!

:smiley: