#!/usr/bin/env python # Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see . import argparse import carla def main(): argparser = argparse.ArgumentParser( description=__doc__) argparser.add_argument('--host', metavar='H', default='localhost', help='IP of the host CARLA Simulator (default: localhost)') argparser.add_argument('--port', metavar='P', default=2000, type=int, help='TCP port of CARLA Simulator (default: 2000)') argparser.add_argument('-f', '--file', action="store_true", help='File to start') argparser.add_argument('-r', '--route', default="", help='Route') # argparser.add_argument('-t', '--time', default=60, help='Time') args = argparser.parse_args() client = carla.Client(args.host, args.port) client.set_timeout(10.0) world = client.get_world() weather = world.get_weather() weather_string = f" " print(weather_string) if __name__ == '__main__': try: main() except RuntimeError as e: print(e)