MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / set_destination

Method set_destination

agents/navigation/basic_agent.py:47–59  ·  view source on GitHub ↗

This method creates a list of waypoints from agent's position to destination location based on the route returned by the global router

(self, location)

Source from the content-addressed store, hash-verified

45 self._grp = None
46
47 def set_destination(self, location):
48 """
49 This method creates a list of waypoints from agent's position to destination location
50 based on the route returned by the global router
51 """
52
53 start_waypoint = self._map.get_waypoint(self._vehicle.get_location())
54 end_waypoint = self._map.get_waypoint(
55 carla.Location(location[0], location[1], location[2]))
56
57 route_trace = self._trace_route(start_waypoint, end_waypoint)
58
59 self._local_planner.set_global_plan(route_trace)
60
61 def _trace_route(self, start_waypoint, end_waypoint):
62 """

Callers 1

__init__Method · 0.45

Calls 4

_trace_routeMethod · 0.95
get_waypointMethod · 0.80
get_locationMethod · 0.80
set_global_planMethod · 0.45

Tested by

no test coverage detected