How to setup OSVR HDK on OSX 10.11.5 El Capitan

682 views Asked by At

As a non-gamer, i just want to play with VR and experience it. OSVR seems to be one cheap option for me compare to Oculus and Hive.

I got the HDK last week, so excited and wanted to test it on my Mac Book Pro (OSX 10.11.5 El Capitan / 2.7 GHz i7 / 16GB DDR3 / nVidia GeForce GT 650M 1024MB) right away.

First i installed osvrcore per https://github.com/OSVR/OSVR-Docs/blob/master/Getting-Started/Installing/osx.md, using the homebrew option

$ brew tap OSVR/osvr
$ brew install osvr-core --HEAD

I did have to manually install opencv using homebrew though.

Then i hooked up all the cables and connected the HMD and camera to my Mac. Saw my screen extended to the HMD screen, but rotated 90 degree. According to https://github.com/OSVR/OSVR-Docs/blob/master/Getting-Started/HDK/HDK-Unboxing-and-Getting-Started.md:

It will likely show up as a 1080x1920 "Portrait" display by default. This is the highest-performance mode. However, at this time most applications don't work with it in that mode, so you'll want to select the 1920x1080 resolution instead. (This doesn't mean you have to change the "Rotation" setting - just choose the alternate resolution and the HMD will perform the rotation internally.)

However, above didn't work for me, after setting the resolution to 1920x1080, the display on the HMD simply got messed. So i followed http://www.osvr.org/forum/viewtopic.php?f=10&t=3572&p=4272&hilit=osx#p4272 and just did screen rotation, then I can see the extended screen displayed ok on HMD.

From then on i was stuck. According to https://github.com/OSVR/OSVR-Docs/blob/master/Getting-Started/HDK/HDK-Unboxing-and-Getting-Started.md:

The default configuration should work for HDK 1.3/1.4 users with systems capable of direct mode, but there are other configuration options. Additionally, there's a configuration tool for the HMD itself that can allow you to customize things further.

And looks like the default config file is just empty:

/* The default config file, as used with the HDK, is fully auto-detected, so no configuration required. */
/* See the JSON-Schema for server config or other samples to see possible options. */
{
    "description": "The default config file, as used with the HDK, is fully auto-detected, so no configuration required. See the JSON-Schema for server config or other samples to see possible options."
}

Anyway, I went ahead and ran it:

$ pwd
/usr/local/Cellar/osvr-core/HEAD/share/osvrcore

$ osvr_server osvr_server_config.json
[OSVR Server] Using config file 'osvr_server_config.json'
[OSVR Server] Constructing server as configured...
[OSVR Server] Loading auto-loadable plugins...
[OSVR Server] Loading plugins...
[OSVR Server] 
[OSVR Server] Instantiating configured drivers...
[OSVR Server] 
[OSVR Server] Using OSVR HDK for display configuration. Did not find an alternate valid 'display' object in config file.
[OSVR Server] Triggering automatic hardware detection...
[OSVR Server] Registering shutdown handler...
[OSVR Server] Starting server mainloop: OSVR Server is ready to go!
[OSVR] Performing hardware auto-detection.
[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKit0
[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKitPrediction0
[OSVR] Path tree updated or connection detected
[OSVR] Sending path tree to clients.

Then i followed http://hapticmonkey.weebly.com/blog/installing-osvr-on-yosemite-mac-os to install OSVRTrackerView and ran OSVRTrackerView on a separate window. I did see the red/blue/green arrows in a window on my mac screen, and those arrows did rotate when i rotated my HMD. But that's it. I can't see it on my HMD screen.

Here is the output from the osvr-server

[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKit0
[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKitPrediction0
[OSVR] Path tree updated or connection detected
[OSVR] Sending path tree to clients.
vrpn: Connection request received from 127.0.0.1: 127.0.0.1 65307
[OSVR] Performing hardware auto-detection.
[OSVR] Path tree updated or connection detected
[OSVR] Sending path tree to clients.
vrpn: Connection request received from 127.0.0.1: 127.0.0.1 65309[/code]

And here is the output from the TrackerView console:

$ /usr/local/Cellar/osvr-tracker-viewer/HEAD/OSVRTrackerView
[OSVR] Connecting to default (local) host
[OSVR] Client context initialized for org.osvr.trackerview
[OSVR] Got connection to main OSVR server
[OSVR] Got updated path tree, processing
[OSVR] Connected 0 of 0 unconnected paths successfully
[OSVR] Connection process took 10ms: have connection to server, have path tree

[TrackerViewer] No arguments passed: default is as if you passed the following:
 --pose /me/hands/left --pose /me/hands/right --pose /me/head

You can specify --pose or --orientation then a path, as many times as you want. Pass the argument --help for more info.

[OSVR] Interface initialized for /me/hands/left
[OSVR] Could not resolve source for /me/hands/left
[OSVR] Interface initialized for /me/hands/right
[OSVR] Could not resolve source for /me/hands/right
[OSVR] Interface initialized for /me/head
[OSVR] Constructed a TrackerHandler for com_osvr_Multiserver/OSVRHackerDevKitPrediction0@localhost:3883 sensor 0
[OSVR] Successfully produced handler for /me/head

[TrackerViewer] /me/head - got first report, enabling display![/code]

Now i wanted to get further. According to https://github.com/OSVR/OSVR-Docs/blob/master/Getting-Started/HDK/HDK-Unboxing-and-Getting-Started.md, i can run The "Palace" Demo

The OSVR Unity Palace Demo (source repo) is a visually-rich environment to look around and explore in using OSVR-supported hardware, including the HDK. The first link contains binary downloads for Windows: just download and run (make sure the OSVR server is running!), and if desired move around in the environment with a gamepad or keyboard and mouse. On the start-up screen you'll want to choose the display that your HDK is configured as, and the 1920x1080 full HD resolution.

But it seems is only for Windows. And i wasn't sure how to get it to work on Mac.

I also tried to use other configuration files: osvr_server_config.HDK13DirectMode.sample.json:

$ cp sample-configs/osvr_server_config.HDK13DirectMode.sample.json osvr_server_config.json

$ osvr_server osvr_server_config.json
[OSVR Server] Using config file 'osvr_server_config.json'
[OSVR Server] Constructing server as configured...
[OSVR Server] Loading auto-loadable plugins...
[OSVR Server] Loading plugins...
[OSVR Server] 
[OSVR Server] Instantiating configured drivers...
[OSVR] Added device: org_osvr_filter_videoimufusion/HeadFusion
[OSVR] Client context initialized for org.osvr.analysisplugin
[OSVR] Interface initialized for /com_osvr_Multiserver/OSVRHackerDevKitPrediction0/semantic/hmd
[OSVR] Interface initialized for /com_osvr_VideoBasedHMDTracker/TrackedCamera0_0/semantic/hmd/front
[OSVR Server] Successes:
[OSVR Server]  - com_osvr_VideoBasedHMDTracker/VideoBasedHMDTracker
[OSVR Server]  - org_osvr_filter_videoimufusion/VideoIMUFusion
[OSVR Server] 
[OSVR Server] 
[OSVR Server] Aliases found and parsed from config file.
[OSVR Server] Display descriptor found and parsed from config file.
[OSVR Server] RenderManager config found and parsed from the config file.
[OSVR Server] Triggering automatic hardware detection...
[OSVR Server] Registering shutdown handler...
[OSVR Server] Starting server mainloop: OSVR Server is ready to go!
[OSVR] Performing hardware auto-detection.
[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKit0
[OSVR] Added device: com_osvr_Multiserver/OSVRHackerDevKitPrediction0

But as you can see above, it just stuck there, i don't see line [OSVR] Sending path tree to clients. as with the default (empty) configuration file. What's more, with this configuration file, i can't even kill osvr-server anymore. It just print out:

^C[OSVR Server] Received shutdown signal...
^C[OSVR Server] Received shutdown signal...
^C[OSVR Server] Received shutdown signal...
^C[OSVR Server] Received shutdown signal...
^C[OSVR Server] Received shutdown signal...

So I had to kill -9 that process.

I also tried to just went ahead and downloaded a game from https://itch.io/games/osvr/platform-osx, this one: https://seven-hills-games.itch.io/hellicott-city. But when I launched it. it showed everything only on my Mac screen, with a warning "No HMD detected" on the top.

Can anyone give any suggestions on what to do next to get further?

2

There are 2 answers

1
reden On

Not a Mac user or familiar with that particular game, but; it might be it only operates in Extended Mode and/or that Direct mode is not available on Mac. Have you tried to change the config to turn off Direct mode? Tracker Viewer is not supposed to show up in the HDK, it's more of a verification that tracking is working/debug. On Windows, when the HDK is in Extended Mode, it shows up as an additional screen in the display properties. There is an application called OSVR Config, but it may only be available for Windows. The display config is located in \OSVR-Core\bin\osvr_server_config.json. Try setting "directModeEnabled": false

3
DuFF14 On

OSVR and Hellicott City developer here.

Can you get the RenderManagerOpenGL examples to run? Not sure if that's included in the homebrew install. I wasn't able to get the homebrew install working, but the RenderManager examples work when I build OSVR-Core from source. I'd test this with an extended mode config before moving on to other apps because everything it needs to run is already there.

@reden is correct that direct mode will not work, you'll need to use an extended-mode config file, or any empty config file like you posted which will not use RenderManager at all.

Hellicott City, Palace Demo, and other OSVR-Unity examples do not ship with OSVR libs for Mac. I think what you'd have to do is open the Palace Demo in Unity, add the necessary osvr*.so libraries to the Plugins directory, and build for Mac. Those osvr*.so files should be wherever homebrew installs OSVR. However, you won't be able to use RenderManager until the OSVR-Unity-Rendering plugin is also built for Mac. As of right now, that plugin does not work with OpenGL, but OSVR-Unity should still work without RenderManager/OSVR-Unity-Rendering plugin. These things are all on the to-do list, but Mac support hasn't been a top priority.