Skip to content

Teleoperation API

Maps teleoperation frames to hand commands.

Source code in dexterous_hand/teleoperation.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class TeleoperationController:
    """Maps teleoperation frames to hand commands."""

    def __init__(self, hand: Hand) -> None:
        self.hand = hand

    def apply_frame(self, frame: TeleoperationFrame) -> None:
        """Apply a normalized teleoperation command."""
        if not frame.joint_targets_rad:
            return
        self.hand.move_joints(frame.joint_targets_rad)

    def read_glove_frame(self) -> TeleoperationFrame:
        """Read a glove frame from a configured device."""
        raise NotImplementedError("Glove device integration is vendor-specific.")

apply_frame(frame)

Apply a normalized teleoperation command.

Source code in dexterous_hand/teleoperation.py
24
25
26
27
28
def apply_frame(self, frame: TeleoperationFrame) -> None:
    """Apply a normalized teleoperation command."""
    if not frame.joint_targets_rad:
        return
    self.hand.move_joints(frame.joint_targets_rad)

read_glove_frame()

Read a glove frame from a configured device.

Source code in dexterous_hand/teleoperation.py
30
31
32
def read_glove_frame(self) -> TeleoperationFrame:
    """Read a glove frame from a configured device."""
    raise NotImplementedError("Glove device integration is vendor-specific.")

Normalized teleoperation command frame.

Source code in dexterous_hand/teleoperation.py
10
11
12
13
14
15
@dataclass(frozen=True)
class TeleoperationFrame:
    """Normalized teleoperation command frame."""

    joint_targets_rad: dict[str, float]
    source: str = "unknown"