Skip to content

Commit

Permalink
#161 Addressed peer review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlm committed Oct 5, 2023
1 parent f6c52d3 commit f9ec14f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
8 changes: 5 additions & 3 deletions scenario-runner/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CARLA ScenarioRunner scenarios

This directory contains custom ScenarioRunner scenario configurations to
facilitate integration testing. This still a work in progress, so the scenarios
serve more as example references.
This directory contains custom [ScenarioRunner][scenario_runner_docs_link]
scenario configurations to facilitate integration testing. This still a work in
progress, so the scenarios serve more as example references.

[scenario_runner_docs_link]: https://carla-scenariorunner.readthedocs.io/en/latest/
10 changes: 9 additions & 1 deletion scenario-runner/my_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def _setup_scenario_trigger(self, _: ScenarioConfiguration) -> None:
BasicScenario parent class. The base class's implementation adds
a trigger that prevents the scenario from starting until the
ego vehicle drives some distance. We don't want that trigger
for this scenario.
for this scenario because the ego vehicle will not move. Override this
function to create custom scenario start triggers. Follow this link
for more information:
https://carla-scenariorunner.readthedocs.io/en/latest/creating_new_scenario/
:return: None
"""
Expand All @@ -112,6 +115,9 @@ def _create_behavior(self):
crossing_person, 2.0, 8.0, name="walk_across_street"
)

# This end condition is commented out because it is not currently being
# used in the scenario. It remains here as an example/reference for
# how to gracefully end a ScenarioRunner scenario.
# end_condition = DriveDistance(carma_vehicle, 10)

root = py_trees.composites.Sequence(name="root_sequence")
Expand All @@ -130,6 +136,8 @@ def _create_test_criteria(self) -> list:
:return: List of test criteria
"""
return [
# This is an example usage for including test criteria in
# ScnearioRunner.
# CollisionTest(self.carma_vehicle)
]

Expand Down
6 changes: 6 additions & 0 deletions scenario-runner/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
py_trees

# Note: The `srunner` package in PyPi is outdated, and the ScenarioRunner
# documentation uses the source-installed `srunner` package in all of its
# examples.
# srunner

0 comments on commit f9ec14f

Please sign in to comment.