SteamVR Developer Hardware

SteamVR Developer Hardware

coral Jan 2, 2016 @ 5:33am
Accessing the raw gyro / accelerometer data through OpenVR?
Hello!

Currently you can get the raw difference by running "lighthouse_console.exe /imu /dump" located in the SteamVR tools folder. This gives you a realtime log of the values. However, logging this breaks the tracking and require you to restart your SteamVR project in Unity to get tracking. The output looks like this:

0.565085 563209 gyro -0.04 +0.03 -0.01 accel +1.10 -9.81 +0.73 0.566085 611217 gyro -0.03 +0.03 -0.01 accel +1.14 -9.74 +0.69 0.567085 659224 gyro -0.03 +0.03 -0.02 accel +1.18 -9.74 +0.70 0.568085 707231 gyro -0.03 +0.03 -0.02 accel +1.20 -9.71 +0.65 0.569085 755239 gyro -0.03 +0.02 -0.02 accel +1.22 -9.77 +0.74 0.570086 803246 gyro -0.03 +0.03 -0.02 accel +1.17 -9.79 +0.69 0.571086 851253 gyro -0.03 +0.03 -0.02 accel +1.15 -9.78 +0.66

Is there any way to in Unity or externally access this data while tracking is running? The other solution would be to strap on a small gyro connected to an Atmega and plug into the USB hub but it seems very unnecessary when the headset contains one of them already.
Last edited by coral; Jan 2, 2016 @ 5:39am
< >
Showing 1-14 of 14 comments
J Bot  [developer] Jan 2, 2016 @ 9:52am 
Can you share more about your use case?

It's already possible to derive a similar data stream from the OpenVR poses using the the public API. I.e., we could emulate a 'virtual imu' atop the normal tracking.

Also note that the returned poses in OpenVR include both linear and angular velocity terms, if that's what you're interested in.
Last edited by J Bot; Jan 2, 2016 @ 9:58am
coral Jan 4, 2016 @ 5:51am 
Originally posted by Jeremy:
Can you share more about your use case?

It's already possible to derive a similar data stream from the OpenVR poses using the the public API. I.e., we could emulate a 'virtual imu' atop the normal tracking.

Also note that the returned poses in OpenVR include both linear and angular velocity terms, if that's what you're interested in.

I can send you a demo over mail to show you what we're working on and explain the use case and the issue.

But in short, the headset assumes that the head is always moving, which our application might not be for this.
76561198238357344 Feb 11, 2016 @ 1:21pm 
I know this is an old thread but I'd like to add that this is something I'd be interested in as well. Ideally I'd be able to get this data even if Lighthouse trackers are not being used (though obviously at the moment the screen won't even be on in this case.. separate issue).
Sippolo Apr 25, 2016 @ 4:50am 
I am interested in this too, I need accelerometer values for a custom locomotion algorithm I already implemented for mobile HMDs (from smartphone accelerometers), is there any news about this?
Last edited by Sippolo; Apr 25, 2016 @ 4:51am
Swarmer Apr 29, 2016 @ 7:42am 
You could start looking here to get the velocity and acceleration of the pose of the HMD/Controllers:
http://steamcommunity.com/app/358720/discussions/0/361787186419244897/
Sippolo Apr 29, 2016 @ 10:35am 
In fact I solved by using the pose velocity vector instead, thanks!
spectralcodec Sep 22, 2016 @ 10:17am 
Is it possible to get positional information for the controllers with lighthouse_console.exe? I tried running it with the /dump /sample options and it appears to only output data for 32 different samples which I assume correspond to the 32 HMD sensors.
wMaN Jul 28, 2017 @ 2:04am 
Hello, I was wondering whether there's any update to this question for more than a year. My team is developing a gesture plugin for vive and we're currently converting using poses and transform like Jeremy mentioned. However, we'd really like to have access to raw gyro value instead of extra layer of conversion from poses.

Thank you.
krazcanuck Jan 5, 2018 @ 10:17am 
Does anybody have any C++/OpenVR code that allows you to capture the gyro/accelerometer values from a device (HMD). NOT the pose data, but the raw gyro/accelerometer data.

Does anyone have the source code for lighthouse_console.exe? Is there another online source that shows how to get the gyro/accelerometer data without using the "pose" methods?

I am trying to handle when a headset gets occluded from the lighthouses for a short period. All the pose methods return the identity matrix when it gets TrackingResult_Calibrating_OutOfRange and sets FALSE==bPoseIsValid. Basically what I want to do is update our local pose information with the updated gyro values when the device has no direct line of sight to any lighthouses.

Before you say: "Don't do that, why don't you just...". Don't bother. I understand the implications of what I am trying to do. This will only ever be done in a sitting context and will only be used for short periods of time (for those with safety concerns).

I know this data is available somehow, the lighthouse_console.exe example shown here does indeed dump correct values even when there is no lghthouses to pull from. This means there is a disconnect between the pose methods and whatever is going on within lighthouse_console.exe.
krazcanuck Jan 5, 2018 @ 10:55am 
@peroht That code only works if TRUE==bPoseIsValid, otherwise the velocity/acceleration values returned are garbage.
Swarmer Jan 15, 2018 @ 11:40pm 
Originally posted by krazcanuck:
@peroht That code only works if TRUE==bPoseIsValid, otherwise the velocity/acceleration values returned are garbage.
Thanks for the information. I hope you find the answer somehow.
Scruffy Mar 8, 2018 @ 5:06pm 
@krazcanuck any more luck with getting the data or source code? I'm looking for the raw data too but for research into alternative position tracking techniques.
MuteAll Jun 22, 2018 @ 11:20am 
Originally posted by Scruffy:
@krazcanuck any more luck with getting the data or source code? I'm looking for the raw data too but for research into alternative position tracking techniques.
@Scruffy
@krazcanuck

I am also kinda running into the same issue with Unity and Vive. I want to get the position/velocity data from HMD/Controller. I followed the online tutorial and implement some sample C# codes in Unity using SteamVR library (SteamVR_Controller.Device). Basically, I am getting the sensing data every time Update() function is called in MonoBehaviour. However, one thing I notice is that the sampling rate of this method is pretty low. Update() function gets called roughly every 40ms (25Hz) and the HMD/Controller data is recorded every 50ms (20Hz).

I'm not sure if it's the correct way to collect the data from Vive components since the sampling rate I need would be much higher (100Hz). Any suggestion? Thanks in advance!
Scruffy Jun 22, 2018 @ 9:07pm 
Originally posted by 阿尔奎特:
Originally posted by Scruffy:
@krazcanuck any more luck with getting the data or source code? I'm looking for the raw data too but for research into alternative position tracking techniques.
@Scruffy
@krazcanuck

I am also kinda running into the same issue with Unity and Vive. I want to get the position/velocity data from HMD/Controller. I followed the online tutorial and implement some sample C# codes in Unity using SteamVR library (SteamVR_Controller.Device). Basically, I am getting the sensing data every time Update() function is called in MonoBehaviour. However, one thing I notice is that the sampling rate of this method is pretty low. Update() function gets called roughly every 40ms (25Hz) and the HMD/Controller data is recorded every 50ms (20Hz).

I'm not sure if it's the correct way to collect the data from Vive components since the sampling rate I need would be much higher (100Hz). Any suggestion? Thanks in advance!

I had a quick and dirty look at osvr for unity and it seems you can access the data directly (position and rotation) by getting reference to a PoseAdaptor object which is kept up to date by osvr itself. Update looks to be called whenever the engine wants and grabs the current data from a PoseAdaptor then. Not sure if that will get you to 100Hz but alteast will let you to get updates async from the engine.

Here would be my starting point:
https://github.com/OSVR/OSVR-Unity/blob/master/OSVR-Unity/Assets/OSVRUnity/src/PoseInterface.cs
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Jan 2, 2016 @ 5:33am
Posts: 14