Class AutonomousManager.ZoneTrigger

java.lang.Object
com.flarerobotics.lib.auto.AutonomousManager.ZoneTrigger
Enclosing class:
AutonomousManager

public static class AutonomousManager.ZoneTrigger extends Object
Creates a trigger zone to execute a command when the robot is close enough to a pose by the given amount.
  • Constructor Details

    • ZoneTrigger

      public ZoneTrigger(String poseName, double triggerDist, edu.wpi.first.wpilibj2.command.Command command)
      Constructs a new ZoneTrigger.
      Parameters:
      poseName - The name of origin of the trigger.
      triggerDist - The distance from the pose to trigger the command.
      command - The command to execute when the robot is within the trigger distance.
  • Method Details

    • getPoseName

      public String getPoseName()
      Returns the origin pose of the trigger.
      Returns:
      The pose name.
    • getTriggerDistance

      public double getTriggerDistance()
      Returns the distance from the pose to trigger the command.
      Returns:
      The trigger distance.
    • getCommand

      public edu.wpi.first.wpilibj2.command.Command getCommand()
      Returns the command to execute.
      Returns:
      The command.