Giter Club home page Giter Club logo

osvr-core's Introduction

OSVR Core System

Maintained at https://github.com/OSVR/OSVR-Core

For details, see http://osvr.github.io

For support, see http://support.osvr.com

This is the code and libraries to use when developing with OSVR.

  • For developing plugins, you'll use the @ref PluginKit library.
  • For developing applications using the framework, you'll use the @ref ClientKit library.

Binary Snapshot Documentation

If you're looking at this file in a binary build of OSVR-Core, please seen the BINARY_README file for more targeted information, as this main README file is focused on the source tree.

Source Documentation

See the HACKING file for some development guidelines for working on this code base itself.

If you're looking at the source tree, not a binary snapshot, you may be interested in build docs. You may also be interested in binary snapshots at http://osvr.github.io .

License and Vendored Projects

This project: Licensed under the Apache License, Version 2.0.

Some directories under /vendor are in fact not external libraries vendored-in, but "internally-vendored" - developed as a part of OSVR-Core, and likewise licensed under the Apache License 2.0, but are logically distinct from the Core in their functionality and are thus kept separate in anticipation of potential splitting off into a separate project at some future point. These include /vendor/comutils and /vendor/dummy-sal.

osvr-core's People

Contributors

andrewbenton avatar bwrsandman avatar christophhaag avatar crossvr avatar d235j avatar duff14 avatar feilen avatar gfrolov avatar godbyk avatar jeromiya avatar mars979 avatar mdutton3 avatar osvr-phabricator avatar outurnate avatar rpavlik avatar russell-taylor avatar rv9me avatar stephengroat avatar toastedcrumpets avatar virneo avatar vrguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osvr-core's Issues

Shared memory support for imaging

To avoid having to break up images into small chunks.

Current approach

Fixed-size circular queue of buffers, with sequence numbers. If a recipient wants to keep an image, it needs to copy it out. (Alternately, could use semaphores per-buffer to keep images around.)

Previous approach

Looking at a reference-counted, publish-subscribe model, with a per-subscriber message queue that can hold a reference-counting smart pointer to image buffers.

Subscriber registry:

  • Subscriber opens subscriber registry, adds self with unique ID.
  • Subscriber opens message buffer keyed by ID.
  • When subscriber exits, removes self from registry.

Right now, have an implementation of the subscriber registry using shared memory, but that doesn't correctly handle apps closing "badly" - something like a pipe would be better.

General flow - Publisher

  • On data send: publisher allocates block of the right size/alignment, managed by a smart pointer, and puts data in it, adding a ref. (ref count = 1)
  • Publisher get subscriber list and puts a message in each subscriber's buffer, with each owning a ref. (ref count = 1 + subscribercount)
  • Publisher releases its ref to that data. (ref count = 1 + subscribercount)

General flow - Subscriber

  • When subscriber updates, checks for messages in its buffer.
  • If one found, the reference to the data block is moved to the message handler and the message is handled (maintaining a proper reference count)

Detail/Complication

To maintain a proper reference count on the shared memory image blocks, we need each pending message to hold a reference (smart pointer) to the image block it corresponds to. However, then, we must make sure that each message is serviced somehow - either by an active application, or by some cleanup when that application exits - otherwise we'll exhaust our shared memory segment with images that nobody is really looking at.

Auto-detect USB serial ports

Sample case is the YEI tracker: we have a VID/PID, want to look up the port so this can be autodetected instead of manually configured.

"Reset Yaw" method

To allow resetting which direction is forward. May or may not be a client API - current work involves a separate application that could become a button in a GUI settings panel.

Handle missing serial devices better

Right now the multiserver just passes things blindly on to the VRPN server, which will try and fail to talk to a port. We should be able to at least screen to see if the port exists, returning a failure if it doesn't, to stop the scrolling of cannot write to serial.

Update plugin documentation regarding test apps

Right now it refers to vrpn_print_messages obliquely - not clear what that is (an app) or why you'd use it (if you are testing a new message type that you don't have a client for yet).

Should include instructions on testing with the Tracker Viewer and vrpn_print_devices instead (or rather, more prominently anyway)

Change default config file?

cc @yboger - the current default config file is for the YEI version of the HDK. This trips up both users of the Bosch version of the HDK, as well as those trying to use the Oculus, since the YEI driver spams the screen with error messages in trying to talk to a non-existent serial port. (see #11 )

Ideally, and eventually, the default config file will be empty, loading all plugins by default and auto-detecting devices with auto-selected routes. The question is what to do in the meantime. Do we:

  1. Change the default config file to be the HDK Bosch one?
  2. Have no default config file, providing an error message saying "you have to pick a config"?

OSVR_calibrate writes multiple times into JSON file

Running OSVR_calibrate multiple times creates a history of the calibration data instead of overwriting it.

For instance:

{
"plugins" : [ "org_opengoggles_bundled_Multiserver" ],
"routes" : [
{
"destination" : "/me/head",
"source" : {
"child" : {
"child" : {
"child" : {
"sensor" : 0,
"tracker" : "/org_opengoggles_bundled_Multiserver/OSVRHackerDevKit0"
},
"rotate" : {
"axis" : [ -0.7397290853882557, 0.6728198380315612, 0.01069325870997396 ],
"radians" : 3.238542030975339
}
},
"rotate" : {
"axis" : [ -0.1116648429726947, -0.3359507666652563, 0.9352368925683535 ],
"radians" : 0.962467929996628
}
},
"rotate" : {
"axis" : [ 0.1937018319634984, 0.04169637136441404, -0.980173970736331 ],
"radians" : 0.4892860528189486
}
}
}
]
}

Boost-free C++11 (or TR1?) version of the clientkit C++ bindings

Per a presentation I read re: Ubisoft's dev. of games in C++ , they don't allow boost in their main tree, and I'm sure they're not the only ones. The main reason we're using Boost in the clientkit bindings is for relatively simple things (shared_ptr, etc) that we could get if the user agreed to a higher C++ standard (Not sure if TR1 suffices or if C++11 is needed, offhand)

(presentation is here: https://github.com/CppCon/CppCon2014/blob/master/Presentations/C%2B%2B%20in%20Huge%20AAA%20Games/C%2B%2B%20in%20Huge%20AAA%20Games%20-%20Nicolas%20Fleury%20-%20CppCon%202014.pdf I just read the slides, didn't watch the video)

Core "mass data" handling methods

This is for plugins that are transferring large data (like images) and whose data might never leave the server. The basic design is that the plugin will supply a deep copy of the data along with a destruction method and a serialization method. Local subscribers will get access to the copy, if any remote clients for it exist serialization is performed, then finally the copy is destroyed.

Handle high COM port numbers smoothly

Users shouldn't have to know to enter \\.\COM13 instead of COM13. Need to figure out what requirement always prepending this imposes (NT-based Windows maybe?), determine if it's acceptable, and make this automatic.

Knowledge base should be updated when this is done.

Detect and use C++11 flags in build

Right now only MSVC lets you just get away with C++11 without asking for it. We should ask for it elsewhere. Main usage right now is for unique_ptr which can't be done without it - though we could sub in shared_ptr at the cost of some overhead.

Server GUI

A GUI console for the server, with a list of loaded plugins and running devices.

CMake 3.0+ required but not documented or explicit

The way we do imported targets requires 3.0 or newer. Not sure what CMake policies we'd change by setting the min required in the script to 3.0, but we could fail on older than 3.0, and at least put it in the docs.

Error message on client quit

vrpn_Endpoint::send_pending_reports():  select() failed.
Windows Sockets Error (10093):  Either the application has not called WSAStartup, or WSAStartup failed. .
vrpn_Connection_IP::send_pending_reports:  Closing failed endpoint.
Connection was deleted while 1 references still remain.

@russell-taylor - I was wondering if you've seen something like this before. Should we have an extra WSAStartup/its opposite pair in the client context open/close? This happens even on a "tidy" shutdown (with a ctrl-c handler installed to tell it to stop looping). My first instinct is that either a: the error state isn't being cleared before each operation and some error check is wrong, or b: there's an extra WSAShutdown (or whatever the opposite is called, I can't recall off the top of my head) in VRPN that isn't matched by a startup.

Custom Doxygen theme

We can go based off of the osvr.github.io styling. Should include a link back to that page and to the repo page.

ogvrPluginRegisterDataWithDeleteCallback

In the Async plugin we have:

ogvrPluginRegisterDataWithDeleteCallback(
ctx, &generic_deleter, static_cast<void *>(myAsync));

immediately after creating the data. Same on sync. Shouldn't we have a way to combine the creation and the registration of the deletion?

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.