The velocity smoother part of the code is this:
if target_speed > control_speed:
control_speed = min( target_speed, control_speed + 0.02 )
elif target_speed < control_speed:
control_speed = max( target_speed, control_speed - 0.02 )
control_speed = target_speed
as you can see, regardless of how much you increase the target velocity, there will be no large jump in the controled velocity. It will always be incremented or decremented by 0.02 cyclically until it reaches the target velocity.
In essence this is an acceleration limiting approach to motion control when a constant maximum acceleration is assumed and so a trapezoidal velocity profile is generated. Jerk limiting (limiting the derivative of the acceleration) produces even smoother velocity profiles.
More about acceleration and jerk limiting here.