Models don't spawn inside a world
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
Asked by J_Schaefer on 2016-01-20 11:10:21 UTC
Answers
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.
Asked by nkoenig on 2016-01-20 11:39:09 UTC
Comments
@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!
Asked by J_Schaefer on 2016-01-20 12:39:27 UTC
Comments