Giter VIP home page Giter VIP logo

i5ucc / vrcthumbparamsosc Goto Github PK

View Code? Open in Web Editor NEW
50.0 1.0 6.0 1.72 MB

OSC program that makes SteamVR controller actions, Tracker button actions and XInput actions accessible as Avatar Parameters.

License: GNU General Public License v3.0

Python 69.26% Batchfile 0.87% C# 29.88%
openvr-bindings openvr-utility vrchat vrchat-sdk3 vrchat-tool chilloutvr vrchat-osc cvr-osc vrchat-avatars

vrcthumbparamsosc's Introduction

ThumbParamsOSC

Github All Releases GitHub release (latest by date) Buy Me a Coffee at ko-fi.com

OSC program that makes SteamVR controller actions, Tracker button actions and XInput actions accessible as Avatar Parameters.

Currently supports Valve-Index, Oculus(Meta)-Touch, SteamVR Trackers and XInput Controllers.

Available Parameters

Following sections go over all available parameters. All parameters are case-sensitive.

SteamVR Controller Parameters

Parameter Type
ControllerType int
RightThumb int
LeftThumb int
LeftAButton bool
LeftBButton bool
LeftABButtons bool
LeftTrackPad bool
LeftThumbStick bool
RightAButton bool
RightBButton bool
RightABButtons bool
RightTrackPad bool
RightThumbStick bool
LeftAButtonClick bool
LeftBButtonClick bool
LeftTrackPadClick bool
LeftThumbStickClick bool
RightAButtonClick bool
RightBButtonClick bool
RightTrackPadClick bool
RightThumbStickClick bool
LeftGrab bool
RightGrab bool
LeftTrigger float
RightTrigger float
LeftGrabForce float
RightGrabForce float
RightTrackpadForce float
LeftTrackpadForce float
LeftStickMoved bool
RightStickMoved bool
LeftTrackPadY float
RightTrackPadY float

Tracker Parameters

Parameter Type
LeftFootTracker bool
RightFootTracker bool
WaistTracker bool
ChestTracker bool
LeftElbowTracker bool
RightElbowTracker bool
LeftKneeTracker bool
RightKneeTracker bool

XInput Parameters

Parameter Type
XInputAButton bool
XInputBButton bool
XInputXButton bool
XInputYButton bool
XInputLeftThumbstick bool
XInputRightThumbstick bool
XInputLeftBumper bool
XInputRightBumper bool
XInputBackButton bool
XInputStartButton bool
XInputLeftDPad bool
XInputRightDPad bool
XInputUpDPad bool
XInputDownDPad bool
XInputLeftTrigger float
XInputRightTrigger float
XInputLeftStickMoved bool
XInputRightStickMoved bool
XInputDPadMoved bool

Special Parameters

The two int parameters RightThumb and LeftThumb represent the position of each thumb with the numbers from 0 to 4:

Value Real Position
0 Not Touching
1 A/X Button
2 B/Y Button
3 Trackpad
4 Thumbstick

The int ControllerType gives what controller is currently being used:

Controller Value
Meta/Oculus Touch 2
Index 1
XInput Controller 10
XInput+Meta 12
XInput+Index 11
Any other controller/No Controller 0

[Left/Right]ABButtons detects if the thumb is on either the A or B buttons, or Touching both at the same time.

Tracker Power button parameters require Tracker roles to be set up in SteamVR:
Go to SteamVR-Settings > Manage Trackers and set up tracking roles for each tracker respectively: 268513445-16f47092-6f8b-4de6-9d5d-118fc9135c29

How to use

Activate OSC in VRChat:

EnableOSC

In Action menu, got to Options>OSC>Enable

Run Configurator.exe to configure the program.

Then just run the ThumbParamsOSC.exe and you are all set!

OSC Troubleshoot

If you have problems with this program, try this to fix it:

  • Automatic way:
    • Close VRChat.
    • Run Configurator.exe and click on the Button "Reset OSC Config"
    • Startup VRChat again and it should work.
  • Manual way:
    • Close VRChat.
    • Open 'Run' in Windows (Windows Key + R)
    • Type in %APPDATA%\..\LocalLow\VRChat\VRChat\OSC
    • Delete the folders that start with 'usr_*'.
    • Startup VRChat again and it should work.

Decreasing OSC Traffic

ThumbparamsOSC consistently sends the current state of each parameter, with a lot of parameters the OSC traffic can increase significantly.
To mitigate this there are a three things you can do:

  • Disable all parameters that you do not need.
  • Switch to a different mode then "Always Send"
  • Lower the Polling Rate You can read on how to do that in #Configuration

Configuration

Running Configurator.exe lets you customize the Parameters that you want to have sent to VRChat, and some more things:

grafik

Unchecking or checking any of the parameters and the hitting save will save the current settings.
You can use the buttons below to do quick unticking or ticking of groups of parameters

  • Floating Time allows values "float" on the last value registered, it is measured in seconds.
    • If Floating Time is set to -1 for boolean values, they will act like a toggle instead of always updating to the current state.
  • Tick the Unsigned Box for any supported parameter to map the float value to [0, 1] instead of [-1, 1]
  • Mode has 3 different values:
    • "Send On Change" (Default) As the name might suggest, it sends a parameter only when it has changed from its previous value.
    • "Send On Positive" It sends a Parameter when it changes, but also continuosly sends Positive values every Poll.
    • "Always Send" This is like the old behaviour, just sends the parameters current state every Poll.
    • You can use the three buttons below to quickly switch between modes for every parameter

Automatic launch with SteamVR

On first launch of the program, it registers as an Overlay app on SteamVR just like other well known programs like XSOverlay or OVRAdvancedSettings and can be launched on startup: Screenshot 2022-12-04 184629
Screenshot 2022-12-04 184907

After setting the option to ON it will launch the program without the console on SteamVR startup.

Command line Arguments

You can run this by using ThumbParamsOSC.exe {Arguments} in command line.

Option Value
-d, --debug prints values for debugging
-i IP, --ip IP set OSC IP. Default=127.0.0.1
-p PORT, --port PORT set OSC port. Default=9000

Credit

Great Projects making use of ThumbparamsOSC:

vrcthumbparamsosc's People

Contributors

i5ucc avatar qbitzvr avatar thelvaen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vrcthumbparamsosc's Issues

Starting SteamVR then I got a error for Thumbparams won't start

---------------------------
cx_Freeze: Python error in main script
---------------------------
Traceback (most recent call last):
  File "ThumbParamsOSC.py", line 328, in <module>
  File "ThumbParamsOSC.py", line 229, in handle_input
TypeError: 'bool' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:\GitRepos\VRCThumbParamsOSC\venv\Lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 135, in run
  File "F:\GitRepos\VRCThumbParamsOSC\venv\Lib\site-packages\cx_Freeze\initscripts\console.py", line 18, in run
  File "ThumbParamsOSC.py", line 338, in <module>
RuntimeError: input(): lost sys.stdin

---------------------------
OK   
---------------------------

This bug is start up I guess so I can't figure out what a problem with it. Anyone can understand this bug why?
I cannot find anything in troubleshoot

Finger-button position delay very high on Quest wireless

Playing VRChat on a Quest 2, using Steam Link wireless streaming over a stable 5Ghz connection directly wired to host PC to minimize any latency on that end. Using all default values with the most recent release.

When using the VRC-ASL Gestures animations (https://github.com/I5UCC/VRC-ASL_Gestures) with the Quest/ThumbParams avatar option I am noticing the latency or delay of the detected finger-button changes aren't taking effect in game for around 5 seconds or more. Very rarely it will be as quick as 2 seconds, but around 5 seconds or longer is about the median time I can tell.

Steps to recreate:

  1. Confirm OSC and ASL Gestures enabled
  2. Make Victory hand pose with A button thumb position to create "R-hand" sign
  3. Change thumb position to B button to create "V-hand" sign
  4. Count the time between when the VR 3D model changes from R to V-hand sign

Error

29-Jan-24 11:27:31 - ERROR - Traceback (most recent call last):
File "main.py", line 241, in
File "D:\GitRepos\VRCThumbParamsOSC\src\osc.py", line 27, in init
File "D:\GitRepos\VRCThumbParamsOSC\src\osc.py", line 52, in start_server
File "D:\GitRepos\VRCThumbParamsOSC\src\osc.py", line 82, in _wait_get_oscquery_client
File "D:\GitRepos\VRCThumbParamsOSC\src\tinyoscquery\query.py", line 50, in find_service_by_name
File "D:\GitRepos\VRCThumbParamsOSC\src\tinyoscquery\query.py", line 120, in get_host_info
Exception: ('Node query error: (HTTP', 204, ') ', b'')

Index trackpad pressure sensor

Index trackpads are 3D inputs, but I only see X/Y position of the trackpad, is the pressure sensor mapped to any of the OSC params?

Also, what happens to X/Y position after you stop touching the touchpad?

Option to disable ints and send only bool

Hi, thank you for making this program - It works really well for me :) I just wanted to ask if an option to disable sending int values would be possible? I am only using bools (specifically left thumbstick) so there is a lot of unnecessary OSC data being sent with my setup. Since I run a lot of OSC senders at once, its important that I only send necessary events or sometimes the OSC pipeline stalls/crashes. Some customisation for what is/isnt sent would be an awesome addition. Thank you so much for this once again @I5UCC :)

Quest 3 causes crash

Since i own a Quest 3 which is connected over Virtual Desktop with my PC i get sometimes the following issue when i start SteamVR

I couldn't find log.log.
image

Reproducable with about 50%. Works after restarting it manually.

Index grip strength

This might be out of scope for this project, but figured I'd post this anyways.

I was telling a friend of mine about this program and he suggested that a float for measuring the grip strength on index controllers would be very neat to have, for like stress toys on your avatar or controlling particle strength on a prop.

A general "isGrabbing" bool for all controller types would be great too.

Thumbstick Click Bool

For what I'm trying to make, it would be perfect if I had a bool when you clicked the left/right thumbstick!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.