ndob / yarrar

A cross-platform Augmented Reality library written in C++11
MIT License
22 stars 9 forks source link

libyarrar Build Status

A cross-platform Augmented Reality library written in C++11.

Strongly WIP, so don't expect to use this for anything real at the moment. :)

Overview

Current features

Roadmap

Architechture

Yarrar is modeled as a pipeline, which consists of four stages. Each stage has one or more stage-handlers, which process the data from previous stage and pass it forward to next stage. Pipeline configuration is done with JSON-based configuration file (see Pipeline Configuration for details). Pipeline stages are:

  1. Dataprovider: Sensor data handling (ie. RGB-camera, depth-camera, accelerometer, gyroscope)
  2. Tracker: Pose tracking (ie. using markers, SLAM)
  3. SensorFusion: Pose accuracy improvement
  4. Render: Rendering the 3D-models on top of camera image

Image of Pipeline

Limitations in current implementation:

Dependencies

Yarrar depends heavily on C++11-features, so a fairly recent compiler is needed.

Library dependencies per compilation target:

Platform OpenCV 3.0 json11 eigen GLEW GLFW
Linux X X X X X
Windows X X X X X
Android X X X
iOS X X X
Unity3D (Windows) X X *
Unity3D (Android) X X *

* Currently not needed (doesn't support sensor fusion), but will become a dependency in the future.

Compiling and running tests

See Compiling for detailed instructions

Quickstart

Compile and run tests on Linux:

mkdir build
cd build
cmake ..
make
make test ARGS="-V"

Compiling examples

Android

  1. Build AAR (see Compiling).
  2. If you built it with build_aar.sh-script, .aar gets automatically copied to example/android/app/libs.
  3. Open and build example/android with gradle or Android studio.

iOS

  1. Build Yarrar.framework (see Compiling).
  2. Copy Yarrar.framework to example/ios-directory.
  3. Open and build example/ios/yarrarexample.xcodeproj with Xcode.

Windows/Linux

  1. See Quickstart. It will also compile example/desktop_webcam-example by default.

Unity

  1. Compile yarrar.unitypackage (see Compiling).
  2. Open up example/unity in Unity Editor. Basic structure should be set up.
Known issues (Unity)

Multiple plugins with the same name 'libyarrar' (found at 'Assets/yarrar/Plugins/x86_64/libyarrar.so' and 'Assets/yarrar/Plugins/Android/libyarrar.so'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.*

Fix this by deleting yarryar/Plugins/x86_64 if you wish to deploy to Android or yarryar/Plugins/Android if you wish to deploy to Linux.