Code Monkey home page Code Monkey logo

neural-slam's Introduction

Active Neural SLAM

This is a PyTorch implementation of the ICLR-20 paper:

Learning To Explore Using Active Neural SLAM
Devendra Singh Chaplot, Dhiraj Gandhi, Saurabh Gupta, Abhinav Gupta, Ruslan Salakhutdinov
Carnegie Mellon University, Facebook AI Research, UIUC

Project Website: https://devendrachaplot.github.io/projects/Neural-SLAM

example

Overview:

The Active Neural SLAM model consists of three modules: a Global Policy, a Local Policy and a Neural SLAM Module. As shown below, the Neural-SLAM module predicts a map and agent pose estimate from incoming RGB observations and sensor readings. This map and pose are used by a Global policy to output a long-term goal, which is converted to a short-term goal using an analytic path planner. A Local Policy is trained to navigate to this short-term goal.

overview

Installing Dependencies

We use earlier versions of habitat-sim and habitat-api. The specific commits are mentioned below.

Installing habitat-sim:

git clone https://github.com/facebookresearch/habitat-sim.git
cd habitat-sim; git checkout 9575dcd45fe6f55d2a44043833af08972a7895a9; 
pip install -r requirements.txt; 
python setup.py install --headless
python setup.py install # (for Mac OS)

Installing habitat-api:

git clone https://github.com/facebookresearch/habitat-api.git
cd habitat-api; git checkout b5f2b00a25627ecb52b43b13ea96b05998d9a121; 
pip install -e .

Install pytorch from https://pytorch.org/ according to your system configuration. The code is tested on pytorch v1.2.0. If you are using conda:

conda install pytorch==1.2.0 torchvision cudatoolkit=10.0 -c pytorch #(Linux with GPU)
conda install pytorch==1.2.0 torchvision==0.4.0 -c pytorch #(Mac OS)

Setup

Clone the repository and install other requirements:

git clone --recurse-submodules https://github.com/devendrachaplot/Neural-SLAM
cd Neural-SLAM;
pip install -r requirements.txt

The code requires datasets in a data folder in the following format (same as habitat-api):

Neural-SLAM/
  data/
    scene_datasets/
      gibson/
        Adrian.glb
        Adrian.navmesh
        ...
    datasets/
      pointnav/
        gibson/
          v1/
            train/
            val/
            ...

Please download the data using the instructions here: https://github.com/facebookresearch/habitat-api#data

To verify that dependencies are correctly installed and data is setup correctly, run:

python main.py -n1 --auto_gpu_config 0 --split val

Usage

Training:

For training the complete Active Neural SLAM model on the Exploration task:

python main.py

Downloading pre-trained models

mkdir pretrained_models;
wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1UK2hT0GWzoTaVR5lAI6i8o27tqEmYeyY' -O pretrained_models/model_best.global;
wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1A1s_HNnbpvdYBUAiw2y1JmmELRLfAJb8' -O pretrained_models/model_best.local;
wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1o5OG7DIUKZyvi5stozSqRpAEae1F2BmX' -O pretrained_models/model_best.slam;

For evaluation:

For evaluating the pre-trained models:

python main.py --split val --eval 1 --train_global 0 --train_local 0 --train_slam 0 \
--load_global pretrained_models/model_best.global \
--load_local pretrained_models/model_best.local \
--load_slam pretrained_models/model_best.slam 

For visualizing the agent observations and predicted map and pose, add -v 1 as an argument to the above

For more detailed instructions, see INSTRUCTIONS.

Cite as

Chaplot, D.S., Gandhi, D., Gupta, S., Gupta, A. and Salakhutdinov, R., 2020. Learning To Explore Using Active Neural SLAM. In International Conference on Learning Representations (ICLR). (PDF)

Bibtex:

@inproceedings{chaplot2020learning,
  title={Learning To Explore Using Active Neural SLAM},
  author={Chaplot, Devendra Singh and Gandhi, Dhiraj and Gupta, Saurabh and Gupta, Abhinav and Salakhutdinov, Ruslan},
  booktitle={International Conference on Learning Representations (ICLR)},
  year={2020}
}

Acknowledgements

This repository uses Habitat API (https://github.com/facebookresearch/habitat-api) and parts of the code from the API. The implementation of PPO is borrowed from https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail/. We thank Guillaume Lample for discussions and coding during initial stages of this project.

neural-slam's People

Contributors

devendrachaplot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural-slam's Issues

ModuleNotFoundError on runing python main.py -n1 --auto_gpu_config 0 --split val

Hi guys!

I try to test python main.py -n1 --auto_gpu_config 0 --split val

I get this error:

(habitat3) jin@jin-MS-7B94:~/Neural-SLAM$ python main.py -n1 --auto_gpu_config 0 --split val
Traceback (most recent call last):
File "main.py", line 15, in
from env import make_vec_envs
File "/home/jin/Neural-SLAM/env/init.py", line 3, in
from .habitat import construct_envs
File "/home/jin/Neural-SLAM/env/habitat/init.py", line 9, in
from .exploration_env import Exploration_Env
File "/home/jin/Neural-SLAM/env/habitat/exploration_env.py", line 28, in
from env.habitat.utils.noisy_actions import CustomActionSpaceConfiguration
File "/home/jin/Neural-SLAM/env/habitat/utils/noisy_actions.py", line 9, in
from habitat.sims.habitat_simulator.action_spaces import (
ModuleNotFoundError: No module named 'habitat.sims.habitat_simulator.action_spaces'

Could anyone help me with this? Thank you very much!

possible to run this on android?

it would be great if there is a way to do SLAM , create maps of rooms and then be able to do path planning from within an android device.
Such an android device could be used as the compute unit for robots , on which the SLAM + Path Planning can be used to make the bot move to various spots (something like the roomba)

Are you familiar with any such frameworks for an android device?

ImportError: cannot import name 'register_move_fn' from 'habitat_sim.agent.controls'

I install habitat-sim=0.1.5, habitat-api=0.1.5, and install all requirements, while get the error follows.

Traceback (most recent call last):
  File "main.py", line 15, in <module>
    from env import make_vec_envs
  File "/data/Neural-SLAM/env/__init__.py", line 3, in <module>
    from .habitat import construct_envs
  File "/data/Neural-SLAM/env/habitat/__init__.py", line 9, in <module>
    from .exploration_env import Exploration_Env
  File "/data/Neural-SLAM/env/habitat/exploration_env.py", line 28, in <module>
    from env.habitat.utils.noisy_actions import CustomActionSpaceConfiguration
  File "/data/Neural-SLAM/env/habitat/utils/noisy_actions.py", line 12, in <module>
    from habitat_sim.agent.controls import register_move_fn

Running paper experiments + running Matterport based experiments

Is there a simple set of instructions available for running and reproducing experiments from the paper? I can't seem to find the relevant documentation anywhere.

Also, are there a set of concrete exact steps for running the code on Matterport? I have tried following along the steps provided in #16 but was hoping there was a better way?
Simply using the mp3d configuration file leads to a Trade::AbstractImporter::image2D(): index out of range error.

Thanks!

No module named 'attr'

After running the following command:
python main.py -n1 --auto_gpu_config 0 --split val

I am encountering following error:

Traceback (most recent call last):
File "main.py", line 15, in
from env import make_vec_envs
File "/DATA/hemnani1/DIR/Neural-SLAM/env/init.py", line 3, in
from .habitat import construct_envs
File "/DATA/hemnani1/DIR/Neural-SLAM/env/habitat/init.py", line 6, in
from habitat.config.default import get_config as cfg_env
File "/DATA/hemnani1/DIR/habitat-api/habitat/init.py", line 8, in
from habitat.core.agent import Agent
File "/DATA/hemnani1/DIR/habitat-api/habitat/core/agent.py", line 11, in
from habitat.core.simulator import Observations
File "/DATA/hemnani1/DIR/habitat-api/habitat/core/simulator.py", line 12, in
import attr
ModuleNotFoundError: No module named 'attr'

It will be very helpful if someone can suggest the possible solution.

How to apply the Neural-SLAM on VLN?

I notice that your Nerual-SLAM method achieves the state-of-the art on VLN benchmark (on SPL). Congratulations!

I have read your code I find that it is not easy to transfer the habitat implementation to Matterport environment. Especially the navigation graph is quite different from the 2D map. Could you please give me some hints about how to run Neural-SLAM in Matterport environment? Is it related to the paper "Neural Topological SLAM for Visual Navigation"?

error when python main.py -n1 --auto_gpu_config 0 --split val

I use googlecolab
I obey all the step before and I get an error when I try to test

python main.py -n1 --auto_gpu_config 0 --split val
I get this error

Traceback (most recent call last):
File "main.py", line 15, in
from env import make_vec_envs
File "/content/Neural-SLAM/env/init.py", line 3, in
from .habitat import construct_envs
File "/content/Neural-SLAM/env/habitat/init.py", line 9, in
from .exploration_env import Exploration_Env
File "/content/Neural-SLAM/env/habitat/exploration_env.py", line 28, in
from env.habitat.utils.noisy_actions import CustomActionSpaceConfiguration
File "/content/Neural-SLAM/env/habitat/utils/noisy_actions.py", line 12, in
from habitat_sim.agent.controls import register_move_fn
ImportError: cannot import name 'register_move_fn'

I find there is no register_move_fn in habitat-sim/habitat_sim/agent/controls
Troubled with this, can u help me?
thank you!

Training time(681 days with 4 GPUs [3090]) is too long according to code

@devendrachaplot Training time(681 days) is too long according to code
the environment is configured according to the introduction in my server with 4 GPUs (3090). All is sucessful. Howerver ,when I run python main.py ,I find 1/1000 of the training is completed after 1 days. So I read code and find num_episodes is 1000000 and max_episode_length is 1000 defaultly which are too large especially the num_episodes. So I have some questions

1、Accoing to code and 4 GPUs ,traning speed is17 fps, I need 1000000 *1000 / 17/ 3600 /24 = 681 days
image
image
2 、Accoing to paper,only val set is mentioned but I don't know the training set details.
image
3、 Could you provide the training detalis ?① GPU detalis including type and num .② Parameter set including num_episodesis and max_episode_length (I am using Gibson datatset) ③Training time

Could you give some suggestions?
I really appreciate any help you can provide.

Running ActiveNeuralSLAM on Matterport3D

Hi,

I am able to run Neural-SLAM successfully on gibson. But, I'm not able to get it run on Matterport3D. I've followed the steps in #16 and done the setup in the exact same manner. I'm getting a different error as follows.

(ActiveNeuralSLAM) sidgoel@node-1080ti-0:~/Neural-SLAM$ python  main.py --split val_mt_small --eval 1 --auto_gpu_config 0 -n 1 --num_episodes 1 --num_processes_per_gpu 10 --load_global pretrained_models/model_best.global --train_global 0 --load_local pretrained_models/model_best.local  --train_local 0 --load_slam pretrained_models/model_best.slam  --train_slam 0 --total_num_scenes 1 --task_config "tasks/pointnav_mp3d.yaml"
Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=0, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location='./tmp/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=1, exp_loss_coeff=1.0, exp_name='exp1', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='pretrained_models/model_best.global', load_local='pretrained_models/model_best.local', load_slam='pretrained_models/model_best.slam', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=1, num_global_steps=40, num_local_steps=25, num_mini_batch=0, num_processes=1, num_processes_on_first_gpu=0, num_processes_per_gpu=10, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val_mt_small', task_config='tasks/pointnav_mp3d.yaml', tau=0.95, total_num_scenes='1', train_global=0, train_local=0, train_slam=0, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Process ForkServerProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 148, in _worker_env
    env = env_fn(*env_fn_args)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/__init__.py", line 17, in make_env_fn
    config_env.SIMULATOR.SCENE = dataset.episodes[0].scene_id
IndexError: list index out of range

Also, I ran the examples/example.py for habitat-sim with mp3d and it works fine.
image

Request help with the same.

Helpful information about the local policy model?

Hi,
Just wanted some implementation clarity on the local policy model.

  1. I am assuming the images provided to the local policy are normalized? Correct me if I am wrong.
  2. I notice that there is a remapping for action spaces. For the local policy pretrained model is the action space prediction : [left,right,forward] ?
  3. the angles provided to the local policy model are in the global frame?

BrokenPipeError: [Errno 32] Broken pipe

Hi,
After setting up as per the readme.md I ran the command python main.py -n1 --auto_gpu_config 0 --split val and getting the below error.

Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=0, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location='./tmp/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=0, exp_loss_coeff=1.0, exp_name='exp1', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='0', load_local='0', load_slam='0', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=1000000, num_global_steps=40, num_local_steps=25, num_mini_batch=0, num_processes=1, num_processes_on_first_gpu=0, num_processes_per_gpu=11, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val', task_config='tasks/pointnav_gibson.yaml', tau=0.95, total_num_scenes='auto', train_global=1, train_local=1, train_slam=1, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Loading data/scene_datasets/gibson/Cantwell.glb
2021-02-04 22:14:49,265 initializing sim Sim-v0
Process ForkServerProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 148, in _worker_env
    env = env_fn(*env_fn_args)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/__init__.py", line 22, in make_env_fn
    config_env=config_env, config_baseline=config_baseline, dataset=dataset
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/exploration_env.py", line 85, in __init__
    super().__init__(config_env, dataset)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/core/env.py", line 290, in __init__
    self._env = Env(config, dataset)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/core/env.py", line 93, in __init__
    id_sim=self._config.SIMULATOR.TYPE, config=self._config.SIMULATOR
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/sims/registration.py", line 19, in make_sim
    return _sim(**kwargs)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/sims/habitat_simulator/habitat_simulator.py", line 155, in __init__
    sim_sensors.append(sensor_type(sensor_cfg))
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/sims/habitat_simulator/habitat_simulator.py", line 52, in __init__
    super().__init__(config=config)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/core/simulator.py", line 186, in __init__
    super().__init__(*args, **kwargs)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/core/simulator.py", line 148, in __init__
    self.observation_space = self._get_observation_space(*args, **kwargs)
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/sims/habitat_simulator/habitat_simulator.py", line 59, in _get_observation_space
    dtype=np.uint8,
TypeError: __init__() got an unexpected keyword argument 'dtype'
Exception ignored in: <bound method Env.__del__ of <env.habitat.exploration_env.Exploration_Env object at 0x7f29ad2dc860>>
Traceback (most recent call last):
  File "/mnt/beegfs/home/sidgoel/ActiveNeuralSLAM/lib/python3.6/site-packages/gym/core.py", line 203, in __del__
    self.close()
  File "/mnt/beegfs/home/sidgoel/habitat-api/habitat/core/env.py", line 382, in close
    self._env.close()
AttributeError: 'Exploration_Env' object has no attribute '_env'
Traceback (most recent call last):
  File "main.py", line 769, in <module>
    main()
  File "main.py", line 119, in main
    envs = make_vec_envs(args)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/__init__.py", line 7, in make_vec_envs
    envs = construct_envs(args)
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/__init__.py", line 102, in construct_envs
    range(args.num_processes))
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in __init__
    read_fn() for read_fn in self._connection_read_fns
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in <listcomp>
    read_fn() for read_fn in self._connection_read_fns
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
Exception ignored in: <bound method VectorEnv.__del__ of <env.habitat.habitat_api.habitat.core.vector_env.VectorEnv object at 0x7fa714619c88>>
Traceback (most recent call last):
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 487, in __del__
    self.close()
  File "/mnt/beegfs/home/sidgoel/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 351, in close
    write_fn((CLOSE_COMMAND, None))
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 404, in _send_bytes
    self._send(header + buf)
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

Request help in resolving this.

Error running main.py "BrokenPipeError: [Errno 32] Broken pipe" with gibson dataset

Hello,
I encounter the as error as #6 but with gibson dataset. I have also run the benchmark.py code and it works fine.

python main.py --split val --eval 1 --train_global 0 --train_local 0 --train_slam 0 \
--load_global pretrained_models/model_best.global \
--load_local pretrained_models/model_best.local \
--load_slam pretrained_models/model_best.slam

and I got the following output:


Auto GPU config:
Number of processes: 1
Number of processes on GPU 0: 0
Number of processes per GPU: 1
Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=1, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location=‘./tmp/’, entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=1, exp_loss_coeff=1.0, exp_name=‘exp1’, frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global=‘pretrained_models/model_best.global’, load_local=‘pretrained_models/model_best.local’, load_slam=‘pretrained_models/model_best.slam’, local_hidden_size=512, local_optimizer=‘adam,lr=0.0001’, local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=1000000, num_global_steps=40, num_local_steps=25, num_mini_batch=0, num_processes=1, num_processes_on_first_gpu=0, num_processes_per_gpu=1, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data=‘0’, seed=1, short_goal_dist=1, sim_gpu_id=1, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer=‘adam,lr=0.0001’, split=‘val’, task_config=‘tasks/pointnav_gibson.yaml’, tau=0.95, total_num_scenes=1, train_global=0, train_local=0, train_slam=0, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Auto GPU config:
Number of processes: 1
Number of processes on GPU 0: 0
Number of processes per GPU: 1
Loading data/scene_datasets/gibson/Cantwell.glb
2020-11-20 16:06:58,655 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1120 16:06:58.661386 17580 WindowlessContext.cpp:98] [EGL] Detected 5 EGL devices
I1120 16:06:58.661504 17580 WindowlessContext.cpp:119] [EGL] Selected EGL device 1 for CUDA device 1
I1120 16:06:58.668072 17580 WindowlessContext.cpp:133] [EGL] Version: 1.5
I1120 16:06:58.668079 17580 WindowlessContext.cpp:134] [EGL] Vendor: NVIDIA
Renderer: GeForce RTX 3090/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: 4.6.0 NVIDIA 455.45.01
Using optional features:
    GL_ARB_ES2_compatibility
    GL_ARB_direct_state_access
    GL_ARB_get_texture_sub_image
    GL_ARB_invalidate_subdata
    GL_ARB_multi_bind
    GL_ARB_robustness
    GL_ARB_separate_shader_objects
    GL_ARB_texture_filter_anisotropic
    GL_ARB_texture_storage
    GL_ARB_texture_storage_multisample
    GL_ARB_vertex_array_object
    GL_KHR_debug
Using driver workarounds:
    nv-egl-incorrect-gl11-function-pointers
    no-layout-qualifiers-on-old-glsl
    nv-zero-context-profile-mask
    nv-implementation-color-read-format-dsa-broken
    nv-cubemap-inconsistent-compressed-image-size
    nv-cubemap-broken-full-compressed-image-query
    nv-compressed-block-size-in-bits
I1120 16:07:01.149317 17580 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Cantwell.navmesh
2020-11-20 16:07:01,149 initializing task Nav-v0
2020-11-20 16:07:01,155 Computing map for data/scene_datasets/gibson/Cantwell.glb
Loading slam pretrained_models/model_best.slam
Loading global pretrained_models/model_best.global
Loading local pretrained_models/model_best.local
Traceback (most recent call last):
  File “main.py”, line 769, in <module>
    main()
  File “main.py”, line 273, in main
    local_map[:, 1, :, :], local_pose)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 547, in call
    result = self.forward(*input, **kwargs)
  File “/home/mzmao/projects/habitat-sim/habitat-api/Neural-SLAM/model.py”, line 162, in forward
    resnet_output = self.resnet_l5(obs[:, :3, :, :])
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 547, in call
    result = self.forward(*input, **kwargs)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/modules/container.py”, line 92, in forward
    input = module(input)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 547, in call
    result = self.forward(*input, **kwargs)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/modules/activation.py”, line 94, in forward
    return F.relu(input, inplace=self.inplace)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/site-packages/torch/nn/functional.py”, line 911, in relu
    result = torch.relu_(input)
RuntimeError: CUDA error: no kernel image is available for execution on the device
Exception ignored in: <function VectorEnv.del at 0x7fbc8db51048>
Traceback (most recent call last):
  File “/home/mzmao/projects/habitat-sim/habitat-api/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py”, line 487, in del
    self.close()
  File “/home/mzmao/projects/habitat-sim/habitat-api/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py”, line 351, in close
    write_fn((CLOSE_COMMAND, None))
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/multiprocessing/connection.py”, line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/multiprocessing/connection.py”, line 404, in _send_bytes
    self._send(header + buf)
  File “/home/mzmao/ENTER/envs/env01/lib/python3.7/multiprocessing/connection.py”, line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

would appreciate for some help,
thanks!

Separate the local policy module and test on the ground-truth map

As I understand your paper and code, I think with the Exploration_Environment, at each time step, I can get the observation (the image from simulation), the global ground-truth map 480x480 pixels), and the local pose of the robot.
Thereby, I can you this information and provide a goal (a pixel on the map) to feed to the local policy to navigate.

I think I'll modify the exploration_env.py so that I can return self.explorable_map and self.curr_loc_gt at each time step.

Is it possible for me to doing so? Thank you for your consideration.

Memory Leak

Hi!

We trained the model from scratch on Gibson dataset with the setting that num_scenes = 72, but we found that once the program is running, the avaliable memory of our machine is going lower and lower, and exhausted after about 2 hours.
We found it leaks over time and stop leaking after we terminate the program.

The curve of avaliable memory is shown as follows.

image

We also found that if we reduce the number of scenes, the speed of memory leaking will also decrease.

It will be very helpful if someone can suggest the possible solution.

Code question of fmm_planner.py

The function get_short_term_goal:
I don't understand why the code needs subset?
I think this function is to find a minium distance to the global goal in a local zone, right?

assert PointNavDatasetV1.check_config_paths_exist(config) AssertionError

When running python main.py --split val_mt --eval 1 \ --auto_gpu_config 0 -n 14 --num_episodes 71 --num_processes_per_gpu 7 \ --map_size_cm 4800 --global_downscaling 4 \ --load_global pretrained_models/model_best.global --train_global 0 \ --load_local pretrained_models/model_best.local --train_local 0 \ --load_slam pretrained_models/model_best.slam --train_slam 0
get:

Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=0, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location='./tmp/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=1, exp_loss_coeff=1.0, exp_name='exp1', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='pretrained_models/model_best.global', load_local='pretrained_models/model_best.local', load_slam='pretrained_models/model_best.slam', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=71, num_global_steps=40, num_local_steps=25, num_mini_batch=7, num_processes=14, num_processes_on_first_gpu=0, num_processes_per_gpu=7, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val_mt', task_config='tasks/pointnav_gibson.yaml', tau=0.95, total_num_scenes='auto', train_global=0, train_local=0, train_slam=0, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Traceback (most recent call last):
  File "main.py", line 769, in <module>
    main()
  File "main.py", line 119, in main
    envs = make_vec_envs(args)
  File "/home/thomastao/SLAM/Neural-SLAM/env/__init__.py", line 7, in make_vec_envs
    envs = construct_envs(args)
  File "/home/thomastao/SLAM/Neural-SLAM/env/habitat/__init__.py", line 40, in construct_envs
    scenes = PointNavDatasetV1.get_scenes_to_load(basic_config.DATASET)
  File "/home/thomastao/SLAM/habitat-api/habitat/datasets/pointnav/pointnav_dataset.py", line 45, in get_scenes_to_load
    assert PointNavDatasetV1.check_config_paths_exist(config)
AssertionError

my data is placed in /home/thomastao/SLAM/Neural-SLAM/data/datasets/pointnav/gibson/v1/train,my scene_datasets is placed in /home/thomastao/SLAM/Neural-SLAM/data/scene_datasets/gibson,
Do I need to modify the config file which in /home/thomastao/SLAM/habitat-api/configs/datasets/pointnav/gibson.yaml

Using the pretrained models cannot replicate the reported results.

Hi,

I evaluated the pretrained models in the validation set of the Gibson with 2 Nividia GTX2080Ti GPUs by the following instruction.

python  main.py --split val_mt --eval 1 \
--auto_gpu_config 0 -n 14 --num_episodes 71 --num_processes_per_gpu 7 \
--map_size_cm 4800 --global_downscaling 4 \
--load_global pretrained_models/model_best.global --train_global 0 \
--load_local pretrained_models/model_best.local  --train_local 0 \
--load_slam pretrained_models/model_best.slam  --train_slam 0 \
--print_images 1 -d results/ --exp_name exp_pretrained

And I got the following outputs:
Final Exp Area:
6.61225, 10.99293, 14.25592, 16.76154, 18.83926, 20.62707, 22.04239, 23.27103, 24.32681, 25.19376, 25.84527, 26.43538, 26.97672, 27.41279, 27.86179, 28.27807, 28.66676, 29.05918, 29.41082, 29.70030, 29.96494, 30.23517, 30.49235, 30.70271, 30.93785, 31.15789, 31.34198, 31.51161, 31.66111, 31.81541, 31.96644, 32.09205, 32.19407, 32.27754, 32.37009, 32.46788, 32.56964, 32.65248, 32.71281, 32.77295,
Final Exp Ratio:
0.22896, 0.38165, 0.49123, 0.57334, 0.63864, 0.69213, 0.73176, 0.76435, 0.79112, 0.81191, 0.82767, 0.84121, 0.85233, 0.86099, 0.86996, 0.87746, 0.88441, 0.89109, 0.89688, 0.90177, 0.90632, 0.91083, 0.91484, 0.91813, 0.92164, 0.92492, 0.92760, 0.93034, 0.93274, 0.93522, 0.93779, 0.93969, 0.94120, 0.94239, 0.94376, 0.94523, 0.94671, 0.94795, 0.94882, 0.94975,

The mean value of the relative coverage is 83.7%, which is much lower than the reported result (94.8%).
How can I replicate the reported result?

How do the visualization part work

Hello! I am curious about the visualization of your project especially the generation of map with exploring trajectory like the gif in your website. I look through the code and didn't find how the visualization part works. Could you give me some hints?
By the way, could you tell how much time did you spend in training and how many GPUs you have used ? Thanks!

Resources required to train a good model

Hi,

I have used one GPU for the training of the model, and it is able to take about 100,000 (0.1 million) steps per 24 hours. This is far from the 10 million steps mentioned in the paper, and I am wondering whether I made any mistakes in my training procedure. How many GPUs did you use for training, and how long did you train the agent to reach 10 million steps? Thanks!

Error running main.py "BrokenPipeError: [Errno 32] Broken pipe"

When I run the following code I get an error:

python main.py --split val --eval 1 --train_global 0 --train_local 0 --train_slam 0 --load_global pretrained_models/model_best.global --load_local pretrained_models/model_best.local --load_slam pretrained_models/model_best.slam --no_cuda --task_config tasks/pointnav_mp3d.yaml --num_processes 1

The output is as follows:

Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=1, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=False, du_scale=2, dump_location='./tmp/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=1, exp_loss_coeff=1.0, exp_name='exp1', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='pretrained_models/model_best.global', load_local='pretrained_models/model_best.local', load_slam='pretrained_models/model_best.slam', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=True, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=1000000, num_global_steps=40, num_local_steps=25, num_mini_batch=0, num_processes=1, num_processes_on_first_gpu=0, num_processes_per_gpu=11, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val', task_config='tasks/pointnav_mp3d.yaml', tau=0.95, total_num_scenes='auto', train_global=0, train_local=0, train_slam=0, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Loading data/scene_datasets/mp3d/2azQ1b91cZZ/2azQ1b91cZZ.glb
2020-09-16 17:57:23,377 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0916 17:57:23.383668 5564 WindowlessContext.cpp:98] [EGL] Detected 4 EGL devices
I0916 17:57:23.383796 5564 WindowlessContext.cpp:119] [EGL] Selected EGL device 0 for CUDA device 0
I0916 17:57:23.385957 5564 WindowlessContext.cpp:133] [EGL] Version: 1.5
I0916 17:57:23.385967 5564 WindowlessContext.cpp:134] [EGL] Vendor: NVIDIA
Renderer: GeForce GTX 1060 6GB/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: 4.6.0 NVIDIA 440.100
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_direct_state_access
GL_ARB_get_texture_sub_image
GL_ARB_invalidate_subdata
GL_ARB_multi_bind
GL_ARB_robustness
GL_ARB_separate_shader_objects
GL_ARB_texture_filter_anisotropic
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_vertex_array_object
GL_KHR_debug
Using driver workarounds:
nv-egl-incorrect-gl11-function-pointers
no-layout-qualifiers-on-old-glsl
nv-zero-context-profile-mask
nv-implementation-color-read-format-dsa-broken
nv-cubemap-inconsistent-compressed-image-size
nv-cubemap-broken-full-compressed-image-query
nv-compressed-block-size-in-bits
Trade::AbstractImporter::image2D(): index out of range
Traceback (most recent call last):
File "main.py", line 769, in
main()
File "main.py", line 119, in main
envs = make_vec_envs(args)
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/init.py", line 7, in make_vec_envs
envs = construct_envs(args)
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/habitat/init.py", line 102, in construct_envs
range(args.num_processes))
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in init
read_fn() for read_fn in self._connection_read_fns
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in
read_fn() for read_fn in self._connection_read_fns
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
Exception ignored in: <function VectorEnv.del at 0x7f90ceac2488>
Traceback (most recent call last):
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 487, in del
self.close()
File "/home/ubuntu/Projects/Active-Neural-SLAM/Neural-SLAM/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 351, in close
write_fn((CLOSE_COMMAND, None))
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
self._send(header + buf)
File "/home/ubuntu/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe


Note: I am using different task config because I didn't download the Gibson dataset yet.
It would be great if you can help me with this error

Question regarding MapBuilder

Hi,

I have some questions regarding the update_map method of MapBuilder class. When I plot the info['fp_proj'] and info['fp_explored'], like the image I post below, I found depth cam scanning shape is wired. I assume the shape should be like an isosceles triangle or trapezoid, but in the image you can see it's more like a half-triangle or half-trapezoid(right-half image shows nothing). Can you explain this to me?
Figure_1

Thank you!

Magnum module was compiled for Python 3.6, but the interpreter version is incompatible: 3.7.9

Hi, I am actually using the same version as you mentioned in the README.md file. However, I still got this error

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/skylark/.pycharm_helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "/home/skylark/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/skylark/Github/Neural-SLAM/main.py", line 15, in <module>
    from env import make_vec_envs
  File "/home/skylark/Github/Neural-SLAM/env/__init__.py", line 3, in <module>
    from .habitat import construct_envs
  File "/home/skylark/Github/Neural-SLAM/env/habitat/__init__.py", line 9, in <module>
    from .exploration_env import Exploration_Env
  File "/home/skylark/Github/Neural-SLAM/env/habitat/exploration_env.py", line 28, in <module>
    from env.habitat.utils.noisy_actions import CustomActionSpaceConfiguration
  File "/home/skylark/Github/Neural-SLAM/env/habitat/utils/noisy_actions.py", line 5, in <module>
    import habitat_sim
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/habitat_sim-0.1.2-py3.7-linux-x86_64.egg/habitat_sim/__init__.py", line 12, in <module>
    from .nav import *
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/habitat_sim-0.1.2-py3.7-linux-x86_64.egg/habitat_sim/nav/__init__.py", line 1, in <module>
    from .greedy_geodesic_follower import GreedyGeodesicFollower
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/habitat_sim-0.1.2-py3.7-linux-x86_64.egg/habitat_sim/nav/greedy_geodesic_follower.py", line 6, in <module>
    import habitat_sim.agent
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/habitat_sim-0.1.2-py3.7-linux-x86_64.egg/habitat_sim/agent/__init__.py", line 7, in <module>
    from .agent import *
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/habitat_sim-0.1.2-py3.7-linux-x86_64.egg/habitat_sim/agent/agent.py", line 10, in <module>
    import magnum as mn
  File "/home/lab/anaconda3/envs/habitat_AN/lib/python3.7/site-packages/magnum/__init__.py", line 28, in <module>
    from _magnum import *
ImportError: Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.7.9 (default, Aug 31 2020, 12:42:55)
[GCC 7.3.0].

As you mentioned in another issue, some problems may occur when using python 3.6 and you recommend using 3.7. But I think this package magnum does not fit 3.7.

ImportError: Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.7.9

Error about EGL devices and CUDA

Hi! I followed your installation instruction and met a bug when trying to verify the installation with command python main.py -n1 --auto_gpu_config 0 --split val under project directory. The printed out error log:

WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
Loading data/scene_datasets/gibson/Cantwell.glb
2020-07-14 20:59:15,185 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0714 20:59:15.188901 19551 WindowlessContext.cpp:98] [EGL] Detected 1 EGL devices
F0714 20:59:15.211788 19551 WindowlessContext.cpp:112] Check failed: eglDevId < numDevices [EGL] Could not find an EGL device for CUDA device -1
*** Check failure stack trace: ***
Traceback (most recent call last):
  File "main.py", line 769, in <module>
    main()
  File "main.py", line 119, in main
    envs = make_vec_envs(args)
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/__init__.py", line 7, in make_vec_envs
    envs = construct_envs(args)
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/habitat/__init__.py", line 102, in construct_envs
    range(args.num_processes))
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in __init__
    read_fn() for read_fn in self._connection_read_fns
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 117, in <listcomp>
    read_fn() for read_fn in self._connection_read_fns
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
Exception ignored in: <bound method VectorEnv.__del__ of <env.habitat.habitat_api.habitat.core.vector_env.VectorEnv object at 0x7f2b9f0d6eb8>>
Traceback (most recent call last):
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 487, in __del__
    self.close()
  File "/home/chenjunting/habitat_ws/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 351, in close
    write_fn((CLOSE_COMMAND, None))
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 404, in _send_bytes
    self._send(header + buf)
  File "/home/chenjunting/anaconda3/envs/habitat/lib/python3.6/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

I found a related issue in habitat-sim, I tried to reinstall nvidia-driver, add CUDA_VISIBLE_DEVICES, and check all libgl*.so libraries but none of them helps. I also tried to install Neural-SLAM repo on two machines. Both failed with the same error information as posted above.

System info of machine 1:


$cat /proc/version
Linux version 4.15.0-45-generic (buildd@lcy01-amd64-027) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)) #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019

$nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.43       Driver Version: 418.43       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 208...  Off  | 00000000:01:00.0  On |                  N/A |
|  0%   45C    P8    14W / 250W |     26MiB / 10986MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     26651      G   /usr/lib/xorg/Xorg                            24MiB |
+-----------------------------------------------------------------------------+

System info of machine 2:

$cat /proc/version
Linux version 4.4.0-185-generic (buildd@lgw01-amd64-017) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #215-Ubuntu SMP Mon Jun 8 21:53:19 UTC 2020

$nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  TITAN Xp            Off  | 00000000:02:00.0 Off |                  N/A |
| 19%   29C    P0    61W / 250W |      0MiB / 12196MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  TITAN Xp            Off  | 00000000:03:00.0 Off |                  N/A |
| 17%   32C    P0    61W / 250W |      0MiB / 12196MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   2  TITAN Xp            Off  | 00000000:81:00.0 Off |                  N/A |
| 17%   28C    P0    60W / 250W |      0MiB / 12196MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   3  TITAN Xp            Off  | 00000000:82:00.0 Off |                  N/A |
| 17%   28C    P0    56W / 250W |      0MiB / 12196MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Can you give me some hints about this bug?

"EOFError" during training for both Matterport and Gibson datasets

Hi all, I successfully installed NeuralSlam, and I can run the test code. Everything seems to work.
Since I want to train the Network with different datasets, I downloaded Matterport3D and Gibson.
Following your tutorial, with minor changes, I can run the training code with both datasets but at a certain (random) episode i receive the following error message:

File "/home/lince/anaconda3/envs/NeuralSlamChapl/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/lince/anaconda3/envs/NeuralSlamChapl/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/lince/Documenti/MythicalSeg/EnvGibsonSingle/ds_study_neuralslam_chaplot/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 208, in _worker_env
command, data = connection_read_fn()
File "/home/lince/anaconda3/envs/NeuralSlamChapl/lib/python3.7/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/home/lince/anaconda3/envs/NeuralSlamChapl/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/home/lince/anaconda3/envs/NeuralSlamChapl/lib/python3.7/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError

Since it happens with both datasets, I investigated the memory consumption ( my computer has two Nvidia GeForce RTX 2080 TI): the memory used during the training phase was acceptable, even when the error occurred.

I tried different configurations, in particular, the last one i used for Gibson is the following: --exp_name gibson_orig --save_periodic 2500 --slam_memory_size 100000 --exp_name gibson_orig --save_periodic 2500 --slam_memory_size 100000

Do you have any suggestions?

I really appreciate any help you can provide.

ClassNLLCriterion.cu:105: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion `t >= 0 && t < n_classes` failed.

when I used this command python main.py -n1 --auto_gpu_config 0 --split val

I got

2021-06-04 21:17:23,075 initializing task Nav-v0
2021-06-04 21:17:23,083 Computing map for data/scene_datasets/gibson/Cantwell.glb
num:0
Time: 00d 00h 00m 00s, num timesteps 0, FPS 0,
Rewards:
Losses:
Time: 00d 00h 00m 01s, num timesteps 10, FPS 7,
Rewards:
Losses: Local Loss: 0.000,
/opt/conda/conda-bld/pytorch_1565272279342/work/aten/src/THCUNN/ClassNLLCriterion.cu:105: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion t >= 0 && t < n_classes failed.
THCudaCheck FAIL
file=/opt/conda/condabld/pytorch_1565272279342/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu line=110 error=59 : device-side assert triggered
Traceback (most recent call last):
File "main.py", line 797, in
main()
File "main.py", line 372, in main
tmp = loss(action_prob, action_target)
File "/home/ad-yang/miniconda3/envs/Neural-SLAM/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/ad-yang/miniconda3/envs/Neural-SLAM/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 916, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/home/ad-yang/miniconda3/envs/Neural-SLAM/lib/python3.6/site-packages/torch/nn/functional.py", line 1995, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/ad-yang/miniconda3/envs/Neural-SLAM/lib/python3.6/site-packages/torch/nn/functional.py", line 1824, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1565272279342/work/aten/src/THCUNN/generic/ClassNLLCriterion.cu:110

I don't know how to solve this problem.
Hope to get your reply.

AttributeError: module 'env' has no attribute 'habitat'

I installed the environment according to README.md:

conda create -n Neural-SLAM python=3.6;     # for creating a conda environment
conda activate Neural-SLAM;                 # for conda
git clone https://github.com/facebookresearch/habitat-sim.git;
cd habitat-sim; git checkout 9575dcd45fe6f55d2a44043833af08972a7895a9;
pip install -r requirements.txt;
python setup.py install --headless;         # output: Successfully installed magnum-0.0.0
cd ..;                                      # back to the parent directory
git clone https://github.com/facebookresearch/habitat-api.git;
cd habitat-api; git checkout b5f2b00a25627ecb52b43b13ea96b05998d9a121;
pip install -e .;                           # output: Successfully installed PyYAML-5.3.1 chardet-4.0.0 gym-0.10.9 habitat idna-2.10 imageio-2.9.0 imageio-ffmpeg-0.4.2 opencv-python-4.4.0.46 pyglet-1.5.13 requests-2.25.1 scipy-1.5.4 six-1.15.0 urllib3-1.26.2 yacs-0.1.8
cd ..;                                      # back to the parent directory
conda install pytorch==1.2.0 torchvision cudatoolkit=10.0 -c pytorch;
git clone --recurse-submodules https://github.com/devendrachaplot/Neural-SLAM;
cd Neural-SLAM;
pip install -r requirements.txt;            # output: Successfully installed PyWavelets-1.1.1 absl-py-0.11.0 cachetools-4.2.0 cycler-0.10.0 decorator-4.4.2 google-auth-1.24.0 google-auth-oauthlib-0.4.2 grpcio-1.34.0 imageio-2.6.0 importlib-metadata-3.3.0 joblib-1.0.0 kiwisolver-1.3.1 markdown-3.3.3 matplotlib-3.3.3 networkx-2.5 oauthlib-3.1.0 pandas-1.1.5 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2020.5 requests-oauthlib-1.3.0 rsa-4.6 scikit-fmm-2019.1.30 scikit-image-0.15.0 scikit-learn-0.22.2.post1 seaborn-0.9.0 tensorboard-2.4.0 tensorboard-plugin-wit-1.7.0 typing-extensions-3.7.4.3 werkzeug-1.0.1 zipp-3.4.0
python main.py -n1 --auto_gpu_config 0 --split val;

An error then occurred:

Traceback (most recent call last):
  File "main.py", line 15, in <module>
    from env import make_vec_envs
  File "xxx/Neural-SLAM/env/__init__.py", line 3, in <module>
    from .habitat import construct_envs
  File "xxx/Neural-SLAM/env/habitat/__init__.py", line 9, in <module>
    from .exploration_env import Exploration_Env
  File "xxx/Neural-SLAM/env/habitat/exploration_env.py", line 29, in <module>
    import env.habitat.utils.pose as pu
AttributeError: module 'env' has no attribute 'habitat'

Are there any extra commands that I have missed?

Sorry to ask question about `Neural Topological SLAM for Visual Navigation`

Sorry to ask question about your paper Neural Topological SLAM for Visual Navigation here because I didn't find NTSlam's github and didn't get connection with you by email.
Will the code of NTSlam be released later? Does any data or training code of your public projects Object-Goal-Navigation and Neural-SLAM shall I use to implement the Neural Topological SLAM?
Hope to get your reply.

Exploration to PointGoal Transfer

Hi dear @devendrachaplot
Thank you for open-sourcing your work!
I enjoyed reading your paper "Learning To Explore Using Active Neural SLAM".
The experiment setup and usage instructions are concise and easy to follow. I was able to run the code without any issues (except import errors fixed here #1). The environment exploration visualizations generated by pre-trained models look amazing!

I'm struggling with Exploration to PointGoal Transfer.
Basically, I understand the idea that the GlobalPolicy should be fixed to output PointGoal coordinates.
But I fail to implement this idea in code.

  • So the general question is: How to transform episode PointGoal coordinates to "local map" coordinates so that they could be used by the short-term goal planner?
    *I see that GlobalPolicy's output is a point in "local map" coordinates. My intuition is that PointGoal coordinates should be converted to "full map" coordinates and then to "local map" coordinates.

  • Could you, please, also explain the math behind this expression? What does st mean? Why do we add 180 to orientation?

    st = torch.tensor([[

  • And how get_grid function works?

    def get_grid(pose, grid_size, device):

    *I understand that it returns rotation and transition matrix. But, again, what is the math behind? I'm also confused with F.affine_grid function. And the similar transformation here
    st_poses[:, 0] = poses[:, 1] * 200. / self.resolution / grid_size

  • And what is the intuition for applying get_new_pose_batch function?

    def get_new_pose_batch(pose, rel_pose_change):

ModuleNotFoundError: No module named 'habitat_sim._ext'

Overview

When running python main.py -n1 --auto_gpu_config 0 --split val, I will get error if I write ~/.bashrc with export PYTHONPATH=$PYTHONPATH:~/Desktop/habitat-sim/

ModuleNotFoundError: No module named 'habitat_sim._ext'

I will also get error if I write ~/.bashrc with unset PYTHONPATH

ModuleNotFoundError: No module named habitat.sims.habitat_simulato.action_spaces'

My Info

ENVIRONMENT INFO:
Platform: Linux-5.4.0-52-generic-x86_64-with-glibc2.10
Machine: x86_64
Processor: x86_64
Libc version: glibc 2.27
Mac version:
Python version: 3.8.3
Architecture: 64bit ELF
Win version:
System OS: Linux
Release: 5.4.0-52-generic
Version: #57 18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020
Operational System: linux
GCC version: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0\n'
CMAKE version: 3.14.0
NVIDIA-SMI: Mon Oct 26 12:50:01 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1650 Off | 00000000:01:00.0 On | N/A |
| N/A 42C P8 3W / N/A | 433MiB / 3903MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1323 G /usr/lib/xorg/Xorg 18MiB |
| 0 N/A N/A 1413 G /usr/bin/gnome-shell 47MiB |
| 0 N/A N/A 1688 G /usr/lib/xorg/Xorg 148MiB |
| 0 N/A N/A 1827 G /usr/bin/gnome-shell 134MiB |
| 0 N/A N/A 3226 G /usr/lib/firefox/firefox 1MiB |
| 0 N/A N/A 31858 G ...AAAAAAAAA= --shared-files 79MiB |
+-----------------------------------------------------------------------------+

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Thu_Jun_11_22:26:38_PDT_2020
Cuda compilation tools, release 11.0, V11.0.194
Build cuda_11.0_bu.TC445_37.28540450_0

My Steps

1.Git clone

cd ~/Desktop
git clone --branch stable https://github.com/facebookresearch/habitat-sim.git
git clone --branch stable https://github.com/facebookresearch/habitat-lab.git
git clone --recurse-submodules https://github.com/devendrachaplot/Neural-SLAM

sudo chmod 777 -R ~/Desktop/habitat-sim
sudo chmod 777 -R ~/Desktop/habitat-lab
sudo chmod 777 -R ~/Desktop/Neural-SLAM

2.conda install
Instructed by habitat-sim tutorials

cd ~/Desktop/habitat-sim
conda install habitat-sim -c conda-forge -c aihabitat
conda install habitat-sim headless -c conda-forge -c aihabitat
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat

cd ~/Desktop/habitat-lab
conda install habitat-sim -c conda-forge -c aihabitat
conda install habitat-sim headless -c conda-forge -c aihabitat
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat

cd ~/Desktop/Neural-SLAM
conda install habitat-sim -c conda-forge -c aihabitat
conda install habitat-sim headless -c conda-forge -c aihabitat
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat

3.build habitat-sim
Instructed by BuildFromSource:

cd ~/Desktop/habitat-sim
conda create -n habitat python=3.6 cmake=3.14.0

conda activate habitat
pip install -r requirements.txt
sudo apt-get update || true
sudo apt-get install -y --no-install-recommends \
     libjpeg-dev libglm-dev libgl1-mesa-glx libegl1-mesa-dev mesa-utils xorg-dev freeglut3-dev

python setup.py install
python setup.py install --headless
python setup.py install --with-cuda
sudo apt-get install libbullet-dev
python setup.py install --bullet 

All these bulid commands above run successfully.

./build/viewer ./data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
./build/viewer --enable-physics ./data/scene_datasets/habitat-test-scenes/van-gogh-room.glb
python examples/example.py --scene ./data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
python examples/example.py --scene ./data/scene_datasets/habitat-test-scenes/skokloster-castle.glb --enable_physics

All these example files above run successfully.

4.export PATHONPATH
This is the most confusing part. I really have no idea what to do.
Instructed by BuildFromSource:, we should write ~/.bashrc with export PYTHONPATH=$PYTHONPATH:~/Desktop/habitat-sim/ However, after doing that, I even could not succeed run example file of habitat-sim, and will get error:

ModuleNotFoundError: No module named 'habitat_sim._ext'

Then accoriding to erikwijmans commented on Feb 14,

Please do unset PYTHONPATH (or similar) to remove it.

Then I write ~/.bashrc with unset PYTHONPATH. I can succeed to run example files of habitat-sim again.

  1. build habitat-lab
sudo -s
conda activate habitat
cd ~/Desktop/habitat-lab
pip install -e .
pip install -r requirements.txt
python setup.py develop --all

python examples/example.py 
python setup.py test
python examples/benchmark.py

I can successfully bulid and run the example files.

6.build Neural-SLAM

sudo -s 
conda activate habitat
cd ~/Desktop/Neural-SLAM
conda install pytorch==1.2.0 torchvision cudatoolkit=11.0 -c pytorch

I will get error:

(Error: habitat 0.1.6 requires torch>=1.3.1, but you'll have torch 1.2.0 which is incompatible.)

I ignore it and run next commands:pip install -r requirements.txt(I don't whether I need to upgrade the torch version to 1.3.1)

Then, when run command python main.py -n1 --auto_gpu_config 0 --split val, I get error:

ModuleNotFoundError: No module named habitat.sims.habitat_simulato.action_spaces'

It should be noticed that, at that time, I wrote ~/.bashrc with unset PYTHONPATH.
Thus, I try to write ~/.bashrc with export PYTHONPATH=$PYTHONPATH:~/Desktop/habitat-sim/ , then the error will change to:

ModuleNotFoundError: No module named 'habitat_sim._ext'

So what is the correct PYTHONPATH to add in to ~/.bashrc ?
How to fix the error?

Expectation

Successfully run the code.

Training each module individually

Hello. It seems that the method consists of Neural Slam module (NS), global policy module(GP) and local policy module (LP). They are trained simultaneously. Would you mind letting me know if it is possible to train each of them individually?
For example, firstly train the Neural Slam module. Then freeze it and train GP. At last train LP while freezing NS and GP. It seems that training individually is relatively easy to fine tune. What's the advantage of training the three modules simultaneously compared with individually?

Your response would be highly appreciated.

ninja error

git clone https://github.com/facebookresearch/habitat-sim.git
cd habitat-sim; git checkout 9575dcd45fe6f55d2a44043833af08972a7895a9;
pip install -r requirements.txt;
python setup.py install --headless

when i did last one, it shows:

ninja: error: loading 'build.ninja': No such file or directory
Traceback (most recent call last):
File "setup.py", line 361, in
zip_safe=False,
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 195, in run
self.build_extension(ext)
File "setup.py", line 256, in build_extension
shlex.split("cmake --build {}".format(self.build_temp)) + build_args
File "/home/liqunzhao/anaconda3/envs/neuslam/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', 'build', '--config', 'RelWithDebInfo', '--']' returned non-zero exit status 1.

Question on pose estimate

Hi,

Thank you for your great work. It's quite amazing to train a neural SLAM. But I get a question about the Neural SLAM module:

If I understand right, the Pose Estimator is responsible for predicting the relative pose change dx and p'_{t-1} is the predicted estimate of p_t^{ego} from p_{t-1}^{ego}. If that is true, why would it receive p'_{t-1} as its input instead of p_{t-1}^{ego}?

About "Demo videos: PointGoal"

Hello, "Demo videos: Exploration and PointGoal" is displayed on your website. How do I run "Demo videos: PointGoal"? Thanks for the help.

Camera Intrinsics for Matterport Dataset

Hello,

When trying to run the Active Neural SLAM with Direct Depth to Ego Map modification on Matterport Dataset. I found that the ego views transposed with the Robot Pose are not registering correctly with the Occupancy Grid, while that is not a problem with the Gibson Dataset. It appears as if there is some distortion in the camera intrinsics of matterport Dataset since in the Ego Map, there is some distortion in walls (appearing curved). I could not find any details in the Matterport Dataset or on the website. Could you please help?

I tried correcting the FOV, frame height and width, as well as other parameters related to the intrinsics.

Frame width: 640
Frame Height: 480
FOV: 79
Camera Angle: 0 degrees
Camera Height: 0.88 m

xc = (width - 1.) / 2.
zc = (height - 1.) / 2.
f = (width / 2.) / np.tan(np.deg2rad(fov / 2.))

1-1-Vis-29

Regarding Why the greater the noise(0-1), the better the performance

When evaluate the prerformance on large scene of Gibson dataset,I find when I run :

CUDA_VISIBLE_DEVICES=1 nohup python main.py --split val_mt_large --eval 1 \ --auto_gpu_config 0 -n 4 --num_episodes 71 --num_processes_per_gpu 4 \ --load_global pretrained_models/model_best.global --train_global 0 \ --load_local pretrained_models/model_best.local --train_local 0 \ --load_slam pretrained_models/model_best.slam --train_slam 0 -na 0 -no 0 -d random/large/na_no/10/ --exp_name exp1 &
the result
INFO:root:Final Exp Area: 7.39262, 11.80636, 15.54326, 18.67932, 21.43694, 24.30778, 26.60989, 28.66229, 30.52884, 31.91293, 33.23227, 34.40311, 35.57489, 36.52914, 37.40491, 38.11405, 38.83797, 39.46507, 39.93938, 40.40798, 40.79878, 41.14798, 41.52818, 41.94619, 42.22427, 42.41448, 42.58310, 42.80809, 42.97796, 43.14965, 43.28536, 43.45905, 43.63735, 43.75960, 43.83435, 43.87316, 43.91094, 43.96829, 44.00480, 44.09988,
Final Exp Ratio: 0.12119, 0.19422, 0.25642, 0.30809, 0.35348, 0.40149, 0.44013, 0.47382, 0.50535, 0.52876, 0.55067, 0.57085, 0.59045, 0.60642, 0.62087, 0.63281, 0.64491, 0.65493, 0.66285, 0.67065, 0.67727, 0.68301, 0.68929, 0.69624, 0.70096, 0.70419, 0.70707, 0.71077, 0.71370, 0.71644, 0.71862, 0.72155, 0.72463, 0.72675, 0.72795, 0.72859, 0.72925, 0.73024, 0.73083, 0.73222,

when I run :
CUDA_VISIBLE_DEVICES=2 nohup python main.py --split val_mt_large --eval 1 \ --auto_gpu_config 0 -n 4 --num_episodes 71 --num_processes_per_gpu 4 \ --load_global pretrained_models/model_best.global --train_global 0 \ --load_local pretrained_models/model_best.local --train_local 0 \ --load_slam pretrained_models/model_best.slam --train_slam 0 -d random/large/not_na_no/10/ --exp_name exp1 &
the result
INFO:root:Final Exp Area: 7.31249, 11.80577, 15.85805, 19.26320, 22.18673, 24.92665, 27.21441, 29.24679, 31.09027, 32.88026, 34.60589, 35.94048, 37.32295, 38.54152, 39.78651, 40.78866, 41.66500, 42.57974, 43.40369, 44.00271, 44.68042, 45.28838, 45.92671, 46.72835, 47.31259, 47.82757, 48.24503, 48.59364, 49.01058, 49.43538, 49.96648, 50.30362, 50.61988, 50.87675, 51.09861, 51.33011, 51.57324, 51.85214, 52.06178, 52.21830,
Final Exp Ratio: 0.12001, 0.19400, 0.26143, 0.31787, 0.36630, 0.41165, 0.44932, 0.48264, 0.51294, 0.54286, 0.57141, 0.59298, 0.61599, 0.63587, 0.65632, 0.67327, 0.68791, 0.70288, 0.71635, 0.72616, 0.73729, 0.74750, 0.75810, 0.77142, 0.78094, 0.78921, 0.79620, 0.80199, 0.80882, 0.81587, 0.82439, 0.82988, 0.83487, 0.83878, 0.84236, 0.84617, 0.85020, 0.85468, 0.85803, 0.86051,

I have a question, why the greater the noise , the better the performance,Maybe there are some other details I don't notice?

Thanks

Regarding supervision for Mapper in Neural SLAM module and noise models

Hi,
I have the following questions regarding the code and your work.

  1. Can you give me some details about how to generate the ground truth for learning the mapper in the SLAM module?

  2. Firstly, as mentioned in the appendix, the vision range V is set as 64 i.e. 3.2m (each cell being 5cm in length). I understood logic of 64 being (3.2*100)/5, but was 64 or 3.2 picked as a design choice or there is some logic behind it.

  3. https://github.com/devendrachaplot/Neural-SLAM/blob/master/model.py#L196, here the grid_size = vr * 2, is this also a design choice or there is some reasoning behind it specifically being twice of vr.

  4. https://github.com/devendrachaplot/Neural-SLAM/blob/master/model.py#L206, lines 206-208, are 200 and 57. 29 for incorporating the noise models as mentioned in the paper or something else, if it's something else, could you briefly explain what exactly it is referring to, similar question for the get_new_pose_batch function as well https://github.com/devendrachaplot/Neural-SLAM/blob/master/model.py#L262 and this line https://github.com/devendrachaplot/Neural-SLAM/blob/master/model.py#L282.

  5. Lastly, to include the semantic categories as in your further ECCV 2020, and CVPR 2020 habitat challenge works, could you give me some details about how do you convert the depth map to point clouds, additionally if you could help me some details about the geometric computations used to convert the point cloud with the associated semantic labels to a 3-dimensional voxel map, it would be very helpful.

Global Policy pretrained model

Hi,
I faced this problem when I tried to use the pretrained model for the Global Policy.
It seems that the size of the used neural network in the code is not the same as the size of the saved model.
I got the following error:

Loading global pretrained_models/model_best.global
Traceback (most recent call last):
.
.
.
  File "/media/ubuntu/SSD1/archiconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 830, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for RL_Policy:
	size mismatch for network.linear1.weight: copying a param with shape torch.Size([256, 7208]) from checkpoint, the shape in current model is torch.Size([256, 31240]).
Exception ignored in: <bound method VectorEnv.__del__ of <env.habitat.habitat_lab.habitat.core.vector_env.VectorEnv object at 0x7efa26acf8>>

I downloaded the pretrained models uploaded on cs.cmu.edu as follows:

wget -O pretrained_models/model_best.global http://www.cs.cmu.edu/~dchaplot/projects/active_neural_slam/model_best.global

So what is the correct shape of the used Global Policy neural network?
Can anyone help explaining how this might happen?

num_mini_batch =0 when use one GPU to train

Hi, Neural-SLAM's author,

When I train this Network first by using the command "python main.py". An error comes out in lines 137, rollout_storage.py file.
It means num_processes divided by zero. My GPU is TitanXp with 12GB memory. So I modified the code in lines 245, argument.py file, let args.num_mini_batch = arts.num_processes // 1 . Did I do it right?

Another problem is when I training with the modified codes, it seems that memory always increases with time going on.
image
image
Would you mind help me to solve this problem?
Thanks,
Pamzerbhu

Question regarding sim_location preprocessing

Hi,

I have a question regarding the preprocessing method of sim location.

x = -agent_state.position[2]
y = -agent_state.position[0]

As I know the agent_state.position is ordered as (x,y,z) instead of (z, y, x). I wonder the reason for swapping x and y, and using their negative value? i.e. why it's not something like:
x = agent_state.position[0]
y = agent_state.position[2]

Thank you so much!

Broken pipe caused by ZeroDivisionError

Hi, I ran into a ZeroDivisionError which causes Broken pipe. The command I ran was python main.py -n1 --auto_gpu_config 0 --split val
At first, the code was all good, and I could see the training process with losses and stuff. But after some time, it broke down and the error log is as follows (the time log is kind of messy because I combined two runs together for a full log history):

Dumping at ./tmp//models/exp1/
Namespace(alpha=0.99, auto_gpu_config=0, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location='./tmp/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=0, exp_loss_coeff=1.0, exp_name='exp1', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='0', load_local='0', load_slam='0', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=1000000, num_global_steps=40, num_local_steps=25, num_mini_batch=0, num_processes=1, num_processes_on_first_gpu=0, num_processes_per_gpu=11, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=0, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=500000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val', task_config='tasks/pointnav_gibson.yaml', tau=0.95, total_num_scenes='auto', train_global=1, train_local=1, train_slam=1, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=0)
Loading data/scene_datasets/gibson/Cantwell.glb
2021-03-24 01:48:47,936 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0324 01:48:47.955277 25783 WindowlessContext.cpp:98] [EGL] Detected 6 EGL devices
I0324 01:48:47.955494 25783 WindowlessContext.cpp:119] [EGL] Selected EGL device 1 for CUDA device 0
I0324 01:48:47.958079 25783 WindowlessContext.cpp:133] [EGL] Version: 1.5
I0324 01:48:47.958138 25783 WindowlessContext.cpp:134] [EGL] Vendor: NVIDIA
Renderer: TITAN V/PCIe/SSE2 by NVIDIA Corporation
OpenGL version: 4.6.0 NVIDIA 455.45.01
Using optional features:
    GL_ARB_ES2_compatibility
    GL_ARB_direct_state_access
    GL_ARB_get_texture_sub_image
    GL_ARB_invalidate_subdata
    GL_ARB_multi_bind
    GL_ARB_robustness
    GL_ARB_separate_shader_objects
    GL_ARB_texture_filter_anisotropic
    GL_ARB_texture_storage
    GL_ARB_texture_storage_multisample
    GL_ARB_vertex_array_object
    GL_KHR_debug
Using driver workarounds:
    nv-egl-incorrect-gl11-function-pointers
    no-layout-qualifiers-on-old-glsl
    nv-zero-context-profile-mask
    nv-implementation-color-read-format-dsa-broken
    nv-cubemap-inconsistent-compressed-image-size
    nv-cubemap-broken-full-compressed-image-query
    nv-compressed-block-size-in-bits
I0324 01:48:53.312220 25783 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Cantwell.navmesh
2021-03-24 01:48:53,313 initializing task Nav-v0
2021-03-24 01:48:53,324 Computing map for data/scene_datasets/gibson/Cantwell.glb
Time: 00d 00h 00m 00s, num timesteps 0, FPS 0,
        Rewards:
        Losses:
Time: 00d 00h 00m 01s, num timesteps 10, FPS 8,
        Rewards:
        Losses: Local Loss: 5.300,
Time: 00d 00h 00m 05s, num timesteps 20, FPS 3,
        Rewards:
        Losses: Local Loss: 5.339,
Time: 00d 00h 00m 13s, num timesteps 30, FPS 2,
        Rewards:
        Losses: Local Loss: 5.373,
Time: 00d 00h 00m 20s, num timesteps 40, FPS 1,
        Rewards:
        Losses: Local Loss: 5.161,
Time: 00d 00h 00m 27s, num timesteps 50, FPS 1,
        Rewards:
        Losses: Local Loss: 5.256,
Time: 00d 00h 00m 34s, num timesteps 60, FPS 1,
        Rewards:
        Losses: Local Loss: 5.418,
Time: 00d 00h 00m 41s, num timesteps 70, FPS 1,
        Rewards:
        Losses: Local Loss: 5.383,
Time: 00d 00h 00m 55s, num timesteps 80, FPS 1,
        Rewards:
        Losses: Local Loss: 5.250, SLAM Loss proj/exp/pose:0.2753/0.4042/1.0404
Time: 00d 00h 01m 10s, num timesteps 90, FPS 1,
        Rewards:
        Losses: Local Loss: 5.295, SLAM Loss proj/exp/pose:0.1872/0.2451/0.5508
Time: 00d 00h 01m 25s, num timesteps 100, FPS 1,
        Rewards:
        Losses: Local Loss: 5.321, SLAM Loss proj/exp/pose:0.1511/0.1848/0.3863

...

I0324 01:18:32.724668 23107 WindowlessContext.cpp:98] [EGL] Detected 6 EGL devices
I0324 01:18:32.724862 23107 WindowlessContext.cpp:119] [EGL] Selected EGL device 0 for CUDA device 1
I0324 01:18:32.727066 23107 WindowlessContext.cpp:133] [EGL] Version: 1.5
I0324 01:18:32.727088 23107 WindowlessContext.cpp:134] [EGL] Vendor: NVIDIA
I0324 01:18:37.851421 23107 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Cantwell.navmesh
2021-03-24 01:18:37,854 initializing task Nav-v0
2021-03-24 01:18:37,876 Computing map for data/scene_datasets/gibson/Cantwell.glb
2021-03-24 01:41:46,300 Computing map for data/scene_datasets/gibson/Cantwell.glb
Traceback (most recent call last):
  File "main.py", line 769, in <module>
    main()
  File "main.py", line 617, in main
    g_agent.update(g_rollouts)
  File "/home/xxx/Neural-SLAM/algo/ppo.py", line 58, in update
    for sample in data_generator:
  File "/home/xxx/Neural-SLAM/utils/storage.py", line 95, in feed_forward_generator
    mini_batch_size = batch_size // num_mini_batch
ZeroDivisionError: integer division or modulo by zero
Exception ignored in: <function VectorEnv.__del__ at 0x7fc52a9e2ef0>
Traceback (most recent call last):
  File "/home/xxx/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 487, in __del__
    self.close()
  File "/home/xxx/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 351, in close
    write_fn((CLOSE_COMMAND, None))
  File "/home/xxx/anaconda3/envs/comp765/lib/python3.7/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/home/xxx/anaconda3/envs/comp765/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
    self._send(header + buf)
  File "/home/xxx/anaconda3/envs/comp765/lib/python3.7/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

Could anyone please tell me what to do with this?

Unable to download scene_datasets

Hello, I am trying to download the demo data following the instructions but I seem unable to download the "Scene datasets" from https://github.com/facebookresearch/habitat-lab#Gibson . The "Task datasets" download link is working fine.
Is the download link for Scene datasets broken? Can you provide an alternative way to download it? Thanks

EDIT: seems like I had to sign an agreement to download the dataset. Closing this issue

ModuleNotFoundError: No module named 'magnum.scenegraph'

I'm trying to implement Active Neural SLAM by following the Github post. But has the following error. Please help me if any solution.....

I'm using ubuntu 18.04, python 3.6.9
Got this error when checking the dependencies ----- sudo python3 main.py -n1 --auto_gpu_config 0 --split val

Traceback (most recent call last):
File "main.py", line 15, in
from env import make_vec_envs
File "/home/msdl/Neural-SLAM/env/init.py", line 3, in
from .habitat import construct_envs
File "/home/msdl/Neural-SLAM/env/habitat/init.py", line 9, in
from .exploration_env import Exploration_Env
File "/home/msdl/Neural-SLAM/env/habitat/exploration_env.py", line 28, in
from env.habitat.utils.noisy_actions import CustomActionSpaceConfiguration
File "/home/msdl/Neural-SLAM/env/habitat/utils/noisy_actions.py", line 5, in
import habitat_sim
File "/usr/local/lib/python3.6/dist-packages/habitat_sim-0.1.2-py3.6-linux-x86_64.egg/habitat_sim/init.py", line 12, in
from .nav import *
File "/usr/local/lib/python3.6/dist-packages/habitat_sim-0.1.2-py3.6-linux-x86_64.egg/habitat_sim/nav/init.py", line 1, in
from .greedy_geodesic_follower import GreedyGeodesicFollower
File "/usr/local/lib/python3.6/dist-packages/habitat_sim-0.1.2-py3.6-linux-x86_64.egg/habitat_sim/nav/greedy_geodesic_follower.py", line 6, in
import habitat_sim.agent
File "/usr/local/lib/python3.6/dist-packages/habitat_sim-0.1.2-py3.6-linux-x86_64.egg/habitat_sim/agent/init.py", line 7, in
from .agent import *
File "/usr/local/lib/python3.6/dist-packages/habitat_sim-0.1.2-py3.6-linux-x86_64.egg/habitat_sim/agent/agent.py", line 11, in
import magnum.scenegraph
ModuleNotFoundError: No module named 'magnum.scenegraph'

Frontier-based exploration

Hi, @devendrachaplot . Thanks for sharing this great work. From the paper, I know that Frontier-based exploration was also implemented. I'm sorry that I did not find this part in the provided code. It would be of great help if I could be provided with the code of Frontier-based exploration.

Moncular visual SLAM

Is this monocular visual slam based on rgb data? How do I prepare a custom dataset?

EOFError when evaluating

Hi, I was running an evaluation with the pre-trained models, and encountered an EOFError after the code started to run normally for some time.

This is my script for evaluation:
python main.py --split val_mt_small --eval 1 --auto_gpu_config 0 --num_processes 10 --num_episodes 71 --num_processes_per_gpu 5 --train_global 0 --train_local 0 --train_slam 0 --load_global pretrained_models/model_best.global --load_local pretrained_models/model_best.local --load_slam pretrained_models/model_best.slam --print_images 1 -d results/ --exp_name exp_pre -v 1 > log0421.txt 2>&1

Here is my log in the terminal (redundant iterations in the middle are ignored). (Another question aside, why there is no reward in the first several minutes? ) :


Dumping at results//models/exp_pre/
Namespace(alpha=0.99, auto_gpu_config=0, camera_height=1.25, clip_param=0.2, collision_threshold=0.2, cuda=True, du_scale=2, dump_location='results/', entropy_coef=0.001, env_frame_height=256, env_frame_width=256, eps=1e-05, eval=1, exp_loss_coeff=1.0, exp_name='exp_pre', frame_height=128, frame_width=128, gamma=0.99, global_downscaling=2, global_hidden_size=256, global_lr=2.5e-05, goals_size=2, hfov=90.0, load_global='pretrained_models/model_best.global', load_local='pretrained_models/model_best.local', load_slam='pretrained_models/model_best.slam', local_hidden_size=512, local_optimizer='adam,lr=0.0001', local_policy_update_freq=5, log_interval=10, map_pred_threshold=0.5, map_resolution=5, map_size_cm=2400, max_episode_length=1000, max_grad_norm=0.5, no_cuda=False, noise_level=1.0, noisy_actions=1, noisy_odometry=1, num_episodes=71, num_global_steps=40, num_local_steps=25, num_mini_batch=5, num_processes=10, num_processes_on_first_gpu=0, num_processes_per_gpu=5, obs_threshold=1, obstacle_boundary=5, pose_loss_coeff=10000.0, ppo_epoch=4, pretrained_resnet=1, print_images=1, proj_loss_coeff=1.0, randomize_env_every=1000, save_interval=1, save_periodic=100000, save_trajectory_data='0', seed=1, short_goal_dist=1, sim_gpu_id=0, slam_batch_size=72, slam_iterations=10, slam_memory_size=500000, slam_optimizer='adam,lr=0.0001', split='val_mt_small', task_config='tasks/pointnav_gibson.yaml', tau=0.95, total_num_scenes='auto', train_global=0, train_local=0, train_slam=0, use_deterministic_local=0, use_gae=False, use_pose_estimation=2, use_recurrent_global=0, use_recurrent_local=1, value_loss_coef=0.5, vis_type=1, vision_range=64, visualize=1)
...
I0423 05:09:22.963959 2397 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Elmira.navmesh
2021-04-23 05:09:22,965 initializing task Nav-v0
I0423 05:09:23.003241 2404 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Pablo.navmesh
2021-04-23 05:09:23,004 initializing task Nav-v0
I0423 05:09:23.131814 2403 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Greigsville.navmesh
2021-04-23 05:09:23,132 initializing task Nav-v0
I0423 05:09:23.141511 2392 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Edgemere.navmesh
2021-04-23 05:09:23,142 initializing task Nav-v0
I0423 05:09:23.175663 2402 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Eudora.navmesh
2021-04-23 05:09:23,176 initializing task Nav-v0
I0423 05:09:26.240513 2407 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Sisters.navmesh
2021-04-23 05:09:26,241 initializing task Nav-v0
I0423 05:09:26.261519 2391 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Denmark.navmesh
2021-04-23 05:09:26,263 initializing task Nav-v0
I0423 05:09:26.421341 2405 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Ribera.navmesh
2021-04-23 05:09:26,422 initializing task Nav-v0
I0423 05:09:26.574383 2406 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Sands.navmesh
2021-04-23 05:09:26,575 initializing task Nav-v0
I0423 05:09:28.335183 2408 simulator.py:80] Loaded navmesh data/scene_datasets/gibson/Swormville.navmesh
2021-04-23 05:09:28,336 initializing task Nav-v0
2021-04-23 05:09:28,364 Computing map for data/scene_datasets/gibson/Denmark.glb
2021-04-23 05:09:28,367 Computing map for data/scene_datasets/gibson/Edgemere.glb
2021-04-23 05:09:28,367 Computing map for data/scene_datasets/gibson/Elmira.glb
2021-04-23 05:09:28,368 Computing map for data/scene_datasets/gibson/Eudora.glb
2021-04-23 05:09:28,369 Computing map for data/scene_datasets/gibson/Greigsville.glb
2021-04-23 05:09:28,373 Computing map for data/scene_datasets/gibson/Ribera.glb
2021-04-23 05:09:28,372 Computing map for data/scene_datasets/gibson/Sisters.glb
2021-04-23 05:09:28,374 Computing map for data/scene_datasets/gibson/Swormville.glb
2021-04-23 05:09:28,377 Computing map for data/scene_datasets/gibson/Pablo.glb
2021-04-23 05:09:28,377 Computing map for data/scene_datasets/gibson/Sands.glb
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Helvetica'] not found. Falling back to DejaVu Sans.
2021-04-23 05:19:31,135 Computing map for data/scene_datasets/gibson/Eudora.glb
2021-04-23 05:19:31,145 Computing map for data/scene_datasets/gibson/Edgemere.glb
2021-04-23 05:19:31,159 Computing map for data/scene_datasets/gibson/Sands.glb
2021-04-23 05:19:31,159 Computing map for data/scene_datasets/gibson/Ribera.glb
2021-04-23 05:19:31,159 Computing map for data/scene_datasets/gibson/Pablo.glb
2021-04-23 05:19:31,161 Computing map for data/scene_datasets/gibson/Greigsville.glb
2021-04-23 05:19:31,161 Computing map for data/scene_datasets/gibson/Elmira.glb
2021-04-23 05:19:31,166 Computing map for data/scene_datasets/gibson/Denmark.glb
2021-04-23 05:19:31,170 Computing map for data/scene_datasets/gibson/Sisters.glb
2021-04-23 05:19:31,173 Computing map for data/scene_datasets/gibson/Swormville.glb
Loading slam pretrained_models/model_best.slam
Loading global pretrained_models/model_best.global
Loading local pretrained_models/model_best.local
Time: 00d 00h 00m 00s, num timesteps 0, FPS 0,
	Rewards:
	Losses:
Time: 00d 00h 00m 06s, num timesteps 100, FPS 15,
	Rewards:
	Losses:
Time: 00d 00h 00m 12s, num timesteps 200, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 00m 17s, num timesteps 300, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 00m 23s, num timesteps 400, FPS 17,
	Rewards:
	Losses:
Time: 00d 00h 00m 29s, num timesteps 500, FPS 17,
	Rewards:
	Losses:
Time: 00d 00h 00m 35s, num timesteps 600, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 00m 41s, num timesteps 700, FPS 17,
	Rewards:
	Losses:
Time: 00d 00h 00m 46s, num timesteps 800, FPS 17,
	Rewards:
	Losses:
...
Time: 00d 00h 09m 12s, num timesteps 9300, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 18s, num timesteps 9400, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 24s, num timesteps 9500, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 30s, num timesteps 9600, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 36s, num timesteps 9700, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 42s, num timesteps 9800, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 09m 48s, num timesteps 9900, FPS 16,
	Rewards:
	Losses:
Time: 00d 00h 10m 00s, num timesteps 10000, FPS 16,
	Rewards: Global step mean/med rew: 0.6008/0.0242,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 06s, num timesteps 10100, FPS 16,
	Rewards: Global step mean/med rew: 0.6008/0.0242,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 12s, num timesteps 10200, FPS 16,
	Rewards: Global step mean/med rew: 0.6008/0.0242,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 17s, num timesteps 10300, FPS 16,
	Rewards: Global step mean/med rew: 0.7254/0.0267,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 23s, num timesteps 10400, FPS 16,
	Rewards: Global step mean/med rew: 0.7254/0.0267,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 29s, num timesteps 10500, FPS 16,
	Rewards: Global step mean/med rew: 0.8288/0.0292,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 35s, num timesteps 10600, FPS 16,
	Rewards: Global step mean/med rew: 0.8288/0.0292,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 41s, num timesteps 10700, FPS 16,
	Rewards: Global step mean/med rew: 0.8288/0.0292,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 46s, num timesteps 10800, FPS 16,
	Rewards: Global step mean/med rew: 0.8729/0.0318,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:
Time: 00d 00h 10m 52s, num timesteps 10900, FPS 16,
	Rewards: Global step mean/med rew: 0.8729/0.0318,  Global eps mean/med/min/max eps rew: 24.032/22.616/16.667/33.158,
	Losses:

...


Time: 00d 00h 23m 39s, num timesteps 23800, FPS 16,
	Rewards: Global step mean/med rew: 0.7613/0.0318,  Global eps mean/med/min/max eps rew: 24.121/22.616/16.280/35.575,
	Losses:
Time: 00d 00h 23m 45s, num timesteps 23900, FPS 16,
	Rewards: Global step mean/med rew: 0.7613/0.0318,  Global eps mean/med/min/max eps rew: 24.121/22.616/16.280/35.575,
	Losses:
Time: 00d 00h 23m 51s, num timesteps 24000, FPS 16,
	Rewards: Global step mean/med rew: 0.7543/0.0401,  Global eps mean/med/min/max eps rew: 24.121/22.616/16.280/35.575,
	Losses:
Traceback (most recent call last):
  File "main.py", line 769, in <module>
    main()
  File "main.py", line 534, in main
    output = envs.get_short_term_goal(planner_inputs)
  File "/home/xxx/Neural-SLAM/env/__init__.py", line 50, in get_short_term_goal
    stg = self.venv.get_short_term_goal(inputs)
  File "/home/xxx/Neural-SLAM/env/habitat/habitat_api/habitat/core/vector_env.py", line 475, in get_short_term_goal
    results.append(read_fn())
  File "/home/xxx/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/home/xxx/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/home/xxx/anaconda3/envs/ns/lib/python3.7/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError

Following The tests mentioned in issue#29 I have tested the installation of habitat-api by python examples/benchmark.py and habitat-sim by python examples/example.py as specified in their corresponding docs. No error occurred in these steps.

Any help and advice would be appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.