Skip to main content

An async TCP client wrapper for controlling a gripper with force sensing and callback support.

Project description

控制抓手 (带力传感器) 的 TCP 客户端

示例

# Expample:

form lzh_gripper_with_force_sensor import GripperWithForceSensor

GRIPPER_IP = '192.168.0.123'
gripper = GripperWithForce_sensor(host=GRIPPER_IP)

gripper.set_mode(1)             # 设置抓取模式 (1~4)
gripper.prepare()               # 准备抓取
gripper.grip()                  # 抓取
gripper.release()               # 释放
gripper.force()                 # 查询力值 (kg)
gripper.force_sensor_zeroing()  # 力传感器调零
gripper.status()                # 抓手当前状态汇总
    
# 回调函数相关 (非必须)
def callback(kg: float):        # 定义一个回调函数
    print(f'New force value print from callback : {kg} kg')

gripper.set_force_callback(     # 设置差值模式回调
    callback = callback,
    callback_threshold = 0.1,
    single_callback_mode = False
)
gripper.set_force_callback(     # 设置单阈值模式回调
    callback = callback,
    callback_threshold = 3.0,
    single_callback_mode = True
)

安装 - PyPI

pip install lzhgripperwithforcesensor

API

Document

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lzhgripperwithforcesensor-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lzhgripperwithforcesensor-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file lzhgripperwithforcesensor-0.1.1.tar.gz.

File metadata

File hashes

Hashes for lzhgripperwithforcesensor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8aff77333d3ec258b04da23de4b42daf1a5696504fb95b4d52a52cfee2724b77
MD5 4748ecb66268fbeae6e4c8f539f7e067
BLAKE2b-256 4ed96c8bb0d9ce4acf59749b43660e8cf5519d80d49f4796c0481197f28caca1

See more details on using hashes here.

File details

Details for the file lzhgripperwithforcesensor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lzhgripperwithforcesensor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22c2559a086042b05335c8af5ea577c91cf3aa67a64c9561827ffed2296b21c3
MD5 e099638918773454b35a56add5667037
BLAKE2b-256 0e9ea36985ca50a06275b38156032991f501e9cddfad11a265af3c13c4630fd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page