|
Re: pic: 254 Drivetrain
The drive train loop is open when you are turning (see the other posts linked to for more information about that), but the straight drive loop is closed. The striaght drive code is run whenever the steering wheel is at the center position +- a certain deadzone. It uses the proximity sensors to get a speed error (left count - right count). For the robot to go straight, the speed error should be 0, but it usually isn't, so the speed error is multiplied by a constant and subtracted from whatever side is going faster.
|