OSVR Plugin Design

60 %
40 %
Information about OSVR Plugin Design

Published on September 9, 2015

Author: rpavlik

Source: slideshare.net

1. OSVR Plugin Design and API Overview Ryan A. Pavlik, PhD Sensics, Inc. July-2015

2. Links ● Dev Portal: http://osvr.github.io/build-with/#building-a-plugin ● Docs on “Writing a Device Plugin” ○ http://resource.osvr.com/docs/OSVR- Core/md_TopicWritingDevicePlugin.html ● Self-contained plugin example: ○ Cross-referenced source in Doxygen: http://resource.osvr. com/docs/OSVR- Core/com__osvr__example__selfcontainedDetectAndCreate_8cpp_so urce.html ○ https://github.com/OSVR/OSVR- Core/blob/master/examples/plugin/selfcontained/com_osvr_example_ selfcontainedDetectAndCreate.cpp

3. Plugins ● Plugins can create/provide a device ○ Devices expose one or more interface classes ● Plugins can expose the ability to “detect hardware” ○ On callback from the server, look for the associated device and handle it if present

4. Process of Instantiating Device ● Create “DeviceInitOptions” ● Use to specify device interface classes ○ Returns an object used to send data on the interface. ● Create device ○ Trade your DeviceInitOptions for a DeviceToken ● Register callback ● Submit JSON device descriptor. ● Plugin structure intentionally flexible

5. Sync vs Async Devices ● A design distinction at the plugin level only: transparent to clients ● Most devices are “async” ○ your callback gets called on its own thread ○ you can block waiting for data ○ When sending data, behind the scenes will wait briefly for control of the transport

6. Sync devices ● Not as common, more complex ○ Typically used when building plugins for devices with a non-blocking SDK ○ You get frequently called, but any blocking adds to system latency ○ Not for most plugins

7. Suggested Structure ● Code: ○ A hardware detection object (functor) ■ Keeps track of what devices are already handled (will be added to core soon) ■ Creates device objects ○ Device objects ■ Holds on to the interface objects and device token, and any device handles/state needed ■ Device callback is a member function

8. Physical structure ● Most plugins maintained out of the OSVR- Core source tree. ● Compile/link against osvrPluginKit (and osvrUtil) headers and libraries ○ C API/ABI ○ Header-only C++ wrapper ○ Other libraries are used internally by PluginKit but not considered “public” APIs

9. Build Systems ● Cross-platform: CMake (self-contained sample) ○ Works for Android too with android-cmake toolchain ● Android: ○ basic ndk-build importable modules available ● Roll your own: ○ If you must, just need the include and libs for osvrClientKit and osvrUtil

10. For additional information: ● OSVR developer portal ○ http://osvr.github.io ● Sensics – Founding contributor to OSVR, experts working in VR/AR for over a decade ○ http://www.sensics.com

Add a comment

Related pages

OSVR Developer Portal | OSVR Plugin Design

OSVR Plugin Design July 2015. An overview of the PluginKit API of OSVR-Core suitable for writing device or other plugins. Slides in PDF format Slides on ...
Read more

Developing Plugins - Developer Docs - OSVR

For more information about these OSVR plugins, see Source for OSVR Projects. ... Plugin Design and Coding PluginKit. To develop your your plugin, ...
Read more

OSVR Developer Portal | Build with OSVR

Building with OSVR. ... Presentation on OSVR Plugin Design from August 2015; Download OSVR-Core Snapshot Builds; Docs (link to topic in OSVR-Core Doxygen)
Read more

OSVR Plugin for Unity - Asset Store

The OSVR Plugin for Unity provides an easy and standardized way to discover, ... This plugin requires the OSVR Server. ... Editor Extensions/Design
Read more

Sensics – OSVR – Open Source Virtual Reality

OSVR™ – Open Source Virtual Reality – is an ecosystem co-founded by Sensics. The OSVR software platform, architected by Sensics, is a multi-OS ...
Read more

Developing Client Apps - Developer Docs - OSVR

Example Client Apps. Some example clients written with clean, minimal C++ code can be found in your OSVR Core snapshot, under sharedocosvrcoreexamples ...
Read more

An Introduction to OSVR - OSVR - Open-Source Virtual ...

An Introduction to OSVR Yuval Boger1 and Ryan Pavlik2, Dec 12th 2014 What is OSVR? OSVR™ is an open-source software platform for VR/AR applications.
Read more

How people build software · GitHub

How people build software. Millions of developers use GitHub to build personal projects, support their businesses, and work together on open source ...
Read more