- invertedai.api.drive(location: str, agent_states: List[AgentState], agent_attributes: List[AgentAttributes], recurrent_states: List[RecurrentState], traffic_lights_states: Optional[Dict[int, TrafficLightState]] = None, get_birdview: bool = False, rendering_center: Optional[Tuple[float, float]] = None, rendering_fov: Optional[float] = None, get_infractions: bool = False, random_seed: Optional[int] = None) DriveResponse #
location – Location name in IAI format.
agent_states – Current states of all agents. The state must include x: [float], y: [float] coordinate in meters orientation: [float] in radians with 0 pointing along x and pi/2 pointing along y and speed: [float] in m/s.
agent_attributes – Static attributes of all agents. List of agent attributes. Each agent requires, length: [float] width: [float] and rear_axis_offset: [float] all in meters.
get_birdview – Whether to return an image visualizing the simulation state. This is very slow and should only be used for debugging.
rendering_center – Optional center coordinates for the rendered birdview.
rendering_fov – Optional fov for the rendered birdview.
get_infractions – Whether to check predicted agent states for infractions. This introduces some overhead, but it should be relatively small.
traffic_lights_states – If the location contains traffic lights within the supported area, their current state should be provided here. Any traffic light for which no state is provided will be ignored by the agents.
random_seed – Controls the stochastic aspects of agent behavior for reproducibility.
- class invertedai.api.DriveResponse(*, agent_states: List[AgentState], recurrent_states: List[RecurrentState], birdview: Optional[Image] = None, infractions: Optional[List[InfractionIndicators]] = None, is_inside_supported_area: List[bool])#
Response returned from an API call to
- infractions: Optional[List[InfractionIndicators]]#
If get_infractions was set, they are returned here.
- is_inside_supported_area: List[bool]#
For each agent, indicates whether the predicted state is inside supported area.