Need help with habitat-api?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

734 Stars 245 Forks MIT License 392 Commits 152 Opened issues


A modular high-level library to train embodied AI agents across a variety of tasks, environments, and simulators.

Services available


Need anything else?

Contributors list

CircleCI codecov GitHub license GitHub release (latest by date) Supports Habitat_Sim Python 3.6 pre-commit Code style: black Imports: isort Slack Join Twitter Follow

Habitat Lab

Habitat Lab is a modular high-level library for end-to-end development in embodied AI -- defining embodied AI tasks (e.g. navigation, instruction following, question answering), configuring embodied agents (physical form, sensors, capabilities), training these agents (via imitation or reinforcement learning, or no learning at all as in classical SLAM), and benchmarking their performance on the defined tasks using standard metrics.

Habitat Lab currently uses

as the core simulator, but is designed with a modular abstraction for the simulator backend to maintain compatibility over multiple simulators. For documentation refer here.

We also have a dev slack channel, please follow this link to get added to the channel. If you want to contribute PRs or face issues with habitat please reach out to us either through github issues or slack channel.

Habitat Demo

Table of contents

  1. Motivation
  2. Citing Habitat
  3. Installation
  4. Example
  5. Documentation
  6. Docker Setup
  7. Details
  8. Data
  9. Baselines
  10. License
  11. Acknowledgments
  12. References


While there has been significant progress in the vision and language communities thanks to recent advances in deep representations, we believe there is a growing disconnect between ‘internet AI’ and embodied AI. The focus of the former is pattern recognition in images, videos, and text on datasets typically curated from the internet. The focus of the latter is to enable action by an embodied agent in an environment (e.g. a robot). This brings to the forefront issues of active perception, long-term planning, learning from interaction, and holding a dialog grounded in an environment.

To this end, we aim to standardize the entire ‘software stack’ for training embodied agents – scanning the world and creating highly photorealistic 3D assets, developing the next generation of highly efficient and parallelizable simulators, specifying embodied AI tasks that enable us to benchmark scientific progress, and releasing modular high-level libraries to train and deploy embodied agents.

Citing Habitat

If you use the Habitat platform in your research, please cite the Habitat and Habitat 2.0 papers:

  title     =     {Habitat 2.0: Training Home Assistants to Rearrange their Habitat},
  author    =     {Andrew Szot and Alex Clegg and Eric Undersander and Erik Wijmans and Yili Zhao and John Turner and Noah Maestre and Mustafa Mukadam and Devendra Chaplot and Oleksandr Maksymets and Aaron Gokaslan and Vladimir Vondrus and Sameer Dharur and Franziska Meier and Wojciech Galuba and Angel Chang and Zsolt Kira and Vladlen Koltun and Jitendra Malik and Manolis Savva and Dhruv Batra},
  journal   =     {arXiv preprint arXiv:2106.14405},
  year      =     {2021}

@inproceedings{habitat19iccv, title = {Habitat: {A} {P}latform for {E}mbodied {AI} {R}esearch}, author = {Manolis Savva and Abhishek Kadian and Oleksandr Maksymets and Yili Zhao and Erik Wijmans and Bhavana Jain and Julian Straub and Jia Liu and Vladlen Koltun and Jitendra Malik and Devi Parikh and Dhruv Batra}, booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)}, year = {2019} }


  1. Clone a stable version from the github repository and install habitat-lab using the commands below. Note that python>=3.6 is required for working with habitat-lab. All the development and testing was done using python3.6. Please use 3.6 to avoid possible issues.

    git clone --branch stable
    cd habitat-lab
    pip install -e .

    The command above will install only core of Habitat Lab. To include habitat_baselines along with all additional requirements, use the command below instead:

    git clone --branch stable
    cd habitat-lab
    pip install -r requirements.txt
    python develop --all # install habitat and habitat_baselines
  2. Install


    For a machine with an attached display,

      conda install habitat-sim withbullet -c conda-forge -c aihabitat

    For a machine with multiple GPUs or without an attached display (i.e. a cluster),

       conda install habitat-sim withbullet headless -c conda-forge -c aihabitat

    See habitat-sim's installation instructions for more detials.

  3. Run the example script

    python examples/
    which in the end should print out number of steps agent took inside an environment (eg:
    Episode finished after 18 steps.


🆕Example code-snippet which uses

for configuration of task and agent.

import habitat

Load embodied AI task (RearrangePick) and a pre-specified virtual robot

env = habitat.Env( config=habitat.get_config("configs/tasks/rearrangepick_replica_cad.yaml") )

observations = env.reset()

Step through environment with random actions

while not env.episode_over: observations = env.step(env.action_space.sample())


for an example of how to extend habitat-lab from outside the source code


Habitat Lab documentation is available here.

For example, see this page for a quickstart example.

Docker Setup

We also provide a docker setup for habitat. This works on machines with an NVIDIA GPU and requires users to install nvidia-docker. The following Dockerfile was used to build the habitat docker. To setup the habitat stack using docker follow the below steps:

  1. Pull the habitat docker image:

    docker pull fairembodied/habitat:latest
  2. Start an interactive bash session inside the habitat docker:

    docker run --runtime=nvidia -it fairhabitat/habitat:v1
  3. Activate the habitat conda environment:

    source activate habitat
  4. Benchmark a forward only agent on the test scenes data:

    cd habitat-api; python examples/
    . This should print out an output like:
    2019-02-25 02:39:48,680 initializing sim Sim-v0
    2019-02-25 02:39:49,655 initializing task Nav-v0
    spl: 0.000


An important objective of Habitat Lab is to make it easy for users to set up a variety of embodied agent tasks in 3D environments. The process of setting up a task involves using environment information provided by the simulator, connecting the information with a dataset (e.g. PointGoal targets, or question and answer pairs for Embodied QA) and providing observations which can be used by the agents. Keeping this primary objective in mind the core API defines the following key concepts as abstractions that can be extended:

  • Env
    : the fundamental environment concept for Habitat. All the information needed for working on embodied tasks with a simulator is abstracted inside an Env. This class acts as a base for other derived environment classes. Env consists of three major components: a Simulator, a Dataset (containing Episodes), and a Task, and it serves to connects all these three components together.
  • Dataset
    : contains a list of task-specific episodes from a particular data split and additional dataset-wide information. Handles loading and saving of a dataset to disk, getting a list of scenes, and getting a list of episodes for a particular scene.
  • Episode
    : a class for episode specification that includes the initial position and orientation of an Agent, a scene id, a goal position and optionally shortest paths to the goal. An episode is a description of one task instance for the agent.

teaser results

Architecture of Habitat Lab

  • Task
    : this class builds on top of the simulator and dataset. The criteria of episode termination and measures of success are provided by the Task.
  • Sensor
    : a generalization of the physical Sensor concept provided by a Simulator, with the capability to provide Task-specific Observation data in a specified format.
  • Observation
    : data representing an observation from a Sensor. This can correspond to physical sensors on an Agent (e.g. RGB, depth, semantic segmentation masks, collision sensors) or more abstract sensors such as the current agent state.

Note that the core functionality defines fundamental building blocks such as the API for interacting with the simulator backend, and receiving observations through Sensors. Concrete simulation backends, 3D datasets, and embodied agent baselines are implemented on top of the core API.


To make things easier we expect

folder of particular structure or symlink presented in habitat-lab working directory.

Scenes datasets

| Scenes models | Extract path | Archive size | | --- | --- | --- | | 🆕ReplicaCAD |

| 123 MB | | 🆕HM3D |
| 130 GB | | Gibson |
| 1.5 GB | | MatterPort3D |
| 15 GB |


Download ReplicaCAD dataset using download utility:

python -m habitat_sim.utils.datasets_download --uids replica_cad_dataset

🆕Habitat Matterport

Download HM3D dataset using download utility and instructions:

python -m habitat_sim.utils.datasets_download --username  --password  --uids hm3d_minival


The full Matterport3D (MP3D) dataset for use with Habitat can be downloaded using the official Matterport3D download script as follows:

python --task habitat -o data/scene_datasets/mp3d/
. You only need the habitat zip archive and not the entire Matterport3D dataset. Note that this download script requires python 2.7 to run. Extract the matterport data to


Download the Habitat related Gibson dataset following the instructions here. After downloading extract the dataset to folder

folder (this folder should contain the
files from Gibson).

Task datasets

| Task | Scenes | Link | Extract path | Config to use | Archive size | | --- | --- | --- | --- | --- | --- | | 🆕Rearrange Pick | ReplicaCAD | |

| 11 MB | | Point goal navigation | Gibson | |
| 385 MB | | 🆕Point goal navigation | Gibson 0+ (train) | |
| 321 MB | | Point goal navigation corresponding to Sim2LoCoBot experiment configuration | Gibson | |
| 274 MB | | Point goal navigation | MatterPort3D | |
| 400 MB | | 🆕Point goal navigation | HM3D | |
| 992 MB | | Object goal navigation | MatterPort3D | |
| 170 MB | | Embodied Question Answering | MatterPort3D | |
| 44 MB | | Visual Language Navigation | MatterPort3D | |
| 2.7 MB | | Image goal navigation | Gibson | |
| 385 MB | | Image goal navigation | MatterPort3D | |
| 400 MB |

To use an episode dataset provide related config to the Env in the example or use the config for RL agent training.


Habitat Lab includes reinforcement learning (via PPO) and classical SLAM based baselines. For running PPO training on sample data and more details refer habitat_baselines/


Habitat Lab supports deployment of models on a physical robot through PyRobot ( Please install the python3 version of PyRobot and refer to

for instructions. This functionality allows deployment of models across simulation and reality.


ROS-X-Habitat ( is a framework that bridges the AI Habitat platform (Habitat Lab + Habitat Sim) with other robotics resources via ROS. Compared with Habitat-PyRobot, ROS-X-Habitat places emphasis on 1) leveraging Habitat Sim v2's physics-based simulation capability and 2) allowing roboticists to access simulation assets from ROS. The work has also been made public as a paper.

Note that ROS-X-Habitat was developed, and is maintained by the Lab for Computational Intelligence at UBC; it has not yet been officially supported by the Habitat Lab team. Please refer to the framework's repository for docs and discussions.


The Habitat project would not have been possible without the support and contributions of many individuals. We would like to thank Dmytro Mishkin, Xinlei Chen, Georgia Gkioxari, Daniel Gordon, Leonidas Guibas, Saurabh Gupta, Or Litany, Marcus Rohrbach, Amanpreet Singh, Devendra Singh Chaplot, Yuandong Tian, and Yuxin Wu for many helpful conversations and guidance on the design and development of the Habitat platform.


Habitat Lab is MIT licensed. See the LICENSE file for details.

The trained models and the task datasets are considered data derived from the correspondent scene datasets. - Matterport3D based task datasets and trained models are distributed with Matterport3D Terms of Use and under CC BY-NC-SA 3.0 US license. - Gibson based task datasets, the code for generating such datasets, and trained models are distributed with Gibson Terms of Use and under CC BY-NC-SA 3.0 US license.


  1. 🆕Habitat 2.0: Training Home Assistants to Rearrange their Habitat Andrew Szot, Alex Clegg, Eric Undersander, Erik Wijmans, Yili Zhao, John Turner, Noah Maestre, Mustafa Mukadam, Devendra Chaplot, Oleksandr Maksymets, Aaron Gokaslan, Vladimir Vondrus, Sameer Dharur, Franziska Meier, Wojciech Galuba, Angel Chang, Zsolt Kira, Vladlen Koltun, Jitendra Malik, Manolis Savva, Dhruv Batra. arXiv preprint arXiv:2106.14405, 2021.
  2. Habitat: A Platform for Embodied AI Research. Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, Dhruv Batra. IEEE/CVF International Conference on Computer Vision (ICCV), 2019.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.