Package com.marswars.util
Class TunablePid
java.lang.Object
com.marswars.util.TunablePid
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(String key, PhoenixPIDController controller) Creates tunable PID parameters for a Phoenix PIDController (used in swerve).static voidcreate(String key, PIDController controller) Creates tunable PID parameters for a single WPILib PIDController.static voidcreate(String key, PIDController... controllers) Creates tunable PID parameters for multiple synchronized WPILib PIDControllers.static voidcreate(String key, Consumer<SlotConfigs> config_applier, SlotConfigs config) Creates tunable PID parameters for CTRE Phoenix 6 SlotConfigs.
-
Method Details
-
create
Creates tunable PID parameters for CTRE Phoenix 6 SlotConfigs. Publishes kP, kI, kD, kS, kV, kA, and kG to NetworkTables for live tuning.- Parameters:
key- The NetworkTables key prefix for the PID parametersconfig_applier- Consumer that applies the updated configuration to the motorconfig- The initial SlotConfigs to use as default values
-
create
Creates tunable PID parameters for a single WPILib PIDController. Publishes kP, kI, and kD to NetworkTables for live tuning.- Parameters:
key- The NetworkTables key prefix for the PID parameterscontroller- The PIDController to tune
-
create
Creates tunable PID parameters for multiple synchronized WPILib PIDControllers. All controllers will be updated together when any parameter changes. Publishes kP, kI, and kD to NetworkTables for live tuning.- Parameters:
key- The NetworkTables key prefix for the PID parameterscontrollers- Variable number of PIDControllers to tune together
-
create
Creates tunable PID parameters for a Phoenix PIDController (used in swerve). Publishes kP, kI, and kD to NetworkTables for live tuning.- Parameters:
key- The NetworkTables key prefix for the PID parameterscontroller- The PhoenixPIDController to tune
-