Requirements:
- CMake
- Qt5
- OpenVR
- liblsl
- Build environment
- Tested with MSVC 2015 on Win10, Xcode on MacOS Sierra, and Qt Creator on Ubuntu 16.04
Instructions:
- Open a Command Prompt / Terminal and change into this directory.
- Make a build subdirectory:
mkdir build && cd build - Call cmake
- `cmake -B build -S . -DCMAKE_INSTALL_PREFIX="build/install"
- set OpenVR_ROOT_DIR to the directory where you downloaded openvr, or let it download for you.
- -DQt5_DIR=path/to/qt/version/architecture/lib/cmake/Qt5
- -DLSL_INSTALL_ROOT=path/to/lsl/install
cmake --build ./build -j --config Release --target install
- `cmake -B build -S . -DCMAKE_INSTALL_PREFIX="build/install"
- Launch the app
- Click on "Scan Devices" to connect to OpenVR and scan for connected devices.
- Enter the sampling rate you would like to sample your poses at.
- Click on the individual device(s) you want to stream, or don't click to stream all.
- Click on "Stream Devices" to start the LSL Outlets.
- One stream will be started for all devices' pose data. Each device gets 12 channels, corresponding to the 12 cells in a 3x4 transformation matrix.
- The channel label prefix (#_) indicates the device ID.
- The channel label suffix (_#) indicates the transformation matrix cell location.
00 01 02 X
10 11 12 Y
20 21 22 Z
Where X,Y,Z refer to the 3-D position.
Another stream will be started for each controller's button press events. This is a single int32 channel with each value having the following format XXYYYYYZZ
- XX : Device ID. Up to 16.
- YYYYY : vr::EVREventType
- ZZ : vr::EVRButtonId
- Cannot build debug app in Windows because it tries to link against non-debug liblsl64.lib, even though liblsl64-debug.lib is correctly specified in the project settings.
- Sometimes an OpenVR controller will sleep/disconnect but it'll still be returned in the list of devices. Sleeping controllers will stream 0's for their pose data.