Still some problems with vrOpenVR.vrOpenVRController

marc.winter2
Advocate

Still some problems with vrOpenVR.vrOpenVRController

marc.winter2
Advocate
Advocate

Hi,

i had some problems with vrOpenVRController in older VredVersions but with VredPro 2020.3 it has changed. There is now no teleport function in vr any more after executing following script which creates the controller and connects to moved-Signal. HTC-VivePro with viveControllers

 

from functools import partial
 
def controllerMoved(_name, _ctrl):
    tempMatrix = _ctrl.getWorldMatrix()
    if tempMatrix != [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]:
        print _name + ' ' + str(_ctrl)
 
tempcontrollers = dict()
tempcontrollerNames = ['GenericTracker0', 'GenericTracker1', 'GenericTracker2', 'GenericTracker3', 'GenericTracker4', 'GenericTracker5', 'GenericTracker6', 'GenericTracker7']
for tempControllerName in tempcontrollerNames:
    tempController = vrOpenVR.vrOpenVRController(tempControllerName)
    tempcontrollers[tempControllerName] = tempController
    tempController.connectSignal('controllerMoved', partial(controllerMoved, tempControllerName, tempController))

 


Something wrong with the script?

Best regards,

Marc

 

0 Likes
Reply
Accepted solutions (1)
603 Views
2 Replies
Replies (2)

Christian_Garimberti
Advisor
Advisor
Accepted solution

Hi,

If you want to use old and new api and functionalities, you have to activate the new service at the end of your script, or at least after the old api's like vrOpenVR.vrOpenVRController.

 

vrImmersiveInteractionService.setDefaultInteractionsActive(True)

If you use old api Vred disable new features, so you have to enable it.

 

Could you try?

 

Best

Chris

Christian Garimberti
Technical Manager and Visualization Enthusiast
Qs Informatica S.r.l. | Qs Infor S.r.l. | My Website
Facebook | Instagram | Youtube | LinkedIn

EESignature

marc.winter2
Advocate
Advocate

Hi Chris,

 

finally i found the time to touch this again.

I have switched to the new api. Which solved the problems.

Now i have new problems and much more possibilities.  😄

I will take a deeper look.

 

Thanks you.

Best regards Marc