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

Method _trace_route

agents/navigation/basic_agent.py:61–79  ·  view source on GitHub ↗

This method sets up a global router and returns the optimal route from start_waypoint to end_waypoint

(self, start_waypoint, end_waypoint)

Source from the content-addressed store, hash-verified

59 self._local_planner.set_global_plan(route_trace)
60
61 def _trace_route(self, start_waypoint, end_waypoint):
62 """
63 This method sets up a global router and returns the optimal route
64 from start_waypoint to end_waypoint
65 """
66
67 # Setting up global router
68 if self._grp is None:
69 dao = GlobalRoutePlannerDAO(self._vehicle.get_world().get_map(), self._hop_resolution)
70 grp = GlobalRoutePlanner(dao)
71 grp.setup()
72 self._grp = grp
73
74 # Obtain route plan
75 route = self._grp.trace_route(
76 start_waypoint.transform.location,
77 end_waypoint.transform.location)
78
79 return route
80
81 def run_step(self, debug=False):
82 """

Callers 2

set_destinationMethod · 0.95
run_stepMethod · 0.45

Calls 6

setupMethod · 0.95
GlobalRoutePlannerClass · 0.90
get_mapMethod · 0.80
get_worldMethod · 0.80
trace_routeMethod · 0.80

Tested by

no test coverage detected