CARLA stops once every second

Hi.

I am going through the self-driving car specialization and I am tasked with implementing lateral & longitudinal controllers on a CARLA vehicle. This is my result:

The car stops once every second, which alters the throttle. I know that this isn’t an issue with my GPU because a hardware glitch on my end won’t alter the values. What could be the reason behind this?