I have run into a problem that when I start an empty world with Gazebo (I have tested this with Citadel, Fortress and Harmonic) inside a docker container my CPU usage shoots up to 70%. When I start Gazebo on my computer without a container the CPU usage is much smaller, about 10%. This is when the GUI is turned on.

enter image description here

I have an NVIDIA GeForce RTX 3050 graphics card, and I think I set the system up so the container can use it. Both the nvidia-smi and the glxgears commands give the expected outputs. When I look at the GPU usage after starting Gazebo I see that it goes up to about the same level both when I start Gazebo on my computer and inside the container. Unfortunately I cannot see the processes running inside the container with the nvidia-smi command, but based on the usage I assume that Gazebo does use my GPU.

Has anyone encountered this problem before? Did you find what causes this, is it possible that my GPU setup is still missing something?

Thanks in advance!


1 Answer 1


I have found the solution, the problem was indeed with the GPU. I had the --env="NVIDIA_DRIVER_CAPABILITIES=all" option missing when I launched the container. I was able to find it thanks to this answer.

Now I launch the container using all the following options, Gazebo does use my GPU and my CPU usage goes down to around 10%.

--gpus all 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.