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: This method creates a list of waypoints between a starting and ending location,
  based on the route returned by the global router, and adds it to the local planner.
  If no starting location is passed, the vehicle local planner's target location is chosen,
  which corresponds (by default), to a location about 5 meters in front of the vehicle.
  
      :param end_location (carla.Location): final location of the route
      :param start_location (carla.Location): starting location of the route
docstr_tok: ["This","method","creates","a","list","of","waypoints","between","a","starting","and","ending","location",",","based","on","the","route","returned","by","the","global","router",",","and","adds","it","to","the","local","planner",".","If","no","starting","location","is","passed",",","the","vehicle","local","planner","'s","target","location","is","chosen",",","which","corresponds","(","by","default",")",",","to","a","location","about","5","meters","in","front","of","the","vehicle",".",":","param","end_location","(","carla.Location",")",":","final","location","of","the","route",":","param","start_location","(","carla.Location",")",":","starting","location","of","the","route"]
code: def set_destination(self, end_location, start_location=None):
      """
      This method creates a list of waypoints between a starting and ending location,
      based on the route returned by the global router, and adds it to the local planner.
      If no starting location is passed, the vehicle local planner's target location is chosen,
      which corresponds (by default), to a location about 5 meters in front of the vehicle.
  
          :param end_location (carla.Location): final location of the route
          :param start_location (carla.Location): starting location of the route
      """
      if not start_location:
          start_location = (
              self._local_planner.target_waypoint.transform.location
          )
          clean_queue = True
      else:
          start_location = self._vehicle.get_location()
          clean_queue = False
  
      start_waypoint = self._map.get_waypoint(start_location)
      end_waypoint = self._map.get_waypoint(end_location)
  
      route_trace = self.trace_route(start_waypoint, end_waypoint)
      self._local_planner.set_global_plan(
          route_trace, clean_queue=clean_queue
      )
  
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 7 for calling the BasicAgent obj's underlying member method code with example usage: obj.set_destination(end_location, start_location) without return types