View Single Post
  #2   Spotlight this post!  
Unread 28-01-2017, 09:42
wlogeais wlogeais is offline
Registered User
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2016
Rookie Year: 2011
Location: Minnesota
Posts: 18
wlogeais is an unknown quantity at this point
Re: Multiple Sensor PID Loops

Quote:
Originally Posted by thecoopster20 View Post
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.
Reply With Quote