Yes, we saw something similar. Our solution was to set the velocity for the startup, is several steps to ramp up the speed, then when the distance is close, switch to position.
It is common for PID implementations to inhibit accumulating an integral of the error when the output is clamped to a limit (high or low). You can put in code like:
Code:
// Only integrate if not driving at a limit
if ((motor_info[motor].pwm < (MAX_PWM-PWM_ZERO)) &&
(motor_info[motor].pwm > (MIN_PWM-PWM_ZERO))){
motor_info[motor].vel_error_i += motor_info[motor].vel_error;
}