Class HeadingPIDProcessor

    • Constructor Detail

      • HeadingPIDProcessor

        public HeadingPIDProcessor​(double p,
                                   DoubleSupplier headingSupplier)
        Create a new HeadingPIDProcessor without inverted sides that outputs to feed-forward setpoints.
        Parameters:
        p - The P coefficient.
        headingSupplier - A supplier that returns the current heading, in radians from -π to π.
      • HeadingPIDProcessor

        public HeadingPIDProcessor​(double p,
                                   double i,
                                   DoubleSupplier headingSupplier)
        Create a new HeadingPIDProcessor without inverted sides that outputs to feed-forward setpoints.
        Parameters:
        p - The P coefficient.
        i - The I coefficient.
        headingSupplier - A supplier that returns the current heading, in radians from -π to π.
      • HeadingPIDProcessor

        public HeadingPIDProcessor​(double p,
                                   double i,
                                   double d,
                                   DoubleSupplier headingSupplier)
        Create a new HeadingPIDProcessor without inverted sides that outputs to feed-forward setpoints.
        Parameters:
        p - The P coefficient.
        i - The I coefficient.
        d - The D coefficient.
        headingSupplier - A supplier that returns the current heading, in radians from -π to π.
      • HeadingPIDProcessor

        public HeadingPIDProcessor​(double p,
                                   double i,
                                   double d,
                                   DoubleSupplier headingSupplier,
                                   boolean outputToPosition)
        Create a new HeadingPIDProcessor without inverted sides.
        Parameters:
        p - The P coefficient.
        i - The I coefficient.
        d - The D coefficient.
        headingSupplier - A supplier that returns the current heading, in radians from -π to π.
        outputToPosition - Whether to output to the position setpoints (as opposed to the feed-forward setpoints.)
      • HeadingPIDProcessor

        public HeadingPIDProcessor​(double p,
                                   double i,
                                   double d,
                                   DoubleSupplier headingSupplier,
                                   boolean outputToPosition,
                                   boolean invertSides)
        Create a new HeadingPIDProcessor.
        Parameters:
        p - The P coefficient.
        i - The I coefficient.
        d - The D coefficient.
        headingSupplier - A supplier that returns the current heading, in radians from -π to π.
        outputToPosition - Whether to output to the position setpoints (as opposed to the feed-forward setpoints.)
        invertSides - Whether to invert the output sides. (If true, the loop output will be added to the left side and subtracted from the right, and vice versa.)