wpimath.controller Package

ArmFeedforward(*args, **kwargs)

A helper class that computes feedforward outputs for a simple arm (modeled as a motor acting against the force of gravity on a beam suspended at an angle).

BangBangController([tolerance])

Implements a bang-bang controller, which outputs either 0 or 1 depending on whether the measurement is less than the setpoint.

ControlAffinePlantInversionFeedforward_1_1(...)

Constructs a control-affine plant inversion model-based feedforward from given model dynamics.

ControlAffinePlantInversionFeedforward_2_1(...)

Constructs a control-affine plant inversion model-based feedforward from given model dynamics.

ControlAffinePlantInversionFeedforward_2_2(...)

Constructs a control-affine plant inversion model-based feedforward from given model dynamics.

DifferentialDriveAccelerationLimiter(*args, ...)

Filters the provided voltages to limit a differential drive's linear and angular acceleration.

DifferentialDriveWheelVoltages([left, right])

Motor voltages for a differential drive.

ElevatorFeedforward(*args, **kwargs)

A helper class that computes feedforward outputs for a simple elevator (modeled as a motor acting against the force of gravity).

HolonomicDriveController(xController, ...)

This holonomic drive controller can be used to follow trajectories using a holonomic drivetrain (i.e.

ImplicitModelFollower_1_1(*args, **kwargs)

Contains the controller coefficients and logic for an implicit model follower.

ImplicitModelFollower_2_1(*args, **kwargs)

Contains the controller coefficients and logic for an implicit model follower.

ImplicitModelFollower_2_2(*args, **kwargs)

Contains the controller coefficients and logic for an implicit model follower.

LTVDifferentialDriveController(plant, ...)

The linear time-varying differential drive controller has a similar form to the LQR, but the model used to compute the controller gain is the nonlinear model linearized around the drivetrain's current state.

LTVUnicycleController(*args, **kwargs)

The linear time-varying unicycle controller has a similar form to the LQR, but the model used to compute the controller gain is the nonlinear model linearized around the drivetrain's current state.

LinearPlantInversionFeedforward_1_1(*args, ...)

Constructs a plant inversion model-based feedforward from a LinearSystem.

LinearPlantInversionFeedforward_2_1(*args, ...)

Constructs a plant inversion model-based feedforward from a LinearSystem.

LinearPlantInversionFeedforward_2_2(*args, ...)

Constructs a plant inversion model-based feedforward from a LinearSystem.

LinearQuadraticRegulator_1_1(*args, **kwargs)

Contains the controller coefficients and logic for a linear-quadratic regulator (LQR).

LinearQuadraticRegulator_2_1(*args, **kwargs)

Contains the controller coefficients and logic for a linear-quadratic regulator (LQR).

LinearQuadraticRegulator_2_2(*args, **kwargs)

Contains the controller coefficients and logic for a linear-quadratic regulator (LQR).

PIDController(Kp, Ki, Kd[, period])

Implements a PID control loop.

ProfiledPIDController(Kp, Ki, Kd, constraints)

Implements a PID control loop whose setpoint is constrained by a trapezoid profile.

ProfiledPIDControllerRadians(Kp, Ki, Kd, ...)

Implements a PID control loop whose setpoint is constrained by a trapezoid profile.

RamseteController(*args, **kwargs)

Ramsete is a nonlinear time-varying feedback controller for unicycle models that drives the model to a desired pose along a two-dimensional trajectory.

SimpleMotorFeedforwardMeters(*args, **kwargs)

A helper class that computes feedforward voltages for a simple permanent-magnet DC motor.