Problems using PID to control DC Motor?

You make a common mistake. The output of a PID is signed, but you try to force
its non-negative. You have a throttle and no brake, game over(*).

If you have a non-zero integral term that will make up for the defficiency, but
with only a proportional term its not really control...

(*) typical behaviour is hunting - make sure your control system can drive the motor
in reverse (ie active braking), then it can a good chance of stabilizing under a fluctuating load.