ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Generic question about the error "Waiting for service /gazebo/spawn_urdf_model"

asked 2021-08-06 06:14:22 -0500

electrophod gravatar image


I had a generic question about a specific error.

It says Waiting for service /gazebo/spawn_urdf_model and the terminal freezes. This usually happens when I'm trying to launch any robot in Gazebo.

I've always figured out how to go past these errors but never really understood "why" and "when" exactly these errors pop up? What do they mean and what's the general workaround to get past these errors?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-06 11:29:59 -0500

shonigmann gravatar image

I wouldn't necessarily call it an error, but rather a information message. Your launch file is trying to use gazebo's spawn_urdf_model service and it is either currently unavailable (e.g. gazebo server has not yet been started) or the service itself is hanging for whatever reason. In my experience, the latter is the most common reason and usually boils down to one of two common causes.

  • files referenced within your urdf file cannot be located on Gazebo's paths. When Gazebo can't find a file or a model, it looks online to the gazebo model database. This can be a slow process and can give the impression that Gazebo is frozen for some time. It should eventually fix itself and you should be able to notice missing models or textures on whatever does spawn. If you run gazebo in --verbose mode, you may see some output indicating this is the case. You may also be able to find information on this in the ~/.gazebo/ogre.log or the ~/.gazebo/gzserver/default.log
  • alternately, your computer just doesn't have enough power. This has been common enough for me when running gazebo in a virtual machine, that didn't have enough graphics memory and RAM allocated. The fact that the terminal itself freezes maybe points to this, but its hard to say

Its been a while since I've used melodic, so there may be other issues that I don't remember. But the above may offer a place to start looking.

edit flag offensive delete link more


Thanks a lot for the detailed answer! @shonigmann

electrophod gravatar image electrophod  ( 2021-08-06 13:16:21 -0500 )edit

Question Tools



Asked: 2021-08-06 06:14:22 -0500

Seen: 1,722 times

Last updated: Aug 06 '21