View Single Post
  #17   Spotlight this post!  
Unread 03-01-2014, 21:37
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
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.
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present