Git Product home page Git Product logo

opticaltracking's Introduction

OpticalTracking

Dump of Oculus Rift DK2 optical tracking code as-is, including a current snapshot of Vrui-3.2-001.

To build:

  1. Build Vrui, which is included at the root level of the repository. Install the required and optional dependencies, and run "make" followed by "make install":

Dependencies:

  • On Ubuntu: $ sudo apt-get install build-essential zlib1g-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libudev-dev libusb-1.0-0-dev libpng12-dev libjpeg62-dev libtiff4-dev libasound2-dev libdc1394-22-dev libspeex-dev libogg-dev libtheora-dev libbluetooth-dev libopenal-dev

  • On Fedora: $ sudo yum install zlib-devel mesa-libGL-devel mesa-libGLU-devel libudev-devel libusb1-devel libpng-devel libjpeg-devel libtiff-devel alsa-lib-devel libv4l-devel libdc1394-devel speex-devel libogg-devel libtheora-devel bluez-libs-devel openal-soft-devel

Building:

$ cd OpticalTracking-1.0 $ make $ make install

By default, Vrui installs itself into ~/Vrui-3.2. To place it, say, in /usr/local/Vrui-3.2, run instead:

$ make INSTALLDIR=/usr/local/Vrui-3.2 $ make INSTALLDIR=/usr/local/Vrui-3.2 install

To speed up the build, you can run make in parallel. For example, to use 8 processes appropriate for a hyperthreaded 4-core CPU, add -j8 to make's command line.

  1. (Optional) Build Vrui example programs

$ cd ExamplePrograms $ make $ ./bin/ShowEarthModel (shows a spinning globe)

If you installed Vrui in a non-default location, such as /usr/local/Vrui-3.2, run instead:

$ make VRUI_MAKEDIR=<Vrui_directory>/share/make $ ./bin/ShowEarthModel

where <Vrui_directory> is the path passed as INSTALLDIR during Vrui installation.

  1. Build the optical tracking package

$ cd OpticalTracking $ make

Again, to use Vrui from a non-default location, do as above.

  1. Run the optical tracking main program:

$ ./bin/LEDFinder

where

$ ./bin/LEDFinder "Camera DK2"

There need to be .ldp (lens distortion) and .icp (intrinsic camera parameter) files with the same name as the video device in the current directory. These need to be created by per-device calibration, but I included the files from my camera into the distribution. They might be a good-enough approximation to get working.

Once in the program, enable the DK2's LEDs by selecting, in the "Rift LED Control" dialog, the buttons for "Modulate" and "Flash LED IDs," then drag the "Pattern" slider to 1, and then select the "Enable" button. This will turn on the camera, and should quickly label all visible LEDs and draw the wireframe 3D HMD model, which should fit the observed LEDs well.

opticaltracking's People

Contributors

doc-ok avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.