ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

gazebo spawning objects crash

asked 2012-02-29 06:30:56 -0500

zamboni gravatar image

updated 2014-11-22 17:05:06 -0500

ngrennan gravatar image

Hi guys, I have the following launch file in my project:


 <!-- Launch PR2 in empty world -->
 <include file="$(find pr2_gazebo)/pr2_empty_world.launch"/>

 <!-- send urdf to param server -->
 <param name="object1" textfile="/home/x/ros_workspace/project/objects/urdf/object1.urdf" />
 <param name="object2" textfile="/home/ros_workspace/project/objects/urdf/object2.urdf" />

 <!-- push urdf to factory and spawn robot in gazebo -->
 <node name="spawn_object1" pkg="gazebo" type="spawn_model" args="-urdf -param object1 -x 3.0 -y 3.0 -z 0.1  -model object1" respawn="false" output="screen" />
 <node name="spawn_object2" pkg="gazebo" type="spawn_model" args="-urdf -param object2 -x 2.75 -y 3.5 -z 0.25  -model object2" respawn="false" output="screen" />


Then file /home/x/ros_workspace/project/objects/urdf/object1.urdf contains:

<robot name="litterbox_model">
  <link name="litterbox_body">
      <mass value="10.0" />
      <!-- center of mass (com) is defined w.r.t. link local coordinate system -->
      <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="1.0"  iyz="0.0"  izz="1.0" />
        <mesh filename="object1.stl"/>
        <mesh filename="object1.stl"/>
  <gazebo reference="litterbox_body">

and object1.stl is in the same location /home/x/ros_workspace/project/objects/urdf/

This code used to work, after a format I am not cabable of finding what is the issue. ROS aborts with the following message:

spawn status:  SpawnModel: successfully spawned model
spawning success True
Error: [/tmp/buildd/ros-diamondback-simulator-gazebo-1.2.8/debian/ros-diamondback-simulator-gazebo/opt/ros/diamondback/stacks/simulator_gazebo/gazebo/build/gazebo/server/]
Unable to find file[object1.stl]
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
spawning success None
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
spawning success None

any idea? I really don't know what could be the issue. Thanks

edit retag flag offensive close merge delete


any update?

zamboni gravatar image zamboni  ( 2012-03-07 12:25:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-10 08:45:03 -0500

hsu gravatar image

updated 2012-03-10 08:46:10 -0500

I see that you have two different ros packages with the same name "objects", are you able to put all your objects and meshes into ros packages with different names or just one single ros package?

Secondly, please take a look at the gazebo media path section and setup your manifest.xml accordingly. Simply put, you need to put object1.stl in a ros package that depends on gazebo directly, and contains the gazebo_media_path export in its manifest.xml.

edit flag offensive delete link more


this was exactly my problem as well. The failure script was giving an ambiguous exception when trying to load the mesh. it would come out with "Qt has caught an exception thrown from an event handler, Throwing exceptions from an event handler is not supported in Qt."

PeterMilani gravatar image PeterMilani  ( 2012-12-19 23:38:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-02-29 06:30:56 -0500

Seen: 1,446 times

Last updated: Mar 10 '12