k2vr-application
k2vr-application copied to clipboard
KinectToVR Main Application (Qt6 rewrite)
DEPRECATED, WILL BE REPLACED WITH AMETHYST
The K2QT projects and wikis were removed, stick back to K2EX for now
This repo is gonna hold KinectToVR's SteamVR driver & K2API until then
Don't worry, removed files are still in the commit history
KinectToVR API (w/ OpenVR driver)
Current KinectToVR API is also a bit deprecated and not version-interchangeable,
due to boost serialization dependency. If you really really wanna use it, please try
looking around in the wiki and find out how to use it for yourself.
(Though I may help a bit when asked to... Don't guarantee how much is a bit tho, heh)
The OpenVR/SteamVR driver protocol has also changed in amethyst (KinectToVR >1.0)
Build instructions
-
Note: Repository may be chaotically updated, please check out
repository before posting an issue with building or missing files. -
Prerequisites
- Visual Studio 2019 (Personally, I'm on VS2019 Preview, probably latest)
-
Set up the project
-
Take a deep breath and make yourself some coffee,
it's gonna take some time to set up allvcpkg
packages.
(About 1-1.5 hour if you have 300-500mbps internet and a hdd) -
Clone the latest OpenVR, GLM and Eigen3 into
external/
:
git clone https://github.com/ValveSoftware/openvr external/openvr
git clone https://gitlab.com/libeigen/eigen external/eigen
git clone https://github.com/g-truc/glm external/glm
-
Fix min/max error in GLM (unresolved with NOMINMAX for now)
sed -i '/#include <limits>/c\#include <limits>\n\n#undef min\n#undef max' external/glm/glm/gtx/component_wise.inl
-
Install
vcpkg
and its Visual Studio integration
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
-
Install needed libraries (You should choose one linking method for all packages)
vcpkg install boost:x64-windows opencv3[world]:x64-windows cppzmq:x64-windows curlpp:x64-windows
(Now you may rest a bit, also consider using a drive other thanC:/
, it'll be about 6-7GB) -
Setup GLog
git clone https://github.com/google/glog.git external/glog
git reset --hard f8c8e99fdfb998c2ba96cfb470decccf418f0b30
cd external/glog
mkdir vcbuild; cd vcbuild
cmake -DBUILD_SHARED_LIBS=ON ..
msbuild glog.vcxproj "/p:Configuration=Release;Platform=x64
WindowsTargetPlatformVersion=10.0"
-
Setup GFlags
git clone https://github.com/gflags/gflags.git external/gflags
git reset --hard 827c769e5fc98e0f2a34c47cef953cc6328abced
cd external/gflags
mkdir vcbuild; cd vcbuild
cmake -DBUILD_SHARED_LIBS=ON ..
msbuild gflags.vcxproj "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"
-
-
Build and deploy
-
Make sure you're building for x64 platform in release mode
-
Click
Build → build all
and wait for the build to finish -
All needed dlls from
vcpkg
should be automatically moved to deploy directory
(For general it'sx64/Release/
and for driverx64/Release/driver/
You can find there KinectToVR driver fully set-up and ready to be registered.)
-
Debugging OpenVR driver
-
Change run command in project properties, selecting your SteamVR installation path.
(Must be the path to vrserver.exe file in current SteamVR installation directory)
-
Remove driver dll from
[K2Driver]/bin/win64
and create a hard link:
([K2Driver]
stands for driver's deployment directory, it possibly isk2vr-application/x64/Release/driver/KinectToVR
)- Open cmd and navigate to
OutDir
(Where you've built your binaries, possibly inx64/Release
) - Delete
driver_KinectToVR.dll
from[K2Driver]/bin/win64
and keep the rest - Create a hard link:
New-Item -ItemType HardLink -Name "[K2Driver]/bin/win64\driver_KinectToVR.dll" -Value driver_KinectToVR.dll
where[K2Driver]
possibly stands for./driver/KinectToVR
- Open cmd and navigate to
-
Click on
driver_KinectToVR
project and selectDebug→Start New Instance
You may turn on profiling tools (mostly for CPU) and experiment with the debugger right after.