Quote:
Originally Posted by sagrossm
Ok, we've been trying to implement it and it's just been really inconsistent (usually turning too far). Looked online for help and I can only find examples with PID, that's why I made that assumption. So is there anything I can do to make it more accurate and reduce error? This is a button that we have:
if((driveStick.getRawButton(12) == true)) {
if(gyro.getYaw() > -140){
leftFront.set(0.3);
leftRear.set(0.3);
rightFront(-0.3);
rightRear.set(-0.3);
}
else if(gyro.getYaw() <= -140){
leftFront.set(0.0);
leftRear.set(0.0);
rightFront(0.0);
rightRear.set(0.0);
}
}
|
I've not had good luck with very basic control methods like you've described, usually because of overshoot. I've found the D parameter to be necessary to slow the rotation as your robot picks up rotational speed during the turn.
Is there a reason you don't want to use PID? The WPILib PIDController is very capable and pretty easy to use.