Linus Trinus
November 27, 2020
I've been playing with VR and ran across LinusTrinus, a somewhat-raw but quite functional bit of code that allows an Android phone with the Trinus VR client app to connect to Linux to make it into a SteamVR-compatible 3DOF headset. While it does not allow movement tracking, and only rotation, it is sufficient for a subset of SteamVR games.
The code isn't very well documented, so for anyone who may want to try to use it, here's a little outline of how it works:
- The Trinus app on the phone is a client. It sends rotation information to the server on Linux, and displays forwarded graphics on the phone screen.
- The LinusTrinus server on the computer is essentially a bridge between a slightly-tweaked SteamVR sample driver, and the Trinus client. Most importantly, it uses ffmpeg to copy an area of the screen directly to the Trinus app.
- The slightly-tweaked sample SteamVR driver receives the rotation data from LinusTrinus and outputs the VR view in a standard, but frameless, window displayed on the desktop.
There are three issues a new user will run into quite quickly:
- If you don't build the sample SteamVR driver in the subfolder first, the app will appear to do nothing, and SteamVR won't even start.
- If you don't fix the ffmpeg command in the server so it looks at the correct VT display for your distro, you'll just get a black screen in Trinus, even though the on-screen window will appear to work.
- If the on-screen window gets obscured (say, by the VR app's window), the video will get screwed up. This can be easily fixed by clicking in the VR output, typing ALT+SPACE, then selecting "Always On Top" from the GNOME Shell pop-up.
I've fixed the first two in my fork of the LinusTrinus repo, and was able to get it to work, but performance is not so great.
Categorized as: Android | Games | Linux | Steam | VR
Hey! This looks really promising. I had tried LinusTrinus in the past, but didn't really get anywhere with it. I am hoping that this will work better than last time I tried. One question I have, does this use Trinus CardBoard VR, or just Trinus VR (the daydream one)?
You'll want to use the Cardboard version. The free one should be good enough for testing it out. :)
Ok, I was able to get it to link with my phone and show the upper left corner of my screen. However, it does not connect with SteamVR at all. I ran `make` in the main directory, and it failed, saying that it could not find `openvr_driver.h`. I then downloaded it from the Valve OpenVR Git repository and placed it in the `samples` folder. Now, it gives the following error:
```
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENVR_LIBRARIES
linked by target "driver_linus_trinus" in directory /home/matthias/Downloads/LinusTrinus2/LinusTrinus/samples/driver_linus_trinus
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
```
I know I am missing something. Do I need to link the OpenVR SDK somewhere? And if so, how?
Thank you!
Yep, you probably need to install the OpenVR development package. On Ubuntu it's libopenvr-dev. You might also need to install libopenvr-api1 to install the libraries.
Hope that helps!
Really Thank you man, this was awesome! I was lost beacuse of the missing documentation, but this site (With a pretty cool design btw) help me a lot. Thanks again :)
Very happy to help. :)
The smartphone has only a black screen with a splitter and cursor. SteamVR of movement tracks correctly. Window with a stereopair in the foreground. How can I test the ffmpeg command?
The ffmpeg command is generated and run by frame_generator.py - you can check in the log to see what it generated and tried to run, and to change the settings you'll want to modify the params variable to suit your needs.
thanks a lot this helped me <:)
Gran aporte... Gracias Saludos
Eres un genio... Gracias Saludos