Robotics StackExchange | Archived questions

How to run gazebo with a specific graphic card or no graphic card?

Hey , I am trying to run a tensorflow image classifier along with a Gazebo simulation .

I have a Nvidia GT730 with 2GB graphics .

The problem i am facing is , when i start up gazebo , it eats up most of the GPU memory , this makes my tensorflow node as non run-able .

Is there some parameter i can give with gzclient , so that gazebo runs solely on the CPU or integrated GPU .

Asked by chrissunny94 on 2018-11-22 05:12:36 UTC

Comments

This may sound simple, but had you tried starting your image classifier node first and pausing for a few seconds for it to start up, then starting gazebo.

Asked by PeteBlackerThe3rd on 2018-11-22 07:25:35 UTC

That could be one solution .

Asked by chrissunny94 on 2018-11-26 06:12:39 UTC

https://gist.github.com/alexlee-gk/76a409f62a53883971a18a11af93241b

Another solution i found is this one .

Asked by chrissunny94 on 2018-11-26 06:12:53 UTC

Not sure, if it is an option for you, but running simulation headless should free some resources on your GPU.

Asked by m.bahno on 2021-03-03 08:53:09 UTC

Answers

You can try using a virtual framebuffer like xvfb to run gazebo on the CPU. Once you install xvfb, run xvfb-run -s "-screen 0 1400x900x24" bash. Launching gazebo from that bash shell will run rendering on the CPU. To check if your world is properly loaded, you can run gzclient from another shell (which will use the GPU).

Asked by azeey on 2018-11-27 18:44:46 UTC

Comments

I have Gazebo 11.9.1. Using xvfb did not show any gzclient window, but also no errors. My hunch is that my screen id could be wrong.

Asked by leuko on 2022-02-08 16:29:17 UTC