Problem with VehiclePIDController

Hello all. I am using carla 0.9.10 pre-built binary version. I want to create a car that will navigate through waypoints by using a PID controller from already available navigation stack. The waypoints are selected randomly by using the waypoint.next() method. Also, I don’t want to use the default autopilot method. Here is the problem. The car stops and moves everytime, as though the simulation appears to be discrete. Can someone please help me with this? Here is my full code:

#!/usr/bin/env python

import carla
from agents.navigation.controller import VehiclePIDController

client = carla.Client('127.0.0.1', 2000)
client.set_timeout(10.0)

world = client.get_world()
carla_map = world.get_map()
blueprints = world.get_blueprint_library().filter('vehicle.*')

blueprints = [x for x in blueprints if int(x.get_attribute('number_of_wheels')) == 4]
blueprints = sorted(blueprints, key=lambda bp: bp.id)

spawn_points = world.get_map().get_spawn_points()

blueprint = np.random.choice(blueprints)
if(blueprint.has_attribute('color')):
    color = np.random.choice(blueprint.get_attribute('color').recommended_values)
    blueprint.set_attribute('color', color)
if(blueprint.has_attribute('driver_id')):
    driver_id = np.random.choice(blueprint.get_attribute('driver_id').recommended_values)
    blueprint.set_attribute('driver_id', driver_id)

actor = world.spawn_actor(blueprint, np.random.choice(spawn_points))
custom_controller = VehiclePIDController(vehicle, args_lateral = {'K_P': 1, 'K_D': 0.0, 'K_I': 0}, args_longitudinal = {'K_P': 1, 'K_D': 0.0, 'K_I': 0.0})

while True:    
    waypoints = carla_map.get_waypoint(actor.get_location())
    waypoint = np.random.choice(waypoints.next(0.3))
    control_signal = custom_controller.run_step(1, waypoint)
    actor.apply_control(control_signal)