Buildit
Buildit Actuator を制御する為のPython3用ライブラリ
Install
Windows
$ pip3 install pybuildit
Ubuntu
$ sudo apt-get -y install python3-tk
$ pip3 install pybuildit
Usage
pybuildit library
-
ライブラリについてのドキュメント
-
初期化
- ※ 以下のデバイスファイル名やCOMポート番号は環境に合わせて変更する必要があります
>>> from pybuildit import *
>>> buildit = Buildit(port="/dev/ttyXXXX") #for Linux (例: /dev/ttyUSB0)
>>> buildit = Buildit(port="COMX") #for Win (例:COM8)
>>> deviceId = 1
- 現在の位置や速度といった情報の取得
>>> qss = buildit.query_servo_status(deviceId)
>>> print("position[deg]: ", qss.position(unit="deg"))
>>> print("velocity[rpm]: ", qss.velocity(unit="rpm"))
>>> print("temperature[℃]: ", qss.temperature())
>>> print("state: ", buildit.last_mcp_status().str_state())
- 速度制御と位置制御の方法
>>> buildit.force_ready(deviceId)
>>> buildit.set_ref_velocity(deviceId, 40, unit="rpm")
>>> buildit.set_ref_position(deviceId, 180, unit="deg")
builditctl
builditctl は Buildit の各メソッドをコマンドラインから呼び出す為のツールです。 アクチュエーターの状態を確認する場合は以下のように実行します。
$ builditctl query-servo-status -d 1 -p /dev/ttyXXXX
state: STATE_HOLD
pos: -51636
vel: 0
cur: 0
ref: 0
temp: 26
faults: NO_FAULTS
速度制御を行う場合は以下のように実行します。
$ builditctl ready -d 1 -p /dev/ttyXXXX
$ builditctl set-ref-velocity 2500 -d 1 -p /dev/ttyXXXX # 指定速度の単位は [rpm/100]
0
位置制御を行う場合は以下のように実行します。
$ builditctl stop -d 1 -p /dev/ttyXXXX
$ builditctl set-ref-position 2500 -d 1 -p /dev/ttyXXXX # 指定位置の単位は [360/65536 度]
-39775
builditct-gui
builditctl は Buildit の各メソッドをコマンドラインから呼び出す為のツールです。
$ builditctl-gui
ポートを選択し、Connectボタンを押した後、各種ボタンを使ってデバイスを操作することが出来ます。
Metadata
Release files for pybuildit 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pybuildit-1.0.1.tar.gz | 33.2 kB | Without provenance | Details for pybuildit-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybuildit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pybuildit-1.0.1-py3-none-any.whl |
Total release size: 73.7 kB
Release files / pybuildit-1.0.1.tar.gz
| Download URL | pybuildit-1.0.1.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
644faf3fe23e9f6db19c9c76b54263114d992e5020dd206e712af40e64522667
|
|
BLAKE2b-256 checksum How to use checksums |
b450439eaa9edbf676fec4d1d9757a2177837ac3ab1b98048313fb20900d63e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
|
Release files / pybuildit-1.0.1-py3-none-any.whl
| Download URL | pybuildit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 40.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eeb71d4128fa0f7f680a56c1d85d47696145779fe3008543594eabea95e61ff3
|
|
BLAKE2b-256 checksum How to use checksums |
b074a898bdbf5743fe7ab9bddc342308cb1be8c968e725f89c04a2bb0cbb763b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
|
Security for pybuildit 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.