Oculus Pi

[WayneKeenan] wrote a proof-of-concept virtual reality system that used a Raspberry Pi and an Oculus Rift. It was about a thousand lines of Python and with a battery pack it was even portable. The problem was that the Pi was struggling to create the 3D views.

[Wayne] recently revisited the demo and found that just about everything has gotten better: the Pi 3 is faster, and the Python libraries have become better. He spent some time building a library — VR Zero — and then recreated the original demo in 80 more lines of Python. You can see a video, below.

The library offers:

  • Default input event handling for Keyboard, Mouse, and other input devices.
  • Configurations for the Oculus Rift DK1 and DK2 and the Xbox Joypad.
  • An OpenGL ES barrel shader for correcting lens distortion.

Some of the demos peak at around 25-30 frames per second on a Pi 3. Not too shabby.

We’ve looked at some cool uses for the Rift like virtual monitors and crane control.

12 thoughts on “Oculus Pi

  1. i remember riftonthepi from oculus dk1. recently tried to get it to work again but was unable to. nice to see someone revive oculus support on pi with its native hdmi and all. i have both dk1 and dk2 and they are still useful headsets and shouldnt be abandoned. now if we could get them working with webvr that would buy them alot of life.

  2. For people without VR experience, it’s important to know that using VR wih less than 60Hz is unbearable, and you ideally want 75Hz+. Unbearable in this context means nearly guaranteed nausea.

    Still a nice hack, though.

    1. Lars: hate to be a troll but give your head a shake. The DK1 & DK2 are all over eBay and can be had relatively cheap. E.g. 2 seconds on ebay I found this http://tinyurl.com/jhlgpg9

      These aren’t old old Motorola flip phones we are talking about. The dk1 & dk2 are still totally cutting edge technology and just because they have been superceded doesn’t need they all went to the E-waste depots.
      That said if they are considered garbage I’d gladly pay shipping to anyone looking to toss their unused obsolete units.

      1. BURNINGFEET: You made a valid argument but I would rather not invest in ‘dead technology’. The successor of the DK2 is excluded from this python project for a reason. My guess is incompatibility that maybe even enforced my the manufacturer.
        I have looked into OSVR: HDK 1.4, which is based on a single display, seems to work fine. For HDK 2.0, which is based on two displays, it is said to be working on the PI by using reduced resolution. However, there is a request for the HDK 2.0 EDID in their forums which is unanswered for 6 weeks now. Maybe it has to do with the technology of the two displays…
        I don’t want to use the VR with the PI, but this is a good indicator for me.

  3. > Not too shabby

    Unfortunately, 23-30 FPS is far too shabby. VR nausea isn’t just a momentary thing. It sticks with you for up to 24 hours. 60fps is an absolute minimum required.

    The Pi3 might be able to do 60fps if the GPU is utilized, and the scenes are extremely simple.

    The Raspberry Pi is a very neat computer, at a very low cost. It is not suitable for everything, and VR is one of those things that I don’t see something like the Pi ever being useful for.

    1. Wow, careful… I bet you that “something like the raspberry pi” 7th gen or so will have a 32 core 5GHz cpu, a usable gpu, and consume 2W of power. And that will be a very capable sbc…

    2. Yeah, however that doesn’t mean it’s not worth having a go.

      I certainly suspect that this demo can be optimised, the scenes are not complex, and whilst the 30 GFLOPS Pi GPU is very weak by modern standards, it can still do some stuff okay.

      What’s really needed is a Pi 4 board that includes a more up to date SoC in terms of process node, so the GPU can run faster, and perhaps be doubled. Onboard native GigE would be nice too, but I digress. It’ll happen someday, in the meantimes there are Odroids.

    3. I think I can get 10fps wireframe at a bit banged 100×80 monochrome resolution in two eyes from an arduino…..

      … we can use it as cruel and unusual punishment on millennials when they’ve broken a law or something.

  4. What i really would love that if someone could make with an fpga an «adaptator» fed with two video signal and with an hdmi output for the rift, like the transporter 3d
    I know i would rather learn to use an fpga, but for now i just haven’t the time until my actual project would be finish.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s