Add license and documentation to Python examples

This commit is contained in:
nsubiron 2018-10-28 11:23:59 +01:00
parent 6d1f3519ec
commit 107b75c36b
4 changed files with 29 additions and 9 deletions

View File

@ -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 <https://opensource.org/licenses/MIT>.
"""
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

View File

@ -6,8 +6,8 @@
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# 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.

View File

@ -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 <https://opensource.org/licenses/MIT>.
import glob
import os
import sys

View File

@ -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 <https://opensource.org/licenses/MIT>.
import glob
import os
import sys