# Copyright (c) 2022-2025, The Isaac Lab Project Developers.# All rights reserved.## SPDX-License-Identifier: BSD-3-Clause"""Base class for teleoperation interface."""fromabcimportABC,abstractmethodfromcollections.abcimportCallablefromtypingimportAny
[docs]classDeviceBase(ABC):"""An interface class for teleoperation devices."""
[docs]def__init__(self):"""Initialize the teleoperation interface."""pass
def__str__(self)->str:"""Returns: A string containing the information of joystick."""returnf"{self.__class__.__name__}"""" Operations """
[docs]@abstractmethoddefreset(self):"""Reset the internals."""raiseNotImplementedError
[docs]@abstractmethoddefadd_callback(self,key:Any,func:Callable):"""Add additional functions to bind keyboard. Args: key: The button to check against. func: The function to call when key is pressed. The callback function should not take any arguments. """raiseNotImplementedError
[docs]@abstractmethoddefadvance(self)->Any:"""Provides the joystick event state. Returns: The processed output form the joystick. """raiseNotImplementedError