Problem with PID variables

Hi team,

I just successfully implemented the full_control_serial example and its working like a charm. So happy with the amount of control it gives me by making motion type dynamic.
However, I am facing one issue with following settings…everytime i activate a motor with ME1 or when motor reaches 0 position, it starts shacking. I hold it with my hands it will stop shacking. It happens with following setting.

motor.PID_velocity.P = 0.2f;
motor.PID_velocity.I = 20;
motor.PID_velocity.D = 0;

If I change motor.PID velocity.I to 0 then also it solves the problem. However, I am curious as to why it happens. Honestly not sure what i am changing by altering this value either. Could someone please throw some light on this and if there is any better way to troubleshoot

It sounds a lot like oscillation, why it occurs at zero position I do not know. usually that means the P gain is a bit too high.

Thanks @Anthony_Douglas. You mean adjust the motor.PID_velocity.P value?

removed leading ‘f’ for float and reducing the I value to 10 from 20 has solved the problem for now.

Does anyone know what is the major difference between commander.motor and commander.motion?