StanfordVL / GibsonEnv

Gibson Environments: Real-World Perception for Embodied Agents
http://gibsonenv.stanford.edu/
MIT License
840 stars 146 forks source link

code hangs when running in headless mode #100

Open mathildecaron31 opened 4 years ago

mathildecaron31 commented 4 years ago

Hi, I'm trying to run examples/demo/play_husky_camera.py with headless mode. I don't have X server running on my machine. I specify in the configuration file:

display_ui: false
mode: headless

The code hangs here: https://github.com/StanfordVL/GibsonEnv/blob/adfee958f23b031cb58525866f90f1b85d984841/gibson/core/render/pcrender.py#L350 I get the following output before it hangs:

pybullet build time: Feb  2 2019 03:31:45
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
./depth_render: error while loading shared libraries: libGLEW.so.1.13: cannot open shared object file: No such file or directory
Processing the data:
Total 1 scenes 0 train 1 test
Indexing
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 52.92it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 59/59 [00:03<00:00, 18.89it/s]
mount/gibson/gibson/core/render/pcrender.py:204: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
  self.imgv = Variable(torch.zeros(1, 3 , self.showsz, self.showsz), volatile = True).cuda()
mount/gibson/gibson/core/render/pcrender.py:205: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
  self.maskv = Variable(torch.zeros(1,2, self.showsz, self.showsz), volatile = True).cuda()
.conda/envs/vizcortex/lib/python3.6/site-packages/skimage/transform/_warps.py:105: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
  warn("The default mode, 'constant', will be changed to 'reflect' in "
.conda/envs/vizcortex/lib/python3.6/site-packages/skimage/transform/_warps.py:110: UserWarning: Anti-aliasing will be enabled by default in skimage 0.15 to avoid aliasing artifacts when down-sampling images.
  warn("Anti-aliasing will be enabled by default in skimage 0.15 to "
Creating map layer for mesh file mount/gibson/gibson/assets/dataset/Beechwood/mesh_z_up.obj...
Done.
Episode: steps:0 score:0
[0, 0, 0],
Episode count: 0

It might be related to the following issues: #44 #43 Thank you so much in advance for your help

Berk035 commented 4 years ago

Hi mathildecaron31,

In my opinion, headless mode and ui:false are not suitable choices for "play_husky_camera.py" You can use this configuration in train mode.

Have a nice day.