Class HeadingModule

java.lang.Object
xbot.common.subsystems.drive.control_logic.HeadingModule

public class HeadingModule extends Object
Encapsulates the logic needed to rotate the robot to a specific angle. When using a PD or PID controller, it will attempt to reach that angle. When using a D-only controller, it will just resist any rotational motion.
  • Field Details

  • Constructor Details

  • Method Details

    • isOnTarget

      public boolean isOnTarget()
    • reset

      public void reset()
    • calculateHeadingPower

      public double calculateHeadingPower(double desiredHeading)
    • calculateHeadingPower

      public double calculateHeadingPower(Rotation2d desiredHeading)
    • calculateDeltaHeadingPower

      public double calculateDeltaHeadingPower(double desiredDeltaHeadingInDegrees)
    • freezeHeading

      public void freezeHeading()
    • calculateFrozenHeadingPower

      public double calculateFrozenHeadingPower()