class habitat.core.simulator.ActionSpaceConfiguration(config: yacs.config.CfgNode)[source]
class habitat.core.simulator.DepthSensor(*args, **kwargs)[source]
get_observation(*args, **kwargs)[source]

Returns: current observation for Sensor.

class habitat.core.simulator.Observations(sensors: Dict[str, habitat.core.simulator.Sensor], *args, **kwargs)[source]

Dictionary containing sensor observations


sensors – list of sensors whose observations are fetched and packaged.

class habitat.core.simulator.RGBSensor(*args, **kwargs)[source]
get_observation(*args, **kwargs) → Any[source]

Returns: current observation for Sensor.

class habitat.core.simulator.SemanticSensor(*args, **kwargs)[source]
get_observation(*args, **kwargs)[source]

Returns: current observation for Sensor.

class habitat.core.simulator.Sensor(*args, **kwargs)[source]

Represents a sensor that provides data from the environment to agent. The user of this class needs to implement the get_observation method and the user is also required to set the below attributes:


universally unique id.


type of Sensor, use SensorTypes enum if your sensor comes under one of it’s categories.


gym.Space object corresponding to observation of sensor.

get_observation(*args, **kwargs) → Any[source]

current observation for Sensor.

class habitat.core.simulator.SensorSuite(sensors: List[habitat.core.simulator.Sensor])[source]

Represents a set of sensors, with each sensor being identified through a unique id.


sensors – list containing sensors for the environment, uuid of each sensor must be unique.

get_observations(*args, **kwargs) → habitat.core.simulator.Observations[source]

collect data from all sensors and return it packaged inside Observation.

class habitat.core.simulator.SensorTypes[source]

Enumeration of types of sensors.

class habitat.core.simulator.Simulator[source]

Basic simulator class for habitat. New simulators to be added to habtiat must derive from this class and implement the abstarct methods.

action_space_shortest_path(source: habitat.core.simulator.AgentState, targets: List[habitat.core.simulator.AgentState], agent_id: int = 0) → List[habitat.core.simulator.ShortestPathPoint][source]

Calculates the shortest path between source and target agent states.

  • source – source agent state for shortest path calculation.

  • targets – target agent state(s) for shortest path calculation.

  • agent_id – id for agent (relevant for multi-agent setup).


list of agent states and actions along the shortest path from source to the nearest target (both included).

property forward_vector

The forward direction in the global coordinate frame i.e. the direction of forward movement for an agent with 0 degrees rotation in the ground plane.

geodesic_distance(position_a: List[float], position_b: List[float]) → float[source]

Calculates geodesic distance between two points.

  • position_a – coordinates of first point.

  • position_b – coordinates of second point.


the geodesic distance in the cartesian space between points position_a and position_b, if no path is found between the points then infinity is returned.

get_agent_state(agent_id: int = 0)[source]

agent_id – id of agent.


state of agent corresponding to agent_id.

get_observations_at(position: List[float], rotation: List[float], keep_agent_at_new_pose: bool = False) → Optional[habitat.core.simulator.Observations][source]

Returns the observation.

  • position – list containing 3 entries for (x, y, z).

  • rotation – list with 4 entries for (x, y, z, w) elements of unit quaternion (versor) representing agent 3D orientation, (https://en.wikipedia.org/wiki/Versor)

  • keep_agent_at_new_pose – If true, the agent will stay at the requested location. Otherwise it will return to where it started.


The observations or None if it was unable to get valid observations.

get_straight_shortest_path_points(position_a: List[float], position_b: List[float]) → List[List[float]][source]

Returns points along the geodesic (shortest) path between two points irrespective of the angles between the waypoints.

position_a: the start point. This will be the first point in the

returned list.

position_b: the end point. This will be the last point in the

returned list.


a list of waypoints (x, y, z) on the geodesic path between the two points.

is_navigable(point: List[float]) → bool[source]

Return true if the agent can stand at the specified point.


point – the point to check.


Whether or not the previous step resulted in a collision


True if the previous step resulted in a collision, false otherwise

Return type


reset() → habitat.core.simulator.Observations[source]

resets the simulator and returns the initial observations.


initial observations from simulator.

sample_navigable_point() → List[float][source]

Samples a navigable point from the simulator. A point is defined as navigable if the agent can be initialized at that point.


navigable point.

step(action: int) → habitat.core.simulator.Observations[source]

Perform an action in the simulator and return observations.


action – action to be performed inside the simulator.


observations after taking action in simulator.

property up_vector

The vector representing the direction upward (perpendicular to the floor) from the global coordinate frame.

class habitat.core.simulator.SimulatorActionsSingleton[source]

Implements an extendable Enum for the mapping of action names to their integer values.

This means that new action names can be added, but old action names cannot be removed nor can their mapping be altered. This also ensures that all actions are always contigously mapped in [0, len(SimulatorActions) - 1]

This accesible as the global singleton SimulatorActions

extend_action_space(name: str) → int[source]

Extends the action space to accomidate a new action with the name name


name (str): The name of the new action


int: The number the action is registered on


from habitat import SimulatorActions
has_action(name: str) → bool[source]

Checks to see if action name is already register


name (str): The name to check


bool: Whether or not name already exists