Gyro sensor overshooting in turns

If I set my turn velocity to anything greater than 10% it overshoots, then tries to correct itself and undershoots, creating a loop of the bot trying to find the correct angle but overshooting/undershooting. I have tried having the motors cut 15 degrees before a 90 degree turn ends (at 20% turn velocity) and it still overshoots. Is there anything I can do to help fix it?

This happened to my team too (VRC)! I’m not sure if it’s the same for IQ, but are you using the drivetrain setup for the drive motors? What we figured out was that we had to switch the gear ratio numbers (1:2 to 2:1). Try that and see if that helps!

Are you using the builtin drivetrain ? If so, it may not work well for anything except the basic clawbot.

1 Like

@jpearman yes, I am using a built-in drivetrain. Is that considered suboptimal for autonomous?

we have our drivetrain numbers correct, but thanks for the suggestion :).

The drivetrain class uses a simple P controller when using the gyro for turns. This works well for small robots, but probably not so good for large competition robots. The P controller has no knowledge of wheel type, whether it’s front or rear wheel drive, the gearing etc. You can adjust the proportional constant when using text, but I don’t think that’s available when using blocks. The drivetrain class is great to get something working quickly and for classroom use, but if you find it does not work as desired then it’s time to write your own control loop that’s tuned to your robot.