A Python library for diving station
Project description
Diving Station Python SDK
Diving Stationデバイスと通信するためのPython SDKです。 v1.5.6以降のDiving Stationに対応しています。
特徴
- Diving Stationデバイスとの接続管理
- デバイス情報の取得
- ハンドジェスチャー(手の曲げ、クォータニオン)データの受信
- 触覚フィードバックの制御
- 手首の動きデータの受信
インストール
- pip
pip install diving-station
- rye
rye add diving-station
使用方法
import asyncio
from diving_station_py.client import DivingStationClient
from diving_station_py.constants import HandType
async def main():
client = DivingStationClient()
# デバイスに接続
await client.connect()
# メインデバイスが見つかるまで待機
main_device = None
while not main_device:
await asyncio.sleep(0.1)
main_device = client.devices[0] if client.devices else None
if main_device:
# 右手に触覚フィードバックを送信
await client.send_haptic(
device_id=main_device.id,
hand_type=HandType.RIGHT,
frequency=0.1,
intensity=1.0,
duration=0.2
)
# 切断
await client.disconnect()
# 非同期実行
asyncio.run(main())
開発
依存関係のインストール
rye sync
テストの実行
テストの実行はDiving Stationを起動し, デバイスを接続してから行ってください。
rye pytest
ライセンス
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diving_station_py-0.1.1.tar.gz.
File metadata
- Download URL: diving_station_py-0.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14eec9af74c08b59fd741b9ac15ca939f08ac4474dba27b3640326fd21d084f2
|
|
| MD5 |
73e7dcc6f2301d25c9b439f8e0d63c9e
|
|
| BLAKE2b-256 |
8c7a17dce64cc8b18b56a0105a6e31d5d3dfe0df684b6a5cd2a432e04300da0c
|
Provenance
The following attestation bundles were made for diving_station_py-0.1.1.tar.gz:
Publisher:
publish.yml on OctSquid/diving-station-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diving_station_py-0.1.1.tar.gz -
Subject digest:
14eec9af74c08b59fd741b9ac15ca939f08ac4474dba27b3640326fd21d084f2 - Sigstore transparency entry: 162095168
- Sigstore integration time:
-
Permalink:
OctSquid/diving-station-py@11b6903ccf80c806d3ca0bb022f5a48ae55de939 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/OctSquid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@11b6903ccf80c806d3ca0bb022f5a48ae55de939 -
Trigger Event:
release
-
Statement type:
File details
Details for the file diving_station_py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: diving_station_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1928b97e5b479acd3842301b0a342f34c84b3436c5ed97b4c3761cf1be13f63
|
|
| MD5 |
9c278fb909a9c4ee9fb116fc78c8d568
|
|
| BLAKE2b-256 |
1565cb7b57054b2a14b5864e91eb3638da55b7c40ed3f3682294c589deeecf12
|
Provenance
The following attestation bundles were made for diving_station_py-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on OctSquid/diving-station-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diving_station_py-0.1.1-py3-none-any.whl -
Subject digest:
a1928b97e5b479acd3842301b0a342f34c84b3436c5ed97b4c3761cf1be13f63 - Sigstore transparency entry: 162095172
- Sigstore integration time:
-
Permalink:
OctSquid/diving-station-py@11b6903ccf80c806d3ca0bb022f5a48ae55de939 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/OctSquid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@11b6903ccf80c806d3ca0bb022f5a48ae55de939 -
Trigger Event:
release
-
Statement type: