Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/safety-analysis.py @ 334:1d90e9080cb2
moved python scripts to the scripts directory
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 14 Jun 2013 10:34:11 -0400 |
| parents | python/safety-analysis.py@c9201f6b143a |
| children | 3950bfe22768 |
comparison
equal
deleted
inserted
replaced
| 333:c9201f6b143a | 334:1d90e9080cb2 |
|---|---|
| 1 #! /usr/bin/env python | |
| 2 | |
| 3 import sys,getopt | |
| 4 | |
| 5 import matplotlib.pyplot as plt | |
| 6 import numpy as np | |
| 7 | |
| 8 from ConfigParser import ConfigParser | |
| 9 | |
| 10 options, args = getopt.getopt(sys.argv[1:], 'hi:d:t:o:f:',['help']) | |
| 11 | |
| 12 options = dict(options) | |
| 13 | |
| 14 print options, args | |
| 15 | |
| 16 if '--help' in options.keys() or '-h' in options.keys() or len(sys.argv) == 1: | |
| 17 print('Usage: '+sys.argv[0]+' --help|-h config_file.cfg\n' | |
| 18 'The program processes indicators for all pairs of road users in the scene\n\n' | |
| 19 'Order matters between positional and named arguments') | |
| 20 sys.exit() | |
| 21 | |
| 22 # TODO work on the way to indicate an interaction definition | |
| 23 | |
| 24 if len(args)>0: # consider there is a configuration file | |
| 25 params = utils.TrackingParameters() | |
| 26 params.loadConfigFile(args[0]) | |
| 27 | |
| 28 | |
| 29 |
