class_docstr: BehaviorAgent implements an agent that navigates scenes to reach a given
  target destination, by computing the shortest possible path to it.
  This agent can correctly follow traffic signs, speed limitations,
  traffic lights, while also taking into account nearby vehicles. Lane changing
  decisions can be taken by analyzing the surrounding environment such as tailgating avoidance.
  Adding to these are possible behaviors, the agent can also keep safety distance
  from a car in front of it by tracking the instantaneous time to collision
  and keeping it in a certain range. Finally, different sets of behaviors
  are encoded in the agent, from cautious to a more aggressive ones.
class_docstr_tok: ["BehaviorAgent","implements","an","agent","that","navigates","scenes","to","reach","a","given","target","destination",",","by","computing","the","shortest","possible","path","to","it",".","This","agent","can","correctly","follow","traffic","signs",",","speed","limitations",",","traffic","lights",",","while","also","taking","into","account","nearby","vehicles",".","Lane","changing","decisions","can","be","taken","by","analyzing","the","surrounding","environment","such","as","tailgating","avoidance",".","Adding","to","these","are","possible","behaviors",",","the","agent","can","also","keep","safety","distance","from","a","car","in","front","of","it","by","tracking","the","instantaneous","time","to","collision","and","keeping","it","in","a","certain","range",".","Finally",",","different","sets","of","behaviors","are","encoded","in","the","agent",",","from","cautious","to","a","more","aggressive","ones","."]
docstr: Overwrites the throttle a brake values of a control to perform an emergency stop.
  The steering is kept the same to avoid going out of the lane when stopping during turns
  
      :param speed (carl.VehicleControl): control to be modified
docstr_tok: ["Overwrites","the","throttle","a","brake","values","of","a","control","to","perform","an","emergency","stop",".","The","steering","is","kept","the","same","to","avoid","going","out","of","the","lane","when","stopping","during","turns",":","param","speed","(","carl.VehicleControl",")",":","control","to","be","modified"]
code: def emergency_stop(self):
      """
      Overwrites the throttle a brake values of a control to perform an emergency stop.
      The steering is kept the same to avoid going out of the lane when stopping during turns
  
          :param speed (carl.VehicleControl): control to be modified
      """
      control = carla.VehicleControl()
      control.throttle = 0.0
      control.brake = self._max_brake
      control.hand_brake = False
      return control
  
file_path: carla/PythonAPI/carla/agents/navigation/behavior_agent.py
imports: import random
  import numpy
  import carla
  from agents.navigation.basic_agent import BasicAgent
  from agents.navigation.local_planner import RoadOption
  from agents.navigation.behavior_types import Cautious, Aggressive, Normal
  from agents.tools.misc import get_speed, positive, is_within_distance, compute_distance
label_desc: Use image node_id 9 for calling the BehaviorAgent obj's underlying member method code with example usage: obj.emergency_stop() and returns: control