Skip to content

Commit b60c5a8

Browse files
committed
Updated Changelog
Change-Id: Ia148688cf25a040807d0d51a085877f6d8334a75
1 parent 7164e51 commit b60c5a8

File tree

4 files changed

+60
-68
lines changed

4 files changed

+60
-68
lines changed

CHANGELOG.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
## Latest changes
2-
* Added logging functionalities to challenge_evaluator_routes.py
3-
* Added wall clock timeout for the CARLA challenge
4-
* Added background scenario to generate dynamic traffic using autopilot
5-
* Updated compatibility with Python 2.7 for the challenge evaluator
6-
* Updated WaypointFollower behavior
7-
* Added detect_lane_obstacle() helper function which identifies if an obstacle is present in front of the reference actor
8-
* Added test to detect vehicles running a stop
9-
* Updated the reference position for a scenario is now called trigger_point
10-
* Added universal access to the map without re-calling get_map()
11-
* Added criteria_enable flag to enable/disable criteria tree
12-
* Added multiple helper methods for generic scenario execution.
13-
* Added pseudo-sensors for SceneLayoutMeasurements and ObjectMeasurements for Track4 of the CARLA AD challenge
14-
* Extended CarlaDataProvider with method to get next relevant traffic light
15-
* Added track identification for autonomous_agent.py
16-
* Added HDMap pseudo-sensor
17-
* Added wrong way test
18-
* Added new traffic event logger
19-
* Added running red light test
20-
* Added running stop test
21-
* Added various helper methods to allow generic scenario execution
22-
* Added method to calculate distance along a route
23-
* Updated folder structure and naming convention in lowercase
24-
* In challenge mode spawn exception are caught and the corresponding scenario is removed
2+
3+
## CARLA Scenario_Runner 0.9.5
4+
* Added support for CARLA challenge
5+
- Added logging functionalities to challenge_evaluator_routes.py
6+
- Added wall clock timeout for the CARLA challenge
7+
- Added background scenario to generate dynamic traffic using autopilot
8+
- Updated compatibility with Python 2.7 for the challenge evaluator
9+
- Updated WaypointFollower behavior
10+
- Added detect_lane_obstacle() helper function which identifies if an obstacle is present in front of the reference actor
11+
- Added test to detect vehicles running a stop
12+
- Updated the reference position for a scenario is now called trigger_point
13+
- Added universal access to the map without re-calling get_map()
14+
- Added criteria_enable flag to enable/disable criteria tree
15+
- Added multiple helper methods for generic scenario execution.
16+
- Added pseudo-sensors for SceneLayoutMeasurements and ObjectMeasurements for Track4 of the CARLA AD challenge
17+
- Added track identification for autonomous_agent.py
18+
- Added HDMap pseudo-sensor
19+
- Added new traffic event logger
20+
- Added various helper methods to allow generic scenario execution
21+
- Added method to calculate distance along a route
22+
- In challenge mode spawn exception are caught and the corresponding scenario is removed
2523
* Reworked scenario execution
24+
- Updated folder structure and naming convention in lowercase
25+
- Extended CarlaDataProvider with method to get next relevant traffic light
2626
- Every scenario has to have a configuration provided as XML file.
2727
Currently there is one XML file for each scenario class
2828
- The scenario runner is now responsible for spawning/destroying the ego vehicle
@@ -44,6 +44,10 @@
4444
- ActorSource: creates actors indefinitely around a location if no other vehicles are present within a threshold
4545
- ActorSink: indefinitely destroys vehicles that wander close to a location within a threshold
4646
- InTriggerDistanceToLocationAlongRoute: check if an actor is within a certain distance to a given location along a given route
47+
* Added new atomic evaluation criteria
48+
- Added running red light test
49+
- Added running stop test
50+
- Added wrong way test
4751
* Fixes
4852
- Fixed SteerVehicle atomic behavior to keep vehicle velocity
4953
* Updated NHTSA Traffic Scenarios
@@ -57,8 +61,6 @@
5761
straight initially from a lateral direction and avoid collision at a signalized intersection.
5862
- SignalizedJunctionLeftTurn : hero vehicle is turning left at signalized intersection, cuts across the path of another vehicle
5963
coming straight crossing from an opposite direction.
60-
* Traffic flow scenario rework
61-
- Traffic scenario 06 modified to simulate a flow of vehicles
6264

6365
## CARLA Scenario_Runner 0.9.2
6466

srunner/challenge/challenge_evaluator_routes.py

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ def __init__(self, args):
183183

184184
if phase_codename == 'dev':
185185
split_name = 'dev_split'
186-
self.routes = '{}/srunner/challenge/routes_devtest.xml'.format(scenario_runner_root)
186+
self.routes = '{}/srunner/challenge/routes_devtest.xml'.format(scenario_runner_root)
187187
repetitions = 1
188188
elif phase_codename == 'validation':
189189
split_name = 'val_split'
190-
self.routes = '{}/srunner/challenge/routes_testprep.xml'.format(scenario_runner_root)
190+
self.routes = '{}/srunner/challenge/routes_testprep.xml'.format(scenario_runner_root)
191191
repetitions = 3
192192
elif phase_codename == 'test':
193193
split_name = 'test_split'
194-
self.routes = '{}/srunner/challenge/routes_testchallenge.xml'.format(scenario_runner_root)
194+
self.routes = '{}/srunner/challenge/routes_testchallenge.xml'.format(scenario_runner_root)
195195
repetitions = 3
196196
else:
197197
# debug mode
@@ -252,7 +252,6 @@ def __init__(self, args):
252252
# debugging parameters
253253
self.route_visible = self.debug > 0
254254

255-
256255
def within_available_time(self):
257256
current_time = datetime.datetime.now()
258257
elapsed_seconds = (current_time - self.start_wall_time).seconds
@@ -281,7 +280,6 @@ def cleanup(self, ego=False):
281280
CarlaActorPool.cleanup()
282281
CarlaDataProvider.cleanup()
283282

284-
285283
if ego and self.ego_vehicle is not None:
286284
self.ego_vehicle.destroy()
287285
self.ego_vehicle = None
@@ -342,7 +340,7 @@ def draw_waypoints(self, waypoints, turn_positions_and_labels, vertical_shift, p
342340

343341
for position in range(start, end):
344342
self.world.debug.draw_point(waypoints[position][0].location + carla.Location(z=vertical_shift),
345-
size=0.2, color=color, life_time=persistency)
343+
size=0.2, color=color, life_time=persistency)
346344

347345
self.world.debug.draw_point(waypoints[0][0].location + carla.Location(z=vertical_shift), size=0.2,
348346
color=carla.Color(0, 0, 255), life_time=persistency)
@@ -496,7 +494,7 @@ def build_master_scenario(self, route, town_name, timeout=300):
496494
blackboard.set('master_scenario_command', 'scenarios_running')
497495

498496
return MasterScenario(self.world, self.ego_vehicle, master_scenario_configuration,
499-
timeout=timeout, debug_mode=self.debug>1)
497+
timeout=timeout, debug_mode=self.debug > 1)
500498

501499
def build_background_scenario(self, town_name, timeout=300):
502500
scenario_configuration = ScenarioConfiguration()
@@ -527,15 +525,15 @@ def build_background_scenario(self, town_name, timeout=300):
527525
scenario_configuration.other_actors = [actor_configuration_instance]
528526

529527
return BackgroundActivity(self.world, self.ego_vehicle, scenario_configuration,
530-
timeout=timeout, debug_mode=self.debug>1)
528+
timeout=timeout, debug_mode=self.debug > 1)
531529

532530
def build_trafficlight_scenario(self, town_name, timeout=300):
533531
scenario_configuration = ScenarioConfiguration()
534532
scenario_configuration.route = None
535533
scenario_configuration.town = town_name
536534

537535
return TrafficLightScenario(self.world, self.ego_vehicle, scenario_configuration,
538-
timeout=timeout, debug_mode=self.debug>1)
536+
timeout=timeout, debug_mode=self.debug > 1)
539537

540538
def build_scenario_instances(self, scenario_definition_vec, town_name, timeout=300):
541539
"""
@@ -644,7 +642,6 @@ def run_route(self, trajectory, no_master=False):
644642
draw_shadow=False, color=carla.Color(255, 255, 255),
645643
life_time=0.01)
646644

647-
648645
if self.route_visible:
649646
turn_positions_and_labels = clean_route(trajectory)
650647
self.draw_waypoints(trajectory, turn_positions_and_labels,
@@ -661,15 +658,14 @@ def run_route(self, trajectory, no_master=False):
661658
except Exception:
662659
attempts += 1
663660
print('======[WARNING] The server is frozen [{}/{} attempts]!!'.format(attempts,
664-
self.MAX_CONNECTION_ATTEMPTS))
661+
self.MAX_CONNECTION_ATTEMPTS))
665662
time.sleep(2.0)
666663
continue
667664

668-
669665
# check for scenario termination
670666
for i, _ in enumerate(self.list_scenarios):
671667

672-
if self.debug==1:
668+
if self.debug == 1:
673669
behavior = self.list_scenarios[i].scenario.scenario_tree.children[0]
674670
if behavior.tip():
675671
print("{} {} {} {}".format(self.list_scenarios[i].scenario.scenario_tree.name,
@@ -680,8 +676,8 @@ def run_route(self, trajectory, no_master=False):
680676
"InTriggerDistanceToLocationAlongRoute" and self.list_scenarios[
681677
i].scenario.scenario_tree.name != "MasterScenario" and
682678
self.list_scenarios[i].scenario.scenario_tree.name != "BackgroundActivity" and
683-
self.list_scenarios[i].scenario.scenario_tree.name != "TrafficLightScenario"):
684-
pass # TODO: find a fix for this ascii bug
679+
self.list_scenarios[i].scenario.scenario_tree.name != "TrafficLightScenario"):
680+
pass # TODO: find a fix for this ascii bug
685681
# py_trees.display.print_ascii_tree(self.list_scenarios[i].scenario.scenario_tree, 2, True)
686682

687683
# The scenario status can be: INVALID, RUNNING, SUCCESS, FAILURE. Only the last two
@@ -694,7 +690,6 @@ def run_route(self, trajectory, no_master=False):
694690
self.list_scenarios[i] = None
695691
self.list_scenarios[:] = [scenario for scenario in self.list_scenarios if scenario]
696692

697-
698693
# Route finished set for the background scenario to also finish
699694
blackboard = py_trees.blackboard.Blackboard()
700695
blackboard.set('master_scenario_command', 'scenarios_stop_request')
@@ -714,7 +709,6 @@ def record_fatal_error(self, error_message):
714709
return_message = error_message
715710
return_message += "\n=================================="
716711

717-
718712
current_statistics = {'id': -1,
719713
'score_composed': score_composed,
720714
'score_route': score_route,
@@ -833,7 +827,6 @@ def compute_current_statistics(self):
833827

834828
return score_composed, score_route, score_penalty
835829

836-
837830
def record_route_statistics_default(self, route_id):
838831
"""
839832
This function is intended to be called from outside and provide
@@ -928,9 +921,9 @@ def record_route_statistics_default(self, route_id):
928921

929922
return_message += "\n=================================="
930923
return_message += "\n==[r{}:{}] [Score = {:.2f} : (route_score={}, infractions=-{})]".format(route_id, result,
931-
score_composed,
932-
score_route,
933-
score_penalty)
924+
score_composed,
925+
score_route,
926+
score_penalty)
934927
if list_collisions:
935928
return_message += "\n===== Collisions:"
936929
for item in list_collisions:
@@ -985,7 +978,6 @@ def report_challenge_statistics(self, filename, show_to_participant):
985978
for stats in self.statistics_routes:
986979
help_message += "{}\n\n".format(stats['help_text'])
987980

988-
989981
else:
990982
submission_status = 'FINISHED'
991983

@@ -1001,7 +993,7 @@ def report_challenge_statistics(self, filename, show_to_participant):
1001993
# create json structure
1002994
json_data = {
1003995
'submission_status': submission_status,
1004-
'stderr': help_message if self.phase == 'dev' or self.phase == 'debug' else 'No metadata provided for '
996+
'stderr': help_message if self.phase == 'dev' or self.phase == 'debug' else 'No metadata provided for '
1005997
'this phase',
1006998
'result': [
1007999
{
@@ -1157,9 +1149,9 @@ def load_environment_and_run(self, args, world_annotations, route_description):
11571149

11581150
self.background_scenario = self.build_background_scenario(_route_description['town_name'],
11591151
timeout=route_timeout)
1160-
1152+
11611153
self.traffic_light_scenario = self.build_trafficlight_scenario(_route_description['town_name'],
1162-
timeout=route_timeout)
1154+
timeout=route_timeout)
11631155

11641156
self.list_scenarios = [self.master_scenario, self.background_scenario, self.traffic_light_scenario]
11651157
# build the instance based on the parsed definitions.
@@ -1332,7 +1324,6 @@ def run(self, args):
13321324
print("Error. ROOT_SCENARIO_RUNNER not found. Please run setup_environment.sh first.")
13331325
sys.exit(0)
13341326

1335-
13361327
if ARGUMENTS.scenarios is None:
13371328
print("Please specify a path to a scenario specification file '--scenarios path-to-file'\n\n")
13381329
PARSER.print_help(sys.stdout)

srunner/scenariomanager/atomic_scenario_behavior.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,8 +1323,8 @@ def update(self):
13231323

13241324
else:
13251325
# the traffic light has been manipulated...
1326-
base_transform = self.target_traffic_light.get_transform()
1327-
area_loc = carla.Location(base_transform.transform( self.target_traffic_light.trigger_volume.location))
1326+
base_transform = self.target_traffic_light.get_transform()
1327+
area_loc = carla.Location(base_transform.transform(self.target_traffic_light.trigger_volume.location))
13281328
distance_to_traffic_light = area_loc.distance(self.ego_vehicle.get_location())
13291329

13301330
if self.debug:

0 commit comments

Comments
 (0)