facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.45k stars 404 forks source link

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 #2405

Open emilia-szymanska opened 1 month ago

emilia-szymanska commented 1 month ago

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:

0mdc commented 4 weeks ago

That's pretty strange. Your script works on my end.

I do not have a GPU, but a python example viewer runs perfectly.

Which example viewer did you run?

emilia-szymanska commented 3 weeks ago

@0mdc I ran examples/viewer.py with exactly this command: python examples/viewer.py --scene path/to/.ply.

emilia-szymanska commented 2 weeks ago

@0mdc why would you close this issue? It is very far from being solved.

0mdc commented 2 weeks ago

My mistake, I closed the wrong one :)