NVlabs / FoundationPose

[CVPR 2024 Highlight] FoundationPose: Unified 6D Pose Estimation and Tracking of Novel Objects
https://nvlabs.github.io/FoundationPose/
Other
1.01k stars 112 forks source link

error when setup through conda. "qt.qpa.xcb: could not connect to display" #36

Closed aiihn closed 1 month ago

aiihn commented 1 month ago

error info when python run_demo.py:

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/dev/shm/user1/user2_data/conda_envs/foundationpose/lib/python3.9/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.
abhishekmonogram commented 1 month ago

@aiihn Are you using a virtual environment or docker container? If you are using the virtual environment, could you try using docker container?

You can track issue #31

aiihn commented 1 month ago

I am following https://github.com/NVlabs/FoundationPose?tab=readme-ov-file#env-setup-option-2-conda-experimental thanks for @abhishekmonogram 's quick reply! I just solved it by: With Xorg started, export DISPLAY=:0 and then python run_demo.py again.

Nikhil-Shenoy commented 1 month ago

Hi, I'm having this issue as well. I'm remotely logged into an Ubuntu machine, and I have everything else set up correctly. I tried setting the DISPLAY environment variable like @aiihn suggested, but I'm still getting the error. I'm running this through Docker.

aThinkingNeal commented 1 month ago

@Nikhil-Shenoy I run the command xhost + on the local machine (outside the docker) to enable the docker to access the X server, then the problem is solved