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

can't spawn model in gazebo

asked 2015-01-06 21:06:38 -0600

forinkzan gravatar image

updated 2015-01-07 01:41:20 -0600

gvdhoorn gravatar image

hello everyone , i start gazebo with $ roscore & $ rosrun gazebo_ros gazebo, then i want to add a coke_can to it , and i type: $ rosrun gazebo_ros spawn_model -database coke_can -gazebo -model coke_can -y 1 but nothing happen in gazebo world . and the info in my terminate is below :

spawn_model script started
Deprecated: the -gazebo tag is now -sdf
[INFO] [WallTime: 1420599431.921951] [0.000000] Loading model xml from Gazebo Model Database
[INFO] [WallTime: 1420599431.922563] [0.000000] Waiting for service /gazebo/spawn_sdf_model
[INFO] [WallTime: 1420599431.925847] [0.000000] Calling service /gazebo/spawn_sdf_model
[INFO] [WallTime: 1420599441.933129] [619.918000] Spawn status: SpawnModel: Model pushed to spawn queue, but spawn service timed out waiting for model to appear in simulation under the name coke_can

if anyone know , please tell me , thx

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-29 09:13:46 -0600

donmrsir gravatar image

Hi! I had the same problem, with the same output from the terminal.

In my case the problem was due to the urdf file that i was using. It seems like the urdf had some deprecated functions from old versions of gazebo, so the parser just gave an error and didnt spawn the model. The "queue error" i think was because the spawn node just send the model and waits for Gazebo to generate it in the simulation. Since Gazebo cant do that, it just says that he is just "waiting to be published".

My solution was to just delete that unused old fuctions from the urdf and it worked fine!. Anyway if this is your case, you should see some parse error about the urdf in the terminal where you are running Gazebo.

I hope this answer help you!

edit flag offensive delete link more


+1 for raising attention to the warning messages and the workaround found. Just headsup; OP uses SDF, not URDF.

130s gravatar image 130s  ( 2015-10-21 21:47:09 -0600 )edit

I thought Gazebo automatically converts from urdf to sdf, so i just supposed the OP was probably using URDF too, maybe i shouldnt have done that :D. Anyway i think that the problem can still be something related to the parser, and since is from the Gazebo database, its probably version related.

donmrsir gravatar image donmrsir  ( 2015-10-22 03:41:06 -0600 )edit

Question Tools

1 follower


Asked: 2015-01-06 21:06:38 -0600

Seen: 5,523 times

Last updated: Sep 29 '15