We are trying to use PID Commands. (Not PID subsystems)
We just found out that on the smart dashboard a command button can be turned into a PID editor.
I am unable to find any documentation regarding this really cool control.
Subsystem name and sensor name must be in quotes or just pass in a string there. The subsystem name is merely used to group your sensors and motors and the sensor name is used to label the PID in LiveWindow. Remember to run LiveWindow in testPeriodic.
Our subsystem controllers would show up in Live Window, but then when hitting the green/red enable button, nothing would happen. We had print statemenets in the usePIDOutput and returnPIDInput and they were never called with the enable flag being green or red. Perhaps we were just trying to use it wrong. I’m not sure. During Teleop though, we saw the PID subsystems were running fine.
This was using SFX Live Window. We finally just pushed past the problem by using some SmartDashboard.putNumber/getNumber calls for P, I, D, and Setpoint and a special command that reads them and then reset the PID.
We have about 4 more PIDs to tune, so figuring out the problem would save us a bit of effort. Anyone have similar experience?
We use RobotBuilder and the calls to LiveWindow.addActuator (not addSensor as suggested in previous case) are automatically generated.
Does anyone have a suggestion?
In scanning PIDCommand (we have only two) I don’t see that RobotBuilder automatically puts one on LiveWindow. Is there a difference between calling AddActuator with 3rd argument getPIDController() and calling AddSensor? If so, perhaps this is just a bug in RobotBuilder’s boilerplate for PIDSubsystem.