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

Method _get_data_from_carla

scenario_runner/no_rendering_mode.py:819–834  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

817 self.actors_surface = None
818
819 def _get_data_from_carla(self):
820 try:
821 self.client = carla.Client(self.args.host, self.args.port)
822 self.client.set_timeout(self.timeout)
823
824 if self.args.map is None:
825 world = self.client.get_world()
826 else:
827 world = self.client.load_world(self.args.map)
828
829 town_map = world.get_map()
830 return (world, town_map)
831
832 except RuntimeError as ex:
833 logging.error(ex)
834 exit_game()
835
836 def start(self):
837 self.world, self.town_map = self._get_data_from_carla()

Callers 1

startMethod · 0.95

Calls 3

exit_gameFunction · 0.85
get_worldMethod · 0.80
get_mapMethod · 0.80

Tested by

no test coverage detected