r57zone / OpenVR-driver-for-DIY

OpenVR driver for DIY
GNU General Public License v3.0
129 stars 28 forks source link

Linux - "Invalid input type click for controller" #6

Open Isopodus opened 2 years ago

Isopodus commented 2 years ago

Hi there and thanks for your software. Just trying to write some custom driver and found this one gonna be a nice template. I've built the project for Linux and it started up (I can see the driver is loaded in logs), but the controls are not working, so I'm stuck looking at the home screed. Idk if that was necessary but I did the room setup procedure, just in case.

When looking through logs I saw a ton of the following messages:

Mon Jun 13 2022 22:49:23.820949 - Invalid input type click for controller (/user/head/proximity)
Mon Jun 13 2022 22:49:23.821208 - Invalid input type touch for controller (/user/hand/left/input/trackpad)
Mon Jun 13 2022 22:49:23.821250 - Invalid input type touch for controller (/user/hand/right/input/trackpad)
Mon Jun 13 2022 22:49:23.821291 - Invalid input type position for controller (/user/hand/left/input/joystick)
Mon Jun 13 2022 22:49:23.821310 - Invalid input type position for controller (/user/hand/right/input/joystick)

I didn't find any relative information for that, but after looking through the code a bit, I tried to log some data out of your GetPose function. So it seems like the rotation and position variables were not changing at all for both controllers and hmd, at this moment I noticed the GetAsyncKeyState, which is not implemented in Linux, so ignoring key presses became clear. But the error messages seem to be wrong. Did you have such messages on windows?

r57zone commented 2 years ago

Hi, probably the API has changed, I think need to create profiles like here https://github.com/r57zone/OpenVR-Additional-Arduino-Btns

If you just want to try moving with keyboard and mouse then you can try this driver https://github.com/r57zone/Half-Life-Alyx-novr but it will probably need to be changed so that it builds on linux

Isopodus commented 2 years ago

Just as I said, I'm using it just as a template, so no need to make the keyboard buttons working. About the profiles, do you mean the json files under resources/input? I remeber this line where you're pointing on a profile that needs to be created, probably. https://github.com/r57zone/OpenVR-driver-for-DIY/blob/50211b9ffe5524f4b6557dfaf276a00748ae1b0d/OpenVR/samples/driver_sample/csamplecontrollerdriver.cpp#L76-L78

So in case I create a profile for the driver, I'll just need to set it like {sample}/input/profile_i_made.json? And put it into the folder ofc.

r57zone commented 2 years ago

yep