SteamVR Developer Hardware

SteamVR Developer Hardware

Swarmer Apr 14, 2016 @ 4:43am
Access tracking data irrespective of application/game (solved)
Hi,
my first post here - please be gentle =)

I wonder if it is possible / how i would go about accessing the tracking data from the system from an external software (which I write) when SteamVR is running? I'd like to access this data irrespective of game at all times.

Will I go about writing a Driver maybe? Now I'll go and RTFM more heavily... :)

Edited:
Here is the direct link to the project (Visual Studio 2013):
https://github.com/Omnifinity/OpenVR-Tracking-Example

Cheers,
Peter
Last edited by Swarmer; Dec 23, 2016 @ 3:24am
< >
Showing 1-15 of 25 comments
Programmer Joe  [developer] Apr 14, 2016 @ 2:52pm 
This is easy:
  1. Call vr::VR_Init() with an application type other than "scene". You probably want Background so your app won't actually start up the system.
  2. Call vr::VRSystem()->GetDeviceToAbsoluteTrackingPose() in a loop.
  3. Also call vr::VRSystem()->PollNextEvent() in that loop and exit when you get VREvent_Quit

What are you doing with the tracking data once you get it?
Swarmer Apr 14, 2016 @ 11:02pm 
Joe,
thanks for the reply. That is good news.

In general I am analyzing and predicting the movement of the user over time to use that for calculating 1) counter-movement of the Omnideck and 2) adding a velocity/position offset to the user character in the simulation/game.

So in this case I am prototyping the feasibility of using your tracking system to acts as an alternative for users who a) cannot buy 10-15 times more expensive motion tracking system and b) who want to reap the benefits of the readiness and intuitiveness of Steam VR (and the distribution platform) and c) to use in our business cases.

In point 2) we use some custom code for adding locomotion but it would be nice to get a more simpler integration with Steam VR that by default works with "any game" allowing unlimited physical movement in a limited space. Feel free to contact me if this is of interest.
Swarmer Apr 15, 2016 @ 7:34am 
Joe,
this works like a charm for the HMD. Will see how it works for the controllers.
Last edited by Swarmer; Apr 15, 2016 @ 8:14am
Swarmer Apr 25, 2016 @ 4:49am 
Had a week without having time to code but now getting the data from the controllers work well also. Thanks Joe.
stellarhopper Jul 14, 2016 @ 11:44pm 
@peroht Any chance you got this working? I'm looking to do the exact same thing as an experiment, but I have no experience with the library..
If you have a code snippet to share, I'd be eternally grateful :)
Swarmer Jul 15, 2016 @ 12:28pm 
I'll see if I can put a simplified and cleaned up version on github over the coming days.

Updated: See three posts below for the example.
Last edited by Swarmer; Sep 5, 2016 @ 1:28am
stellarhopper Jul 15, 2016 @ 7:55pm 
Awesome, I'll keep an eye out, thanks!
zoinks Jul 18, 2016 @ 2:08pm 
Did you just do this with a busy waiting while() loop or something? I'm trying to do something similar but I still want to use scene mode and vsync... Just adjusting the prediction interval.
Swarmer Sep 5, 2016 @ 1:16am 
Originally posted by stellarhopper:
Awesome, I'll keep an eye out, thanks!

Hi,
I got totally busy but in the link below you will find a Windows / Visual Studio 2013 example on how to access tracking data.

It also includes a binary.

How to use:
When you press either button on either controller the position and rotation of the left hand controller will be output to the console window. Have fun.


https://github.com/Omnifinity/OpenVR-Tracking-Example

//Peter
Last edited by Swarmer; Sep 5, 2016 @ 1:27am
Guy Ledouche Sep 7, 2016 @ 2:13pm 
Originally posted by peroht:
Originally posted by stellarhopper:
Awesome, I'll keep an eye out, thanks!

Hi,
I got totally busy but in the link below you will find a Windows / Visual Studio 2013 example on how to access tracking data.

It also includes a binary.

How to use:
When you press either button on either controller the position and rotation of the left hand controller will be output to the console window. Have fun.


https://github.com/Omnifinity/OpenVR-Tracking-Example

//Peter

Thanks Peter, this example is exactly what I have been looking for!

The packaged binaries work without any modification on my end, and I'm getting the left hand controller coordinates.

However, I am having a hard time getting the source code configured in Visual Studio 2015. Upon opening "HTC Lighthouse Tracking Example.sln" it trys to to load the Visual Studio Project File file called "HTC Lighthouse Tracking Example.vcxproj", and can't find it.

The output window:
C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj : error : Project "C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj" could not be found.

Any thoughts on this? I just started using Visual Studio, so I'm not too familiar with it.

Thanks,
Derek

Swarmer Sep 8, 2016 @ 12:59am 
Originally posted by derekshowers:

-- cut --

Any thoughts on this? I just started using Visual Studio, so I'm not too familiar with it.

Thanks,
Derek


Hi,
i've added that file now, it was excluded in my gitignore file. Clone the repository again and tell me how it goes.

I apologise for the inconvenience I caused.
/p
Last edited by Swarmer; Sep 8, 2016 @ 6:27am
BOLL Sep 8, 2016 @ 10:45am 
I'm trying to do just this for an Arduino project now, but I just recently started using Visual Studio and C#. I've managed to initiate OpenVR, loading the openvr_api.dll and openvr_api.cs, but I have issues instantiating CVRSystem so I can run GetDeviceToAbsoluteTrackingPose(), not quite sure what to input as parameters. Anyone know of a C# example? :o

Edit: I was linked to this[github.com] via Slack, it got me going :) Still working on it!
Last edited by BOLL; Sep 8, 2016 @ 1:19pm
Swarmer Sep 23, 2016 @ 12:10pm 
Hi,
sorry but that is something i cannot put focus on right now.

Hope you manage it on your own,
Peter
Swarmer Sep 23, 2016 @ 12:11pm 
Originally posted by derekshowers:
Originally posted by peroht:

Hi,
I got totally busy but in the link below you will find a Windows / Visual Studio 2013 example on how to access tracking data.

It also includes a binary.

How to use:
When you press either button on either controller the position and rotation of the left hand controller will be output to the console window. Have fun.


https://github.com/Omnifinity/OpenVR-Tracking-Example

//Peter

Thanks Peter, this example is exactly what I have been looking for!

The packaged binaries work without any modification on my end, and I'm getting the left hand controller coordinates.

However, I am having a hard time getting the source code configured in Visual Studio 2015. Upon opening "HTC Lighthouse Tracking Example.sln" it trys to to load the Visual Studio Project File file called "HTC Lighthouse Tracking Example.vcxproj", and can't find it.

The output window:
C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj : error : Project "C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj" could not be found.

Any thoughts on this? I just started using Visual Studio, so I'm not too familiar with it.

Thanks,
Derek

Derek,
any luck?
Guy Ledouche Oct 5, 2016 @ 10:49am 
Originally posted by peroht:
Originally posted by derekshowers:

Thanks Peter, this example is exactly what I have been looking for!

The packaged binaries work without any modification on my end, and I'm getting the left hand controller coordinates.

However, I am having a hard time getting the source code configured in Visual Studio 2015. Upon opening "HTC Lighthouse Tracking Example.sln" it trys to to load the Visual Studio Project File file called "HTC Lighthouse Tracking Example.vcxproj", and can't find it.

The output window:
C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj : error : Project "C:\Users\Derek\Downloads\OpenVR-Tracking-Example-master\OpenVR-Tracking-Example-master\HTC Lighthouse Tracking Example\HTC Lighthouse Tracking Example.vcxproj" could not be found.

Any thoughts on this? I just started using Visual Studio, so I'm not too familiar with it.

Thanks,
Derek

Derek,
any luck?

Got it to work after getting some help and explanation on the library imports!

Thanks for the help! I'm getting a good understanding of how the API is organized, how all the functions work, and how all the bits and pieces come together.

Cheers,
Derek
< >
Showing 1-15 of 25 comments
Per page: 1530 50

Date Posted: Apr 14, 2016 @ 4:43am
Posts: 25