FTC7393 / FtcRobotController

BSD 3-Clause Clear License
4 stars 1 forks source link

Fetcher slow mode is inconsistent #27

Closed robot256 closed 1 year ago

robot256 commented 1 year ago

I see what the problem is now. The slow mode button changes the amount that is added to the current fetcher target each cycle. But in fast mode, the target changes way faster than the fetcher actually moves. It will still go just as fast to get to the way-high target even after you change the rate at which the target changes from there. The process will reset when you let go of the joystick and the target is made equal to the encoder again.

One solution is to change the PID's speed with the setPower command, rather than change the joystick rate. Or we could do more tuning and path planning to make the joystick target not get so far from the actual position.

robot256 commented 1 year ago

Derp. The simplest solution is to make the slow mode button justPressed or justReleased call fetcher.stopExtension(), then continue moving from there at the new speed.

robot256 commented 1 year ago

I forget if they tested this, but yes it should work now.