so our team is trying to use a pid to control our drivetrain and we were using the WPIlib PIDcontroler class but now we are using the spakPIDcontroler class and we would like to know if there is any equivalent to the calculate method present in the WPIlib one
That would be setReference()
.
isn’t the setReference() for saying “go to that position”?
Yes it is.
Is there a particular reason why you need to get the output of the internal PID controller?
Because there isn’t a way to get that, like the calculate method. You can only tell the Spark Max to go to a certain position or velocity, using your PID values.
No, since that is handled by the spark max’s internal PID controller, they have no reason to let you call calculate. You can get the applied output, or you can calculate it yourself using the same PID gains
thank we just didn’t understand properly what the function of the calculate method was
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.