@@ -6,61 +6,127 @@ This repository provides the **Leader Arm (Teleoperator)** integration for the *
66
77* ** Robot** : Seeed reBot Arm B601 Series (6-DOF + Gripper)
88* ** Motors** : Damiao (DM4310 + DM4340), RobStride
9- * ** Communication** : CAN Bus (via USB-CAN adapter, e.g., derivatives of Candle/slcan or SocketCAN compatible devices )
9+ * ** Communication** : CAN Bus (via USB-CAN adapter, including Damiao's v3 USB2CAN adapter )
1010
1111## Installation
1212
13131 . ** Install LeRobot** :
14- Follow the instructions in the [ LeRobot repository] ( https://github.com/huggingface/lerobot ) to install the base library.
14+ Follow the instructions in the [ LeRobot repository] ( https://github.com/huggingface/lerobot ) to install the base library. A very quick summary would be like the following.
15+
16+ ``` shell
17+ conda create -y -n lerobot python=3.12
18+ conda activate lerobot
19+ conda install ffmpeg -c conda-forge
20+ git clone https://github.com/huggingface/lerobot.git
21+ cd lerobot
22+ pip install -e .
23+ ```
24+
25+ 2. ** Install motorbridge Python Package**
26+
27+ ` ` ` shell
28+ # goto https://github.com/tianrking/motorbridge/releases
29+ # find the proper python wheel for your platform
30+ # e.g. ubuntu x86_64, python3.12, we should download https://github.com/tianrking/motorbridge/releases/download/v0.1.5/motorbridge-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
31+ # with your conda env activated
32+ pip install motorbridge-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
33+
34+ # TODO: install from pypi
35+ ` ` `
36+
37+ You could also install the ` motor-cli` tool,a very useful motor tool.
1538
16- 2 . ** Install this package** :
39+ ` ` ` shell
40+ wget https://github.com/tianrking/motorbridge/releases/download/v0.1.5/motor-cli-v0.1.5-linux-x86_64.tar.gz
41+ tar zxvf motor-cli-v0.1.5-linux-x86_64.tar.gz
42+ sudo cp motor-cli-v0.1.5-linux-x86_64/bin/motor_cli /usr/local/bin/
43+ sudo chmod a+x /usr/local/bin/motor_cli
44+
45+ # # new version may be released, you should check the lates version
46+
47+ ` ` `
48+
49+ 3. ** Install this package** :
1750 Clone this repository and install in editable mode:
1851 ` ` ` bash
19- git clone https://github.com/Seeed-Studio /lerobot-teleoperator-seeed-b601.git
52+ git clone https://github.com/Seeed-Projects /lerobot-teleoperator-seeed-b601.git
2053 cd lerobot-teleoperator-seeed-b601
2154 pip install -e .
2255 ` ` `
2356
57+ Or install from PyPI:
58+ ` ` ` bash
59+ pip install lerobot-teleoperator-seeed-b601
60+ ` ` `
61+
2462 Upon installation, two teleoperator variants are registered:
2563 * ` seeed_b601_dm_leader` : B601 Leader using Damiao motors (6-DOF + Gripper) - ** Fully Implemented**
2664 * ` seeed_b601_rs_leader` : B601 Leader using RobStride motors (6-DOF + Gripper) - ** Placeholder**
65+
66+ ` ` ` shell
67+ # test if the installation is good
68+ lerobot-teleoperate --help | grep SeeedB601
69+
70+ # if you see the following you're good
71+ SeeedB601DMLeaderConfig [' teleop' ]:
72+ SeeedB601RSLeaderConfig [' teleop' ]:
73+ ` ` `
2774
2875# # Configuration
2976
30- The default configuration for B601-DM Leader is located in ` lerobot_teleoperator_seeed_b601/config_seeed_b601_dm_leader.py` .
31-
32- * ** Motor IDs** : 0x01 - 0x07 (send), 0x11 - 0x17 (receive)
33- * ** Motor Types** :
34- * Joint 1, 4, 5, 6, Gripper: ` dm4310`
35- * Joint 2, 3: ` dm4340`
77+ Default motor mapping for the B601 leader:
3678
37- Ensure your robot' s motor IDs match this configuration.
79+ * ` shoulder_pan` : master ID ` 0x01` , feedback ID ` 0x11` , motor model ` dm4340p`
80+ * ` shoulder_lift` : master ID ` 0x02` , feedback ID ` 0x12` , motor model ` dm4340p`
81+ * ` elbow_flex` : master ID ` 0x03` , feedback ID ` 0x13` , motor model ` dm4340p`
82+ * ` wrist_flex` : master ID ` 0x04` , feedback ID ` 0x14` , motor model ` dm4310`
83+ * ` wrist_roll` : master ID ` 0x05` , feedback ID ` 0x15` , motor model ` dm4310`
84+ * ` wrist_yaw` : master ID ` 0x06` , feedback ID ` 0x16` , motor model ` dm4310`
85+ * ` gripper` : master ID ` 0x07` , feedback ID ` 0x17` , motor model ` dm4310`
3886
39- TODO: Refer to the wiki page for the guide to configure the motors.
87+ * ** CAN adapter types** :
88+ * ` socketcan` : for SocketCAN-compatible adapters such as ` can0`
89+ * ` damiao` : for Damiao serial bridge adapters such as ` /dev/ttyACM0`
90+ * ` robstride` : registered in config, but the dedicated adapter path is not yet supported by the current ` motorbridge` Python SDK integration
4091
41- ## Usage
92+ Ensure your motor names, IDs, wiring, and motor models match this configuration.
4293
43- ### Quick Start
94+ TODO: Refer to the wiki page for the guide to configure the motors.
4495
45- A verification script is provided to test the connection and read basic motor states (joint positions) .
96+ TODO: A script that utilize the motorbridge to configure the deep parameters of the motor.
4697
47- ```bash
48- # Linux (SocketCAN)
49- python examples/verification_dm.py --port can0
98+ # # Usage
5099
51- # macOS (slcan)
52- python examples/verification_dm.py --port /dev/tty.usbmodemXXX
100+ ` ` ` shell
101+ lerobot-teleoperate \
102+ --robot.id=follower1 \
103+ --robot.type=seeed_b601_dm_follower \
104+ --robot.port=/dev/ttyACM4 \
105+ --robot.can_adapter=damiao \
106+ --teleop.type=seeed_b601_dm_leader \
107+ --teleop.id=leader1 \
108+ --teleop.port=/dev/ttyACM5 \
109+ --teleop.can_adapter=damiao
53110` ` `
54111
55- ### Use within LeRobot
112+ Teleoperate with cameras,
56113
57- ```bash
114+ ` ` ` shell
58115lerobot-teleoperate \
116+ --robot.type=seeed_b601_dm_follower \
117+ --robot.port=/dev/ttyACM4 \
118+ --robot.can_adapter=damiao \
119+ --robot.id=my_awesome_follower_arm \
120+ --robot.cameras=" { up: {type: opencv, index_or_path: /dev/video10, width: 640, height: 480, fps: 30}, side: {type: intelrealsense, serial_number_or_name: 233522074606, width: 640, height: 480, fps: 30}}" \
59121 --teleop.type=seeed_b601_dm_leader \
60- --teleop.port=can0 \
61- --robot.type=<your_follower_robot> \
62- --robot.port=can1 \
63- --fps=30
122+ --teleop.port=/dev/ttyACM5 \
123+ --teleop.id=my_awesome_leader_arm \
124+ --robot.can_adapter=damiao \
125+ --display_data=true
64126` ` `
65127
66- TODO: Write the full guide to use this teleoperator within LeRobot.
128+ Fore more lerobot operations, please refer to the lerobot official documentation:
129+
130+ https://huggingface.co/docs/lerobot/il_robots
131+
132+
0 commit comments