Skip to content

Getting started with pygloves

unsigned code edited this page Mar 26, 2022 · 1 revision

pygloves

Demo showing hand and finger movement

It would be nice to see if LucidGloves work without having to start SteamVR. This repo attempts to plot glb files in the same was as Steam, so that you can test out experimental designs, such as gloves with potentiometers per finger joint, without having to get it working with Steam, etc

pip install numpy
pip install matplotlib

# Test using GUI
python lerp_finger_slider.py

# Test using Arduino over Serial (check comport and left/right handedness)
pip install pyserial
python lerp_finger_from_serial.py

# Test using Myo
pip install pyomyo
python lerp_finger_from_myo.py

lerp_finger_from_serial.py

Reads serial values then plots the hand live using multithreading.
In order to work, you need to define the COM port that the Arduino is using and make sure no other program is using it. E.g. SteamVR

lerp_finger_slider.py

Features 6 sliders, one for overall curl and one for each finger.
Moving these sliders will generate plots of the hand using those curl values.

opengloves_tester.py

OpenGloves Tester
Sends flexion values from GUI sliders to OpenGloves using a NamedPipe.

bone.py

Attempts to plot the OpenGloves glb file.
The glb file is hierarchical, so the end of the finger cannot just be plotted, it has to be calculated by considering the other points in the finger. Relative positions have to be built into global positons.

Useful links

glb/gltf2.0 refrence guide
glb Nodes Tutorial
OpenVR Hand Skeleton Docs
3Blue1Brown, Visualizing quaternions
Implimenting Forward Kinematics