This is the PyTorch implementation for our paper:
Focus on Impact: Indoor Exploration with Intrinsic Motivation
Roberto Bigazzi, Federico Landi, Silvia Cascianelli, Lorenzo Baraldi, Marcella Cornia, Rita Cucchiara
If you find our code useful for your research, please cite our paper:
@article{bigazzi2022focus,
title={Focus on Impact: Indoor Exploration with Intrinsic Motivation},
author={Bigazzi, Roberto and Landi, Federico and Cascianelli, Silvia and Baraldi, Lorenzo and Cornia, Marcella and Cucchiara, Rita},
journal={IEEE Robotics and Automation Letters},
year={2022},
publisher={IEEE}
}
In this work, we propose to train the model with a purely intrinsic reward signal to guide exploration, which is based on the impact of the robot's actions on its internal representation of the environment. So far, impact-based rewards have been employed for simple tasks and in procedurally generated synthetic environments with countable states. Since the number of states observable by the agent in realistic indoor environments is non-countable, we include a neural-based density model and replace the traditional count-based regularization with an estimated pseudo-count of previously visited states.
The proposed exploration approach outperforms DRL-based competitors relying on intrinsic rewards and surpasses the agents trained with a dense extrinsic reward computed with the environment layouts. We also show that a robot equipped with the proposed approach seamlessly adapts to point-goal navigation and real-world deployment.
-
Create an environment with conda:
conda create -n focus_on_imp python=3.6 cmake=3.14.0 source activate focus_on_imp
-
Clone this repository:
git clone --recursive https://github.com/aimagelab/focus-on-impact cd focus-on-impact
-
Install Habitat-Lab and Habitat-Sim in the environments directory:
cd environments/habitat-sim python -m pip install -r requirements.txt python setup.py install --headless --with-cuda cd ../habitat-lab python -m pip install -r requirements.txt python -m pip install -r habitat_baselines/rl/requirements.txt python setup.py develop --all cd ../..
-
Install the requirements for this repository:
python -m pip install -r requirements.txt
-
Download the scene datasets Gibson and Matterport3D and store them in
data/scene_datasets/
. -
Download the exploration task datasets for Gibson and Matterport3D from Occupancy Anticipation repository and store them in
data/datasets/
. -
Download the navigation task datasets for Gibson from Habitat-Lab repository and store them in
data/datasets/
. -
Install A* algorithm used by the Planner:
cd occant_utils/astar_pycpp make cd ../..
-
Generate environment layout maps as specified in the instructions of Occupancy Anticipation repository.
In order to train a model for exploration you can run:
python -u run.py --exp-config configs/model_configs/{MODEL_TYPE}/ppo_{MODEL_NAME}_training.yaml --run-type train
It is possible to change training parameters modifying the .yaml file.
The evaluation of the models can be done both in exploration and pointgoal navigation.
python -u run.py --exp-config configs/model_configs/{MODEL_TYPE}/ppo_{MODEL_NAME}_{DATASET}_{SPLIT}_noisy.yaml --run-type eval
python -u run.py --exp-config configs/model_configs/{MODEL_TYPE}/ppo_{MODEL_NAME}_navigation.yaml --run-type eval
Pretrained weights of our models on 5 millions total frames.
Name | Link |
---|---|
Impact (Grid) | Here |
Impact (DME) | Here |
For instructions on the real-world deployment of the models please follow LocoNav instructions.
This repository uses parts of Habitat-Lab and Habitat-Sim. We also used Occupancy Anticipation [1] for some of the competitors, the ANS-based [2] Mapper and the exploration task dataset.
[1] Ramakrishnan S. K., Al-Halah Z., and Grauman K. "Occupancy anticipation for efficient exploration and navigation" In ECCV 2020.
[2] Chaplot D. S., et al. "Learning to explore using active neural slam" In ICLR 2020.