From fa5ca1e04c5638c95dcf950eff3d5372fd2c133e Mon Sep 17 00:00:00 2001 From: acutenoob Date: Tue, 14 Jul 2026 14:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LinkerHand/config/setting.yaml | 2 +- README.md | 16 ++++++++-------- README_CN.md | 28 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/LinkerHand/config/setting.yaml b/LinkerHand/config/setting.yaml index 630c284..39665d6 100644 --- a/LinkerHand/config/setting.yaml +++ b/LinkerHand/config/setting.yaml @@ -3,7 +3,7 @@ LINKER_HAND: # 手部配置信息 LEFT_HAND: EXISTS: False # 是否存在左手 TOUCH: True # 是否有压力传感器 - CAN: "can0" # 配置CAN端口 默认can0 如果MODUBS不为"None",则CAN配置失效。 如果是win系统则类似于 PCAN_USBBUS1。注:蓝色盒子为Linux下can0,WIN下位PCAN_USBBUS1。透明盒子Linux下为can0,WIN下为0 + CAN: "can0" # 配置CAN端口 默认can0 如果MODUBS不为"None",则CAN配置失效。 如果是win系统则类似于 PCAN_USBBUS1。注:蓝色盒子为Linux下can0,WIN下为PCAN_USBBUS1。透明盒子Linux下为can0,WIN下为0 MODBUS: "None" # 通讯协议是否为485 默认None 如果启动485,则是设备端口 /dev/ttyUSB* CAN配置失效 当前只支持O6/L6.后续版本正在努力增加中 JOINT: O6 # 左手型号 O6/L6/L7/L10/L20/G20/L21/L25/ NAME: # 默认值,不用修改 diff --git a/README.md b/README.md index 3ab0823..ab5f86f 100644 --- a/README.md +++ b/README.md @@ -24,24 +24,24 @@ LinkerHand Python SDK - download ```bash -$ git clone https://github.com/linker-bot/linkerhand-python-sdk.git +git clone https://github.com/linker-bot/linkerhand-python-sdk.git ``` - install ```bash -$ cd linkerhand-python-sdk/ -$ pip3 install -r requirements.txt +cd linkerhand-python-sdk/ +pip3 install -r requirements.txt ``` -- 快速使用示例 by CAN +- Quick Start Example via CAN Edit the config/setting.yaml configuration file and modify the parameters according to the comments inside. Set CAN:"can0" and Set 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 +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 example/gui_control +sudo chmod a+x gui_control.py +python3 gui_control.py ``` diff --git a/README_CN.md b/README_CN.md index 8921a07..e2396b8 100644 --- a/README_CN.md +++ b/README_CN.md @@ -29,21 +29,21 @@ $ git clone https://github.com/linker-bot/linkerhand-python-sdk.git - install ```bash -$ cd linkerhand-python-sdk/ +cd linkerhand-python-sdk/ # win下需要安装python-can-candle用于适配透明CAN设备candle协议 -$ pip install python-can -$ pip install python-can-candle -$ pip3 install -r requirements.txt +pip install python-can +pip install python-can-candle +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 +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 example/gui_control +sudo chmod a+x gui_control.py +python3 gui_control.py ``` @@ -56,15 +56,15 @@ 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 +pip install minimalmodbus --break-system-packages +pip install pyserial --break-system-packages +pip install pymodbus --break-system-packages # 查看USB-RS485端口号 -$ ls /dev +ls /dev # 可以看到类似ttyUSB0端口后给端口执行权限 -$ sudo chmod 777 /dev/ttyUSB0 +sudo chmod 777 /dev/ttyUSB0 # GUI控制示例 -$ python3 example/gui_control/gui_control.py +python3 example/gui_control/gui_control.py ```