Skip to content

Commit

Permalink
Updated metric examples and updated to 0.9.13
Browse files Browse the repository at this point in the history
  • Loading branch information
glopezdiest authored Nov 25, 2021
1 parent 729bd29 commit 85109e7
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CARLA_VER
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
HOST = https://carla-releases.s3.eu-west-3.amazonaws.com/Linux
RELEASE=CARLA_0.9.12
RELEASE=CARLA_0.9.13
6 changes: 5 additions & 1 deletion Docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Table of Contents
* [Latest Changes](#latest-changes)
* [CARLA ScenarioRunner 0.9.13](#carla-scenariorunner-0913)
* [CARLA ScenarioRunner 0.9.12](#carla-scenariorunner-0912)
* [CARLA ScenarioRunner 0.9.11](#carla-scenariorunner-0911)
* [CARLA ScenarioRunner 0.9.10](#carla-scenariorunner-0910)
Expand All @@ -12,13 +13,16 @@
* [CARLA ScenarioRunner 0.9.2](#carla-scenariorunner-092)

## Latest changes


## CARLA ScenarioRunner 0.9.13
### :rocket: New Features
* OpenSCENARIO support:
- Added support for `ParameterAction`
- Extended `ParameterCondition` support to use as an event trigger condition

### :bug: Bug Fixes
* Fixed metrics parsing
* Fixed metrics parsing and remade the example recordings
* Fixed a bug with repetitions / scenario groups causing the simulation to crash after the second one.
* Fixed use of OSC Parameters as entry names for catalogs

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ branch contains the latest fixes and features, and may be required to use the la

It is important to also consider the release version that has to match the CARLA version.

* [Version 0.9.13](https://github.com/carla-simulator/scenario_runner/releases/tag/v0.9.13) and the 0.9.13 Branch: Compatible with [CARLA 0.9.13](https://github.com/carla-simulator/carla/releases/tag/0.9.13)
* [Version 0.9.12](https://github.com/carla-simulator/scenario_runner/releases/tag/v0.9.12) and the 0.9.12 Branch: Compatible with [CARLA 0.9.12](https://github.com/carla-simulator/carla/releases/tag/0.9.12)
* [Version 0.9.11](https://github.com/carla-simulator/scenario_runner/releases/tag/v0.9.11) and the 0.9.11 Branch: Compatible with [CARLA 0.9.11](https://github.com/carla-simulator/carla/releases/tag/0.9.11)
* [Version 0.9.10](https://github.com/carla-simulator/scenario_runner/releases/tag/v0.9.10) and the 0.9.10 Branch: Compatible with [CARLA 0.9.10](https://github.com/carla-simulator/carla/releases/tag/0.9.10)
Expand Down
2 changes: 1 addition & 1 deletion scenario_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from srunner.tools.route_parser import RouteParser

# Version of scenario_runner
VERSION = '0.9.12'
VERSION = '0.9.13'


class ScenarioRunner(object):
Expand Down
Binary file modified srunner/metrics/data/CriteriaFilter.log
Binary file not shown.
28 changes: 14 additions & 14 deletions srunner/metrics/data/CriteriaFilter_criteria.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"actual_value": 100,
"optional": false,
"_wsize": 2,
"_current_index": 759,
"_current_index": 754,
"_route_length": 762,
"_accum_meters": [
0.0,
Expand Down Expand Up @@ -787,14 +787,14 @@
"test_status": "FAILURE",
"expected_value_success": 0,
"expected_value_acceptable": null,
"actual_value": 5,
"actual_value": 11,
"optional": false,
"_collision_sensor": null,
"other_actor": null,
"other_actor_type": null,
"registered_collisions": [],
"last_id": null,
"collision_time": 70.1000010445714,
"last_id": 437,
"collision_time": 97.15000144764781,
"terminate_on_failure": false
},
"InRouteTest": {
Expand All @@ -811,7 +811,7 @@
"_offroad_max": 30,
"_offroad_min": 15.0,
"_route_length": 762,
"_current_index": 760,
"_current_index": 754,
"_out_route_distance": 0,
"_in_safe_route": true,
"_accum_meters": [
Expand Down Expand Up @@ -1588,15 +1588,15 @@
"test_status": "FAILURE",
"expected_value_success": 0,
"expected_value_acceptable": null,
"actual_value": 35.22,
"actual_value": 20.91,
"optional": false,
"_current_index": 760,
"_current_index": 754,
"_route_length": 762,
"_outside_lane_active": true,
"_wrong_lane_active": true,
"_outside_lane_active": false,
"_wrong_lane_active": false,
"_last_road_id": 15,
"_last_lane_id": -1,
"_total_distance": 759.2815870046616,
"_last_lane_id": 1,
"_total_distance": 753.2815870046616,
"_wrong_distance": 0,
"terminate_on_failure": false
},
Expand All @@ -1608,9 +1608,9 @@
"test_status": "FAILURE",
"expected_value_success": 0,
"expected_value_acceptable": null,
"actual_value": 3,
"actual_value": 1,
"optional": false,
"_last_red_light_id": 288,
"_last_red_light_id": 211,
"debug": false,
"terminate_on_failure": false
},
Expand Down Expand Up @@ -1644,7 +1644,7 @@
"list_traffic_events": [],
"_speed_threshold": 0.1,
"_below_threshold_max_time": 90.0,
"_time_last_valid_state": 70.80000105500221,
"_time_last_valid_state": 101.05000150576234,
"terminate_on_failure": false
}
}
Binary file modified srunner/metrics/data/DistanceBetweenVehicles.log
Binary file not shown.
Binary file modified srunner/metrics/data/DistanceToLaneCenter.log
Binary file not shown.
31 changes: 20 additions & 11 deletions srunner/metrics/tools/metrics_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,27 @@ def parse_scene_lights(info):
return scene_light

def parse_bounding_box(info):
"""Parses a list into a carla.BoundingBox"""
location = carla.Location(
x=float(info[3][1:-1])/100,
y=float(info[4][:-1])/100,
z=float(info[5][:-1])/100,
)
"""
Parses a list into a carla.BoundingBox.
Some actors like sensors might have 'nan' location and 'inf' extent, so filter those.
"""
if 'nan' in info[3]:
location = carla.Location()
else:
location = carla.Location(
float(info[3][1:-1])/100,
float(info[4][:-1])/100,
float(info[5][:-1])/100,
)

extent = carla.Vector3D(
x=float(info[7][1:-1])/100,
y=float(info[8][:-1])/100,
z=float(info[9][:-1])/100,
)
if 'inf' in info[7]:
extent = carla.Vector3D()
else:
extent = carla.Vector3D(
float(info[7][1:-1])/100,
float(info[8][:-1])/100,
float(info[9][:-1])/100,
)

bbox = carla.BoundingBox(location, extent)

Expand Down

0 comments on commit 85109e7

Please sign in to comment.