Quote:
Originally Posted by ayeckley
That sounds like a classic case of the Proportional gain being set too high. Keep in mind that it might require surprisingly small values, depending on your exact implementation. If you haven't already, the recommended PID tuning process starts with the I and D gains set to zero and the P gain set to a very low value. If you still get oscillation, then it is probably(*) necessary to decrease the P gain. If the robot "under-turns", then increase the gain incrementally. Generally speaking, once tuning is complete the P gain value should be just below the point at which you get oscillation. This can be very tricky with drives that have to overcome a large amount of stiction (static friction) in their drive systems (Mechanum drives are a good example) and robots that have relatively high angular moments of inertia (all of them?). It's highly unlikely that the navX unit is the source of the problem. You'll get very different behaviors if your robot is on a hard floor vs. carpet; try to use the most-FRC-realistic surface you can obtain.
* You might also get the symptoms you've described if there is some binding or other non-uniform drag in your drivetrain.
|
We started with the P value but no matter what its set at (low or high) the turn is still at the same velocity - it does hit the angle though before gyrating back and forth trying to reach accuracy. We've also tried changing the % SetTolerance which yields no change. It must be something with the way we are handing the PID output. Thanks for the suggestions.