cancel
Showing results for 
Search instead for 
Did you mean: 

Linux/DK2 Development/Bring-Up Guide?

lhl
Protege
I've been following along w/ the Linux nag thread, but is anyone actually doing dev w/ the DK2 on Linux at the moment w/ a version of the 0.3.x SDK? I finally got my DK2 in my hands today and am getting started setting up now.

I'm actually waiting on a HDMI-miniHDMI adapter at the moment in case it makes a difference but I'm attaching it at the moment w/ a mini-DP adapter. I updated the firmware to 2.11 on my Mac.

I'm running a Gigabyte BRIX Gaming (GK104, basically an 870m w/ 2 mini-HDMI and 1 miniDP output). I have one display on HDMI, and when I plug in the DK2 it shows up as an extra display, all I need to do is rotate it counterclockwise for it to display the extended desktop. I am running on a clean Ubuntu 14.04.1 LTS setup w/ the the latest edgers nvidia package (nvidia-343) w/ an out-of-the-box Unity desktop .

I've downloaded the 0.3.2 SDK and it seems to somewhat work. The Configuration Utility runs for a 10 seconds or so before it dies:


*** SensorFusion Startup: TimeSeconds = 1408639842.170932
OVR::DeviceManagerThread - running (ThreadId=0x7f7743438700).
OVR::DeviceManager - initialized.
OVR::Linux::HIDDevice - Opened '/dev/hidraw5'
Manufacturer:'Oculus VR, Inc.' Product:'Rift DK2' Serial#:'MSCE4BR6K9DA3M00V100'
Error: Magnetometer calibration not found!

Timestamp 0 rollover, was: 2783083885, now: 2780368853
./OculusConfigurationUtility.sh: line 27: 16214 Segmentation fault (core dumped) ./Tools/OculusConfigUtil/OculusConfigUtil_x86_64


OculusWorldDemo from the Official 0.3.2 runs very briefly before also segfaulting.

I've also checked out @jherico's fork https://github.com/jherico/OculusSDK but haven't gotten either the stable or the 0.3.3.pre1 branch working - is there something I'm missing w/ cmake config? I don't do much C/C++ programming - my plan is actually to try to get to Python as quickly as possible.

In that regard I've also installed @jehrico's python-ovrsdk (master) https://github.com/jherico/python-ovrsdk
It seems to do a bit of a dance on setup but then seems to output (non-positional) tracking ok:

OVR::DeviceManagerThread - running (ThreadId=0x7fede53ad700).
OVR::DeviceManager - initialized.
Segmentation fault (core dumped)
lhl@ono1:~/vrdev/001-pythonsdk$ ./demo.py
OVR::DeviceManagerThread - running (ThreadId=0x7fbfd472c700).
OVR::DeviceManager - initialized.
OVR::Linux::HIDDevice - Opened '/dev/hidraw5'
Manufacturer:'Oculus VR, Inc.' Product:'Rift DK2' Serial#:'MSCE4BR6K9DA3M00V100'
Error: Magnetometer calibration not found!

*** SensorFusion Startup: TimeSeconds = 1408640467.836481
OVR::SensorDevice - Closed '/dev/hidraw5'
OVR::Linux::HIDDevice - HID Device Closed '/dev/hidraw5'
OVR::Linux::HIDDevice - HIDShutdown '/dev/hidraw5'
OVR::Linux::HIDDevice - Opened '/dev/hidraw5'
Manufacturer:'Oculus VR, Inc.' Product:'Rift DK2' Serial#:'MSCE4BR6K9DA3M00V100'
Error: Magnetometer calibration not found!

OVR::SensorDevice - Closed '/dev/hidraw5'
Oculus Rift DK2
OVR::Linux::HIDDevice - HID Device Closed '/dev/hidraw5'
OVR::Linux::HIDDevice - HIDShutdown '/dev/hidraw5'
OVR::Linux::HIDDevice - Opened '/dev/hidraw5'
Manufacturer:'Oculus VR, Inc.' Product:'Rift DK2' Serial#:'MSCE4BR6K9DA3M00V100'
Error: Magnetometer calibration not found!

Sensor created.
1.000000 0.000000 0.000000 0.000000
0.996810 0.018656 -0.000648 0.077604
0.996828 0.018819 -0.001301 0.077318
0.996845 0.018971 -0.001954 0.077044
0.996862 0.019122 -0.002602 0.076769
0.996879 0.019277 -0.003252 0.076483
0.996896 0.019439 -0.003909 0.076189
0.996911 0.019597 -0.004569 0.075914
0.996926 0.019739 -0.005217 0.075637

...


This sometimes segfaults but otherwise seems to run indefinitely, w/ somewhat sensical numbers.

OK, so the questions I have:

* The first once is a total noob question: how do I control which display apps render on? For example, the OculusWorldDemo, for all 5-seconds it'll run pops up on my primary display, not the DK2

* If I don't care about the positional tracking atm, what's the best way to get something set up so I'm not constantly segfaulting and I can do some basic dev?

* Are there any good samples around? I have some specific R&D goals (building a 3D WM using the DK2 as my primary display on this Linux system) so plan on going step-by-step, still any existing resources would be pretty useful. Stuff like @jherico's https://github.com/OculusRiftInAction (hey Brad, you're stuff has been super useful, I've ordered the MEAP!)

* I don't see a lot of Linux discussion here. Is there a better forum/IRC channel/other for people that are doing Linux Rift dev?

* Is there an Oculus contact/support/dev who focuses on Linux? Obviously it seems to be the lowest priority at the moment, but just wondering in general how/if people have been able to get problems/issues looked at/fixed? Are there any plans for a Phabricator or something? Obviously this is directed towards Oculus devrel, but it'd be interesting to hear other people's feedback - I played around w/ a DK1, but I'm only now just diving into the weeds doing dev right now...

I'm publishing my work here in case it's useful: https://github.com/lhl/vrdev

My goal, btw, is to get to a usable 3D WM as quickly as possible: https://randomfoo.hackpad.com/3D-Window-Manager-Terminal-vuUkyfPJtv2
10 REPLIES 10

vrcoder3d
Honored Guest
My pre-SDK Linux+DK2 experience went a little better than expected -- quarternion tracking "just worked" and seemingly-correct stereoscopic worked too (after getting the monitor layout sorted). It's still a far worse experience than DK1 though, so I think I'll go back to waiting for the Linux DK2 SDK (and back to using my DK1 for development).

In case useful to others -- I'm running Ubuntu 12.04.3 and developing with an arbitrarily-old branch of jherico's OculusSDK (from around mid-June; OVR_VERSION_STRING says it's 0.3.2)

When connecting the DK2 it was immediately recognized as a portrait 1080x1920 display -- which I managed to get into extended-desktop mode (and horizontal) using the following XRandR command-line:

xrandr --output DFP3 -s 1080x1920 --pos 1920x0 --rotate left


(my primary monitor is an HD TV so position 1920x0 is just to its right)

With the DK1 I had been using cloned displays -- but the DK2 (with 0.3.2) seems to work slightly-faster somehow in extended-desktop mode. To get that to work required adding an x-pixel coordinate to my prototype -- which is either used to identify the correct GLFW monitor (at that location, if going full screen) or for positioning the actual GLFW window.

(... didn't even try connecting the tracking camera yet -- planning to wait until official Linux support before messing with that at all)