Skip to main content

Buildit

Buildit Actuator を制御する為のPython3用ライブラリ

Install

Windows

$ pip3 install pybuildit2

Ubuntu

$ sudo apt-get -y install python3-tk
$ pip3 install pybuildit2

Usage

pybuildit2 library

>>> from pybuildit2 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 pybuildit2 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybuildit2 1.0.0
File Size Uploaded Provenance Actions
pybuildit2-1.0.0.tar.gz 35.1 kB Without provenance Details for pybuildit2-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pybuildit2 1.0.0
File Interpreter ABI Platform Actions
pybuildit2-1.0.0-py3-none-any.whl Python 3 none any Details for pybuildit2-1.0.0-py3-none-any.whl

Total release size: 78.5 kB

Release files / pybuildit2-1.0.0.tar.gz

Download URL pybuildit2-1.0.0.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d0eea30b2fc3758f26e3624d4d4e9866a2b067ac6f241640b9f6bbcd050e428
BLAKE2b-256 checksum
How to use checksums
6e7451f5c590ddb02c3ca6d6c52aa7b2d560421a3efaea7e2ffaa323f5748019
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.2 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

Release files / pybuildit2-1.0.0-py3-none-any.whl

Download URL pybuildit2-1.0.0-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0270d24fa82e31cd479056238025ba2e48f58e12c30235bf3b8c3ab041047c47
BLAKE2b-256 checksum
How to use checksums
3a167ec4283bee92281d0ac5923169137cf7de82f0508d8ded33b329a3d830ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.2 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

Security for pybuildit2 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page