|
Re: Running multiple PID loops on the drivetrain
It gets a little tricky with the PIDController class, since it wants to write directly to a speed controller, which doesn't work when you want to mix the results of multiple PID controllers and output to multiple speed controllers. What we did was create a class called DummyPIDOutput that implements PIDOutput but doesn't output anything. We then read the DummyPIDOutput in our drive code and do the mixing there.
There's probably an easier way, but this what worked for us. I've attached our DummyPIDOutput class.
|