Skip to content

Commit d9ce524

Browse files
authored
Merge pull request #7 from robot-learning-co/v0.3
Add v0.3 changes
2 parents 02ffd2b + 092fe73 commit d9ce524

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+615513
-623676
lines changed

README.md

Lines changed: 29 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -26,160 +26,87 @@
2626
<table align="center">
2727
<tr>
2828
<td width="50%">
29-
<a href="https://github.com/robot-learning-co/trlc-dk1/blob/main/hardware/TRLC-DK1-Follower_v0.2.0.step" target="_blank">
30-
TRLC-DK1 v0.2.0 Follower CAD (Fusion)<br>
29+
<a href="https://github.com/robot-learning-co/trlc-dk1/blob/main/hardware/TRLC-DK1-Follower_v0.3.0.step" target="_blank">
30+
TRLC-DK1 v0.3.0 Follower CAD<br>
3131
<img src="media/follower_cad.png" width="100%">
3232
</a>
3333
</td>
3434
<td width="50%">
3535
<a href="https://a360.co/481PSQH" target="_blank">
36-
TRLC-DK1 v0.2.0 Leader CAD (Fusion)<br>
36+
TRLC-DK1 v0.2.0 Leader CAD<br>
3737
<img src="media/leader_cad.png" width="100%">
3838
</a>
3939
</td>
4040
</tr>
4141
</table>
42-
Copyright 2025 The Robot Learning Company UG (haftungsbeschränkt). All rights reserved.
42+
Copyright 2025-2026 The Robot Learning Company UG (haftungsbeschränkt). All rights reserved.
4343

4444
## Installation
4545

4646
```
47-
conda create -n dk1 python=3.10
48-
conda activate dk1
49-
pip install -e .
47+
git clone https://github.com/robot-learning-co/trlc-dk1.git
48+
uv venv
49+
uv pip install -e .
5050
```
51+
This repo uses [LeRobot's plugin conventions](https://huggingface.co/docs/lerobot/integrate_hardware#using-your-own-lerobot-devices-) to be automatically detected by a LeRobot installation in the same Python environment.
5152

52-
(This should also install [TRLC's fork of LeRobot](https://github.com/robot-learning-co/lerobot) and use branch `trlc-dk1`)
5353

5454
## Examples
5555

56-
Use [LeRobot's CLI](https://huggingface.co/docs/lerobot/il_robots) to identify your teleop and robot ports:
56+
Use [LeRobot's CLI](https://huggingface.co/docs/lerobot/il_robots) to identify your teleop, robot, and camera ports:
5757

5858
```
59-
lerobot-find-port
59+
uv run lerobot-find-port
60+
uv run lerobot-find-cameras
6061
```
6162

6263
<details>
63-
<summary>Teleoperation
64+
<summary>Example I: Single Arm Teleoperation
6465
</summary>
6566

6667
```bash
67-
lerobot-teleoperate \
68+
uv run lerobot-teleoperate \
6869
--robot.type=dk1_follower \
69-
--robot.port=/dev/tty.usbmodem00000000050C1 \
70-
--robot.joint_velocity_scaling=0.5 \
70+
--robot.port=/dev/ttyACM0 \
71+
--robot.joint_velocity_scaling=0.2 \
72+
--teleop.type=dk1_leader \
73+
--teleop.port=/dev/ttyACM1 \
7174
--robot.cameras="{
72-
context: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 30},
73-
wrist: {type: opencv, index_or_path: 1, width: 1280, height: 720, fps: 30}
75+
context: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 60, fourcc: "MJPG"},
76+
wrist: {type: opencv, index_or_path: 1, width: 1280, height: 720, fps: 60, rotation: 180, fourcc: "MJPG"}
7477
}" \
75-
--teleop.type=dk1_leader \
76-
--teleop.port=/dev/tty.usbmodem58FA0824311 \
7778
--display_data=true
7879
```
7980
</details>
8081

8182
<details>
82-
<summary>Recording
83+
<summary>Example II: Bimanual Recording
8384
</summary>
8485

8586
```bash
8687
lerobot-record \
87-
--robot.type=dk1_follower \
88-
--robot.port=/dev/tty.usbmodem00000000050C1 \
89-
--robot.joint_velocity_scaling=1.0 \
90-
--robot.cameras="{
91-
context: {type: opencv, index_or_path: 0, width: 640, height: 360, fps: 30},
92-
wrist: {type: opencv, index_or_path: 1, width: 640, height: 360, fps: 30}
93-
}" \
94-
--teleop.type=dk1_leader \
95-
--teleop.port=/dev/tty.usbmodem58FA0824311 \
96-
--display_data=true \
97-
--dataset.repo_id=$USER/my_dataset \
98-
--dataset.push_to_hub=false \
99-
--dataset.num_episodes=50 \
100-
--dataset.episode_time_s=30 \
101-
--dataset.reset_time_s=15 \
102-
--dataset.single_task="My task description."
103-
```
104-
```bash
105-
--resume=true
106-
```
107-
</details>
108-
109-
<details>
110-
<summary>Inference
111-
</summary>
112-
113-
```bash
114-
lerobot-record \
115-
--robot.type=dk1_follower \
116-
--robot.port=/dev/tty.usbmodem00000000050C1 \
117-
--robot.joint_velocity_scaling=0.5 \
118-
--robot.cameras="{
119-
context: {type: opencv, index_or_path: 0, width: 640, height: 360, fps: 30},
120-
wrist: {type: opencv, index_or_path: 1, width: 640, height: 360, fps: 30}
121-
}"
122-
--display_data=true \
123-
--dataset.repo_id=$USER/eval_my_model \
124-
--dataset.single_task="My task description." \
125-
--dataset.push_to_hub=false \
126-
--policy.path=outputs/my_model/checkpoints/last/pretrained_model
127-
```
128-
</details>
129-
130-
<details>
131-
<summary>Bimanual Teleoperation
132-
</summary>
133-
134-
```bash
135-
lerobot-teleoperate \
13688
--robot.type=bi_dk1_follower \
13789
--robot.right_arm_port=/dev/ttyACM0 \
13890
--robot.left_arm_port=/dev/ttyACM1 \
13991
--robot.joint_velocity_scaling=1.0 \
140-
--robot.cameras="{
141-
context: {type: opencv, index_or_path: 2, width: 640, height: 360, fps: 30},
142-
right_wrist: {type: opencv, index_or_path: 4, width: 640, height: 360, fps: 30},
143-
left_wrist: {type: opencv, index_or_path: 0, width: 640, height: 360, fps: 30},
144-
}" \
14592
--teleop.type=bi_dk1_leader \
14693
--teleop.right_arm_port=/dev/ttyACM2 \
14794
--teleop.left_arm_port=/dev/ttyACM3 \
148-
--display_data=true \
149-
--display_url=100.88.6.81
150-
```
151-
</details>
152-
153-
<details>
154-
<summary>Bimanual Recording
155-
</summary>
156-
157-
```bash
158-
lerobot-record \
159-
--robot.type=bi_dk1_follower \
160-
--robot.right_arm_port=/dev/ttyACM0 \
161-
--robot.left_arm_port=/dev/ttyACM1 \
162-
--robot.joint_velocity_scaling=1.0 \
16395
--robot.cameras="{
164-
context: {type: opencv, index_or_path: 2, width: 640, height: 360, fps: 30},
165-
right_wrist: {type: opencv, index_or_path: 4, width: 640, height: 360, fps: 30},
166-
left_wrist: {type: opencv, index_or_path: 0, width: 640, height: 360, fps: 30},
96+
head: {type: opencv, index_or_path: /dev/video0, width: 960, height: 540, fps: 60, fourcc: "MJPG"},
97+
right_wrist: {type: opencv, index_or_path: /dev/video2, width: 960, height: 540, fps: 60, rotation: 180, fourcc: "MJPG"},
98+
left_wrist: {type: opencv, index_or_path: /dev/video4, width: 960, height: 540, fps: 60, rotation: 180, fourcc: "MJPG"},
16799
}" \
168-
--teleop.type=bi_dk1_leader \
169-
--teleop.right_arm_port=/dev/ttyACM2 \
170-
--teleop.left_arm_port=/dev/ttyACM3 \
171-
--dataset.repo_id=$USER/disassemble_lego \
100+
--dataset.repo_id=$USER/my_test_dataset \
172101
--dataset.push_to_hub=false \
173-
--dataset.num_episodes=40 \
174-
--dataset.episode_time_s=180 \
175-
--dataset.reset_time_s=120 \
176-
--dataset.single_task="Disassemble the Lego and sort it." \
177-
--dataset.reset_time_s=120 \
178-
--resume=true
102+
--dataset.num_episodes=3 \
103+
--dataset.episode_time_s=30 \
104+
--dataset.reset_time_s=20 \
105+
--dataset.single_task="Test the LeRobot recording pipeling."
179106
```
180107
</details>
181108

182-
## URDF
109+
## URDF (v0.2)
183110

184111
<p align="center">
185112
<img src="https://github.com/andreaskoepf/trlc-dk1-follower-urdf/blob/main/assets/dk1_vsual_right.png">

examples/bi_teleop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from trlc_dk1.bi_follower import BiDK1Follower, BiDK1FollowerConfig
2-
from trlc_dk1.bi_leader import BiDK1Leader, BiDK1LeaderConfig
1+
from lerobot_robot_trlc_dk1.bi_follower import BiDK1Follower, BiDK1FollowerConfig
2+
from lerobot_robot_trlc_dk1.bi_leader import BiDK1Leader, BiDK1LeaderConfig
33
import time
44
import logging
55

examples/calibration_follower.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2-
from trlc_dk1.motors.DM_Control_Python.DM_CAN import *
1+
from lerobot_robot_trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2+
from lerobot_robot_trlc_dk1.motors.DM_Control_Python.DM_CAN import *
33

44
import serial
55
import time
66

77

88
follower_config = DK1FollowerConfig(
9-
port="/dev/tty.usbmodem00000000050C1",
9+
port="/dev/ttyACM1",
1010
)
1111
follower = DK1Follower(follower_config)
1212

examples/follower_read_position.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2-
from trlc_dk1.motors.DM_Control_Python.DM_CAN import *
1+
from lerobot_robot_trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2+
from lerobot_robot_trlc_dk1.motors.DM_Control_Python.DM_CAN import *
33

44
import time
55

66
follower_config = DK1FollowerConfig(
7-
port="/dev/tty.usbmodem00000000050C1",
7+
port="/dev/ttyACM1",
88
)
99
follower = DK1Follower(follower_config)
1010

examples/leader_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from trlc_dk1.leader import DK1Leader, DK1LeaderConfig
1+
from lerobot_robot_trlc_dk1.leader import DK1Leader, DK1LeaderConfig
22
import time
33

44
leader_config = DK1LeaderConfig(

examples/read_motor_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from trlc_dk1.motors.DM_Control_Python.DM_CAN import *
1+
from lerobot_robot_trlc_dk1.motors.DM_Control_Python.DM_CAN import *
22
import serial
33
import time
44

examples/teleop.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
from trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2-
from trlc_dk1.leader import DK1Leader, DK1LeaderConfig
1+
from lerobot_robot_trlc_dk1.follower import DK1Follower, DK1FollowerConfig
2+
from lerobot_robot_trlc_dk1.leader import DK1Leader, DK1LeaderConfig
33
import time
44

55

66
follower_config = DK1FollowerConfig(
7-
port="/dev/tty.usbmodem00000000050C1",
7+
port="/dev/ttyACM1",
88
joint_velocity_scaling=0.2,
99
)
1010

1111
leader_config = DK1LeaderConfig(
12-
port="/dev/tty.usbmodem5A680096411"
12+
port="/dev/ttyACM0"
1313
)
1414

1515
leader = DK1Leader(leader_config)

0 commit comments

Comments
 (0)