main function
()
| 125 | |
| 126 | |
| 127 | def main(): |
| 128 | """ |
| 129 | main function |
| 130 | """ |
| 131 | |
| 132 | # pylint: disable=line-too-long |
| 133 | description = ("Scenario Runner's metrics module. Evaluate the execution of a specific scenario by developing your own metric.\n") |
| 134 | |
| 135 | parser = argparse.ArgumentParser(description=description, |
| 136 | formatter_class=RawTextHelpFormatter) |
| 137 | parser.add_argument('--host', default='127.0.0.1', |
| 138 | help='IP of the host server (default: localhost)') |
| 139 | parser.add_argument('--port', '-p', default=2000, |
| 140 | help='TCP port to listen to (default: 2000)') |
| 141 | parser.add_argument('--log', required=True, |
| 142 | help='Path to the CARLA recorder .log file (relative to SCENARIO_RUNNER_ROOT).\nThis file is created by the record functionality at ScenarioRunner') |
| 143 | parser.add_argument('--metric', required=True, |
| 144 | help='Path to the .py file defining the used metric.\nSome examples at srunner/metrics') |
| 145 | parser.add_argument('--criteria', default="", |
| 146 | help='Path to the .json file with the criteria information.\nThis file is created by the record functionality at ScenarioRunner') |
| 147 | # pylint: enable=line-too-long |
| 148 | |
| 149 | args = parser.parse_args() |
| 150 | |
| 151 | MetricsManager(args) |
| 152 | |
| 153 | if __name__ == "__main__": |
| 154 | sys.exit(main()) |
no test coverage detected