smarts.core.simulation_frame module
- class smarts.core.simulation_frame.SimulationFrame(actor_states: List[ActorState], agent_vehicle_controls: Dict[str, str], agent_interfaces: Dict[str, AgentInterface], ego_ids: Set[str], pending_agent_ids: List[str], elapsed_sim_time: float, fixed_timestep: float, resetting: bool, map_spec: MapSpec, last_dt: float, last_provider_state: ProviderState, step_count: int, vehicle_collisions: Dict[str, List[Collision]], vehicles_for_agents: Dict[str, List[str]], vehicle_ids: Set[str], vehicle_states: Dict[str, VehicleState], vehicle_sensors: Dict[str, Dict[str, Sensor]], sensor_states: Dict[str, SensorState], interest_filter: re.Pattern, _ground_bullet_id: str | None = None)[source]
This is state that should change per step of the simulation.
- actor_is_interest(actor_id: str, extension: Pattern | None = None) bool [source]
Determine if the actor is of interest.
- Parameters:
actor_id (str) – The id of the actor to test.
- Returns:
If the actor is of interest.
- Return type:
bool
- actor_states: List[ActorState]
- property actor_states_by_id: Dict[str, ActorState]
Get actor states paired by their ids.
- property agent_ids: Set[str]
Get the ids of all agents that currently have vehicles.
- agent_interfaces: Dict[str, AgentInterface]
- agent_vehicle_controls: Dict[str, str]
- ego_ids: Set[str]
- elapsed_sim_time: float
- filtered_vehicle_collisions(vehicle_id: str) List[Collision] [source]
Get a list of all collisions the given vehicle was involved in during the last physics update.
- fixed_timestep: float
- interest_actors(extension: re.Pattern | None = None) Dict[str, ActorState] [source]
Get the actor states of actors that are marked as of interest.
- Parameters:
extension (re.Pattern) – A matching for interest actors not defined in scenario.
- interest_filter: re.Pattern
- last_dt: float
- last_provider_state: ProviderState
- pending_agent_ids: List[str]
- property potential_agent_ids: Set[str]
This includes current agent ids and future pending ego agent ids.
- resetting: bool
- sensor_states: Dict[str, SensorState]
- step_count: int
- vehicle_did_collide(vehicle_id: str) bool [source]
Test if the given vehicle had any collisions in the last physics update.
- vehicle_ids: Set[str]
- vehicle_states: Dict[str, VehicleState]
- vehicles_for_agents: Dict[str, List[str]]