Class HumanVsMachineDecider

java.lang.Object
xbot.common.logic.HumanVsMachineDecider

public class HumanVsMachineDecider extends Object
Decides whether to use human or machine control of a subsystem. Human control is used when the inputs exceed a deadband. When input stops, control is handed back to the machine after a coast period.
  • Constructor Details

    • HumanVsMachineDecider

      @AssistedInject public HumanVsMachineDecider(@Assisted("prefix") String prefix, PropertyFactory propertyFactory)
      Creates a new decider with the given prefix.
      Parameters:
      prefix - The prefix to use for all properties created by this decider.
      propertyFactory - The property factory to use for creating properties.
  • Method Details

    • reset

      public void reset()
      Resets the decider defaulting to machine control.
    • reset

      public void reset(boolean startInAutomaticMode)
      Resets the decider.
      Parameters:
      startInAutomaticMode - Whether to start in automatic mode.
    • getRecommendedMode

      public HumanVsMachineDecider.HumanVsMachineMode getRecommendedMode(double humanInput)
      Gets the recommended mode based on the human input.
      Parameters:
      humanInput - The human input to use for the decision.
      Returns:
      The recommended mode.
    • getDeadband

      public double getDeadband()
      Get the deadband value.
      Returns:
      The deadband value.
    • setDeadband

      public void setDeadband(double value)