Commit 52dcb599 authored by Jaeyoung Lee's avatar Jaeyoung Lee

Change AP ('before_but_close_to_stop_region' --> 'close_to_stop_region')

parent 03f9b70a
......@@ -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(
......
......@@ -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,
......
......@@ -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') + \
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment