Home | Tutorials | Wiki | Issues
Ask Your Question
0

Models don't spawn inside a world

asked 2016-01-20 10:10:21 -0500

J_Schaefer gravatar image

Hello Gazebo-Users,

my target is to create a simulation with an UR5 and the Robotiq 85-Gripper. My simulation works quite fine. Now I try to insert a box that can be grabbed. Inside my world-file i wrote this:

<model name="Box4">
 <pose>0 0 2</pose>
 <static>true</static>
 <link name="Box4_Link">
  <inertial>
   <mass>5</mass>
   <inertia>
   <ixx>1.0</ixx><ixy>0</ixy><ixz>0</ixz>
   <iyy>1.0</izz><iyz>0</iyz>
   <izz>1.0</izz>
   <inertia>
  </inertial>
  <visual name="Box4_Visual">
   <geometry>
   <box>
   <size>1.05 1.05 1.05</size>
   </box>
   </geometry>
   <material>
   <script>Gazebo/SkyBlue</script>
   </material>
  </visual>
  <collision name="Box4_Collision">
   <geometry>
   <box>
   <size>0.05 0.05 0.05</size>
   </box>
   </geometry>
  </collision>
 </link>
</model>

The problem is, that the simulation starts properly, with the robot an the tables, but without the box.

Is there a need to spawn it manually?

Best regards J_Schaefer

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-01-20 11:39:27 -0500

J_Schaefer gravatar image

updated 2016-01-20 12:10:42 -0500

@nkoenig Thank you for your answer. I changed it. Still doesn't work.

I now saw that the model is loaded in Gazebo but not shown. It appears in the list of models, with size 0 0 0. When I manually change the values in Gazebo nothing happens. All the values (pose, size of visual) are set to 0. Is there another problem with Gazebo?

Update: With the latest changes made, it works. So minor mistakes and nothing works! Thank you very much, @nkoenig!

edit flag offensive delete link more
0

answered 2016-01-20 10:39:09 -0500

nkoenig gravatar image

updated 2016-01-20 11:47:15 -0500

Try running gazebo in verbose mode: gazebo --verbose <world_file>.

You'll probably see a message about incorrect SDF syntax. For example, the second line of you SDF model should be this:

 <pose>0 0 2 0 0 0</pose>

The last three numbers represent roll, pitch, and yaw.

Everything else looks good, but I might have missed something.

Update:

Yup, your model had more than one problem. Did you run gazebo in verbose mode? I copied your model into a world, and gazebo outputs:

Error [parser.cc:292] Error parsing XML in file [/data/gazebo_copy/worlds/empty.world]: Error reading end tag.
[Err] [Server.cc:380] Unable to read sdf file[worlds/empty.world]

Looking at your model file, you need to properly close the <inertia> block. The <iyy> tag also is not closed properly.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-01-20 10:10:21 -0500

Seen: 3,116 times

Last updated: Jan 20 '16