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

gazebo spawning objects crash

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

zamboni gravatar image

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

ngrennan gravatar image

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

<launch>

 <!-- 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" />

</launch>

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

<robot name="litterbox_model">
  <link name="litterbox_body">
    <inertial>
      <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" />
    </inertial>
    <visual>
        <geometry>
        <mesh filename="object1.stl"/>
      </geometry>
    </visual>
    <collision>
        <geometry>
        <mesh filename="object1.stl"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="litterbox_body">
    <material>Gazebo/Red</material>
  </gazebo>
</robot>

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/MeshManager.cc:137]
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

Comments

any update?

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

1 Answer

Sort by ยป oldest newest most voted
1

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

hsu gravatar image

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

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

Comments

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 -0600 )edit

Question Tools

Stats

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

Seen: 1,514 times

Last updated: Mar 10 '12