muskie82 / MonoGS

[CVPR'24 Highlight & Best Demo Award] Gaussian Splatting SLAM
https://rmurai.co.uk/projects/GaussianSplattingSLAM/
Other
1.2k stars 103 forks source link

ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running #38

Open kk6398 opened 5 months ago

kk6398 commented 5 months ago

A error occurs when “ python slam.py --config configs/mono/tum/fr3_office.yaml”

1711281066057

kk6398 commented 5 months ago

I use SSH to remotely connect to the Linux terminal. The vscode shell I use does not have a graphical interface. Is this the reason?

kk6398 commented 5 months ago

Yep, I try run "python slam.py --config configs/mono/tum/fr3_office.yaml" on the unbuntu graphical interface, and the error "Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running" doesnot appear.

However, anthor question occurs: ①there is no gui window pop out, and ②"cuda out of memory" when processing"Evaluating ATE at frame: 2230". (I run the code on 4090 24G)

What is the reason and how I deal with it?

muskie82 commented 5 months ago

Hi,

Never seen this before, but I guess the GUI is dead for some reason and the q_main2vis is not cleaned up, which leads to out of memory. Do you see any suspicious error message related to GUI?

kk6398 commented 5 months ago

okay, I display the code log as follows: python slam.py --config configs/mono/tum/fr1_desk.yaml image image

muskie82 commented 5 months ago

I think x error of failed request is the one related. Your environment seems to have some issue with OpenGL, which prevents GUI launch.

Can you try to fix the error message? As a quick search, this might be relevant. https://askubuntu.com/questions/1369900/x-error-of-failed-request-glxbadfbconfig

kk6398 commented 5 months ago

Thank for your reply. I tried entering "export MESA_GL_VERSION_OVERRIDE=4.3" or export "MESA_GL_VERSION_OVERRIDE=4.5" as the ISSUE#5, but the window MonoGS only flashed for one second and suddenly exiting, then reporting an error as follow. I hope you can answer. The version of pyopengl is 3.1.7 cry~ ~
image

kk6398 commented 5 months ago

Thank for your reply. I tried entering "export MESA_GL_VERSION_OVERRIDE=4.3" or export "MESA_GL_VERSION_OVERRIDE=4.5" as the ISSUE#5, but the window MonoGS only flashed for one second and suddenly exiting, then reporting an error as follow. I hope you can answer. The version of pyopengl is 3.1.7 cry~ ~ image

I may not have fully stated the environment: ubuntu 18.04 GPU: 4090 cuda11.6 pytorch1.12.1 pyopengl 3.1.7

muskie82 commented 5 months ago

I don't have an immediate answer unfortunately. The error message x error of failed request has many reports online, so I recommend searching the web for similar cases and trying out the suggested solutions.

For a temporary solution, you could comment out all the code related to gl_render in slam_gui.py. gl_render is used just for the Ellipsoid shader, so the rest of the GUI should function without it.

kk6398 commented 5 months ago

Hi, I try lots of methods, and successfully run the MonoGS GUI window through [https://github.com/isl-org/Open3D/issues/4429], but some errors occur: there is no picture appears in the left frame. Moreover, there is no response when l click any button on the right. image

muskie82 commented 4 months ago

Any error message?

Also, I recommend you to try some of the Open3D GUI examples, for example this. If the same problem happens, then probably some similar issues/solutions are reported on Open3D repo.

yaochengrong commented 4 months ago

same issue here

kk6398 commented 4 months ago

same issue here

I have not solved it yet. Do you have any good methods?

peterWon commented 4 months ago

@kk6398 I met this error. I solved this problem by 'evo_config set plot_backend agg'

kk6398 commented 4 months ago

@kk6398 I met this error. I solved this problem by 'evo_config set plot_backend agg'

Can you explain the operation steps in detail please?

whwh747 commented 4 months ago

i meet the same error in vscode , and the i run this code in mobaxterm , it is normal @kk6398

kk6398 commented 4 months ago

i meet the same error in vscode , and the i run this code in mobaxterm , it is normal @kk6398

Thank for your reply. I have run this code in mobaxterm. However, the real-time performance of SLAM displayed in the pop-up window is poor, and it does not perform tracking and mapping as quickly as the video provided by the author.

whwh747 commented 4 months ago

i agree , but i did not find the reason, and my code seems to get stuck after running 00ab49f29cbcf9956de56fd1ff3bda3 @kk6398

whwh747 commented 4 months ago

As an additional note, I find it puzzling that when I run the code, the GPU utilization peaks at 50%, while the CPU utilization is consistently above 98%. I'm running the code on an A6000 with 48GB. @kk6398 8604bf76b82e6a05e47327c566c32d7

rmurai0610 commented 4 months ago

To solve

Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running

As @peterWon mentions, if you run the command in the terminal, evo_config set plot_backend agg agg will be set for the backend for the evo. (evo has a global config file, and it's probably set to TkAgg for some reason)

@kk6398 @whwh747, which sequences are you running? @whwh747 I cannot replicate the 100% CPU utilisation. What CPU are you using?

whwh747 commented 4 months ago

rgbd model fr3 long office , and you can clearly see the CPU usage and which processes are using the CPU in nvitop. @rmurai0610

885d49fdb219aa01f47457390b924ee