Add is_connected in robots and teleops

This commit is contained in:
Simon Alibert 2025-03-23 19:26:10 +01:00
parent 4273f1f384
commit 5b46dc0b6a
2 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,10 @@ class Robot(abc.ABC):
def camera_features(self) -> dict[str, dict]: def camera_features(self) -> dict[str, dict]:
pass pass
@abc.abstractproperty
def is_connected(self) -> bool:
pass
@abc.abstractmethod @abc.abstractmethod
def connect(self) -> None: def connect(self) -> None:
"""Connects to the robot.""" """Connects to the robot."""

View File

@ -31,6 +31,10 @@ class Teleoperator(abc.ABC):
def feedback_feature(self) -> dict: def feedback_feature(self) -> dict:
pass pass
@abc.abstractproperty
def is_connected(self) -> bool:
pass
@abc.abstractmethod @abc.abstractmethod
def connect(self) -> None: def connect(self) -> None:
"""Connects to the teleoperator.""" """Connects to the teleoperator."""