|
Re: 95's Pre-season drive base done!
As far as controlling that setup with a PID, I would use two separate PIDs for each side of the drive train, and control them via speed. Also, because you will be changing the setpoint a lot, I'd remove the derivative term from the equation, because that's just going to provide a large unintended movement every time you quickly move the joysticks.
Also, be sure to reset your integral term every time target speed = 0 and current speed = 0 (or close to it), or else after a bit of driving your robot, it will begin to overshoot your speed every time.
As far as gear changes go, I'd have it default to low gear and if speed >= n ft/s, shift to high gear, and change the PI controller values, and joystick_input_to_target_speed_conversion algorithm accordingly.
And that's not to say you can't use a position mode during autonomous, but for teleop, that becomes very weird because you need to integrate change in distance based on the joystick values, which will tend to lead to a lot of overshoot.
|