omnifinity / openvr-tracking-example Goto Github PK
View Code? Open in Web Editor NEWC++ example on how to connect to OpenVR as a background process and acquire tracking data and controller states.
License: BSD 3-Clause "New" or "Revised" License
C++ example on how to connect to OpenVR as a background process and acquire tracking data and controller states.
License: BSD 3-Clause "New" or "Revised" License
Getting following error:
unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? HTC Lighthouse Tracking Example d:\openvr-tracking-example-master\openvr-tracking-example-master\htc lighthouse tracking example\lighthousetracking.cpp 445
Thanks for your helpful contribution!
We're writing some of the output to a file, in order to analyze it later. By doing so, it looks like the sampling frequency is around 10Hz. Are we right? If so, is it possible to increase this easily?
I'm only starting to work with OpenVR/C++ - so bear with me if this is an uninformed question.
Thanks a bunch!
Hi! I'd like to use your code but there currently isn't any form of licensing. Is there any chance you would consider a permissible license like MIT?
What do I need to do?
Is it possible to get the touch-pad touch location, or any data of where the touchpad is pressed?
I am getting error LNK2019 when trying to compile, here are the steps I have taken:
Code uses deprecated methods that are to be removed in the future. Please fix.
Hello, thank you very much for sharing this project.
After following all steps I get an error message: Error: 3.
This error seems to correspond to VRInputError_InvalidHandle = 3
, defined in openvr.h.
The handle you pass in line 723 of LighthouseTracking.cpp is vr::k_ullnvalidInputValueHandle
:
0723: inputError = vr::VRInput()->GetPoseActionDataForNextFrame(m_actionDemoHandLeft, vr::TrackingUniverseStanding, &poseData, sizeof(poseData), vr::k_ulInvalidInputValueHandle);
To fix this problem I am tempted to pass a valid handle. However, I suspect your code is all right.
Do you have a guess what I am doing wrong?
You find the command shell output below.
C:\1_Projekte\61_SteamVR\2_OpenVR_Example\OpenVR-Tracking-Example-master\Debug>"HTC Lighthouse Tracking Example.exe" --calccontrollerdeltapos 1
vive_debugger v1.5 by Omnifinity in 2020
Using openvr 1.9.16
Showing data for all devices
Successfully initialized VR Compositor
Successfully set manifest path: C:/1_Projekte/61_SteamVR/2_OpenVR_Example/OpenVR - Tracking - Example - master/Release/win32/vive_debugger_actions.json
Successfully got /actions/demo action set handle: 297
Successfully got /actions/demo/in/Hand_Left handle: 298
Successfully got /actions/demo/in/Hand_Right handle: 299
Successfully got /actions/demo/in/AnalogInput handle: 300
Successfully got /actions/demo/in/HideCubes handle: 301
Successfully got /actions/demo/in/TouchAction handle: 302
Successfully got /actions/demo/in/ClickAction handle: 303
Successfully got /user/hand/left input handle: 9
Successfully got /user/hand/right input handle: 10
Device list:
Device 0: Class: [HMD] HTC - VIVE_Pro MV [LHR-FAD0DC88] can power off: 0
Device 1: Class: [TrackingReference] Valve Corporation - Valve SR [LHB-2B0740F3] can power off: 0
Device 2: Class: [TrackingReference] Valve Corporation - Valve SR [LHB-2085BA6B] can power off: 0
End of device list
Press 'q' to quit. Starting capture of tracking data...
/actions/demo | UpdateActionState(): Ok
/actions/demo/in/AnalogInput | GetAnalogActionData() Not Ok. Error: 3
/actions/demo/in/HideCubes | GetDigitalActionData() Not Ok. Error: 3
/actions/demo/in/TouchAction | GetDigitalActionData() Not Ok. Error: 3
/actions/demo/in/ClickAction | GetDigitalActionData() Not Ok. Error: 3
/actions/demo/in/Hand_Left | GetPoseActionData() Call Not Ok. Error: 3
(lx, ly, lz) = (0.000, 0.000, 0.000) | (rx, ry, rz) = (0.000, 0.000, 0.000) | (dX, dY, dZ) = (0.000, 0.000, 0.000)
C:\1_Projekte\61_SteamVR\2_OpenVR_Example\OpenVR-Tracking-Example-master\Binary\Release_openvr1.9.16\Release\win32>vive_debugger.exe
vive_debugger v1.5 by Omnifinity in 2020
Using openvr 1.9.16
Showing data for all devices
Successfully initialized VR Compositor
Successfully set manifest path: C:/Users/pt/Documents/Visual Studio 2013/Projects/HTC Lighthouse Tracking Example/Release/win32/vive_debugger_actions.json
Successfully got /actions/demo action set handle: 472
Successfully got /actions/demo/in/Hand_Left handle: 473
Successfully got /actions/demo/in/Hand_Right handle: 474
Successfully got /actions/demo/in/AnalogInput handle: 475
Successfully got /actions/demo/in/HideCubes handle: 476
Successfully got /user/hand/left input handle: 9
Successfully got /user/hand/right input handle: 10
Device list:
Device 0: Class: [HMD] HTC - VIVE_Pro MV [LHR-FAD0DC88] can power off: 0
Device 1: Class: [Controller] HTC - VIVE Controller Pro MV [LHR-889DEB56] can power off: 1
Device 2: Class: [TrackingReference] Valve Corporation - Valve SR [LHB-2085BA6B] can power off: 0
Device 3: Class: [TrackingReference] Valve Corporation - Valve SR [LHB-2B0740F3] can power off: 0
Device 4: Class: [Controller] HTC - VIVE Controller Pro MV [LHR-E8B85D51] can power off: 1
End of device list
Press 'q' to quit. Starting capture of tracking data...
/actions/demo | UpdateActionState(): Ok
/actions/demo/in/AnalogInput | GetAnalogActionData() Not Ok. Error: 3
/actions/demo/in/HideCubes | GetDigitalActionData() Not Ok. Error: 3
/actions/demo/in/Hand_Left | GetPoseActionData() Call Not Ok. Error: 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.