OSVR-Core
OSVR-Core copied to clipboard
Support for remote OSVR servers
I am attempting to use OSVR with a Samsung Gear mobile HMD. Our use case is a client running on the HMD, connecting to another machine that hosts all the devices the application may need - controllers, trackers, navigation devices, etc. There will be nothing connected directly to the HMD because it is impractical, thus there is no need for an OSVR server to run on the headset - reducing complexity and saving battery power.
Right now the high level API doesn't support this use case. The class osvr::clientkit::ClientContext
doesn't allow to specify the host where the OSVR server is located. This can be worked around either by using the low level API (which does take a host
argument) or by using an environment variable. Neither workaround is ideal - the low level API exposes Boost dependencies to the client application, making for a complicated compilation, especially on mobile platforms. The environment variable approach is not usable on Android.
Proposed enhancement
Add an additional constructor to the osvr::clientkit::ClientContext
class, the host
argument accepting also the host:port
format (important for servers running on non-standard ports):
inline ClientContext::ClientContext(const char applicationIdentifier[],
const char host[],
uint32_t flags);
Or, alternately, come up with a non-hacky alternative to the environment variable.
(I think host:port
is already supported transparently with the APIs that accept a host)
Yes, it is - the low level API accepts that and it should even work as vrpnConnection is used underneath.
Updated the pull req for the latest master: https://github.com/OSVR/OSVR-Core/pull/331
Hello,
Is there a chance to get this trivial enhancement merged? I have encountered this again when updating our in-house OSVR copy today. The pull request is over 2 years old and doesn't conflict with anything. Right now we have to either use our in-house built copy or use a kludge with setting the environment variable from inside of the application, which is ridiculous.
If it isn't going to be merged, then I would at least like to know why so that I could accommodate that locally.
Thank you.