-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Update] Support Tundra Tracker quirks #9
Conversation
8b823b8
to
955eb35
Compare
I've been thinking on how to emulate the Vive Tracker behavior until there is time to revisit the What does a Vive Tracker do if you call
The exact durations don't matter; pick numbers that work with Vive Trackers and are easy enough to measure. |
Thanks to preparing Windows as a plan B if Proton fails with Furality (it at least seemed to work in March), I can confirm this appears to work on Windows, too. Still need to determine if the Interestingly, SteamVR's own tracker |
Good news - |
622475d
to
e42c6ba
Compare
Note to self: I may want to try modifying this so instead of clipping any vibration intensity above 100%, it extends the pulse beyond a single loop iteration by using the That way, quick pokes should trigger the Velocity method to make a longer-than-4ms pulse that has a chance of being felt. |
e42c6ba
to
1a6749f
Compare
Soo… PySimpleGUI v4 is no longer on PyPy, making the GitHub action fail. PySimpleGUI v5 is a drop-in upgrade but it's also now a commercial product with a free hobbyist license key option. Everyone who uses it (every end user, not just developers!) has to register their own license key and that key expires after 1 year. You can still use PySimpleGUI v4 if you have a local copy, but this breaks the automated builds here (necessary for me to make Windows versions) and threatens the ability to build the current Haptic Pancake software. |
Might be migrating to FreeSimpleGUI: |
1a6749f
to
06b8f58
Compare
EDIT: The above was merged! |
Set range of intensity spinboxes to 0-100 via range(0, 101). Python treats range(0, 5) as [0, 1, 2, 3, 4], verifiable with... > [num for num in range(0, 5)] This fixes the maximum strength being limited to 99%.
Support the Tundra Tracker (Haptic Tundrakes?) via… 1. Microseconds instead of milliseconds for "triggerHapticPulse()" Scale up from milliseconds via a time-based multiplier for the legacy, deprecated "triggerHapticPulse()" method. Set Tundra Trackers back to a multiplier of 1.0 elsewhere, matching the behavior of Vive Trackers. This could be replaced with support for the IVRInput system instead of using the deprecated triggerHapticPulse() function. 2. Limit pulse length to 4000 µs / 4 ms Tundra Trackers have a limit of around 4000 µs (4 ms) per pulse, so the update loop must run more frequently to stay within that maximum duration for a single pulse. Queue a time-based forced pulse and warn once if attempting to send a haptic pulse exceeding the max pulse length for the tracker (if set). Usually this shouldn't happen - strength values of up to 100% would result in pulses scaled up to the pulse limit. However, there are two notable cases: A. "Identify" button triggers a 500 ms pulse B. Velocity calculation can result in a strength that exceeds 1.0 This should (hopefully) match the Vive Tracker behavior. NOTE: Velocity calculation currently appears to do almost nothing with Tundra Trackers unless the multiplier is set to around 50, which then breaks normal Proximity and Identify-button haptics pulses. Tested setup: * 4x pancake vibration motors Thinner than LRAs shipped with Tundra IO Boards, fits in stock base * 4x Tundra Trackers Left/right foot, waist, chest * Default multiplier, default strengths Also tested Velocity strength set to 60% - 100% * Proximity and Velocity set to "Linear" pattern "Throb" works too, but feels a bit weak
06b8f58
to
8f5b5ba
Compare
UPDATE - merged!
Find downloads from
main
branch here.Testing instructions updated below to now point to the
main
Haptic Pancake branch.In short
Identify
button)Details
Ideally, we'd use the
IVRInput
API which appears to be handled correctly by Tundra Trackers, allowing for triggering haptics that last multiple seconds.However, that API is… complex. Lighthouse Console allows you to trigger it exactly like
triggerHapticPulse()
, which is great. But the SteamVR API wants you to make a bunch of rebindable haptics outputs.I've documented this here: Migrate to IVRInput's haptic Actions and/or consider OpenXR?
In the meantime, this pull request hacks around Tundra Trackers/etc using microseconds instead of milliseconds for the legacy
triggerHapticPulse()
command.On microseconds vs milliseconds…
Incidentally, going by the
lighthouse_console
help, Vive Trackers are the odd one out:The help describes "haptic pulse" (presumably
triggerHapticPulse()
) as being specified in microseconds, whereas "haptics" (presumablyIVRInput
) operates in milliseconds.This could be adjusted so microseconds are the default, and Vive Trackers are the exception..?
Testing
There are builds for Linux and Windows here:
https://github.com/Z4urce/VRC-Haptic-Pancake/actions?query=branch%3Amain+is%3Asuccess
Click the topmost result, then get the downloads below, e.g.
hapticpancake_windows_v0.5.2-15-g456a1ab
.If you can't click that text in the Artifacts section, you're not signed into GitHub (if necessary I can look into setting up nightly.link for the project - example of
main
branch - not this one! - here).On Linux, I've been setting the pattern to
Linear
, but that might also not work for you.