Gazebo | Ignition | Community
Ask Your Question

How to run Gazebo 1.9 headless

asked 2013-08-21 08:39:45 -0500

Nevik gravatar image

updated 2013-08-21 08:55:07 -0500

For a series of unattended simulations, we'd like to utilize a bunch of VMs on a server. For this, we'd like to run a Gazebo simulation server in headless mode (since a] the server has no graphics card and b] Gazebo does not like VirtualBox's OpenGL capabilities).

I've found a few mentions of using the commandline argument -r to run in headless (no OGRE/OpenGL) mode, but this seems to have changed in recent Gazebo. In the --help screen of Gazebo 1.9.5, the -r option is listed as "record", and no mention is made of a headless mode.

So my question is, how do I run a Gazebo 1.9 server in headless mode?

PS: If this is not available in the standard binary releases (we're using the DEB packages at the moment), I could also recompile Gazebo. I just need to find out how to use a Gazebo 1.9 with a ROS-fuerte.... (but that's not part of this question)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-08-23 10:22:42 -0500

nkoenig gravatar image

updated 2013-08-23 10:23:05 -0500

Yes, if your robot model has a camera then gzserver will try to create a camera. You are right, the behavior of gzserver should be: "Output a warning about no opengl support, and then continue." This sounds like a bug.

I've created and issue for this. Could you add your robot model file to that issue?

edit flag offensive delete link more

answered 2013-08-22 12:59:22 -0500

nkoenig gravatar image

You can run Gazebo headless (without a GUI) through the gzserver command. To give you a bit more insight, there are two primary executables: gzserver and gzclient. gzserver runs physics, sensors, etc and gzclient runs the GUI. The gazebo executable just runs both gzserver and gzclient in separate processes.

If you don't have opengl capabilities, you won't be able to generate camera sensor data. Just a warning.

edit flag offensive delete link more


Does the server try to run any OpenGL when the robot model uses a camera sensor plugin? I have one in my model and when I try to spawn the model with the server running, it crashes with an OGRE error about a texture or whatnot. I had assumed cameras would just be disabled, but could it be that I have to manually remove them from the model?

Nevik gravatar imageNevik ( 2013-08-22 13:03:05 -0500 )edit

Question Tools

1 follower


Asked: 2013-08-21 08:39:45 -0500

Seen: 6,501 times

Last updated: Aug 23 '13