Overview of the Metrics Module
masterThe Metrics module allows users to calculate and monitor parameters from a completed CARLA simulation without re-running the scenario. It relies on the CARLA recorder to store simulation information.
Users follow a three-step workflow:
- Record a scenario: Generate
.logand.jsonfiles usingscenario_runner.py. - Define metrics: Create custom metric classes by inheriting from
BasicMetric. - Run the metrics manager: Execute
metrics_manager.pyto process the recorded data and visualize results.
The module structure is as follows:
metrics_manager.py: The main entry point.srunner/metrics/data/: Stores scenario information.srunner/metrics/examples/: Contains example metrics and theBasicMetricbase class.srunner/metrics/tools/: Containsmetrics_parser.py(converts recording strings to dictionaries) andmetrics_log.py(provides query functions).