diff --git a/lerobot/common/robots/robot.py b/lerobot/common/robots/robot.py index 8b68c09f..a263a043 100644 --- a/lerobot/common/robots/robot.py +++ b/lerobot/common/robots/robot.py @@ -37,6 +37,10 @@ class Robot(abc.ABC): def camera_features(self) -> dict[str, dict]: pass + @abc.abstractproperty + def is_connected(self) -> bool: + pass + @abc.abstractmethod def connect(self) -> None: """Connects to the robot.""" diff --git a/lerobot/common/teleoperators/teleoperator.py b/lerobot/common/teleoperators/teleoperator.py index 3b60372e..743bd2c6 100644 --- a/lerobot/common/teleoperators/teleoperator.py +++ b/lerobot/common/teleoperators/teleoperator.py @@ -31,6 +31,10 @@ class Teleoperator(abc.ABC): def feedback_feature(self) -> dict: pass + @abc.abstractproperty + def is_connected(self) -> bool: + pass + @abc.abstractmethod def connect(self) -> None: """Connects to the teleoperator."""