smarts.sstudio.sstypes.scenario module

class smarts.sstudio.sstypes.scenario.Scenario(map_spec: ~smarts.sstudio.sstypes.map_spec.MapSpec | None = None, traffic: ~typing.Dict[str, ~smarts.sstudio.sstypes.traffic.Traffic] | None = None, ego_missions: ~typing.Sequence[~smarts.sstudio.sstypes.mission.Mission | ~smarts.sstudio.sstypes.mission.EndlessMission] | None = None, social_agent_missions: ~typing.Dict[str, ~typing.Tuple[~typing.Sequence[~smarts.sstudio.sstypes.actor.social_agent_actor.SocialAgentActor], ~typing.Sequence[~smarts.sstudio.sstypes.mission.Mission]]] | None = None, bubbles: ~typing.Sequence[~smarts.sstudio.sstypes.bubble.Bubble] | None = None, friction_maps: ~typing.Sequence[~smarts.sstudio.sstypes.zone.RoadSurfacePatch] | None = None, traffic_histories: ~typing.Sequence[~smarts.sstudio.sstypes.dataset.TrafficHistoryDataset | str] | None = None, scenario_metadata: ~smarts.sstudio.sstypes.scenario.ScenarioMetadata | None = <smarts.sstudio.sstypes.scenario.ScenarioMetadata object>)[source]

The Scenario Studio (sstudio) scenario representation.

bubbles: Sequence[Bubble] | None = None

Capture bubbles for focused social agent simulation.

ego_missions: Sequence[Mission | EndlessMission] | None = None

Ego agent missions.

friction_maps: Sequence[RoadSurfacePatch] | None = None

Friction coefficient of patches of road surface.

map_spec: MapSpec | None = None

Specifies the road map.

scenario_metadata: ScenarioMetadata | None = <smarts.sstudio.sstypes.scenario.ScenarioMetadata object>

“Scenario data that does not have influence on simulation.

social_agent_missions: Dict[str, Tuple[Sequence[SocialAgentActor], Sequence[Mission]]] | None = None

Actors must have unique names regardless of which group they are assigned to. Every dictionary item {group: (actors, missions)} gets selected from simultaneously. If actors > 1 and missions = 0 or actors = 1 and missions > 0, we cycle through them every episode. Otherwise actors must be the same length as missions.

traffic: Dict[str, Traffic] | None = None

Background traffic vehicle specification.

traffic_histories: Sequence[TrafficHistoryDataset | str] | None = None

Traffic vehicles trajectory dataset to be replayed.

class smarts.sstudio.sstypes.scenario.ScenarioMetadata(metadata: Dict[str | ScenarioMetadataFields, Any] | None = None, *, actor_of_interest_re_filter: str | None = None, actor_of_interest_color: Colors | None = None, scenario_difficulty: float | None = None, scenario_duration: float | None = None)[source]

Scenario data that does not have influence on simulation.

get(_ScenarioMetadata__key, _ScenarioMetadata__default=None)[source]

Retrieve the value or a default.

Parameters:
  • __key (Any) – The key to find.

  • __default (Any, optional) – The default if the key does not exist. Defaults to None.

Returns:

The value or default.

Return type:

Optional[Any]

class smarts.sstudio.sstypes.scenario.ScenarioMetadataFields(value)[source]

This lists metadata fields generally useful for scenario metadata.

actor_of_interest_color = 1

The color that the actors of interest should have.

actor_of_interest_re_filter = 2

Actors with names that match this pattern are actors of interest.

scenario_difficulty = 3

Custom difficulty marking values, normalized to (0,1].

scenario_duration = 4

The expected scenario time length in seconds.