百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

uArm-Python-SDK

> 编程语言
开源

适用于 Swift 和 Swift Pro 的新 Python 库

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

适用于 Swift 和 Swift Pro 的新 Python 库

uArm-Python-SDK


Overview

This module encapsulates the operations for uArm. It provides basic movement on Python. The library only supports uArm Swift/SwiftPro. For Metal, please use pyuarm or pyuf instead.

Related

  • 0.0 --> pyuarm
  • 1.0 --> pyuf
  • 2.0 --> uArm-Python-SDK

Update Summary for 2.0

  • Support multi-machine synchronization.
  • New Support Swift Pro firmware V4.0 or later.
  • Supoort event callback register and release.
  • Support api callback.
  • Support more custom configuration.
  • Better in management threads.
  • Easy to use.

Caution

  • Temporarily only supports Swift / SwiftPro.
  • Temporarily only supports Python3 (development is python3.5).
  • if your uArm's firmware is 4.0 or later, please set the speed between 1 to 250, or with the api set_speed_factor to fix.
  • Make sure you move the device head to a safe position and completely quit uArm Studio before running the tests.

Installation

bash
python setup.py install
  • Install is not necessary, you can run examples without installation.

Doc

  • Swift/SwiftPro
  • Other

Example:

  • Swift/SwiftPro

Import

…

Wait

swift.waiting_ready()
swift.flush_cmd()

Connect/Disconnect

swift.connect()
swift.disconnect()

Get

swift.get_power_status()
swift.get_device_info()
swift.get_limit_switch()
swift.get_gripper_catch()
swift.get_pump_status()
swift.get_mode()
swift.get_servo_attach(servo_id=2)
swift.get_servo_angle()
swift.get_polar()
swift.get_position()
swift.get_analog(0)
swift.get_digital(0)

Set

swift.set_speed_factor(1)
swift.set_mode(mode=0)
swift.set_wrist(90)
swift.set_servo_attach()
swift.set_servo_detach()
swift.set_buzzer(frequency=1000, duration=2)
swift.set_pump(on=True)
swift_set_gripper(catch=True)

Move

swift.reset()
swift.set_position(x=200, y=0, z=100, speed=100000)
swift.set_polar(stretch=200, rotation=90, height=150)
swift.set_servo_angle(servo_id=0, angle=90)

Event register/release

swift.register_report_position_callback(callback)
swift.release_report_position_callback(callback)
swift.set_report_position(0.5)

API callback

swift.get_polar(wait=False, callback=lambda i: print('polar', i))
swift.get_position(wait=False, callback=lambda i: print('pos', i))

License

uArm-Python-SDK is published under the BSD license

Issues· 17 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言