Robot moving more than necessary

I programmed my robot’s drivetrain motors to move for 1464 revolutions. But when we check the motors on the devices menu, the value of the motors is higher than 1464. One of them is between 1600 and 1630 and the other one is between 1550 and 1600. We’re using a pid loop with pros.
Here’s the code:
cons
Straight

What happens when you input smaller values into the PID?

We still have the same problem :frowning:

Also when we tried the drivetrain function of vexCode Blocks, the displayed values are the same but when we run it on the field the robot slightly moves to the left.

I think this one is a Vexcode issue if I am not mistaken, so I’m assuming the PID is steady state error on straight movement?

If by steady state error you mean the difference between the target and the current position, then our robot goes far beyond the target.

Typically, your kD is tiny and kP is as big as it needs to be. I would tune your PID by setting all values to 0. Start with kP until it oscillates once or twice. Then go to kD and very slightly increase it until it’s stable. kI should fix any small inaccuracies that it has. kD should be the smallest

1 Like