pyrcf.components.robot_interfaces ================================= .. py:module:: pyrcf.components.robot_interfaces .. autoapi-nested-parse:: Defines interface for robots that can be used in the control loop. Also has a submodule for simulated robots. Subpackages ----------- .. toctree:: :maxdepth: 1 /autoapi/pyrcf/components/robot_interfaces/simulation/index Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pyrcf/components/robot_interfaces/robot_interface_base/index /autoapi/pyrcf/components/robot_interfaces/robot_interface_with_pinocchio/index Classes ------- .. autoapisummary:: pyrcf.components.robot_interfaces.RobotInterface pyrcf.components.robot_interfaces.DummyRobot Package Contents ---------------- .. py:class:: RobotInterface Bases: :py:obj:`pyrcf.components.pyrcf_component.PyRCFComponent` Base class defining the interface for all robots that can be used in the control loop. .. py:method:: read() -> pyrcf.core.types.RobotState :abstractmethod: Get the latest state from the robot. :raises NotImplementedError: Raised if this method is not implemented by the child class. :returns: the latest state of the robot. :rtype: RobotState .. py:method:: write(cmd: pyrcf.core.types.RobotCmd) -> bool :abstractmethod: Send the specified commands to the robot. :param cmd: the command object as computed by the controller in the loop. :type cmd: RobotCmd :raises NotImplementedError: Raised if this method is not implemented by the child class. :returns: True if sending command was succesful. :rtype: bool .. py:method:: activate() -> bool This method will be called in a loop until it returns true, before the control loop starts. Override in child class as required. .. py:method:: deactivate() -> bool This method will be called in a loop until it returns true, after the control loop is stopped, and before shutdown of this class is called. Override in child class as required. .. py:class:: DummyRobot(squawk: bool = True) Bases: :py:obj:`RobotInterface` Base class defining the interface for all robots that can be used in the control loop. .. py:attribute:: _squawk .. py:method:: read() -> pyrcf.core.types.RobotState This is a dummy method for sanity checking the control loop. .. py:method:: write(cmd: pyrcf.core.types.RobotCmd) -> bool This is a dummy method for sanity checking the control loop.