Commit graph

463 commits

Author SHA1 Message Date
Atlante45
45921a5c8d Restore split behavior for inputs/displays on quit 2016-08-08 15:39:25 -07:00
howard-stearns
6e7b828203 keep qml text fields up to date with vive virtual keyboard 2016-08-02 10:13:35 -07:00
Anthony J. Thibault
90beb30e8a Filter out bad openvr HMD poses that are below the floor
When interface is launched and steam vr is NOT running, openvr can return bad HMD poses for a few frames.
To workaround this, filter out any hmd poses that are obviously bad, i.e. beneath the floor.
2016-07-19 18:12:20 -07:00
Brad Davis
90299a98fe PR feedback 2016-07-15 12:19:02 -07:00
Brad Davis
091e798267 Make hand pointer lasers 'click' on fully pressing and clicking the vive controller 2016-07-14 10:30:35 -07:00
Brad Davis
88d28120b6 Adding missed file 2016-07-01 15:48:58 -07:00
Brad Hefta-Gaub
39ff03cfb5 reduce log spam in Vive plugins 2016-06-24 10:53:46 -07:00
howard-stearns
581d87d653 feedback re magic numbers and variable name. 2016-06-22 16:40:10 -07:00
howard-stearns
67f76db7e4 Merge branch 'master' of https://github.com/highfidelity/hifi into vive-ui 2016-06-22 15:58:53 -07:00
Howard Stearns
a1844d8c19 Fix plugin include. (How did this build for me locally?) 2016-06-21 17:36:41 -07:00
howard-stearns
baa9139881 Merge branch 'vive-ui' of https://github.com/highfidelity/hifi into vive-ui 2016-06-21 17:02:23 -07:00
Ryan Huffman
70be7b3273 Merge branch 'master' of https://github.com/highfidelity/hifi into feat/user-actions 2016-06-21 16:39:25 -07:00
Ryan Huffman
da71fcb57f Update connected device detection implementation 2016-06-21 16:37:58 -07:00
Brad Davis
f3bad3a63b Don't trigger keyboard on revealing the overlay layer 2016-06-21 16:04:06 -07:00
howard-stearns
8421931c56 Merge branch 'master' of https://github.com/highfidelity/hifi into vive-ui 2016-06-21 14:47:45 -07:00
Ryan Huffman
251e2137d3 Remove old use of connectedDevice 2016-06-21 13:31:10 -07:00
Brad Hefta-Gaub
160a5de271 CR feedback 2016-06-21 12:49:42 -07:00
Brad Hefta-Gaub
c322317878 rework plugins to not depend on PluginContainer unless they want to 2016-06-21 12:07:05 -07:00
howard-stearns
2ac6dc8798 do not tilt virtual keyboard 2016-06-21 09:48:01 -07:00
Bradley Austin Davis
5bc8b53d1b Merge remote-tracking branch 'upstream/master' into vive-ui 2016-06-17 10:56:53 -07:00
Bradley Austin Davis
6ad1008a56 Allow explicit overlay alpha from scripts 2016-06-15 17:24:32 -07:00
Bradley Austin Davis
87dc6649ce Better track keyboard open state, fix text replacement 2016-06-15 15:16:29 -07:00
Bradley Austin Davis
0b0977f362 Support keyboard suppresion, control suppresion while in keyboard mode 2016-06-15 10:48:48 -07:00
Bradley Austin Davis
71bf9384ce Merge remote-tracking branch 'upstream/master' into vive-ui 2016-06-15 10:45:51 -07:00
Atlante45
5560ba9a4c Quit application when SteamVR requests it 2016-06-14 16:29:50 -07:00
Bradley Austin Davis
f3c47acbb2 Fix offset when UI transform is not identity 2016-06-14 09:49:25 -07:00
SamGondelman
df9fd6c7fc reset vive grip buttons to 0 if not pressed 2016-06-13 18:35:39 -07:00
Bradley Austin Davis
6707f889b8 Fixing laser offset, support laser in Oculus 2016-06-13 17:33:18 -07:00
Brad Davis
9640727f51 Hand laser rendering support in HMD plugins. 2016-06-13 13:04:11 -07:00
Brad Davis
472a3540d7 Merge remote-tracking branch 'upstream/master' into vive-ui
Conflicts:
	scripts/system/controllers/handControllerGrab.js
2016-06-10 10:43:09 -07:00
Brad Hefta-Gaub
8434aa9416 Merge pull request #8027 from SamGondelman/exposeHaptics
Expose haptics to JS
2016-06-08 16:17:04 -07:00
Brad Hefta-Gaub
69ae33ad9a Merge pull request #7997 from SamGondelman/touchFixes
Corrected Oculus Touch coordinate system so that hands track properly
2016-06-08 15:39:17 -07:00
Brad Davis
40778d7f29 Allow env disabling of the keyboard. Show keyboard after short delay to avoid flickers 2016-06-08 10:41:19 -07:00
Brad Davis
79c68b2ecb Working on positioning of the keyboard 2016-06-07 21:52:22 -07:00
Brad Davis
c2aa9e7f61 Update SteamVR keyboard behavior 2016-06-07 21:52:21 -07:00
Brad Davis
eab611acc0 Enable Steam VR text input 2016-06-07 21:52:20 -07:00
Brad Davis
ca6e86e767 Merge remote-tracking branch 'upstream/master' into vive-ui
Conflicts:
	interface/resources/qml/hifi/dialogs/RunningScripts.qml
2016-06-07 21:51:47 -07:00
SamGondelman
ff2405437b can set strength to 0 2016-06-07 12:19:38 -07:00
SamGondelman
b59d597780 if overlapping calls, haptics take on strength and duration of call that will finish last 2016-06-06 15:35:12 -07:00
SamGondelman
cea0d74c35 fix spaces and touch duration 2016-06-06 15:20:10 -07:00
SamGondelman
e7743cd8e2 added options for both hands (default), all devices, short pulse, and fixed touch timing mechanism 2016-06-06 15:03:08 -07:00
Atlante45
3dadb515f3 Add plugins name to their metadata file 2016-06-06 13:28:36 -07:00
SamGondelman
afca0ec2c9 moved vive pulses to correct thread, works with duration 2016-06-06 13:25:05 -07:00
SamGondelman
f51cb7ce0c trying to add duration support for vive 2016-06-06 10:34:32 -07:00
Brad Davis
b7d1659852 Merge remote-tracking branch 'upstream/master' into vive-ui 2016-06-06 09:32:33 -07:00
howard-stearns
849bee977a Do not send stale vive data as valid after deactivating.
(cherry picked from commit e6cc1fabe0)
2016-06-04 09:07:51 -07:00
Brad Hefta-Gaub
c2a34f24cb Merge pull request #7999 from howard-stearns/do-not-send-stale-vive-data-as-valid
Do not send stale vive data as valid after deactivating.
2016-06-04 08:41:26 -07:00
SamGondelman
2367cb1995 fixing input mapping for vive/touch grip button/trigger, script needs fixing 2016-06-03 15:07:21 -07:00
SamGondelman
912b35693b added vive single pulse haptics 2016-06-02 18:13:33 -07:00
howard-stearns
e6cc1fabe0 Do not send stale vive data as valid after deactivating. 2016-06-02 12:38:54 -07:00
Howard Stearns
f0133013c2 typo 2016-06-01 07:30:26 -07:00
Howard Stearns
922468ce1c fix cut and paste error with extraneous namespace qualifiers. 2016-05-31 20:47:58 -07:00
howard-stearns
c2858f847b Partition vive trackpad by center, x, and y (not just center v outer). 2016-05-31 16:57:23 -07:00
Brad Davis
ac5912df01 Fix crash on shutdown of SteamVR 2016-05-27 13:40:47 -07:00
howard-stearns
a3f1ece978 Do button mapping in C++ and simplify vive.json accordingly. Vive and
Hydra now use PrimaryThumb and SecondaryThumb. Fix warnings for Neuron.
2016-05-24 16:10:12 -07:00
Brad Davis
73342b2758 PR feedback 2016-05-20 14:50:24 -07:00
Brad Davis
07562f72af Doing a pass over the input plugins and controller code 2016-05-20 14:50:23 -07:00
Brad Hefta-Gaub
d656f61c64 Merge pull request #7759 from jherico/app_plugin_type
Don't expose raw pointer to the display plugin
2016-05-11 14:49:22 -07:00
Anthony J. Thibault
09a4e0eaa8 Fix for vive controllers sometimes not working
* Fixed bug with input devices that where added, removed then re-added.
  The default mappings were being ignored on the second add.
* Fixed potential crash when hardware inputPlugin device poses were polled from the JavaScript thread
  by taking the UserInputManager lock during pluginUpdate.
* Renamed Controller.Hardware.Vive.LB & RB to LeftGrip and RightGrip, to better match Oculus touch.
* Updated resource/controller/vive.json to reflect this new mapping.
* Exposed touch pad capacitive touch events to JavaScript as
  Controller.Hardware.Vive.LSTouch and RSTouch.
* Added viveTouchpadTest.js script to test LSTouch and RSTouch events.
2016-05-10 19:32:08 -07:00
Brad Davis
c54d0bc993 Don't expose raw pointer to the display plugin 2016-05-08 10:35:31 -07:00
Brad Davis
3421c10c1b Fixing vive hand controllers 2016-04-13 10:35:39 -07:00
Brad Davis
1a02220886 Fixing wobble 2016-04-12 17:50:59 -07:00
Brad Davis
73ec40dae6 Making a debug mechanism for force OpenVR 2016-04-12 16:44:16 -07:00
Brad Davis
3325c58ceb Vive timewarp implementation 2016-04-12 16:44:15 -07:00
Brad Davis
df8ad57185 Fix FPS counter 2016-04-11 00:25:16 -07:00
Brad Davis
f569cbf70e Add debugging output, fix timewarp 2016-03-30 10:40:32 -07:00
Zach Pomerantz
931cad34d1 Check plugin activation success 2016-03-28 12:05:58 -07:00
Anthony Thibault
88c4e54cff openvr: predict 3 frames into the future
Becasue I revered the latency fix in the GLEscrow queue.

*sigh*
2016-03-23 17:38:40 -07:00
Anthony J. Thibault
0d37515784 Merge branch 'master' into tony/vive-rendering-work 2016-03-23 15:59:59 -07:00
Anthony Thibault
209524a5c0 openvr: Non-threaded present work
In the unlikely event you hit 90htz in non-threaded present mode, you will have perfect tracking and latency.
This verifies that there are no other sources of tracking or rendering latency, other then the ones we already know about.
2016-03-22 15:38:10 -07:00
Zach Pomerantz
64ced6ee04 Add comment explaining bare glGetError 2016-03-22 12:04:24 -07:00
Anthony Thibault
b1286517c6 Removed frame latency in GLEscrow
This could occur if the GLEscrow queue has extra frames in it.
When new textures were fetched, before this fix, they were simply popped from the queue.
This commit introduces a loop, that will fetch from the queue until it is empty.
2016-03-21 21:51:16 -07:00
Anthony Thibault
225c462685 Improved NSIGHT instrumentation
* Application::idle, physics and avatar processing are tracked
* Application::paintGL frameNumber payload is tracked
* OpenGLDisplayPlugin::present is profiled with corresponding frameNumber payload
* Added color and payload support to Nsight ProfileRange class.
2016-03-21 21:47:59 -07:00
Anthony Thibault
0d046b12de OpenVR: Moved WaitGetPoses after main window preview. 2016-03-21 17:39:10 -07:00
Anthony Thibault
63d6f888e6 Update openvr sdk to 0.9.19 2016-03-21 17:31:13 -07:00
Anthony Thibault
5b2a050df7 display-plugins: Pulled getHeadPose into common base class.
* Moved getHeadPose and _headPoseCache out of each derived class and into HmdDisplayPlugin.
* updated comment in application.
2016-03-20 14:08:35 -07:00
Anthony J. Thibault
960ffd9c9e DisplayPlugins: updateHeadPose() no longer returns a value.
Also, moved updateHeadPose so that the overlay and the main rendering use the same headPose.
Which should also be the same place the latencyMarker for the ovr_GetTrackingState is set.
2016-03-18 15:16:58 -07:00
Anthony J. Thibault
2faaf243a1 Revert change to OpenVrDisplayPlugin::isSupported() 2016-03-18 13:42:31 -07:00
Anthony J. Thibault
d218ca4960 openvr: fix for crash on exit
Before this fix, a script could call into HMD.getHUDLookAtPosition2D() while the app was shutting down, which in turn would call
getHeadPose() on the currently active display plugin.  This call could cause a crash within the openvr plugin, because the SDK was either shutdown, or in the process of shutting down on the main thread.

This fixes this by spliting the previous DisplayPlugin::getHeadPose(int) into two parts:

* updateHeadPose(int) which is only called once a frame and only by the main thread.
* getHeadPose() which is thread-safe and will return a cached copy of the hmd pose sampled by the last updateHeadPose.
2016-03-18 12:26:11 -07:00
Bradley Austin Davis
cde56d6fa2 Disable OpenVR plugin when Oculus HMD is connected 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
b279ff9f7d Fix for crash on disabling and re-enabling openvr 2016-03-17 10:13:52 -07:00
Bradley Austin Davis
7045680bc7 Reduce crashes on switching display plugins 2016-03-17 10:13:52 -07:00
Brad Davis
27033e5bb5 Fix vive crash on deactivate 2016-03-12 21:48:36 -08:00
Chris Collins
ae596d79f1 Merge pull request #7317 from jherico/hmd_worn
Expose a property in display plugins to determine if the device is visible to the user
2016-03-11 11:46:06 -08:00
Philip Rosedale
e87ef52a4c Merge pull request #7302 from hyperlogic/tony/wrong-way-overlay
More reliable and usable UI sphere overlay location
2016-03-10 17:43:50 -08:00
Brad Davis
87c9961aa8 Expose a property in display plugins to determine if the device is visble to the user 2016-03-10 17:19:32 -08:00
Anthony Thibault
153f7fc3aa OpenVR: adjusted translation of UI sphere overlay 2016-03-10 09:45:47 -08:00
Anthony Thibault
42d27557a1 OpenVR: remove 180 y rotation for UI bounds.
Turns out the room I was using was misconfigured.
2016-03-09 18:42:58 -08:00
Anthony Thibault
5df616be37 OpenVR: More usable UI Sphere overlay location
Also, added a debug option to display SensorToWorld matrix in Developer > Avatar menu.
2016-03-09 16:24:08 -08:00
Brad Davis
d428f3b96f Working on crash bugs 2016-03-09 14:00:05 -08:00
Brad Davis
17852e86d2 Fixing enum names 2016-03-08 16:16:44 -08:00
Brad Davis
f651adbd24 Correcting vive button naming 2016-03-08 15:12:54 -08:00
Brad Davis
1312901f06 Removing thumb mappings, using start/back for camera and menu 2016-03-08 15:09:45 -08:00
Brad Davis
28103cf5ef Migrate composition of the overlay and pointer to the present thread 2016-03-07 17:14:41 -08:00
Anthony Thibault
89885805d2 OpenVR: Added hysteresis to the touch pad dead spot
This should make using the Vive touch pad for movement more reliable.
2016-02-26 18:34:33 -08:00
Anthony J. Thibault
01ef5aabcb OpenVR: More reliable detection of left and right hands 2016-02-26 14:38:35 -08:00
Anthony Thibault
3b87cd0ea8 Improve hold action by using controller velocity
The AvatarHoldAction now derives the body velocity by using data from the controller::Pose.  Rather then trying to derive it based on previous positions.  This results in more acurate motion of the held object when the hold is released.

OpenVR input plugin: pass the velocity and angularVelocity directly from the controller pose to the controller::Pose.
2016-02-22 19:15:22 -08:00
Anthony Thibault
942f2c13ab Vive: smoother updates for IK driven by vive controllers
Before this PR the simulation rate was clamped to never exceed 60htz.
This had problems when waving the vive hand controllers in the world,
they would jitter.  The simulation rate is now clamped to never exceed
120 htz.  This has the effect of synchronizing the display and the
update rates to 90htz.

Also there are improvements to vive support if threaded present is
disabled.
2016-02-19 15:58:13 -08:00
Anthony Thibault
93f61fce7a OpenVRDisplayPlugin: predict poses for better tracking
Extrapolate the next set of poses for HMD and hand controllers.
Currently we predict 44ms into the future, this seems too high, however
it was discovered by inspection to be the best value.
Obviously there is a source of latency that we need to track down,
however even with this latency, it is a much improved experience.
2016-02-18 18:00:04 -08:00
Brad Davis
8289c39a2a Removing flicker from OpenVR mirror 2016-02-17 14:48:24 -08:00
Brad Davis
d1583e8cbe Fixing warnings 2016-02-16 17:00:00 -08:00
Brad Davis
d61f4fbb25 PR feedback 2016-02-16 16:44:16 -08:00
Brad Davis
56fc9ea301 Remove distortion on HMD previews, both mono and stereo 2016-02-15 21:46:29 -08:00
Anthony J. Thibault
111ed65bf8 Controller Pose values are relative to Avatar.
Pass a InputCalibrationData to each inputPlugin and inputDevice.
This contains the most up sensorToWorldMatrix, avatarMat and hmdSensorMatrix.
Each input plugin can use this data to transform it's poses into Avatar space
before sending it up the chain.

This fixes a bug in the handControllerGrab.js script that relied on the hand controller
rotation/positions being in the avatar frame.
2016-02-11 17:18:01 -08:00
Anthony J. Thibault
c8e6aee3e7 OpenVr: fix for conflict between openvr and oculus display plugins
* Call vr::VR_Shutdown() when ref-count goes to zero.  The ref-count
  is ncessary because the vr::IVRSystem poitner is shared between the
  the openvr input and display plugins.
* OpenVR plugins options will display in the menu if vr::VR_IsHmdPresent() is true.
  This is faster then initializing all of openvr and less likely to conflict with the
  oculus display plugin.
2016-02-10 16:28:03 -08:00
Anthony J. Thibault
90f0821c2b OpenVR: reduce thread contention, fix sensor reset 2016-02-10 11:14:26 -08:00
Anthony J. Thibault
b9a16cec25 Re-enable OpenVR plugin
* Enabled preview window
* rendering is only mono for some-reason.
2016-02-09 18:49:18 -08:00
Brad Hefta-Gaub
dfba05ae5f CR feedback 2016-01-11 11:07:07 -08:00
Brad Hefta-Gaub
e2a3903def add support for advanced/developer plugins and change diplay modes to match spec 2016-01-08 16:58:25 -08:00
samcake
a50b14dfae Merging with upstream graphics 2015-12-14 18:18:39 -08:00
Howard Stearns
83078b9d8c Merge branch 'master' of https://github.com/highfidelity/hifi into correct-target-frame-rate 2015-12-10 08:44:08 -08:00
Bradley Austin Davis
fd5fb3096f Disabling OpenVR plugin 2015-12-09 17:31:53 -08:00
Brad Davis
978d39b7f4 Moving OpenVR to external plugin and updating to latest version 2015-12-09 16:20:24 -08:00