MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / _init

Method _init

leaderboard/team_code/roach_ap_agent.py:114–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112 (self.save_path / 'bev').mkdir()
113
114 def _init(self):
115 self._waypoint_planner = RoutePlanner(4.0, 50)
116 self._waypoint_planner.set_route(self._plan_gps_HACK, True)
117
118 self._command_planner = RoutePlanner(7.5, 25.0, 257)
119 self._command_planner.set_route(self._global_plan, True)
120
121 self._route_planner = RoutePlanner(4.0, 50.0)
122 self._route_planner.set_route(self._global_plan, True)
123
124 self._world = CarlaDataProvider.get_world()
125 self._map = self._world.get_map()
126 self._ego_vehicle = CarlaDataProvider.get_ego()
127 self._last_route_location = self._ego_vehicle.get_location()
128 self._criteria_stop = run_stop_sign.RunStopSign(self._world)
129 self.birdview_obs_manager = ObsManager(self.cfg['obs_configs']['birdview'], self._criteria_stop)
130 self.birdview_obs_manager.attach_ego_vehicle(self._ego_vehicle)
131
132 self.navigation_idx = -1
133
134
135 # for stop signs
136 self._target_stop_sign = None # the stop sign affecting the ego vehicle
137 self._stop_completed = False # if the ego vehicle has completed the stop sign
138 self._affected_by_stop = False # if the ego vehicle is influenced by a stop sign
139
140 TrafficLightHandler.reset(self._world)
141 print("initialized")
142
143 self.initialized = True
144
145 def _get_angle_to(self, pos, theta, target):
146 R = np.array([

Callers 1

run_stepMethod · 0.95

Calls 9

RoutePlannerClass · 0.90
ObsManagerClass · 0.90
get_worldMethod · 0.80
get_mapMethod · 0.80
get_egoMethod · 0.80
get_locationMethod · 0.80
set_routeMethod · 0.45
attach_ego_vehicleMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected