Code for running "Simultaneous Mapping and Target-driven Navigation" in Habitat simulator.
Installation
-
Install habitat-lab and habitat-sim from the following repository.
https://github.com/facebookresearch/habitat-lab -
The following libraries should also be necessary.
torch >= 1.5
torchvision == 0.6
networkx
visualpriors -
Put
my_objectnav_mp3d.yaml, my_objectnav_mp3d_train.yaml, my_objectnav_mp3d_test.yaml
into the data folder.
Habitat Code Example
-
examples/shortest_path_follower_example.py
will draw a top down map visualizing the agent following a shortest path to the goal. It is also an example of running shortest path on the pointNav task. -
temp_geodesic_follower.py
is an example for running shortest path on the objectNav task.
Training and Testing
All the hyper-parameters are defined in parameters_habitat.py
.
MapNet module and navigation module are trained and tested separately.
-
To train and test the MapNet module,
python train_MapNet_habitat.py
python test_MapNet_habitat.py
-
To train and test the navigator,
python train_IL_habitat.py
python test_IL_habitat.py