@@ -258,12 +258,14 @@ def _create_behavior(self):
258
258
Basic behavior do nothing, i.e. Idle
259
259
"""
260
260
261
- stories_behavior = py_trees .composites .Parallel (policy = py_trees .common .ParallelPolicy .SUCCESS_ON_ALL , name = "OSCStories" )
261
+ stories_behavior = py_trees .composites .Parallel (policy = py_trees .common .ParallelPolicy .SUCCESS_ON_ALL ,
262
+ name = "OSCStories" )
262
263
joint_actor_list = self .other_actors + self .ego_vehicles + [None ]
263
264
264
265
for story in self .config .stories :
265
266
story_name = story .get ("name" )
266
- story_behavior = py_trees .composites .Parallel (policy = py_trees .common .ParallelPolicy .SUCCESS_ON_ALL , name = story_name )
267
+ story_behavior = py_trees .composites .Parallel (policy = py_trees .common .ParallelPolicy .SUCCESS_ON_ALL ,
268
+ name = story_name )
267
269
for act in story .iter ("Act" ):
268
270
269
271
act_sequence = py_trees .composites .Sequence (
@@ -289,7 +291,8 @@ def _create_behavior(self):
289
291
for entity in actor .iter ("EntityRef" ):
290
292
entity_name = entity .attrib .get ('entityRef' , None )
291
293
for k , _ in enumerate (joint_actor_list ):
292
- if joint_actor_list [k ] and entity_name == joint_actor_list [k ].attributes ['role_name' ]:
294
+ if (joint_actor_list [k ] and
295
+ entity_name == joint_actor_list [k ].attributes ['role_name' ]):
293
296
actor_ids .append (k )
294
297
break
295
298
@@ -298,10 +301,11 @@ def _create_behavior(self):
298
301
sequence .attrib .get ('name' )))
299
302
actor_ids .append (len (joint_actor_list ) - 1 )
300
303
301
- # Collect catalog reference maneuvers in order to process them at the same time as normal maneuvers
304
+ # Collect catalog reference maneuvers to process them at the same time as normal maneuvers
302
305
catalog_maneuver_list = []
303
306
for catalog_reference in sequence .iter ("CatalogReference" ):
304
- catalog_maneuver = OpenScenarioParser .get_catalog_entry (self .config .catalogs , catalog_reference )
307
+ catalog_maneuver = OpenScenarioParser .get_catalog_entry (self .config .catalogs ,
308
+ catalog_reference )
305
309
catalog_maneuver_list .append (catalog_maneuver )
306
310
all_maneuvers = itertools .chain (iter (catalog_maneuver_list ), sequence .iter ("Maneuver" ))
307
311
single_sequence_iteration = py_trees .composites .Parallel (
@@ -319,7 +323,8 @@ def _create_behavior(self):
319
323
if child .tag == "Action" :
320
324
for actor_id in actor_ids :
321
325
maneuver_behavior = OpenScenarioParser .convert_maneuver_to_atomic (
322
- child , joint_actor_list [actor_id ], joint_actor_list , self .config .catalogs )
326
+ child , joint_actor_list [actor_id ],
327
+ joint_actor_list , self .config .catalogs )
323
328
maneuver_behavior = StoryElementStatusToBlackboard (
324
329
maneuver_behavior , "ACTION" , child .attrib .get ('name' ))
325
330
parallel_actions .add_child (
@@ -370,7 +375,8 @@ def _create_behavior(self):
370
375
start_triggers = act .find ("StartTrigger" )
371
376
if list (start_triggers ) is not None :
372
377
for start_condition in start_triggers :
373
- parallel_start_criteria = self ._create_condition_container (start_condition , story , "StartConditions" )
378
+ parallel_start_criteria = self ._create_condition_container (start_condition , story ,
379
+ "StartConditions" )
374
380
if parallel_start_criteria .children :
375
381
start_conditions .add_child (parallel_start_criteria )
376
382
end_triggers = act .find ("StopTrigger" )
0 commit comments