class_docstr: PIDLongitudinalController implements longitudinal control using a PID.
docstr: Estimate the throttle/brake of the vehicle based on the PID equations
  
      :param target_speed:  target speed in Km/h
      :param current_speed: current speed of the vehicle in Km/h
      :return: throttle/brake control
docstr_tok: ["Estimate","the","throttle\/brake","of","the","vehicle","based","on","the","PID","equations",":","param","target_speed",":","target","speed","in","Km\/h",":","param","current_speed",":","current","speed","of","the","vehicle","in","Km\/h",":","return",":","throttle\/brake","control"]
code: def _pid_control(self, target_speed, current_speed):
      """
      Estimate the throttle/brake of the vehicle based on the PID equations
  
          :param target_speed:  target speed in Km/h
          :param current_speed: current speed of the vehicle in Km/h
          :return: throttle/brake control
      """
  
      error = target_speed - current_speed
      self._error_buffer.append(error)
  
      if len(self._error_buffer) >= 2:
          _de = (
              self._error_buffer[-1] - self._error_buffer[-2]
          ) / self._dt
          _ie = sum(self._error_buffer) * self._dt
      else:
          _de = 0.0
          _ie = 0.0
  
      return np.clip(
          (self._k_p * error) + (self._k_d * _de) + (self._k_i * _ie),
          -1.0,
          1.0,
      )
  
imports: from collections import deque
  import math
  import numpy
  import carla
  from agents.tools.misc import get_speed
label_desc: Use image node_id 3 for calling the PIDLongitudinalController obj's underlying member method code with example usage: obj._pid_control(target_speed, current_speed) and returns: np