Skip to content

Commit 5968562

Browse files
committed
Update habitat-mas readme
1 parent 8f4348d commit 5968562

File tree

1 file changed

+85
-25
lines changed

1 file changed

+85
-25
lines changed

habitat-mas/README.md

Lines changed: 85 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ Habitat-MAS is a Python package for Multi-Agent Systems in Habitat virtual envir
1010
- [Install habitat-mas](#install-habitat-mas)
1111
- [Usage](#usage)
1212
- [Download Data](#download-data)
13+
- [Download Base Dataset](#download-base-dataset)
14+
- [Download MP3D Dataset](#download-mp3d-dataset)
15+
- [Download Habitat-MAS Dataset](#download-habitat-mas-dataset)
1316
- [Run the demo](#run-the-demo)
14-
- [Dataset Generation](#dataset-generation)
17+
- [Run Habitat-MAS](#run-habitat-mas)
18+
- [Perception](#perception)
19+
- [Mobility](#mobility)
20+
- [Manipulation](#manipulation)
21+
- [Rearrange](#rearrange)
1522
- [Dataset Structure](#dataset-structure)
23+
- [Dataset Generation](#dataset-generation)
1624

1725
## Installation
1826

@@ -41,19 +49,29 @@ pip install -e habitat-mas
4149
## Usage
4250

4351
### Download Data
52+
53+
#### Download Base Dataset
4454
The dataset used in the demo is the same as [Habitat-3.0 Multi-Agent Training](../habitat-baselines/README.md#habitat-30-multi-agent-training). You can download the dataset by running the following command:
4555

4656
```sh
4757
python -m habitat_sim.utils.datasets_download --uids hssd-hab hab3-episodes habitat_humanoids hab_spot_arm hab3-episodes ycb hssd-hab hab3_bench_assets rearrange_task_assets
4858
```
59+
#### Download MP3D Dataset
60+
Since the mobility and rearrange tasks utilize the scene data of [Matterport3D](https://niessner.github.io/Matterport/), it is necessary to download the scene data of mp3d-habitat first according to the instructions in [here](https://github.com/facebookresearch/habitat-sim/blob/main/DATASETS.md#matterport3d-mp3d-dataset).
61+
62+
In short, you should first fill and sign a form to get `download_mp.py`, then run the following command in Python 2.7:
63+
```sh
64+
python download_mp.py --task habitat
65+
```
66+
Remeber to rename the folder name from 'mp3d-habitat' to 'mp3d', the path of MP3D dataset will be `EMOS/data/scene_datasets/mp3d/...`.
4967

68+
#### Download Habitat-MAS Dataset
5069
Besides, you should:
51-
- download the robot configuration data from [here](https://drive.google.com/drive/folders/132Fhf0YGCEgMFUw93-b48eRiv4E9pj8h), and place it into the `data/robots` folder.
52-
- download the perception, manipulation and mobility episodes data from [here](https://drive.google.com/drive/folders/1fnhzhRAW7Pzw48A4YsoijgdDPiKCArnK), and place them into the `data/datasets` folder.
70+
Download the robot configuration and episodes data from [Here](https://drive.google.com/drive/folders/1YVoCg2-tGkKWrdej4km6Abxsop0wS9XJ?usp=drive_link), extract and merge it into EMOS like `EMOS/data/...`.
5371

5472
The folder should look like this:
5573
```
56-
habitat-lab
74+
EMOS
5775
├── data
5876
│ ├── robots
5977
│ ├── dji_drone
@@ -97,51 +115,93 @@ The demo is adapted from [Habitat-3.0 Social Rearrangement](../habitat-baselines
97115
```sh
98116
# Under the habitat-lab root directory
99117
python -u -m habitat_baselines.run \
100-
--config-name=multi_rearrange/llm_spot_drone.yaml \
118+
--config-name=social_rearrange/llm_spot_drone.yaml \
101119
habitat_baselines.evaluate=True \
102120
habitat_baselines.num_environments=1
103121
```
104122

105-
Besides, to run our episodes, you should:
123+
### Run Habitat-MAS
106124

107-
- download the high-level configuration data from [here](https://drive.google.com/drive/folders/1DR-WErfJLqmZuOCp1UUQ9T-scp8JdgPN), and place them into the `habitat-baselines/habitat_baselines/config` folder.
108-
- download the simulator-level configuration data from [here](https://drive.google.com/drive/folders/1ovNky8ZzQVnVf_FyFaergRl3Qp94PWMz), and place them into the `habitat-lab/habitat/config/benchmark` folder.
109-
- download the dataset configuration data from [here](https://drive.google.com/drive/folders/1bOM9aXEiifp-QL4w0GVj5qrGiU5ex0SI), and place them into the `habitat-lab/habitat/config/habitat/dataset`
125+
To run our episodes in Habitat-MAS, you should first:
110126

127+
- download the high-level configuration files from [here](https://drive.google.com/drive/folders/1DR-WErfJLqmZuOCp1UUQ9T-scp8JdgPN), and place them into the `habitat-baselines/habitat_baselines/config` folder.
128+
- download the simulator-level configuration files from [here](https://drive.google.com/drive/folders/1ovNky8ZzQVnVf_FyFaergRl3Qp94PWMz), and place them into the `habitat-lab/habitat/config/benchmark` folder.
129+
- download the dataset configuration files from [here](https://drive.google.com/drive/folders/1bOM9aXEiifp-QL4w0GVj5qrGiU5ex0SI), and place them into the `habitat-lab/habitat/config/habitat/dataset`
111130

112-
## Dataset Generation
113-
The following section describes how to generate the dataset for the Habitat-MAS benchmark.
114-
Here is a demo data generation command for dataset in `hssd` scene.
131+
Then, you need to set your API key in [`habitat-mas/habitat_mas/utils/models.py`](https://github.com/SgtVincent/EMOS/blob/8f4348d73fcf605ebfbeee13ff897359723b5f1c/habitat-mas/habitat_mas/utils/models.py) to run EMOS.
132+
133+
For each task, you could run the following command:
115134

135+
#### Perception
116136
```sh
117-
python habitat-lab/habitat/datasets/rearrange/run_hssd_episode_generator.py --run --config data/config/hssd/hssd_dataset.yaml --num-episodes 340 --out data/datasets/hssd_height.json.gz --type height
137+
python -u -m habitat_baselines.run \
138+
--config-name=multi_rearrange/llm_spot_drone_per.yaml \
139+
# --config-name=multi_rearrange/llm_height_per.yaml \
140+
habitat_baselines.evaluate=True \
141+
habitat_baselines.num_environments=1
118142
```
119143

120-
`--config`: path of your dataset generation configuration data.
121-
122-
`--num-episodes`: episodes number you want to generate. (Note: in `scene_balanced` type `scene_sampler`, the number should be Integer multiple of `34`, you can customize your dataset generation configuration, which should be the file in the path of `--config`)
123-
124-
`--out`: desired path of your newly generated dataset.
125-
126-
`--type`: the purpose of your dataset, currently there are three types: `height`, `distance`, `normal`.
144+
#### Mobility
145+
```sh
146+
python -u -m habitat_baselines.run \
147+
--config-name=multi_rearrange/llm_spot_fetch_mobility.yaml \
148+
habitat_baselines.evaluate=True \
149+
habitat_baselines.num_environments=1
150+
```
127151

128-
Besides, for dataset generation, you should:
152+
#### Manipulation
153+
```sh
154+
python -u -m habitat_baselines.run \
155+
--config-name=multi_rearrange/llm_fetch_stretch_man.yaml \
156+
habitat_baselines.evaluate=True \
157+
habitat_baselines.num_environments=1
158+
```
129159

130-
- download the dataset generation configuration data from [here](https://drive.google.com/drive/folders/1YVoCg2-tGkKWrdej4km6Abxsop0wS9XJ), and place them into the `data` folder.
160+
#### Rearrange
161+
```sh
162+
python -u -m habitat_baselines.run \
163+
--config-name=multi_rearrange/llm_spot_drone_rearrange.yaml \
164+
habitat_baselines.evaluate=True \
165+
habitat_baselines.num_environments=1
166+
```
131167

132168
### Dataset Structure
133169

134170
**Multi robot perception**
135-
171+
`data/datasets/hssd/0/hssd_height_per.json.gz`
136172
- Mainly deploy robots spot and drone for object perception.
137173
- Objects are easy for drone to find, but hard for spot robot.
138174

139175
**Multi robot manipulation**
176+
`data/datasets/hssd/0/hssd_height_man.json.gz` or `data/datasets/hssd/0/hssd_dist_man.json.gz`
140177

141178
- Mainly deploy robots fetch and stretch for object rearrangement.
142179
- Objects are easy for stretch robot to get, but hard for fetch robot.
143180

144181
**Multi robot mobility**
145-
182+
`data/datasets/mp3d/mobility_episodes_1.json.gz`
146183
- Mainly deploy robots spot and fetch for cross-floor navigation.
147-
- Cross-floor tasks are easy for spot to do, but hard for fetch robot.
184+
- Cross-floor tasks are easy for spot to do, but impossible for fetch robot.
185+
186+
**Multi robot rearrange**
187+
`data/datasets/mp3d/mp3d_episodes_1.json.gz`
188+
- Mainly deploy spot, fetch and drone for cross-floor rearrangement.
189+
- Cross-floor rearrangement is suitable for spot, same-floor rearrangement is suitable for fetch, cross-floor perception is suitable for drone.
190+
191+
### Dataset Generation
192+
193+
Besides the dataset we have provided, custom data can be also generated through the scripts we provided.
194+
195+
Here is a demo data generation command for dataset in `hssd` scene.
196+
197+
```sh
198+
python habitat-lab/habitat/datasets/rearrange/run_hssd_episode_generator.py --run --config data/config/hssd/hssd_dataset.yaml --num-episodes 340 --out data/datasets/hssd_height.json.gz --type height
199+
```
200+
201+
`--config`: path of your dataset generation configuration data.
202+
203+
`--num-episodes`: episodes number you want to generate. (Note: in `scene_balanced` type `scene_sampler`, the number should be Integer multiple of `34`, you can customize your dataset generation configuration, which should be the file in the path of `--config`)
204+
205+
`--out`: desired path of your newly generated dataset.
206+
207+
`--type`: the purpose of your dataset, currently there are three types: `height`, `distance`, `normal`.

0 commit comments

Comments
 (0)