Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rib/ouvrt

A playground to understand how the Oculus Rift DK2 positional tracking works
https://github.com/rib/ouvrt

Last synced: 2 months ago
JSON representation

A playground to understand how the Oculus Rift DK2 positional tracking works

Awesome Lists containing this project

README

        

ouvrt
=====
1. About
2. Setup
3. ouvrtd
4. Tools
5. Todo

1. About
--------
ouvrt is a playground to understand how the Oculus Rift DK2 positional tracking
works. Its main component is the ouvrtd daemon that detects the Rift DK2 USB
HID device and the Positional Tracker DK2 UVC camera, sets up synchronized
exposure, and captures video frames of the DK2's IR LEDs.

Currently, features are limited to enabling the IR LEDs, setting up the camera
sensor for synchronized exposure, and capturing video frames into a GStreamer
pipeline for debugging.

2. Setup
--------

First of all, make sure the prerequisites libraries and development packages
are installed:

- libudev
- GStreamer 1.0

Now configure the build system and build everything:

$ ./configure

When building from git, you also need autotools. Use autogen.sh to generate
the configure script with autoreconf and execute it:

$ ./autogen.sh

Now build everything:

$ make

3. ouvrtd
---------

Make sure you have permissions to access the /dev/hidraw and /dev/video devices
corresponding to the Rift DK2 and the DK2 Positional Tracker. Then run ouvrtd:

$ ./ouvrtd

The daemon will create a shared memory socket /tmp/ouvrtd-gst and write frames
into it as soon as a GStreamer shmsrc connects to it. To see the captured
frames, run:

$ gst-launch-1.0 shmsrc socket-path=/tmp/ouvrtd-gst ! video/x-raw,format=BGRx,width=752,height=480,framerate=60/1 ! ximagesink

4. Tools
--------

The dump-eeprom tool reads the Positional Tracker DK2 EEPROM and writes it to
a file or stdout:

$ ./dump-eeprom camera-dk2-rom.bin

$ ./dump-eeprom - | hexdump -C

4. Todo
-------

- Add blob detection and tracking
- Enable Rift DK2 IR LED blinking patterns
- Add individual blinking LED detection to the blob tracker
- Add a 3D model of the tracking LEDs, readout from the Rift
- Add support for camera intrinsic and lens distortion parameters, readout
from the Rift and/or camera EEPROM
- Add a PnP solver to estimate the pose from 3D-2D point correspondences
- Add RANSAC PnP solver support for the initial pose estimation
- Feed the projection of the estimated pose back as starting points for the
PnP solver and blob tracker
- Add Rift DK2 IMU support to estimate the pose from integrated gyro and
acceleration sensor readouts
- Add sensor fusion, correcting the IMU pose from the camera pose regularly,
use the fused pose estimate to feed back into PnP solver and blob tracker
- Implement proper time handling for all of this