Parses the log argument into readable information
(self, log)
| 58 | metric_class(town_map, log, criteria_dict) |
| 59 | |
| 60 | def _get_recorder(self, log): |
| 61 | """ |
| 62 | Parses the log argument into readable information |
| 63 | """ |
| 64 | |
| 65 | # Get the log information. |
| 66 | self._client = carla.Client(self._args.host, self._args.port) |
| 67 | recorder_file = "{}/{}".format(os.getenv('SCENARIO_RUNNER_ROOT', "./"), log) |
| 68 | |
| 69 | # Check that the file is correct |
| 70 | if recorder_file[-4:] != '.log': |
| 71 | print("ERROR: The log argument has to point to a .log file") |
| 72 | sys.exit(-1) |
| 73 | if not os.path.exists(recorder_file): |
| 74 | print("ERROR: The specified log file does not exist") |
| 75 | sys.exit(-1) |
| 76 | |
| 77 | recorder_str = self._client.show_recorder_file_info(recorder_file, True) |
| 78 | |
| 79 | return recorder_str |
| 80 | |
| 81 | def _get_criteria(self, criteria_file): |
| 82 | """ |