|
Re: PID function to reduce drift
When we use a PID for driving a certain distance, we check for the encoder speed as well as the distance to be below a certain threshold before stopping the PID.
This keeps it from drifting past the setpoint at the end because the command won't finish until the robot is no longer moving.
|