Quote:
Originally Posted by thecoopster20
Now, the solutions I've seen so far here on CD are varied. One idea I saw was to create multiple PID loops within the drive subsystem. Another idea was to create separate dummy subsystems specifically for each PID task. I'm not quite sure what the best way to approach this problem is.
|
I'd suggest that the second of these ideas is more difficult/risky, with the potential for parallel commands sending conflicting drive-straight/rotate instructions.
The second idea just requires you to use conditions (eg if setpoint-is-angle, elseif setpoint-is-distance...) within your ChassisPIDSubsystem's returnPIDInput() and usePIDOutput() and potentially within a custom-onTarget() too.