paralleldomain.data_lab.sim_state¶
- class ExtendedSimState(initial_state=None)¶
A class to represent the Simulation State of a Data Lab scenario at a particular timestep
- Parameters:
initial_state (State | None) –
- ego_agent_id¶
The agent id of the ego asset in the scenario
- frame_count¶
The frame number of the current simulation state within the scenario
- sim_time¶
The time (in milliseconds) from the beginning of the scenario of the current simulation state
- frame_ids¶
Integer frame id in the scenario of which the simulation state is a part
- frame_date_times¶
List of the times (in date time format) of the frame in the scenario of which the simulation state is a part
- time_since_last_frame¶
The time (in milliseconds) which has elapsed since the preceding frame in the scenario of which the simulation state is a part
- static from_blank_state(**kwargs)¶
Creates a blank ExtendedSimulationState object except for the parameters specified
- Parameters:
**kwargs – Keyword arguments of parameters to be passed in when initializing the ExtendedSimulationState
- Return type:
- is_using_occupied_space(agent, scale_length=1.0, scale_width=1.0, pose=None)¶
Checks whether an agent in a particular pose is using space which is occupied by other agents
- Parameters:
agent (
CustomSimulationAgent
) – The agent that should be checked for collisions. Ifpose
is not passed, the agent’s current pose from the sim state is checked for collisionsscale_length (
float
) – Scales the region the collision check is performed over in the length direction. A value of 1.0 checks the exact dimension of the agent’s bounding box. Values greater than 1.0 expand the collision check region to be larger than the bounding box of the agent, values below 1.0 make the collision check region smaller than the agentscale_width (
float
) – Scales the region the collision check is performed over in the width direction. A value of 1.0 checks the exact dimension of the agent’s bounding box. Values greater than 1.0 expand the collision check region to be larger than the bounding box of the agent, values below 1.0 make the collision check region smaller than the agentpose (
Optional
[Transformation
]) – A pose of the agent (other that the agent’s current pose) to check for collisions, useful for checking if a new pose is a valid location for the agent to be moved to
- Return type:
- Returns:
- True if there is a collision between the agent and other objects in the world, False if there are no
collisions
- property current_occupancy_grid: OccupancyGrid¶
Returns the occupancy grid of the current simulation state
- property ego_pose: Transformation¶
Pose of the ego agent in the current simulation state
- property previous_occupancy_grid: OccupancyGrid¶
Returns the occupancy grid of the previous simulation state