spayne / soft_knuckles Goto Github PK
View Code? Open in Web Editor NEWOpenVR device driver with similar input configuration to Valve's EV2 Knuckle controller
License: MIT License
OpenVR device driver with similar input configuration to Valve's EV2 Knuckle controller
License: MIT License
hi,
just stumbled over this upcoming arduino vr project https://www.reddit.com/r/SteamVR/comments/g30lng/arduino_index_controllers_free_head_tracking/
(auther says it will be opensource) and regarding linux compatibility he mentioned your soft_knuckles.
I had to make some minor modifications in order to build your code under linux:
Prop_LegacyInputProfile_String is deprecated so I replaced it with Prop_InputProfilePath_String in soft_knuckles_device.cpp. no idea if this is correct:
--- soft_knuckles_device.cpp 2020-04-18 10:32:44.671686051 +0200
+++ soft_knuckles_device.cpp 2020-04-18 10:18:10.197399235 +0200
@@ -326,7 +326,7 @@
SetInt32Property(Prop_DeviceClass_Int32, (int32_t)TrackedDeviceClass_Controller);
SetProperty(Prop_InputProfilePath_String, "{soft_knuckles}/input/soft_knuckles_profile.json");
SetProperty(Prop_ControllerType_String, "soft_knuckles");
- SetProperty(Prop_LegacyInputProfile_String, "soft_knuckles");
+ SetProperty(Prop_InputProfilePath_String, "soft_knuckles");
m_component_handles.resize(m_num_component_definitions);
for (uint32_t i = 0; i < m_num_component_definitions; i++)
WatchdogWakeUp requires an argument now, so this change was required in soft_knuckles_provider.cpp:
--- soft_knuckles_provider.cpp 2020-04-18 10:34:41.931552083 +0200
+++ soft_knuckles_provider.cpp 2020-04-18 10:20:06.928803669 +0200
@@ -181,7 +181,7 @@
#else
// for the other platforms, just send one every five seconds
this_thread::sleep_for(chrono::seconds(5));
- vr::VRWatchdogHost()->WatchdogWakeUp();
+ vr::VRWatchdogHost()->WatchdogWakeUp(vr::TrackedDeviceClass_HMD);
#endif
}
}
the bundled make_linux.sh just builds the objects but doesn't link a shared lib, so I created a quick&dirty (hardcoded openvr header path) CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project(soft_knuckles)
INCLUDE_DIRECTORIES( "/usr/include/openvr" )
SET(SNSRC
dprintf.cpp
socket_notifier.cpp
soft_knuckles_config.cpp
soft_knuckles_debug_handler.cpp
soft_knuckles_device.cpp
soft_knuckles_provider.cpp
)
add_library(
soft_knuckles
SHARED
${SNSRC}
)
builds fine here and creates a libsoft_knuckles.so
haven't tested the result, but maybe it is of some use :)
I followed all instructions in the readme, built the project changed .bat installation strings, ran it, and it seems the dll factory is not being called by Steam, so nothing happens after that (including not being able to use telnet to localhost 27015).
I also tried the sample driver from OpenVR, but for some reason all calls to UpdateBooleanComponent
just return VRInputError_InvalidHandle
, even with the original code version. I had already tried your driver before, but never could put it to work. I put some DriverLog
calls inside some of the functions, including HmdDriverFactory
and nothing comes from there, showing it's not being called.
Is there something I may be missing about the installation process?
The soft knuckles driver and debug client works and appears in SteamVR Home, however the controllers do not appear in any game which supports the valve knuckles controllers (Aperature Hand Labs, The Lab, etc). I have a suspicion that it is because the game needs to detect the controllers as Valve Knuckles, however I do not have the correct model number to put into the OpenVR driver to test this theory.
I finally managed to install and use the soft knuckles driver perfectly, however, I'm facing a small issue: I am updating the position and orientation of each controller inside SoftKnucklesProvider::RunFrame()
using vr::VRServerDriverHost()->TrackedDevicePoseUpdated(m_knuckles[0].m_id, newPose, sizeof(DriverPose_t));,
which I can visually check is happening without any problem, but I can see each controller keeps alternating between the position and orientation I just gave it and the position and orientation it starts when initialized.
I can visually see each controller constantly alternating between these two states. Would you know what may be resetting the controllers states and how to avoid it?
Hey there, thanks for making this.
There's actually a bit of a bounty I want to put together for a universal software driver for the vive TRACKERS using off the shelf cameras so that vrchat and other applications can have full body without the purchase of vive trackers.
There's extremely fast, accurate, and dense realtime pose estimation from commodity RGB cameras and other devices like low light and colour led available now thanks to pytorch and other RNN, but there's nothing to take a joint/foot/etc and emulate vive trackers.
Your driver seems absolutely perfect, what would it take to pipe data from a video stream to it and make steamVR see it as a vive tracker rather than knuckles?
Software like this could then be used to pipe in data to it:
https://github.com/CMU-Perceptual-Computing-Lab/openpose
Hi,
First of all, thanks a lot for the driver, there is way too little examples for SteamVR drivers out there, so I'm sure this will help many people a lot!
Sadly, it doesn't seem like the Knuckles driver from Steam can be downloaded without pairing the real Knuckles controllers first, is there maybe a different way of getting the rendermodels?
Also, I wanted to ask if you're going to try to implement the Skeleton as well, and if so, what the approximate timeline for this is going to be?
Thanks and have a good day!
Hagen
I feel that the soft_knuckles title doesn't fully express what this utility can do, perhaps OPVRD? (openvr driver)
I have built the base driver and added it to SteamVR, however, there are several problems. Firstly, the driver is only adding the left controller (see screenshot below), the controller models are not appearing in VR, and the debug client does not seem to be able to interact with the driver, activate buttons, change pos, etc.
EDIT: had numdevices set to 1... the other two issues still stand.
Does the driver still work for you ?
Cause not for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.