ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
353 stars 82 forks source link

How to deal with known vibration on trackers. #40

Open wirelessdreamer opened 6 years ago

wirelessdreamer commented 6 years ago

I'm working on building a controller that will experience known heavy vibration, and want to turn off reading input from the tracker for a fixed amount of time (in ms) so the tracker doesn't jump all over the place. A few months ago when I started looking into Vive Input Utility someone told me that function already existed in this library, but I've been unable to locate it.

Does it exist, and what is its name? Thanks.

dariol commented 6 years ago

I'm assuming you are referencing the low pass filter configuration which unfortunately has been removed for Vive Tracker 2018 (V2).

But you can still find the details in the older documentation on page 27: https://dl.vive.com/Tracker/Guideline/HTC_Vive_Tracker_Developer_Guidelines_v1.5.pdf

This wasn't wrapped by VIU (not sure why you were directed here) but can be implemented using the USB setFeature as described in the documentation above for V1 Vive Trackers.

Please note moving forward this functionality may be removed and the new solution (a hardware solution to dampen vibrations) is available here on page 16: https://dl.vive.com/Tracker/Guideline/HTC_Vive_Tracker_Developer_Guidelines_v1.6.pdf

If this isn't what you are referring to and simply want to freeze the pose, there's no specific API in VIU to do this whenver you call the haptic api (although we could consider this), so you would need to freeze the current pose, perform haptic pulse, and resume obtaining pose in your script.