Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.2.3] Hab2 fixup : merging main and resolving conflicts #1022

Merged
merged 12 commits into from
Dec 3, 2022
Merged
7 changes: 2 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
command: |
pip install black --progress-bar off
pip install "isort[pyproject]" numpy --progress-bar off
pip install mypy==0.950 --progress-bar off
pip install mypy==0.991 types-mock types-Pillow types-tqdm types-PyYAML --progress-bar off
pip install -r habitat-lab/requirements.txt --progress-bar off
- run:
name: run black
Expand All @@ -39,10 +39,7 @@ jobs:
name: run mypy
command: |
mypy --version
mypy habitat-lab/
mypy habitat-baselines/
mypy examples/
mypy test/
mypy --exclude="^docs/|setup.py$"
- run:
name: run assert no files in habitat and habitat_baselines
command: |
Expand Down
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ repos:
- flake8-simplify==0.18.2

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v0.991
hooks:
- id: mypy
name: mypy-habitat-lab
files: habitat-lab
# https://github.com/python/mypy/issues/4008
exclude: "^docs/|setup.py$"
additional_dependencies:
- attrs>=19.1.0
- numpy
- id: mypy
name: mypy-habitat-baselines
files: habitat-baselines
additional_dependencies:
- attrs>=19.1.0
- numpy
- hydra-core>=1.2.0
- numpy>=1.20.0
- omegaconf>=2.2.3
- types-mock
- types-Pillow
- types-tqdm
- types-PyYAML

- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
Expand Down
32 changes: 16 additions & 16 deletions DATASETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ These datasets can be downloaded follow the instructions [here](https://github.c

### Task datasets

| Task | Scenes | Link | Extract path | Config to use | Archive size |
| --- | --- | --- | --- | --- | --- |
| 🆕[Rearrange Pick](https://arxiv.org/abs/2106.14405) | ReplicaCAD | [rearrange_pick_replica_cad_v0.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/rearrange_pick/replica_cad/v0/rearrange_pick_replica_cad_v0.zip) | `data/datasets/rearrange_pick/replica_cad/v0/` | [`datasets/rearrangepick/replica_cad.yaml`](habitat/config/habitat/dataset/rearrangement/replica_cad.yaml) | 11 MB |
| [Point goal navigation](https://arxiv.org/abs/1807.06757) | Gibson | [pointnav_gibson_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/pointnav/gibson.yaml`](habitat/config/habitat/dataset/pointnav/gibson.yaml) | 385 MB |
| 🆕[Point goal navigation](https://arxiv.org/abs/1807.06757) | Gibson 0+ (train) | [pointnav_gibson_0_plus_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_0_plus_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/pointnav/gibson_0_plus.yaml`](habitat/config/habitat/dataset/pointnav/gibson_0_plus.yaml) | 321 MB |
| [Point goal navigation corresponding to Sim2LoCoBot experiment configuration](https://arxiv.org/abs/1912.06321) | Gibson | [pointnav_gibson_v2.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v2/pointnav_gibson_v2.zip) | `data/datasets/pointnav/gibson/v2/` | [`datasets/pointnav/gibson_v2.yaml`](habitat/config/habitat/dataset/pointnav/gibson_v2.yaml) | 274 MB |
| [Point goal navigation](https://arxiv.org/abs/1807.06757) | MatterPort3D | [pointnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/mp3d/v1/pointnav_mp3d_v1.zip) | `data/datasets/pointnav/mp3d/v1/` | [`datasets/pointnav/mp3d.yaml`](habitat/config/habitat/dataset/pointnav/mp3d.yaml) | 400 MB |
| 🆕[Point goal navigation](https://arxiv.org/abs/1807.06757) | HM3D | [pointnav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/hm3d/v1/pointnav_hm3d_v1.zip) | `data/datasets/pointnav/hm3d/v1/` | [`datasets/pointnav/hm3d.yaml`](habitat/config/habitat/dataset/pointnav/hm3d.yaml) | 992 MB |
| [Object goal navigation](https://arxiv.org/abs/2006.13171) | MatterPort3D | [objectnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/objectnav/m3d/v1/objectnav_mp3d_v1.zip) | `data/datasets/objectnav/mp3d/v1/` | [`datasets/objectnav/mp3d.yaml`](habitat/config/habitat/dataset/objectnav/mp3d.yaml) | 170 MB |
| 🆕[Object goal navigation](https://arxiv.org/abs/2006.13171) | HM3D | [objectnav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/objectnav/hm3d/v1/objectnav_hm3d_v1.zip) | `data/datasets/objectnav/hm3d/v1/` | [`datasets/objectnav/hm3d.yaml`](habitat/config/habitat/dataset/objetnav/hm3d.yaml) | 154 MB |
| [Embodied Question Answering](https://embodiedqa.org/) | MatterPort3D | [eqa_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/eqa/mp3d/v1/eqa_mp3d_v1.zip) | `data/datasets/eqa/mp3d/v1/` | [`datasets/eqa/mp3d.yaml`](habitat/config/habitat/dataset/eqa/mp3d.yaml) | 44 MB |
| [Visual Language Navigation](https://bringmeaspoon.org/) | MatterPort3D | [vln_r2r_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/vln/mp3d/r2r/v1/vln_r2r_mp3d_v1.zip) | `data/datasets/vln/mp3d/r2r/v1` | [`datasets/vln/mp3d_r2r.yaml`](habitat/config/habitat/dataset/vln/mp3d_r2r.yaml) | 2.7 MB |
| 🆕[Instance image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/936) | HM3D | [instance_imagenav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/imagenav/hm3d/v1/instance_imagenav_hm3d_v1.zip) | `data/datasets/instance_imagenav/hm3d/v1/` | [`datasets/instance_imagenav/hm3d.yaml`](habitat/config/habitat/dataset/instance_imagenav/hm3d.yaml) | 303 MB |
| [Image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/333) | Gibson | [pointnav_gibson_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/imagenav/gibson.yaml`](habitat/config/habitat/dataset/imagenav/gibson.yaml) | 385 MB |
| [Image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/333) | MatterPort3D | [pointnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/mp3d/v1/pointnav_mp3d_v1.zip) | `data/datasets/pointnav/mp3d/v1/` | [`datasets/imagenav/mp3d.yaml`](habitat/config/habitat/dataset/imagenav/mp3d.yaml) | 400 MB |
| Task | Scenes | Link | Extract path | Config to use | Archive size |
| --- | --- | --- | --- |------------------------------------------------------------------------------------------------------------------------| --- |
| 🆕[Rearrange Pick](https://arxiv.org/abs/2106.14405) | ReplicaCAD | [rearrange_pick_replica_cad_v0.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/rearrange_pick/replica_cad/v0/rearrange_pick_replica_cad_v0.zip) | `data/datasets/rearrange_pick/replica_cad/v0/` | [`datasets/rearrangepick/replica_cad.yaml`](habitat-lab/habitat/config/habitat/dataset/rearrangement/replica_cad.yaml) | 11 MB |
| [Point goal navigation](https://arxiv.org/abs/1807.06757) | Gibson | [pointnav_gibson_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/pointnav/gibson.yaml`](habitat-lab/habitat/config/habitat/dataset/pointnav/gibson.yaml) | 385 MB |
| 🆕[Point goal navigation](https://arxiv.org/abs/1807.06757) | Gibson 0+ (train) | [pointnav_gibson_0_plus_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_0_plus_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/pointnav/gibson_0_plus.yaml`](habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_0_plus.yaml) | 321 MB |
| [Point goal navigation corresponding to Sim2LoCoBot experiment configuration](https://arxiv.org/abs/1912.06321) | Gibson | [pointnav_gibson_v2.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v2/pointnav_gibson_v2.zip) | `data/datasets/pointnav/gibson/v2/` | [`datasets/pointnav/gibson_v2.yaml`](habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_v2.yaml) | 274 MB |
| [Point goal navigation](https://arxiv.org/abs/1807.06757) | MatterPort3D | [pointnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/mp3d/v1/pointnav_mp3d_v1.zip) | `data/datasets/pointnav/mp3d/v1/` | [`datasets/pointnav/mp3d.yaml`](habitat-lab/habitat/config/habitat/dataset/pointnav/mp3d.yaml) | 400 MB |
| 🆕[Point goal navigation](https://arxiv.org/abs/1807.06757) | HM3D | [pointnav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/hm3d/v1/pointnav_hm3d_v1.zip) | `data/datasets/pointnav/hm3d/v1/` | [`datasets/pointnav/hm3d.yaml`](habitat-lab/habitat/config/habitat/dataset/pointnav/hm3d.yaml) | 992 MB |
| [Object goal navigation](https://arxiv.org/abs/2006.13171) | MatterPort3D | [objectnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/objectnav/m3d/v1/objectnav_mp3d_v1.zip) | `data/datasets/objectnav/mp3d/v1/` | [`datasets/objectnav/mp3d.yaml`](habitat-lab/habitat/config/habitat/dataset/objectnav/mp3d.yaml) | 170 MB |
| 🆕[Object goal navigation](https://arxiv.org/abs/2006.13171) | HM3D | [objectnav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/objectnav/hm3d/v1/objectnav_hm3d_v1.zip) | `data/datasets/objectnav/hm3d/v1/` | [`datasets/objectnav/hm3d.yaml`](habitat-lab/habitat/config/habitat/dataset/objectnav/hm3d.yaml) | 154 MB |
| [Embodied Question Answering](https://embodiedqa.org/) | MatterPort3D | [eqa_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/eqa/mp3d/v1/eqa_mp3d_v1.zip) | `data/datasets/eqa/mp3d/v1/` | [`datasets/eqa/mp3d.yaml`](habitat-lab/habitat/config/habitat/dataset/eqa/mp3d.yaml) | 44 MB |
| [Visual Language Navigation](https://bringmeaspoon.org/) | MatterPort3D | [vln_r2r_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/vln/mp3d/r2r/v1/vln_r2r_mp3d_v1.zip) | `data/datasets/vln/mp3d/r2r/v1` | [`datasets/vln/mp3d_r2r.yaml`](habitat-lab/habitat/config/habitat/dataset/vln/mp3d_r2r.yaml) | 2.7 MB |
| 🆕[Instance image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/936) | HM3D | [instance_imagenav_hm3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/imagenav/hm3d/v1/instance_imagenav_hm3d_v1.zip) | `data/datasets/instance_imagenav/hm3d/v1/` | [`datasets/instance_imagenav/hm3d.yaml`](habitat-lab/habitat/config/habitat/dataset/instance_imagenav/hm3d.yaml) | 303 MB |
| [Image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/333) | Gibson | [pointnav_gibson_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/gibson/v1/pointnav_gibson_v1.zip) | `data/datasets/pointnav/gibson/v1/` | [`datasets/imagenav/gibson.yaml`](habitat-lab/habitat/config/habitat/dataset/imagenav/gibson.yaml) | 385 MB |
| [Image goal navigation](https://github.com/facebookresearch/habitat-lab/pull/333) | MatterPort3D | [pointnav_mp3d_v1.zip](https://dl.fbaipublicfiles.com/habitat/data/datasets/pointnav/mp3d/v1/pointnav_mp3d_v1.zip) | `data/datasets/pointnav/mp3d/v1/` | [`datasets/imagenav/mp3d.yaml`](habitat-lab/habitat/config/habitat/dataset/imagenav/mp3d.yaml) | 400 MB |

To use an episode dataset, provide the related config to the Env in [the example](#example) or use the config for [RL agent training](habitat_baselines/README.md#reinforcement-learning-rl).
To use an episode dataset, provide the related config to the Env in [the example](examples/example.py) or use the config for [RL agent training](habitat-baselines/habitat_baselines/README.md#reinforcement-learning-rl).
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
graft habitat/utils/visualizations/assets
include habitat/py.typed
include habitat_baselines/py.typed
include habitat-lab/habitat/py.typed
include habitat-baselines/habitat_baselines/py.typed
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ If you use the Habitat platform in your research, please cite the [Habitat 1.0](
import habitat

# Load embodied AI task (RearrangePick) and a pre-specified virtual robot
env = habitat.Env(
config=habitat.get_config("habitat-lab/habitat/config/benchmark/rearrange/pick.yaml")
)

env = habitat.Env(config=habitat.get_config("benchmark/rearrange/pick.yaml"))
observations = env.reset()

# Step through environment with random actions
Expand Down Expand Up @@ -190,7 +187,7 @@ We provide docker containers for Habitat, updated approximately once per year fo
[Common task and episode datasets used with Habitat-Lab](DATASETS.md).

## Baselines
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/README.md](habitat_baselines/README.md).
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/README.md](habitat-baselines/habitat_baselines/README.md).

## ROS-X-Habitat
ROS-X-Habitat (https://github.com/ericchen321/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](https://arxiv.org/abs/2109.07703).
Expand All @@ -199,7 +196,7 @@ Note that ROS-X-Habitat was developed, and is maintained by the Lab for Computat


## License
Habitat-Lab is MIT licensed. See the [LICENSE file](habitat_baselines/LICENSE) for details.
Habitat-Lab is MIT licensed. See the [LICENSE file](/LICENSE) for details.

The trained models and the task datasets are considered data derived from the correspondent scene datasets.

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"registry",
"vector_env",
]
# yacs.config isn't ours, so don't document it
habitat.config.__all__.remove("Config")
# Hydra's DictConfig isn't ours, so don't document it
habitat.config.__all__.remove("DictConfig")

PROJECT_TITLE = "Habitat"
PROJECT_SUBTITLE = "Lab Docs"
Expand Down
32 changes: 15 additions & 17 deletions docs/pages/habitat-lab-demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ Habitat Lab Demo

.. code:: py

import habitat

import numpy as np
import random
from omegaconf import read_write

%matplotlib inline
import matplotlib.pyplot as plt

import habitat
from habitat.config import read_write

All the boilerplate code in the habitat-sim to set sensor config and agent
config is abstracted out in the Habitat Lab config system. Default config is at
:gh:`habitat-lab/habitat/config/default.py <facebookresearch/habitat-lab/blob/main/habitat-lab/habitat/config/default.py>`.
config is abstracted out in the Habitat Lab config system. Default habitat structured configs are at
:gh:`habitat-lab/habitat/config/default_structured_configs.py <facebookresearch/habitat-lab/blob/main/habitat-lab/habitat/config/default_structured_configs.py>`.
You can override defaults by specifying them in a separate file and pass it to
the :ref:`habitat.config.get_config()` function or use `read_write` to edit
the config object.
Expand All @@ -26,10 +23,9 @@ the config object.

.. code:: py

config = habitat.get_config(config_paths='../habitat-lab/habitat/config/tasks/pointnav_mp3d.yaml')
config = habitat.get_config(config_paths="benchmark/nav/pointnav/pointnav_mp3d.yaml")
with read_write(config):
config.habitat.dataset.data_path = '../data/datasets/pointnav/mp3d/v1/val/val.json.gz'
config.habitat.dataset.scenes_dir = '../data/scene_datasets/'
config.habitat.dataset.split = "val"

env = habitat.Env(config=config)

Expand Down Expand Up @@ -106,6 +102,8 @@ the config object.
import numpy as np
from PIL import Image
from habitat_sim.utils.common import d3_40_colors_rgb
from habitat.config.default import get_agent_config
from habitat.config.default_structured_configs import HabitatSimSemanticSensorConfig

def display_sample(rgb_obs, semantic_obs, depth_obs):
rgb_img = Image.fromarray(rgb_obs, mode="RGB")
Expand All @@ -128,13 +126,13 @@ the config object.
plt.imshow(data)
plt.show()

config = habitat.get_config(config_paths='../habitat-lab/habitat/config/tasks/pointnav_mp3d.yaml')
config = habitat.get_config(config_paths="benchmark/nav/pointnav/pointnav_mp3d.yaml")
with read_write(config):
config.habitat.dataset.data_path = '../data/datasets/pointnav/mp3d/v1/val/val.json.gz'
config.habitat.dataset.scenes_dir = '../data/scene_datasets/'
config.habitat.simulator.agent_0.sensors = ['rgb_sensor', 'depth_sensor', 'semantic_sensor']
config.habitat.simulator.semantic_sensor.width = 256
config.habitat.simulator.semantic_sensor.height = 256
config.habitat.dataset.split = "val"
agent_config = get_agent_config(sim_config=config.habitat.simulator)
agent_config.sim_sensors.update(
{"semantic_sensor": HabitatSimSemanticSensorConfig(height=256, width=256)}
)
config.habitat.simulator.turn_angle = 30

env = habitat.Env(config=config)
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ you can install using: :sh:`pip install opencv-python`.

def example():
env = habitat.Env(
config=habitat.get_config("habitat-lab/habitat/config/tasks/pointnav.yaml")
config=habitat.get_config("benchmark/nav/pointnav/pointnav_habitat_test.yaml")
)

print("Environment creation successful")
Expand Down
Loading