Skip to content

Feature/etvr module support#106

Merged
lorow merged 33 commits intoEyeTrackVR:v2.0-beta-feature-branchfrom
lorow:feature/etvr-module-support
Jul 4, 2024
Merged

Feature/etvr module support#106
lorow merged 33 commits intoEyeTrackVR:v2.0-beta-feature-branchfrom
lorow:feature/etvr-module-support

Conversation

@lorow
Copy link
Member

@lorow lorow commented Mar 18, 2024

Description

Refactors completely OSC and adds support for the VRCFT module

Changes done:

  • Refactor entirely how OSC works
  • Fix V2 params
  • Fix eye_x parameter in V1 params
  • Add proper support for ETVR VRCFT Module
  • Fix Apply And restart button not actually working, now it will restart the tracking
  • Commit some crimes to make pydantic and pysimplegui happy
  • Implement tests
  • Cleanup some dead / duplicated code
  • Improve message passing, more components now react to changes

To explain a bit how the new architecture works.

We have now one main OSCManager, its role is to coordinate dispatching OSC messages to anything that needs them, and to listen and react to any incoming OSC messages. This is done using two other components. An OSCSender, and an OSCReceiver. It's one additional purpose is to serve as a proxy for registering callbacks for the OSCReceiver.

Basically, the OSCManager's role boils down to setting up a sender and a receiver component, spinning their threads and coordinating them, restarting them if need be.

Actual sending of messages is coordinated by the OSCSender component, it's responsible for listening to the passed down by OSCManager queue and dispatching the given message to a concrete sender. It does so based on the message type.

Right now, we implement two senders. VRChatOSCSender and VRCFTModuleSender, their purpose is to take the message and some context, transform the message into OSC messages the receiver expects and send them.

As for the receiving.

That's done by the OSCReceiver, it listens for any incoming messages, checks if they're valid and sends them to the interested receiver as a OSCMessage data object. Callbacks themselves are responsible for deciding if they want to engage with the given message.

To register a callback, the service must define the address it wishes to receive messages from, and the function to call. For example:

    osc_manager.register_listeners(
        config.settings.gui_osc_recenter_address,
        [
            eyes[0].recenter_eyes,
            eyes[1].recenter_eyes,
        ],
    )

Checklist

  • I accept the CLA.

@lorow lorow changed the title DRAFTL Feature/etvr module support DRAFT Feature/etvr module support Mar 20, 2024
@lorow lorow force-pushed the feature/etvr-module-support branch 2 times, most recently from 77e2331 to a0b8b3f Compare March 29, 2024 19:41
@lorow lorow changed the title DRAFT Feature/etvr module support Feature/etvr module support Mar 29, 2024
@lorow lorow marked this pull request as ready for review March 29, 2024 20:16
@lorow lorow force-pushed the feature/etvr-module-support branch from b0641b0 to 1e6fced Compare April 15, 2024 20:38
lorow added 24 commits July 4, 2024 19:25
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
NOTE:

I brought back the entire old OSC implementation as a live reference, this will be removed once I'm done.

This also lays ground for other modes as they're pretty similar

# TODO:
# - there's ghosts in the machine - vrc osc is not working properly
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
…ig sends everything changed anyway, sunset the idea of using single client and thus simplify the code a bit

# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
# TODO:
# - min/maxing will require field combinators in the modules lmao
…Receiver

# TODO:
# - min/maxing will require field combinators in the modules lmao
@lorow lorow force-pushed the feature/etvr-module-support branch from 3c729b1 to 3d7b5bc Compare July 4, 2024 18:04
@lorow lorow merged commit 7e41a65 into EyeTrackVR:v2.0-beta-feature-branch Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant