habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

Python viewer runs perfectly, but other scripts end with Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total WindowlessContext: Unable to create windowless context

Open emilia-szymanska opened this issue 1 year ago • 7 comments
trafficstars

At this point I truly do not know what I am doing wrong. I do not have a GPU, but a python example viewer runs perfectly. However, if I try to do anything in another script, it fails with Platform::WindowlessEglApplication::tryCreateContext(): unable to find CUDA device 0 among 2 EGL devices in total WindowlessContext: Unable to create windowless context. I truly do not understand how a fancier script can run without problems, and the following piece breaks:

from typing import Any, Dict
import habitat_sim
from habitat_sim.utils.settings import default_sim_settings, make_cfg

sim_settings: Dict[str, Any] = default_sim_settings
sim_settings["scene"] = "./data/test_assets/scenes/simple_room.glb"
sim_settings["scene_dataset_config_file"] = "default"
sim_settings["enable_physics"] = False
sim_settings["num_environments"] = 1
sim_settings["window_width"] = 800
sim_settings["window_height"] = 600
sim_settings["default_agent_navmesh"] = False
sim_settings["color_sensor"] = True
sim_settings["depth_sensor"] = True
sim_settings["semantic_sensor"] = True

cfg = make_cfg(sim_settings)
sim = habitat_sim.Simulator(cfg)

Please help :(

Specs:

  • Python: 3.9
  • how I installed habitat: conda install habitat-sim withbullet -c conda-forge -c aihabitat
  • system: Ubuntu 22.04

emilia-szymanska avatar Jun 07 '24 14:06 emilia-szymanska