diff --git a/smarts/core/plan.py b/smarts/core/plan.py index ae9f398ccb..d5412a7eb3 100644 --- a/smarts/core/plan.py +++ b/smarts/core/plan.py @@ -76,10 +76,8 @@ def from_pose(cls, pose: Pose): @dataclass(frozen=True) -class AutomaticStart(StartBase): - """Generates a start""" - - pass +class InheritedStart(StartBase): + """A starting state that inherits from the original vehicle.""" @dataclass(frozen=True, unsafe_hash=True) @@ -95,6 +93,12 @@ def is_reached(self, vehicle_state) -> bool: return False +@dataclass(frozen=True) +class InheritedGoal(Goal): + """Describes a goal that is inherited from the vehicle (or original dataset).""" + + pass + @dataclass(frozen=True, unsafe_hash=True) class AutomaticGoal(Goal): """A goal that determines an end result from pre-existing vehicle and mission values.""" diff --git a/smarts/primatives/constants.py b/smarts/primatives/constants.py index b11a8bc63d..2bc5a95b4e 100644 --- a/smarts/primatives/constants.py +++ b/smarts/primatives/constants.py @@ -25,13 +25,15 @@ class SmartsLiteral(Enum): - AUTO: Final = "auto" - MAX: Final = 9223372036854775807 - MISSING: Final = MAX - NONE: Final = None + AUTO = "auto" + INHERIT = ... + MAX = 9223372036854775807 + MISSING = MAX + NONE = None AUTO: Final = SmartsLiteral.AUTO +INHERIT: Final = SmartsLiteral.INHERIT MAX: Final = SmartsLiteral.MAX MISSING = SmartsLiteral.MISSING NONE: Final = SmartsLiteral.NONE diff --git a/smarts/sstudio/types/actor/social_agent_actor.py b/smarts/sstudio/types/actor/social_agent_actor.py index 28bcbe89b5..e7beaf0ae8 100644 --- a/smarts/sstudio/types/actor/social_agent_actor.py +++ b/smarts/sstudio/types/actor/social_agent_actor.py @@ -31,8 +31,8 @@ @dataclass(frozen=True) class SocialAgentActor(Actor): - """Used as a description/spec for zoo traffic actors. These actors use a - pre-trained model to understand how to act in the environment. + """Used as a description/spec for zoo traffic actors. These actors are controlled by a + pre-trained model that understands how to behave in the environment. """ name: str @@ -43,7 +43,7 @@ class SocialAgentActor(Actor): agent_locator: str """The locator reference to the zoo registration call. Expects a string in the format of 'path.to.file:locator-name' where the path to the registration call is in the form - `{PYTHONPATH}[n]/path/to/file.py` + ``{PYTHONPATH}[n]/path/to/file.py``. """ policy_kwargs: Dict[str, Any] = field(default_factory=dict) """Additional keyword arguments to be passed to the constructed class overriding the diff --git a/smarts/sstudio/types/mission.py b/smarts/sstudio/types/mission.py index 431a34b34e..3a701414dd 100644 --- a/smarts/sstudio/types/mission.py +++ b/smarts/sstudio/types/mission.py @@ -75,7 +75,7 @@ def __post_init__(self): class EndlessMission: """The descriptor for an actor's mission that has no end.""" - begin: Tuple[str, int, float] + begin: Union[Tuple[str, int, float], Literal[AUTO]] """The (road, lane_index, offset) details of the start location for the route. road: diff --git a/smarts/sstudio/types/route.py b/smarts/sstudio/types/route.py index 66c5675f13..7f68fe85e1 100644 --- a/smarts/sstudio/types/route.py +++ b/smarts/sstudio/types/route.py @@ -86,7 +86,7 @@ class Route: """The ids of roads that must be included in the route between `begin` and `end`.""" map_spec: Optional[MapSpec] = None - """All routes are relative to a road map. If not specified here, + """All routes are relative to a road map. If not specified here, the default map_spec for the scenario is used.""" @property