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

Method __init__

scenario_runner/srunner/scenarios/cut_in.py:41–66  ·  view source on GitHub ↗
(self, world, ego_vehicles, config, randomize=False, debug_mode=False, criteria_enable=True,
                 timeout=600)

Source from the content-addressed store, hash-verified

39 timeout = 1200
40
41 def __init__(self, world, ego_vehicles, config, randomize=False, debug_mode=False, criteria_enable=True,
42 timeout=600):
43
44 self.timeout = timeout
45 self._map = CarlaDataProvider.get_map()
46 self._reference_waypoint = self._map.get_waypoint(config.trigger_points[0].location)
47
48 self._velocity = 40
49 self._delta_velocity = 10
50 self._trigger_distance = 30
51
52 # get direction from config name
53 self._config = config
54 self._direction = None
55 self._transform_visible = None
56
57 super(CutIn, self).__init__("CutIn",
58 ego_vehicles,
59 config,
60 world,
61 debug_mode,
62 criteria_enable=criteria_enable)
63
64 if randomize:
65 self._velocity = random.randint(20, 60)
66 self._trigger_distance = random.randint(10, 40)
67
68 def _initialize_actors(self, config):
69

Callers

nothing calls this directly

Calls 2

get_mapMethod · 0.80
get_waypointMethod · 0.80

Tested by

no test coverage detected