Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebookresearch/habitat-sim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.2
Choose a base ref
...
head repository: facebookresearch/habitat-sim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.3
Choose a head ref
Loading
Showing 608 changed files with 122,951 additions and 56,704 deletions.
76 changes: 39 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -123,9 +123,10 @@ commands:
. activate habitat
# For whatever reason we have to install pytorch first. If it isn't
# it installs the 1.4 cpuonly version. Which is no good.
conda install -q -y pytorch torchvision cudatoolkit=11.3 -c pytorch
conda install -q -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis
pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python
#conda install -q -y pytorch=1.12 torchvision pytorch-cuda=11.3 -c pytorch -c nvidia
conda install pytorch==1.12.1 torchvision==0.13.1 cudatoolkit=11.3 -c pytorch
conda install -q -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis pytest-mock
pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython mock
fi
- run:
name: Install emscripten
@@ -156,9 +157,9 @@ commands:
npm install
touch ~/npm_deps_installed
fi
- restore_cache:
keys:
- habitat-lab-{{ checksum "./hablab_sha" }}
#- restore_cache:
# keys:
# - habitat-lab-{{ checksum "./hablab_sha" }}
- restore_cache: &ccache_cache
keys:
- ccache-{{ arch }}-{{ .Branch }}-{{ .BuildNum }}
@@ -184,18 +185,11 @@ jobs:
- run:
name: setup
command: |
# Updated llvm to v 10
sudo apt-get update
sudo apt-get install llvm-10
cd /usr/bin
sudo rm llvm-config
sudo ln -s llvm-config-10 llvm-config
cd ~/project/
pip install -U pip
pip install -U --prefer-binary \
black \
flake8 \
flake8-bugbear \
flake8-bugbear==22.6.22 \
flake8-builtins \
flake8-comprehensions \
flake8-return \
@@ -439,7 +433,7 @@ jobs:
git clone -q --depth 1 https://github.com/facebookresearch/habitat-lab.git
fi
cd habitat-lab
pip install -r requirements.txt --progress-bar off
pip install -r habitat-lab/requirements.txt --progress-bar off
ln -s ../habitat-sim/data data
touch ~/miniconda/pip_deps_installed
- run:
@@ -448,8 +442,11 @@ jobs:
command: |
export PATH=$HOME/miniconda/bin:$PATH
. activate habitat; cd habitat-lab
python -u setup.py develop --all
python -u setup.py test
pip install -e habitat-lab
pip install -e habitat-baselines
export PYTHONPATH=.:$PYTHONPATH
export MULTI_PROC_OFFSET=0 && export MAGNUM_LOG=quiet && export HABITAT_SIM_LOG=quiet
python -m pytest
- save_cache:
key: habitat-lab-{{ checksum "./hablab_sha" }}
background: true
@@ -461,8 +458,8 @@ jobs:
export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
. activate habitat; cd habitat-lab
# Install requirments first to avoid errors related to gym
pip install -r requirements.txt --progress-bar off
python setup.py develop --all
pip install -r habitat-lab/requirements.txt --progress-bar off
pip install -e habitat-lab
cd docs
conda install -y -c conda-forge doxygen
@@ -580,24 +577,7 @@ jobs:
. ~/emsdk/emsdk_env.sh
# Generate JS CodeConv
npm run test_with_coverage
- run:
name: Build, install habitat-sim with audio and run audio_agent script
no_output_timeout: 10m
command: |
export PATH=$HOME/miniconda/bin:$PATH
. activate habitat;
cd habitat-sim
pip install -r requirements.txt --progress-bar off
pip install imageio imageio-ffmpeg
git submodule update --init --recursive --jobs 8
python -u setup.py install --build-type "Release" --lto --headless --audio
python examples/tutorials/audio_agent.py
- save_cache:
key: ccache-{{ arch }}-{{ .Branch }}-{{ .BuildNum }}
background: true
paths:
- /home/circleci/.ccache
- run:
- run: &upload_coverage
name: Upload test coverage
command: |
export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
@@ -620,6 +600,27 @@ jobs:
#lcov --remove coverage.info "*/test/*" --output-file coverage.info > /dev/null
#lcov --remove coverage.info "*/tests/*" --output-file coverage.info > /dev/null
./codecov -f coverage.info -cF CPP
- run:
name: Build, install habitat-sim with audio and run audio_agent script
no_output_timeout: 10m
command: |
export PATH=$HOME/miniconda/bin:$PATH
. activate habitat;
cd habitat-sim
pip install -r requirements.txt --progress-bar off
pip install imageio imageio-ffmpeg
git submodule update --init --recursive --jobs 8
python -u setup.py install --build-type "Release" --lto --headless --audio
python examples/tutorials/audio_agent.py
- save_cache:
key: ccache-{{ arch }}-{{ .Branch }}-{{ .BuildNum }}
background: true
paths:
- /home/circleci/.ccache
# Uploading test coverage again for code changed by the above rebuild.
# TODO: https://github.com/facebookresearch/habitat-sim/pull/1860 fixes
# this better, remove once it's merged
- run: *upload_coverage



@@ -748,6 +749,7 @@ workflows:
- update_docs:
requires:
- install_and_test_ubuntu
- lab_build_habitat
filters:
branches:
only: main
5 changes: 4 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -46,7 +46,10 @@ BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
# Doc block @ref and @section commands often cause Doxygen parsing bugs if
# wrapped on multiple lines. If a comment contains them, it's not formatted in
# any way.
CommentPragmas: '(^ IWYU pragma:|@ref|@section)'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
29 changes: 23 additions & 6 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ readability-uniqueptr-delete-release,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-bugprone-easily-swappable-parameters,
-bugprone-forward-declaration-namespace,
'

CheckOptions:
@@ -75,12 +76,6 @@ CheckOptions:
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: true

# Let deprecation warnings through. From time to time, Magnum annotates APIs
# with deprecation warnings, suggesting people to upgrade to newer / better
# designed / more flexible APIs. Treating such warnings as error is
# counterproductive, since the first thing you want to do after an upgrade is
# compiling existing *unchanged* code and ensuring all tests pass, and only
# then start updating the code.
WarningsAsErrors: '
*,
-bugprone-narrowing-conversions,
@@ -90,6 +85,28 @@ WarningsAsErrors: '
-clang-analyzer-cplusplus.PlacementNew,
-cppcoreguidelines-pro-type-member-init,
-optin.cplusplus.UninitializedObject,
-readability-implicit-bool-conversion,
'

HeaderFilterRegex: "src/esp/"

# Comments for particular disabled checks:
#
# bugprone-forward-declaration-namespace
# This check would make forward declarations work only if each class name is
# unique across all namespaces, otherwise it would complain that e.g. Buffer
# is defined in Magnum::GL but a forward declaration appears in Magnum::Vk.
# Which is just useless, and goes against the point of namespaces.
# clang-diagnostic-deprecated-declarations
# From time to time, Magnum annotates APIs with deprecation warnings,
# suggesting people to upgrade to newer / better designed / more flexible
# APIs. Treating such warnings as error is counterproductive, since the first
# thing you want to do after an upgrade is compiling existing *unchanged*
# code and ensuring all tests pass, and only then start updating the code.
# readability-implicit-bool-conversion
# There's many cases of checking counts in if statements, such as
# `if(!importer->sceneCount())` for Magnum importers. For those there are no
# corresponding `hasScenes()` or such, and having to write `== 0` doesn't
# really improve readability in any way. Keeping this as a warning tho, as it
# *might* actually be useful in certain cases, just not treating it as an
# error.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ __pycache__/

# Distribution / packaging
.Python
build/
build*/
develop-eggs/
dist/
downloads/
@@ -172,8 +172,6 @@ tests/17DRP5sb8fy
*.zip
*.mp4
src_python/habitat_sim/_ext
build_js/
build_corrade-rc/

.setuppy_args_cache.json

3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -34,9 +34,6 @@
[submodule "docs/m.css"]
path = docs/m.css
url = https://github.com/mosra/m.css
[submodule "src/deps/imgui"]
path = src/deps/imgui
url = https://github.com/ocornut/imgui.git
[submodule "src/deps/tinyobjloader"]
path = src/deps/tinyobjloader
url = https://github.com/syoyo/tinyobjloader.git
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -68,15 +68,15 @@ repos:
exclude: docs/

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
exclude: docs/
additional_dependencies: &flake8_dependencies
- flake8-bugbear==22.1.11
- flake8-builtins==1.5.3
- flake8-comprehensions==3.10.0
- flake8-return==1.1.3
- flake8-return==1.2.0
- flake8-simplify==0.17.0

- repo: https://github.com/asottile/yesqa
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
Meta Platforms has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text](https://code.fb.com/codeofconduct/)
so that you can understand what actions will and will not be tolerated.
31 changes: 28 additions & 3 deletions DATASETS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Datasets commonly used with Habitat-Sim

## Table of contents
1. [Habitat test scenes](#habitat-test-scenes)
1. [Habitat-Matterport 3D Research Dataset (HM3D)](#habitat-matterport-3d-research-dataset-hm3d)
1. [Matterport3D (MP3D) dataset](#matterport3d-mp3d-dataset)
1. [Gibson and 3DSceneGraph datasets](#gibson-and-3dscenegraph-datasets)
1. [Replica Dataset](#replica-dataset)
1. [ReplicaCAD](#replicacad)
1. [ScanNet](#scannet)
1. [YCB Benchmarks - Object and Model Set](#ycb-benchmarks---object-and-model-set)
1. [Previewing dataset assets using Habitat-Sim's viewers](#previewing-dataset-assets-using-habitat-sims-viewers)

## Habitat test scenes

We provide 3 example scenes for performing unit tests in habitat-sim. These can be programmatically downloaded via Habitat's data download utility.

```
python -m habitat_sim.utils.datasets_download --uids habitat_test_scenes --data-path data/
```

We also provide PointNav episodes sampled from these scenes for performing unit tests in habitat-lab. These can also be downloaded using Habitat's data download utility.

```
python -m habitat_sim.utils.datasets_download --uids habitat_test_pointnav_dataset --data-path data/
```

## Habitat-Matterport 3D Research Dataset (HM3D)

Details: [https://aihabitat.org/datasets/hm3d/](https://aihabitat.org/datasets/hm3d/).
@@ -23,13 +48,13 @@ First, you will need to generate a matterport API Token:

Now, you are ready to download. For example, to download the minival split, use:
```
python -m habitat_sim.utils.datasets_download --username <api-token-id> --password <api-token-secret> --uids hm3d_minival
python -m habitat_sim.utils.datasets_download --username <api-token-id> --password <api-token-secret> --uids hm3d_minival_v0.2
```

By default, downloading the data for train/val/example scenes also pulls in the semantic annotations and configs for [HM3D-Semantics v0.1](https://aihabitat.org/datasets/hm3d-semantics/). To download only the semantic files for these splits, use the uid `hm3d_semantics`.
By default, downloading the data for train/val/example scenes also pulls in the semantic annotations and configs for [HM3D-Semantics v0.2](https://aihabitat.org/datasets/hm3d-semantics/). To download only the semantic files for these splits, use the uid `hm3d_semantics`.


By default the download script will only download what is needed for Habitat-Sim. You can add `_full` to the uid to download the raw glbs and the obj+mtl's in addition to what is needed for use with Habitat-Sim.
By default the download script will only download what is needed for Habitat-Sim. You can add `_full` to the uid to download the raw glbs in addition to what is needed for use with Habitat-Sim.

### Loading semantics for HM3D

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Facebook, Inc. and its affiliates.
Copyright (c) Meta Platforms, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading