|
Re: PIDController - control speed vs distance - SetSetpoint
I've seen both done:
-Leaving the controller on will help keep you in the same position. This is often simpler too.
-Turning off the controller (and setting the drivetrain to zero) will assume the robot will stay in the same spot, and yield drivetrain power & computing resources for other tasks to use.
Regardless, the trigger condition I like to use for saying "We are now done using this controller" is:
--Error Magnititude is less than some threshold (say, 3 inches?) and stays that way for a certain time period (say, 0.25 seconds?)
|