Skip to content

Commit 993d27d

Browse files
committed
no message
1 parent 283dd51 commit 993d27d

File tree

11 files changed

+17
-440
lines changed

11 files changed

+17
-440
lines changed
0 Bytes
Binary file not shown.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ LinkerHand Python SDK
5050
- #### [0008-linker_hand_get_speed](example/L10/get_status/get_speed.py)
5151
- #### [0009-linker_hand_get_state](example/L10/get_status/get_state.py)
5252

53+
- #### [0010-linker_hand_dynamic_grasping](example/L10/grab/dynamic_grasping.py)
54+
5355

5456

5557

example/L10/grab/dynamic_grasping.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66
import argparse
77
from LinkerHand.linker_hand_api import LinkerHandApi
88

9-
9+
'''
10+
动态抓取示例,通过动态设置抓取坐标,实现抓取不同位置物品
11+
命令行参数:
12+
--hand_joint: 手指关节类型(L10或L25)
13+
--hand_type: 左手还是右手(left或right)
14+
--speed: 速度设置(0~255)
15+
--mm: 抓取物品距离(mm)
16+
示例:
17+
python3 dynamic_grasping.py --hand_joint L10 --hand_type left --speed 20 50 50 50 50 --mm 30
18+
'''
1019

1120
def main(args):
21+
1222
# 初始化API
13-
hand = LinkerHandApi(hand_joint="L10",hand_type="left")
23+
hand = LinkerHandApi(hand_joint=args.hand_joint,hand_type=args.hand_type)
1424
# 设置速度
1525
hand.set_speed(speed=[20,50,50,50,50])
1626
# 准备抓握姿态
@@ -39,9 +49,9 @@ def main(args):
3949

4050
if __name__ == "__main__":
4151
parser = argparse.ArgumentParser(description="Dynamic Grasping Script")
42-
parser.add_argument("--hand_joint", type=str, default="L10", help="Hand joint type")
43-
parser.add_argument("--hand_type", type=str, default="left", help="Hand type")
44-
parser.add_argument("--speed", type=int, nargs='+', default=[20, 50, 50, 50, 50], help="Speed settings")
52+
parser.add_argument("--hand_joint", type=str, default="L10", help="Hand joint type (L10 or L25)")
53+
parser.add_argument("--hand_type", type=str, default="left", help="Hand type (left or right)")
54+
parser.add_argument("--speed", type=int, nargs='+', default=[20, 50, 50, 50, 50], help="Speed settings (0~255)")
4555
parser.add_argument("--mm", type=int, default="30", help="Distance in mm")
4656
args = parser.parse_args()
4757
main(args)
-3.71 KB
Binary file not shown.

example/L10/gui_control/gui_control.py

Lines changed: 0 additions & 181 deletions
This file was deleted.
-3.01 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

example/L10/gui_control/views/left_view.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)