WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Check for running SteamVR (https://forum.worldviz.com/showthread.php?t=6100)

A Wundlechner 01-09-2018 09:27 AM

Check for running SteamVR
 
Hello everyone,

for my program I want to use 2 different controlling scemes. One should be controlled with a gamepad and the other one is for steamvr. I want the following behaviour:

If steamvr is already running, I want to use the steamvr controlles.
If it's not running, I want to use the gamepad.

For those 2 cases I've already created 2 configfiles with vizconnect and I changed my specific code parts within the scripts. I only need to know if steamvr is already open.

I haven't found a helpfull command within the steamvr library, to check if steamvr is running. If I run the steamvr.HMD() command when steamvr is closed, it just opens steamvr.

Thanks in advance,

Andreas Wundlechner

Jeff 01-10-2018 09:02 PM

Rather than checking if SteamVR is running, would it work for you to check if the controllers are connected or not in there? If so, take a look at the initInputs section of a Vive config file. That checks for whether the controllers are connected.

A Wundlechner 01-11-2018 01:03 AM

Thank you for your reply.

it also opens steamvr when I check for controllers by this command: steamvr.getControllerList()[index]

But it doesn't matter for me anymore, beause in the meantime I already found a solution for my problem. I installed the psutil library. I search with it for the running process "vrmonitor.exe". If I find the process, then steamvr is running.


All times are GMT -7. The time now is 01:47 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC