# linkerhand-python-sdk **Repository Path**: lauka1026/linkerhand-python-sdk ## Basic Information - **Project Name**: linkerhand-python-sdk - **Description**: github https://github.com/linker-bot/linkerhand-python-sdk 灵心巧手SDK镜像 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-20 - **Last Updated**: 2026-01-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LinkerHand-Python-SDK ## 概述 Linker Hand [灵心巧手(北京)科技有限公司](https://linkerbot.cn/index) 专注于人工智能和机器人解决方案,帮助开发者、企业、科研机构快速实现真实场景落地 [中文](README_CN.md) | [English](README.md) ## 注意 - 请确保灵巧手未开启其他控制,如linker_hand_sdk_ros、动捕手套控制和其他控制灵巧手的topic。以免冲突。 - 请将固定灵巧手,以免灵巧手在运动时跌落。 - 请确保灵巧手电源与USB转CAN连接正确。 | Name | Version | Link | | --- | --- | --- | | Python SDK | ![SDK Version](https://img.shields.io/badge/SDK%20Version-V3.0.1-brightgreen?style=flat-square) ![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square&logo=python&logoColor=white) ![Windows 11](https://img.shields.io/badge/OS-Windows%2011-0078D4?style=flat-square&logo=windows&logoColor=white) ![Ubuntu 20.04+](https://img.shields.io/badge/OS-Ubuntu%2020.04%2B-E95420?style=flat-square&logo=ubuntu&logoColor=white) | [![GitHub 仓库](https://img.shields.io/badge/GitHub-grey?logo=github&style=flat-square)](https://github.com/linker-bot/linkerhand-python-sdk) | | ROS SDK | ![SDK Version](https://img.shields.io/badge/SDK%20Version-V3.0.1-brightgreen?style=flat-square) ![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square&logo=python&logoColor=white) ![Ubuntu 20.04+](https://img.shields.io/badge/OS-Ubuntu%2020.04%2B-E95420?style=flat-square&logo=ubuntu&logoColor=white) ![ROS Noetic](https://img.shields.io/badge/ROS-Noetic-009624?style=flat-square&logo=ros) | [![GitHub 仓库](https://img.shields.io/badge/GitHub-grey?logo=github&style=flat-square)](https://github.com/linker-bot/linkerhand-ros-sdk) | | ROS2 SDK | ![SDK Version](https://img.shields.io/badge/SDK%20Version-V3.0.1-brightgreen?style=flat-square) ![Python 3.11](https://img.shields.io/badge/Python-3.11-3776AB?style=flat-square&logo=python&logoColor=white) ![Ubuntu 24.04](https://img.shields.io/badge/OS-Ubuntu%2024.04-E95420?style=flat-square&logo=ubuntu&logoColor=white) ![ROS 2 Jazzy](https://img.shields.io/badge/ROS%202-Jazzy-00B3E6?style=flat-square&logo=ros) ![Windows 11](https://img.shields.io/badge/OS-Windows%2011-0078D4?style=flat-square&logo=windows&logoColor=white) | [![GitHub 仓库](https://img.shields.io/badge/GitHub-grey?logo=github&style=flat-square)](https://github.com/linker-bot/linkerhand-ros2-sdk) | ## Installation   您可以在安装requirements.txt后的情况下运行示例。仅支持 Python3。 - download ```bash $ git clone https://github.com/linker-bot/linkerhand-python-sdk.git ``` - install ```bash $ cd linkerhand-python-sdk/ $ pip3 install -r requirements.txt ``` - 快速使用示例 by CAN 编辑config/setting.yaml配置文件,按照配置文件内注释说明进行参数修改,配置CAN: "can0"(根据实际硬件情况来确定,一般第一个为can0),配置MODBUS:"None" ```bash # Open the CAN port $ sudo /usr/sbin/ip link set can0 up type can bitrate 1000000 # USB-to-CAN device blue light stays solid. This step can be skipped on Ubuntu systems after modifying setting.ymal as required. $ cd examples/gui_control $ sudo chmod a+x gui_control.py $ python3 gui_control.py ``` ## RS485 协议使用 当前支持O6/L6/L10,其他型号灵巧手请参考[官网MODBUS RS485协议文档](https://document.linkeros.cn/developer/90) 注:如不确定协议类型,请咨询技术支持。 编辑config/setting.yaml配置文件,按照配置文件内注释说明进行参数修改,将MODBUS:"/dev/ttyUSB0",配置文件中"modbus"参数为"/dev/ttyUSB0"。USB-RS485转换器在Ubuntu上一般显示为/dev/ttyUSB* or /dev/ttyACM* modbus: "None" or "/dev/ttyUSB0" ```bash # 确保requirements.txt安装依赖 # 安装系统级相关驱动 $ pip install minimalmodbus --break-system-packages $ pip install pyserial --break-system-packages $ pip install pymodbus --break-system-packages # 查看USB-RS485端口号 $ ls /dev # 可以看到类似ttyUSB0端口后给端口执行权限 $ sudo chmod 777 /dev/ttyUSB0 # GUI控制示例 $ python3 example/gui_control/gui_control.py ``` ## 相关文档 [Linker Hand API for Python Document](doc/API-Reference.md) ## 更新说明 - > ### release_3.0.1 - 1、支持O6/L6/L10 RS485通讯 pymodbus模式 - > ### release_2.2.4 - 1、新增支持G20工业版灵巧手 - 2、重绘GUI - > ### release_2.1.9 - 1、新增支持O6灵巧手 - > ### release_2.1.8 - 1、修复偶发撞帧问题 - > ### 2.1.4 - 1、新增支持L21 - 2、新增支持矩阵式压力传感器 - 3、支持L10 Mujoco仿真 - > ### 1.3.6 - 支持LinkerHand L7/L20/L25版本灵巧手 - > ### 1.1.2 - 支持LinkerHand L10版本灵巧手 - 增加GUI控制L10灵巧手 - 增加GUI显示L10灵巧手压感图形模式数据 - 增加部分示例源码 - position与手指关节对照表 O6: ["大拇指弯曲", "大拇指横摆","食指弯曲", "中指弯曲", "无名指弯曲","小拇指弯曲"] L6: ["大拇指弯曲", "大拇指横摆","食指弯曲", "中指弯曲", "无名指弯曲","小拇指弯曲"] L7: ["大拇指弯曲", "大拇指横摆","食指弯曲", "中指弯曲", "无名指弯曲","小拇指弯曲","拇指旋转"] L10: ["拇指根部", "拇指侧摆","食指根部", "中指根部", "无名指根部","小指根部","食指侧摆","无名指侧摆","小指侧摆","拇指旋转"] L20: ["拇指根部", "食指根部", "中指根部", "无名指根部","小指根部","拇指侧摆","食指侧摆","中指侧摆","无名指侧摆","小指侧摆","拇指横摆","预留","预留","预留","预留","拇指尖部","食指末端","中指末端","无名指末端","小指末端"] G20(工业版): ["拇指根部", "食指根部", "中指根部", "无名指根部","小指根部","拇指侧摆","食指侧摆","中指侧摆","无名指侧摆","小指侧摆","拇指横摆","预留","预留","预留","预留","拇指尖部","食指末端","中指末端","无名指末端","小指末端"] L21: ["大拇指根部","食指根部","中指根部","无名指根部","小拇指根部","大拇指侧摆","食指侧摆","中指侧摆","无名指侧摆","小拇指侧摆","大拇指横滚","预留","预留","预留","预留","大拇指中部","预留","预留","预留","预留","大拇指指尖","食指指尖","中指指尖","无名指指尖","小拇指指尖"] L25: ["大拇指根部", "食指根部", "中指根部","无名指根部","小拇指根部","大拇指侧摆","食指侧摆","中指侧摆","无名指侧摆","小拇指侧摆","大拇指横滚","预留","预留","预留","预留","大拇指中部","食指中部","中指中部","无名指中部","小拇指中部","大拇指指尖","食指指尖","中指指尖","无名指指尖","小拇指指尖"] ## [L10_Example](example/L10)    __在运行之前, 请将 [setting.yaml](LinkerHand/config/setting.yaml) 的配置信息修改为您实际控制的灵巧手配置信息.__ - #### [0000-gui_control](example/gui_control/gui_control.py) 开启后会弹出UI界面。通过滑动条可控制相应LinkerHand灵巧手关节运动 - 增加或修改动作示例。在[constants.py](example/gui_control/config/constants.py)文件中可增加或修改动作。 ```python # 例如增加L6的动作序列 "L6": HandConfig( joint_names_en=["thumb_cmc_pitch", "thumb_cmc_yaw", "index_mcp_pitch", "middle_mcp_pitch", "pinky_mcp_pitch", "ring_mcp_pitch"], joint_names=["大拇指弯曲", "大拇指横摆", "食指弯曲", "中指弯曲", "无名指弯曲", "小拇指弯曲"], init_pos=[250] * 6, preset_actions={ "张开": [250, 250, 250, 250, 250, 250], "壹": [0, 31, 255, 0, 0, 0], "贰": [0, 31, 255, 255, 0, 0], "叁": [0, 30, 255, 255, 255, 0], "肆": [0, 30, 255, 255, 255, 255], "伍": [250, 250, 250, 250, 250, 250], "OK": [54, 41, 164, 250, 250, 250], "点赞": [255, 31, 0, 0, 0, 0], "握拳": [49, 61, 0, 0, 0, 0], # 增加自定义动作...... } ) ``` - #### [0001-linker_hand_fast](example/L10/gesture/linker_hand_fast.py) - #### [0002-linker_hand_finger_bend](example/L10/gesture/linker_hand_finger_bend.py) - #### [0003-linker_hand_fist](example/L10/gesture/linker_hand_fist.py) - #### [0004-linker_hand_open_palm](example/L10/gesture/linker_hand_open_palm.py) - #### [0005-linker_hand_opposition](example/L10/gesture/linker_hand_opposition.py) - #### [0006-linker_hand_sway](example/L10/gesture/linker_hand_sway.py) - #### [0007-linker_hand_get_force](example/L10/get_status/get_force.py) #python3 get_force.py --hand_joint L10 --hand_type right - #### [0008-linker_hand_get_speed](example/L10/get_status/get_set_speed.py) #python3 get_set_speed.py --hand_joint L10 --hand_type right --speed 100 123 211 121 222 注:L7 speed参数为7个,其他为5个 - #### [0009-linker_hand_get_state](example/L10/get_status/get_set_state.py) # python3 get_set_state.py --hand_joint L10 --hand_type right --position 100 123 211 121 222 255 255 255 255 255 position参数个数请参照position与手指关节对照表 - #### [0010-linker_hand_dynamic_grasping](example/L10/grab/dynamic_grasping.py) ## API 说明文档 [Linker Hand API for Python Document](doc/API-Reference.md)