diff --git a/options/simple_intersection/maneuvers.py b/options/simple_intersection/maneuvers.py index 1702cd5f885cef35d67d379f52d1f21e2a393cbb..b42b03d067cf56a9a2a9692defba0bd1a61548d9 100644 --- a/options/simple_intersection/maneuvers.py +++ b/options/simple_intersection/maneuvers.py @@ -94,7 +94,7 @@ class Halt(ManeuverBase): # (currently, this functionality is implemented by "not self._enable_low_level_training_properties") self._LTL_preconditions.append( LTLProperty( - "G ( (veh_ahead and before_but_close_to_stop_region) U highest_priority )", + "G ( (veh_ahead and close_to_stop_region) U highest_priority )", None, not self._enable_low_level_training_properties)) self._LTL_preconditions.append( @@ -166,10 +166,10 @@ class Stop(ManeuverBase): LTLProperty("G ( not has_stopped_in_stop_region )", self._penalty(self._reward_in_goal), not self._enable_low_level_training_properties)) - # before_intersection rather than "before_but_close_to_stop_region or in_stop_region"? + # before_intersection rather than "close_to_stop_region or in_stop_region"? self._LTL_preconditions.append( LTLProperty( - "G ( (before_but_close_to_stop_region or in_stop_region) U has_stopped_in_stop_region )", + "G ( (close_to_stop_region or in_stop_region) U has_stopped_in_stop_region )", self._penalty_in_violation)) self._LTL_preconditions.append( @@ -485,7 +485,7 @@ class Follow(ManeuverBase): def _init_LTL_preconditions(self): self._LTL_preconditions.append( - LTLProperty("G ( veh_ahead U (in_stop_region or before_but_close_to_stop_region ) )", self._penalty_for_out_of_range)) + LTLProperty("G ( veh_ahead U (in_stop_region or close_to_stop_region ) )", self._penalty_for_out_of_range)) self._LTL_preconditions.append( LTLProperty( diff --git a/verifier/simple_intersection/AP_dict.py b/verifier/simple_intersection/AP_dict.py index b72fe8695d483d9473b53d85314d5b00a2769076..bb8c921050a6f815fbc4f6b6c7d68d86a56b48b8 100644 --- a/verifier/simple_intersection/AP_dict.py +++ b/verifier/simple_intersection/AP_dict.py @@ -4,7 +4,7 @@ # * in_stop_region: True if the veh. is in stop region # * has_entered_stop_region: True if the veh. has entered or passed the stop # region -# * before_but_close_to_stop_region: True if the veh. is before but close +# * close_to_stop_region: True if the veh. is before but close # to the stop region # * stopped_now: True if the veh. is now stopped # * has_stopped_in_stop_region: True if the veh. has ever stopped in the @@ -26,7 +26,7 @@ AP_dict_simple_intersection = { 'in_stop_region': 0, 'has_entered_stop_region': 1, - 'before_but_close_to_stop_region': 2, + 'close_to_stop_region': 2, 'stopped_now': 3, 'has_stopped_in_stop_region': 4, 'in_intersection': 5, diff --git a/worlds/simple_intersection/simple_intersection_env.py b/worlds/simple_intersection/simple_intersection_env.py index 5b1994e23a775842d05657e94624e1dbecafb7c1..9f104fdafed99af22d636fa703d9ad7102b40d06 100644 --- a/worlds/simple_intersection/simple_intersection_env.py +++ b/worlds/simple_intersection/simple_intersection_env.py @@ -1238,7 +1238,7 @@ class SimpleIntersectionEnv(RoadEnv, EpisodicEnvBase): info = "Ego Attributes:" + get_APs( self, EGO_INDEX, 'in_stop_region', 'has_entered_stop_region', 'has_stopped_in_stop_region', - 'before_but_close_to_stop_region', 'intersection_is_clear', + 'close_to_stop_region', 'intersection_is_clear', 'stopped_now', 'in_intersection', 'over_speed_limit', 'on_route', 'highest_priority', 'intersection_is_clear', 'veh_ahead', 'lane') + \ diff --git a/worlds/simple_intersection/vehicles.py b/worlds/simple_intersection/vehicles.py index a614b0a5d0f2202b3d318b593418b55f10e5d38d..3b749d532f163bc259b7101ec7946967d93f46e9 100644 --- a/worlds/simple_intersection/vehicles.py +++ b/worlds/simple_intersection/vehicles.py @@ -273,7 +273,7 @@ class Vehicle(VehicleState): self.APs[ 'has_entered_stop_region'] = self.APs['has_entered_stop_region'] or self.APs['in_stop_region'] self.APs[ - 'before_but_close_to_stop_region'] = True if rd.hlanes.near_stop_region <= self.x < rd.hlanes.stop_region[0] else False + 'close_to_stop_region'] = True if rd.hlanes.near_stop_region <= self.x < rd.hlanes.stop_region[0] else False self.APs[ 'parallel_to_lane'] = True if -0.1 <= self.theta <= 0.1 else False @@ -289,7 +289,7 @@ class Vehicle(VehicleState): self.APs[ 'has_entered_stop_region'] = True if rd.vlanes.stop_region[0] <= self.y else False self.APs[ - 'before_but_close_to_stop_region'] = True if rd.vlanes.near_stop_region <= self.y < rd.vlanes.stop_region[0] else False + 'close_to_stop_region'] = True if rd.vlanes.near_stop_region <= self.y < rd.vlanes.stop_region[0] else False theta_v = -np.sign(rd.vlanes.start_pos) * np.pi / 2.0 self.APs[ 'parallel_to_lane'] = True if theta_v - 0.1 <= self.theta <= theta_v + 0.1 else False