pyrcf.components.controller_manager.command_accumulators ======================================================== .. py:module:: pyrcf.components.controller_manager.command_accumulators .. autoapi-nested-parse:: Accumulation policies will decide how control commands from multiple controllers (if present) in the same control loop will be combined before sending them to the robot. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pyrcf/components/controller_manager/command_accumulators/cmd_accumulation_policies/index Classes ------- .. autoapisummary:: pyrcf.components.controller_manager.command_accumulators.CommandAccumulatorBase pyrcf.components.controller_manager.command_accumulators.SimpleCmdOverride Package Contents ---------------- .. py:class:: CommandAccumulatorBase Bases: :py:obj:`abc.ABC` Accumulation policies are functions that takes in commands from two controllers and decides how to generate a single command to be sent to the robot. NOTE: this should ideally be done at joint level, but we are simplifying by doing accumulation at robot-level instead. .. py:method:: accumulate(commands=List[RobotCmd]) -> pyrcf.core.types.robot_io.RobotCmd :abstractmethod: Accumulate the specified commands into a single command to be sent to the robot. :param commands: the robot commands from different controllers (in sequence). :type commands: List[RobotCmd] :returns: The final control command (action) to be sent to the robot. :rtype: RobotCmd :raises NotImplementedError: Raised if this method is not implemented by the child class. .. py:class:: SimpleCmdOverride Bases: :py:obj:`CommandAccumulatorBase` This accumulation policy simply overrides the command from all controllers with the latest one. .. py:method:: accumulate(commands=List[RobotCmd]) -> pyrcf.core.types.robot_io.RobotCmd Accumulate the specified commands into a single command to be sent to the robot. :param commands: the robot commands from different controllers (in sequence). :type commands: List[RobotCmd] :returns: The final control command (action) to be sent to the robot. :rtype: RobotCmd :raises NotImplementedError: Raised if this method is not implemented by the child class.