Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the hand data from vuer's Hand API #32

Open
jiqimao-1 opened this issue Nov 6, 2024 · 1 comment
Open

how to get the hand data from vuer's Hand API #32

jiqimao-1 opened this issue Nov 6, 2024 · 1 comment

Comments

@jiqimao-1
Copy link

Hello,when i run hand_tracking's example:

from vuer import Vuer, VuerSession
from vuer.schemas import Hands
from asyncio import sleep

app = Vuer()

@app.add_handler("HAND_MOVE")
async def handler(event, session):
print(f"Movement Event: key-{event.key}", event.value)

@app.spawn(start=True)
async def main(session: VuerSession):
# Important: You need to set the stream option to True to start
# streaming the hand movement.
session.upsert @ Hands(stream=True, key="hands")

while True:
    await sleep(1)

The terminal always show "event.value",but i can't get the data what i want.
I don't konw how to do.
Please help me,thank you.
The following i don't konw how to use in my python script.
/**

  • Left and right pose are relative to the wrist transformations.
    */
    export type HandsData = {
    left?: Float32Array; // 25 * 16 values.
    right?: Float32Array; // 25 * 16 values.
    leftState: HandState;
    rightState: HandState;
    };

export type HandState = {
pinch: boolean;
squeeze: boolean;
tap: boolean;

pinchValue: number;
squeezeValue: number;
tapValue: number;
}

@jiqimao-1
Copy link
Author

when i use the vuer==0.0.35,nothing shows on the ternimal

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

No branches or pull requests

1 participant