parameters: (self, target_speed, waypoint)
return_statement: return control
docstring: Execute one step of control invoking both lateral and longitudinal
          PID controllers to reach a target waypoint
          at a given target_speed.
  
              :param target_speed: desired vehicle speed
              :param waypoint: target location encoded as a waypoint
              :return: distance (in meters) to the waypoint
docstring_summary: Execute one step of control invoking both lateral and longitudinal
          PID controllers to reach a target waypoint
          at a given target_speed.
docstring_tokens: Execute one step of control invoking both lateral and longitudinal PID controllers to reach a target waypoint at a given target_speed .
function: def run_step(self, target_speed, waypoint):
          """
          Execute one step of control invoking both lateral and longitudinal
          PID controllers to reach a target waypoint
          at a given target_speed.
  
              :param target_speed: desired vehicle speed
              :param waypoint: target location encoded as a waypoint
              :return: distance (in meters) to the waypoint
          """
  
          acceleration = self._lon_controller.run_step(target_speed)
          current_steering = self._lat_controller.run_step(waypoint)
          control = carla.VehicleControl()
          if acceleration >= 0.0:
              control.throttle = min(acceleration, self.max_throt)
              control.brake = 0.0
          else:
              control.throttle = 0.0
              control.brake = min(abs(acceleration), self.max_brake)
  
          # Steering regulation: changes cannot happen abruptly, can't steer too much.
  
          if current_steering > self.past_steering + 0.1:
              current_steering = self.past_steering + 0.1
          elif current_steering < self.past_steering - 0.1:
              current_steering = self.past_steering - 0.1
  
          if current_steering >= 0:
              steering = min(self.max_steer, current_steering)
          else:
              steering = max(-self.max_steer, current_steering)
  
          control.steer = steering
          control.hand_brake = False
          control.manual_gear_shift = False
          self.past_steering = steering
  
          return control
function_tokens: def run_step ( self , target_speed , waypoint ) : acceleration = self . _lon_controller . run_step ( target_speed ) current_steering = self . _lat_controller . run_step ( waypoint ) control = carla . VehicleControl ( ) if acceleration >= 0.0 : control . throttle = min ( acceleration , self . max_throt ) control . brake = 0.0 else : control . throttle = 0.0 control . brake = min ( abs ( acceleration ) , self . max_brake ) # Steering regulation: changes cannot happen abruptly, can't steer too much. if current_steering > self . past_steering + 0.1 : current_steering = self . past_steering + 0.1 elif current_steering < self . past_steering - 0.1 : current_steering = self . past_steering - 0.1 if current_steering >= 0 : steering = min ( self . max_steer , current_steering ) else : steering = max ( - self . max_steer , current_steering ) control . steer = steering control . hand_brake = False control . manual_gear_shift = False self . past_steering = steering return control