From 107b75c36b958c09f813bcc77dc8c979d0785105 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Sun, 28 Oct 2018 11:23:59 +0100 Subject: [PATCH] Add license and documentation to Python examples --- PythonAPI/dynamic_weather.py | 22 +++++++++++++++------- PythonAPI/manual_control.py | 4 ++-- PythonAPI/tutorial.py | 6 ++++++ PythonAPI/vehicle_gallery.py | 6 ++++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/PythonAPI/dynamic_weather.py b/PythonAPI/dynamic_weather.py index 23f7f9dd8..7473ed6a6 100755 --- a/PythonAPI/dynamic_weather.py +++ b/PythonAPI/dynamic_weather.py @@ -1,5 +1,18 @@ #!/usr/bin/env python +# Copyright (c) 2017 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 . + +""" +CARLA Dynamic Weather: + +Connect to a CARLA Simulator instance and control the weather. Change Sun +position smoothly with time and generate storms occasionally. +""" + import glob import os import sys @@ -87,12 +100,7 @@ class Weather(object): def main(): argparser = argparse.ArgumentParser( - description='CARLA Dynamic Weather') - argparser.add_argument( - '-v', '--verbose', - action='store_true', - dest='debug', - help='print debug information') + description=__doc__) argparser.add_argument( '--host', metavar='H', @@ -109,7 +117,7 @@ def main(): metavar='FACTOR', default=1.0, type=float, - help='update speed (default: 1.0)') + help='rate at which the weather changes (default: 1.0)') args = argparser.parse_args() speed_factor = args.speed diff --git a/PythonAPI/manual_control.py b/PythonAPI/manual_control.py index ae0537ac0..865297694 100755 --- a/PythonAPI/manual_control.py +++ b/PythonAPI/manual_control.py @@ -6,8 +6,8 @@ # This work is licensed under the terms of the MIT license. # For a copy, see . -# Keyboard controlling for CARLA. Please refer to client_example.py for a simpler -# and more documented example. +# Allows controlling a vehicle with a keyboard. For a simpler and more +# documented example, please take a look at tutorial.py. """ Welcome to CARLA manual control. diff --git a/PythonAPI/tutorial.py b/PythonAPI/tutorial.py index 0d06cc78f..28e4e4f48 100755 --- a/PythonAPI/tutorial.py +++ b/PythonAPI/tutorial.py @@ -1,5 +1,11 @@ #!/usr/bin/env python +# Copyright (c) 2017 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 glob import os import sys diff --git a/PythonAPI/vehicle_gallery.py b/PythonAPI/vehicle_gallery.py index d00fd03cc..3662c0d98 100755 --- a/PythonAPI/vehicle_gallery.py +++ b/PythonAPI/vehicle_gallery.py @@ -1,5 +1,11 @@ #!/usr/bin/env python +# Copyright (c) 2017 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 glob import os import sys