@@ -248,24 +248,22 @@ def _on_actor_constellation_request(self, actor_constellation_data):
248
248
actor_constellation_result .rss_calculation_mode = ad .rss .map .RssMode .Unstructured
249
249
self .change_to_unstructured_position_map [
250
250
actor_id ] = actor_constellation_data .other_match_object .enuPosition
251
- else :
252
- # ego moves
253
- if actor_distance < 10 :
254
- # if the ego moves, the other actor doesn't move an the mode was
255
- # previously set to unstructured, keep it
256
- try :
257
- if self .change_to_unstructured_position_map [actor_id ] == actor_constellation_data .other_match_object .enuPosition :
258
- heading_delta = abs (float (actor_constellation_data .ego_match_object .enuPosition .heading -
259
- actor_constellation_data .other_match_object .enuPosition .heading ))
260
- if heading_delta > 0.2 :
261
- actor_constellation_result .rss_calculation_mode = ad .rss .map .RssMode .Unstructured
262
- else :
263
- del self .change_to_unstructured_position_map [actor_id ]
264
- except (AttributeError , KeyError ):
265
- pass
266
- else :
267
- if actor_id in self .change_to_unstructured_position_map :
268
- del self .change_to_unstructured_position_map [actor_id ]
251
+ # ego moves
252
+ elif actor_distance < 10 :
253
+ # if the ego moves, the other actor doesn't move an the mode was
254
+ # previously set to unstructured, keep it
255
+ try :
256
+ if self .change_to_unstructured_position_map [actor_id ] == actor_constellation_data .other_match_object .enuPosition :
257
+ heading_delta = abs (float (actor_constellation_data .ego_match_object .enuPosition .heading -
258
+ actor_constellation_data .other_match_object .enuPosition .heading ))
259
+ if heading_delta > 0.2 :
260
+ actor_constellation_result .rss_calculation_mode = ad .rss .map .RssMode .Unstructured
261
+ else :
262
+ del self .change_to_unstructured_position_map [actor_id ]
263
+ except (AttributeError , KeyError ):
264
+ pass
265
+ elif actor_id in self .change_to_unstructured_position_map :
266
+ del self .change_to_unstructured_position_map [actor_id ]
269
267
270
268
# still in structured?
271
269
if actor_constellation_result .rss_calculation_mode == ad .rss .map .RssMode .Structured :
@@ -399,7 +397,7 @@ def get_pedestrian_parameters():
399
397
pedestrian_dynamics .unstructuredSettings .vehicleBrakeIntermediateAccelerationSteps = 3
400
398
return pedestrian_dynamics
401
399
402
- def get_steering_ranges (self ) -> List [ Tuple [ float , float ]] :
400
+ def get_steering_ranges (self ):
403
401
return [
404
402
((float (self .ego_dynamics_on_route .ego_heading ) - float (heading_range .begin )) / self ._max_steer_angle ,
405
403
(float (self .ego_dynamics_on_route .ego_heading ) - float (heading_range .end )) / self ._max_steer_angle )
0 commit comments