oliverlee / phobos

TU Delft bike lab embedded systems projects
http://spaaaccccce.com/Space_space_space_Going_Going_there_Okay_I_love_you_space_Yeah_yeah_yeah_okay_okay_Atmosphere_Black_holes_Astronauts_Nebulas_Jupiter_The_Big_Dipper_Im_proud_of_you_son_Space_space_wanna_go_to_space
BSD 2-Clause "Simplified" License
1 stars 5 forks source link

Determine latency for visuals #187

Closed oliverlee closed 7 years ago

oliverlee commented 7 years ago

We need at least a rough estimate on how long it takes Unity to draw the environment to screen (monitor or headset) as well as a latency for the sensor data to propagate to Unity/screen.

mickvangelderen commented 7 years ago

@oliverlee is this still relevant?

oliverlee commented 7 years ago

Yes.

Time for motion to be sampled, fed into Kalman filter + dynamics simulation, and a completed transmission from microcontroller to desktop should be < 1 ms from previous testing with a blocking usbTransmit() call in the simulation loop. Here we don't explicitly take into account the 'sampling time' of the encoder as we are using a timer in encoder mode, and pose messages aren't sent at 1 kHz, but I think a 1 ms upper bound for all the microcontroller stuff is reasonable.

Now we need to estimate the time from being read in Unity to photon output. This should be less than 13 ms as we consistently display 75 FPS, otherwise we would be dropping frames.

Looks like there are some tools to use to test out motion-to-photon latency: https://www.reddit.com/r/oculus/comments/43p3a6/does_anybody_know_the_motiontophoton_latency_of/ https://forums.oculus.com/developer/discussion/43597/whats-your-motion-to-photon-latency https://www.reddit.com/r/oculus/comments/55avya/high_motiontophoton_latency_how_to_find_the_cause/

oliverlee commented 7 years ago

Also it looks like we should just buy CV1 to reach 90 FPS.

oliverlee commented 7 years ago

Using the following commits: 1ac3acf154fb4a79309a687d3840f06c67babf7b https://gitlab.com/bikelab/phobos-visualizer/commit/4c315acc6d99940e6e612ee1f0f77ca1739562b8

I observe an app motion-to-photon latency of ~ 23 ms. Log file here: https://docs.google.com/spreadsheets/d/1be0ZcxpZIkWNshU5prqRswj9LfAd-1It74HtP4rDpAc/edit?usp=sharing

So roughly 24 ms total latency.