Giter VIP home page Giter VIP logo

Comments (4)

ChengshuLi avatar ChengshuLi commented on August 19, 2024 1

This might be because you are running on a cluster machine without a display (monitor) connected to it.

You can either set headless=True in the line below or run the code on a machine that has a display.

def main(selection="user", headless=False, short_exec=False):

from igibson.

hellkonig avatar hellkonig commented on August 19, 2024

Hi Chengshu, thank you very much for your suggestion. I tried setting headless=True in the line as you suggested, and it worked perfectly fine when running the code in headless mode.

However, I also tried to run the code on my laptop without headless mode and faced another error in the following:

INFO:igibson.render.mesh_renderer.get_available_devices:Device 0 is available for rendering
INFO:igibson.render.mesh_renderer.get_available_devices:Command '['/home/wan325/miniconda3/envs/igibson/lib/python3.8/site-packages/igibson/render/mesh_renderer/build/test_device', '1']' returned non-zero exit status 1.
INFO:igibson.render.mesh_renderer.get_available_devices:Device 1 is not available for rendering
INFO:igibson.render.mesh_renderer.get_available_devices:Device 2 is available for rendering
ERROR: Failed to EGL with glad.

That is why I unset the $DISPLAY variable. Could you please advise me on how to solve this issue if I want to run the code not in headless mode?

Thank you for your time and support.

from igibson.

linkct avatar linkct commented on August 19, 2024

Same here. I ran the docker command docker run --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --env="QT_X11_NO_MITSHM=1" --gpus all -ti --rm igibson/igibson on a local Ubuntu 20.04 workstation, but running python -m igibson.examples.environments.env_nonint_example inside the container gave me the following error:

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/miniconda/envs/igibson/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

I can confirm that the DISPLAY environment variable is indeed set to :0, which seems to be the source of the problem, but running GUI applications outside the container is completely normal (e.g. glxgears), so I'm not sure how to fix this.
Thanks for any help!

from igibson.

unnikrishnanrnair avatar unnikrishnanrnair commented on August 19, 2024

(for running on a local machine with a monitor attached)
running this on the host machine
xhost +local:docker
before starting the docker container and running the example script worked for me.
@linkct

from igibson.

Related Issues (20)

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.