File size: 730 Bytes
d7b60cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from trlc_dk1.follower import DK1Follower, DK1FollowerConfig
from lerobot.cameras.opencv import OpenCVCameraConfig

# Initialize the robot
config = DK1FollowerConfig(
    right_arm_port="/dev/ttyACM0",
    left_arm_port="/dev/ttyACM1",
    joint_velocity_scaling=1.0,
    cameras={
        "base_0": OpenCVCameraConfig(index_or_path=8, width=640, height=360, fps=30),
        "left_wrist": OpenCVCameraConfig(index_or_path=6, width=640, height=360, fps=30),
        "right_wrist": OpenCVCameraConfig(index_or_path=4, width=640, height=360, fps=30),
    }
)
robot = DK1Follower(config)

# Get an observation and print its structure
obs = robot.get_observation()

print(type(obs))
print(obs.keys())

import pprint
pprint.pprint(obs)