-
Notifications
You must be signed in to change notification settings - Fork 1
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
Investigate and potentially improve timing stability of vibrations #13
Comments
As a first attempt to get some measurements of the accuracy of the haptic vibrations, I set up my Samsung S7 on a table with it tilted up slightly by being propped on a scaled ruler, and butting up against some clamps, with a microphone to record the vibration. It looked like this: I recorded the sounds produced by the various interactions that produce vibrations, then looked at the recordings in Audacity (a free sound-editing app). Below is a 1.5-second sample of the vibration produced when dragging a vertex (i.e. a corner) in the quadrilateral sim, which is currently coded to produce a pattern of 75ms on and 75ms off. Note that there is a "missing beat" at around 14.45 seconds, which is probably what makes it feel a bit unsteady. By the way, it is a stereo recording, which is why two channels are shown. There were a number of such unsteady sections in the recording. Here are 20 seconds of the 75-ms-on-75-ms-off pattern, and it shows a number of small gaps. This is at a different time scale than the first recording shown above. Next is a screenshot that shows the resulting sound from dragging a side, which is 200ms on and 200ms off. This is 1.5 seconds long. This pattern is more steady than the first, but also shows that it takes a while (on the order of 50 to 100 ms) for the motor to ramp up, and about the same amount of time to damp out. Also, in the 200-ms-on-200-ms-off pattern, there is a bit of a dip in amplitude in each pulse for some as yet unknown reason. I am not personally sensing this in the haptic vibration, but it shows up in the audio recording. I thought it would be useful to see how long it takes for the motor to ramp up for a long pulse, so I used the Haptics Playground app to produce a 1 second pulse. Below is what that sounded/looked like. Note that it takes on the order of 400 ms to really get fully stable, and even then it tapers a bit before reaching what appears to be a full steady state. My next step will be to change the code to see if I can make the faster pattern steadier. However, after looking at this data, I'm concerned that we may be running into the physical limitations of the vibration hardware for this particular device, so we might not be able to make it much better. |
Based on the Q3 planning, work on haptics for the Quadrilateral sim is being de-prioritized for a while. I'm going to defer this issue for now. |
While doing some prototyping of haptic vibration for phetsims/quadrilateral#104, I felt like the vibration wasn't very steady in some cases when dragging elements of the sim. I suspect that this is because the vibrations are currently timed by stepping the
vibrationManager
, so if the animation frames aren't keeping up, the vibrations will be unsteady. One of the designers on the project reported the same experience.We should first figure out a way to make some measurements so we can determine if the problem really exists and isn't some perceptual thing, and then can also test and measure solutions to quantify if we've really improved things.
The text was updated successfully, but these errors were encountered: