Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CollisionTest and RedLighRunningTest to scenario (#317)
<!-- Thanks for the contribution, this is awesome. --> # PR Details ## Description Adding CollisionTest and RedLightRunning test to scenario definition. CollisionTest adds collision detector to vehicle ([atomic_criteria.py](https://github.com/carla-simulator/scenario_runner/blob/0ff0ebe7fb0ee2de1f157b11ed450e7b981398bf/srunner/scenariomanager/scenarioatomics/atomic_criteria.py#L313)). Both test criteria are evaluated for the run and generate a JSON file indicating success or failure as well as information about any collisions or events in which we run a red light ```json { "CollisionTest": { "children": [], "feedback_message": "", "blackbox_level": 4, "_terminate_on_failure": false, "test_status": "FAILURE", "expected_value_success": 0, "expected_value_acceptable": null, "actual_value": 1, "optional": false, "_collision_sensor": null, "other_actor": null, "other_actor_type": null, "registered_collisions": [], "last_id": null, "collision_time": 27.05000040307641, "terminate_on_failure": false }, "RunningRedLightTest": { "children": [], "feedback_message": "", "blackbox_level": 4, "_terminate_on_failure": false, "test_status": "SUCCESS", "expected_value_success": 0, "expected_value_acceptable": null, "actual_value": 0, "optional": false, "list_traffic_events": [], "_last_red_light_id": null, "debug": false, "terminate_on_failure": false } } ``` **NOTE** : While the collision test seems to be correctly recognizing collisions and the time they occur at it is not currently providing data about the collisions likes actors involved, type of collision, kinematic information. This is likely a bug in CarlaScenarioRunner. Investigation for this information will be considered outside of this PR <!--- Describe your changes in detail --> ## Related Issue CDAR-746 <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Motivation and Context Collect data on collisions and traffic violations <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? CDASim deployment <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Defect fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have added any new packages to the sonar-scanner.properties file - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [CARMA Contributing Guide](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed.
- Loading branch information