LeRobot documentation

Teleoperators

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.6.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Teleoperators

A teleoperator produces actions for a robot to follow — a leader arm, a gamepad, a keyboard, a phone. All of them implement the Teleoperator interface, so a recording script written against it works with any input device.

See Phone teleoperation and Isaac Teleop for setup guides, and Imitation Learning for Robots for the recording workflow.

Teleoperator

class lerobot.teleoperators.Teleoperator

< >

( config: TeleoperatorConfig )

Parameters

  • config_class (RobotConfig) — The expected configuration class for this teleoperator.
  • name (str) — The unique name used to identify this teleoperator type.

The base abstract class for all LeRobot-compatible teleoperation devices.

This class provides a standardized interface for interacting with physical teleoperators. Subclasses must implement all abstract methods and properties to be usable.

connect

< >

( calibrate: bool = True )

Parameters

  • calibrate (bool) — If True, automatically calibrate the teleoperator after connecting if it’s not calibrated or needs calibration (this is hardware-dependant).

Establish communication with the teleoperator.

disconnect

< >

( )

Disconnect from the teleoperator and perform any necessary cleanup.

configure

< >

( )

Apply any one-time or runtime configuration to the teleoperator. This may include setting motor parameters, control modes, or initial state.

calibrate

< >

( )

Calibrate the teleoperator if applicable. If not, this should be a no-op.

This method should collect any necessary data (e.g., motor offsets) and update the :pyattr:calibration dictionary accordingly.

get_action

< >

( ) RobotAction

Returns

RobotAction

A flat dictionary representing the teleoperator’s current actions. Its structure should match :pymeth:observation_features.

Retrieve the current action from the teleoperator.

send_feedback

< >

( feedback: dict ) dict[str, Any]

Parameters

  • feedback (dict[str, Any]) — Dictionary representing the desired feedback. Its structure should match :pymeth:feedback_features.

Returns

dict[str, Any]

The action actually sent to the motors potentially clipped or modified, e.g. by safety limits on velocity.

Send a feedback action command to the teleoperator.

action_features

< >

( )

A dictionary describing the structure and types of the actions produced by the teleoperator. Its structure (keys) should match the structure of what is returned by :pymeth:get_action. Values for the dict should be the type of the value if it’s a simple value, e.g. float for single proprioceptive value (a joint’s goal position/velocity)

Note: this property should be able to be called regardless of whether the robot is connected or not.

feedback_features

< >

( )

A dictionary describing the structure and types of the feedback actions expected by the robot. Its structure (keys) should match the structure of what is passed to :pymeth:send_feedback. Values for the dict should be the type of the value if it’s a simple value, e.g. float for single proprioceptive value (a joint’s goal position/velocity)

Note: this property should be able to be called regardless of whether the robot is connected or not.

is_connected

< >

( )

Whether the teleoperator is currently connected or not. If False, calling :pymeth:get_action or :pymeth:send_feedback should raise an error.

is_calibrated

< >

( )

Whether the teleoperator is currently calibrated or not. Should be always True if not applicable

TeleoperatorConfig

class lerobot.teleoperators.TeleoperatorConfig

< >

( id: str | None = Nonecalibration_dir: pathlib.Path | None = None )

make_teleoperator_from_config

lerobot.teleoperators.make_teleoperator_from_config

< >

( config: TeleoperatorConfig )

Update on GitHub