https://github.com/cyberorigin2077/open_cyber_glove
Python SDK for OpenCyberGlove ๐งค
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
โCITATION.cff file
Found CITATION.cff file -
โcodemeta.json file
Found codemeta.json file -
โ.zenodo.json file
Found .zenodo.json file -
โDOI references
-
โAcademic publication links
-
โCommitters with academic emails
-
โInstitutional organization owner
-
โJOSS paper metadata
-
โScientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
Python SDK for OpenCyberGlove ๐งค
Basic Info
Statistics
- Stars: 27
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
OpenCyberGlove SDK
An open-source Python SDK for interfacing with data gloves, supporting real-time sensor data acquisition, calibration, and extensible inference. Designed for robotics, VR/AR, and HCI applications.
Features
- Connect to one or two data gloves via serial port (1Mbps baudrate)
- Real-time sensor data acquisition at 120Hz
- Comprehensive sensor data including:
- 19 tensile sensors
- Temperature sensor
- Timestamp
- Extensible inference interface for custom models
For more product info, refer to here.
Installation
From Source
bash
git clone https://github.com/CyberOrigin2077/open_cyber_glove.git
cd open_cyber_glove
conda create --name ocg python=3.9
conda activate ocg
pip install -e .
Dependencies
The package requires: - Python 3.7+ - pyserial - numpy - matplotlib - tqdm - open3d
Usage
Here are a few examples of how to use the OpenCyberGlove SDK.
Basic Usage: Single Glove
This example shows how to connect to a single glove, calibrate it, and read raw sensor data.
```python from opencyberglove.sdk import OpenCyberGlove
Initialize SDK for a single left glove.
Replace '/dev/ttyUSB0' with your glove's serial port.
sdk = OpenCyberGlove(left_port='/dev/ttyUSB0')
Start the background data reader.
sdk.start()
Calibrate the glove. This is an interactive process.
print("Starting calibration...") sdk.calibrate() print("Calibration finished.")
Get the latest sensor data packet.
sensordata = sdk.getdata('left') print(f"Timestamp: {sensordata.timestamp}") print(f"Tensile data: {sensordata.tensiledata}") print(f"Accelerometer: {sensordata.acc_data}")
Stop the data reader.
sdk.stop() ```
Real-Time 3D Hand Visualization
The examples/hello_world.py script provides a complete demonstration of the SDK's capabilities, including real-time hand pose inference and 3D visualization. It reads data from one or two gloves, feeds it into a pre-trained ONNX model to infer joint angles, and then visualizes the hand's movement in a 3D environment using Open3D.
To run the example, use the following command structure, providing the serial ports for your gloves and paths to the model files. For model files, you need to download from here and put them under model directory.
Example command for dual gloves:
bash
python3 -m examples.hello_world --right_port ${RIGHT_PORT} --left_port ${LEFT_PORT} --calib_path ${HAND_MODEL} --model_path ${MODEL_PATH}
You can also run it with a single glove:
bash
python3 -m examples.hello_world --right_port ${RIGHT_PORT} --calib_path ${HAND_MODEL} --model_path ${MODEL_PATH}
The script will first guide you through the interactive calibration process for each connected glove. After calibration, a 3D visualization window will appear, showing the real-time movement of the hand(s).
Note: The quality of the visualization significantly depends on the model and proper calibration.
ROS2 Wrapper
For ROS2 integration, we provide a dedicated wrapper package that enables seamless integration with the Robot Operating System 2 (ROS2) ecosystem. This wrapper allows you to publish glove data as ROS2 messages and integrate with other ROS2 nodes.
For detailed installation instructions, usage examples, and available ROS2 message types, please visit our ROS2 wrapper repository: OpenCyberGlove ROS2 Wrapper
We also offer a dedicated wrapper for retargeting glove motions to specific robotic hands: OpenCyberGlove Retarget ROS2
Data Structure
The GloveSensorData class provides structured access to all sensor data:
- tensile_data: Tuple of 19 integers (0-16384)
- acc_data: Tuple of 3 floats (To be added)
- gyro_data: Tuple of 3 floats (To be added)
- mag_data: Tuple of 3 floats (To be added)
- temperature: Float
- timestamp: Integer
Roadmap
- [x] Core functionality
- [x] ROS2 wrapper
- [ ] Glove in simulation
- [ ] Model finetune pipeline
License
BSD 3-Clause License
Owner
- Name: CyberOrigin2077
- Login: CyberOrigin2077
- Kind: organization
- Repositories: 1
- Profile: https://github.com/CyberOrigin2077
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it using the following metadata." title: "open_cyber_glove" date-released: 2024-07-07 version: "0.1.0" url: "https://github.com/CyberOrigin2077/open_cyber_glove" repository-code: "https://github.com/CyberOrigin2077/open_cyber_glove" license: "BSD 3-Clause License" authors: - name: CYBERORIGIN PTE. LTD.
GitHub Events
Total
- Watch event: 23
- Delete event: 5
- Push event: 16
- Pull request review event: 13
- Pull request review comment event: 32
- Pull request event: 8
- Create event: 10
Last Year
- Watch event: 23
- Delete event: 5
- Push event: 16
- Pull request review event: 13
- Pull request review comment event: 32
- Pull request event: 8
- Create event: 10
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| omiz-rehtona | z****c@c****k | 8 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- Jinja2 ==3.1.4
- Markdown ==3.7
- MarkupSafe ==3.0.2
- PyYAML ==6.0.2
- Pygments ==2.18.0
- babel ==2.16.0
- certifi ==2024.8.30
- charset-normalizer ==3.4.0
- click ==8.1.7
- colorama ==0.4.6
- ghp-import ==2.1.0
- idna ==3.10
- mergedeep ==1.3.4
- mkdocs ==1.6.1
- mkdocs-autorefs ==1.2.0
- mkdocs-get-deps ==0.2.0
- mkdocs-material ==9.5.42
- mkdocs-material-extensions ==1.3.1
- mkdocs-swan ==0.4.0
- mkdocstrings ==0.26.2
- packaging ==24.1
- paginate ==0.5.7
- pathspec ==0.12.1
- platformdirs ==4.3.6
- pymdown-extensions ==10.12
- python-dateutil ==2.9.0.post0
- pyyaml_env_tag ==0.1
- regex ==2024.9.11
- requests ==2.32.3
- six ==1.16.0
- urllib3 ==2.2.3
- watchdog ==5.0.3
- matplotlib *
- numpy *
- onnxruntime *
- open3d *
- pyserial *
- scipy *
- tqdm *
- matplotlib *
- numpy *
- onnxruntime *
- open3d *
- pyserial *
- scipy *
- matplotlib *
- numpy *
- onnxruntime *
- open3d *
- pyserial *
- tqdm *