class_docstr: BasicAgent implements an agent that navigates the scene.
  This agent respects traffic lights and other vehicles, but ignores stop signs.
  It has several functions available to specify the route that the agent must follow,
  as well as to change its parameters in case a different driving mode is desired.
class_docstr_tok: ["BasicAgent","implements","an","agent","that","navigates","the","scene",".","This","agent","respects","traffic","lights","and","other","vehicles",",","but","ignores","stop","signs",".","It","has","several","functions","available","to","specify","the","route","that","the","agent","must","follow",",","as","well","as","to","change","its","parameters","in","case","a","different","driving","mode","is","desired","."]
docstr: Calculates the shortest route between a starting and ending waypoint.
  
      :param start_waypoint (carla.Waypoint): initial waypoint
      :param end_waypoint (carla.Waypoint): final waypoint
docstr_tok: ["Calculates","the","shortest","route","between","a","starting","and","ending","waypoint",".",":","param","start_waypoint","(","carla.Waypoint",")",":","initial","waypoint",":","param","end_waypoint","(","carla.Waypoint",")",":","final","waypoint"]
code: def trace_route(self, start_waypoint, end_waypoint):
      """
      Calculates the shortest route between a starting and ending waypoint.
  
          :param start_waypoint (carla.Waypoint): initial waypoint
          :param end_waypoint (carla.Waypoint): final waypoint
      """
      start_location = start_waypoint.transform.location
      end_location = end_waypoint.transform.location
      return self._global_planner.trace_route(
          start_location, end_location
      )
  
imports: import carla
  from shapely.geometry import Polygon
  from agents.navigation.local_planner import LocalPlanner, RoadOption
  from agents.navigation.global_route_planner import GlobalRoutePlanner
  from agents.tools.misc import get_speed, is_within_distance, get_trafficlight_trigger_location, compute_distance
label_desc: Use image node_id 9 for calling the BasicAgent obj's underlying member method code with example usage: obj.trace_route(start_waypoint, end_waypoint) and returns: self