|Googly eyes functioned flawlessly|
The most obvious issues while wearing the Rift were latency and resolution. Because I intended to navigate crowds, I had to keep the latency as low as possible. Because I was running all of this on a Raspberry Pi, this meant that my camera resolution had to be set at it's lowest setting. Anything higher dropped my frame rate to single digits. However, even at it's lowest setting, my frame rate hovered between 15 and 30 frames per second. Even if everything else was working perfectly, that meant dealing with up to ~70 ms of latency in my view.
70 milliseconds might be fabulous for video games, but when you're walking around, it can seriously mess with your sense of balance. Also, having your perspective suddenly shifted up and forward by a number of inches is disruptive to your proprioception. This setup might have an application as a 'being drunk' simulator for teetotalers. A 'waking up next to a stranger' simulator is left as an exercise for the reader.
In this application I didn't use the head tracker hardware at all. The camera was affixed to the Rift, moved with it and my head, so there didn't seem to be any point. However, given the limitations I encountered occurs to me that the prediction functionality discussed by Steve LaValle in his post on the Oculus VR blog could be applied here. While the hardware on the RasPi is extremely limited, it should be possible to alter the vertices being sent to the Rift to render the full screen view based on the current and recent acceleration values read from the Rift. I'm hoping to be able do this strictly via use of the raw HID messages as I don't relish the idea of trying to port the OculusVR SDK to RasPi. I plan to update this setup for a costume for the Emerald City Comic Con next March, so I'll have to experiment between now and then with this approach. Alternatively I may try switching the computer from the Arm based RasPi to one of my Atom based ZBox machines, though that will incur a significant uptick in power requirements, heat generation and weight.
I was using an Energizer x18000 external battery as my primary power source, but it only has one USB jack. When I connected this to a hub and tried connecting the RasbPi and Rift power to it, and then the Rift data and webcam to the RasbPi, I couldn't get the system to function. The Rift would not turn on, or rather its blue power light on the control box would come on briefly, then turn off. I deduced that this was because the USB hub would only pull 1 amp over its (USB) connection to the battery, and that wasn't enough to power all the downstream devices. Since I was only trying this out the morning of the third day of the con, I was in a bit of panic mode. Eventually I found a solution by using a second much smaller external battery (provided by my wife) meant for emergency charging cell phones. I plugged the Rift power into this battery and fed the battery USB charger into the first hub coming off the Energizer, in hopes it would trickle charge. This ultimately worked, but only added to the sheer number of wires and do-dads strapped to my side.
The lights were problematic because my soldering skills are pretty crude, and the RGB LED strips I had required 4 soldered connections between each section. The result was that my blue and red LEDs were intermittent at best and tended to flicker as I moved. This ultimately resulted in my disconnecting them and just going with a green lighting scheme, which happily didn't really detract from the overall effect.
Some lessons learned:
- Magnets are awesome for connecting things to your costume, but they can have a negative impact on electronics, even solid state electronics you wouldn't ordinarily expect to be susceptible.
- A costume with electronics requires a full dress rehearsal with enough advance time to get to the store to buy any required additional components or do re-soldering.
- Said dress rehearsal should also involve vigrously shaking the driving computer to make sure it can survive and that the connections are solid. Until I did some fiddling with zip-ties I had frequent drop outs of my vision because of a twitchy HDMI cable.
- If you want to power a bunch of things from a USB hub, make sure the hub itself is drawing it's power via a DC plug that can carry enough current for all your downstream devices. A USB connection to your power source may not do it.
- Don't rat-hole on tasks that aren't on the critical path (like how you can best diffuse the lights from the LEDs into a solid bar) until you've completed all the critical path portions of the costume.