Error loading SDF in Gazebo 1.3.1
I'm trying to load a simple SDF in Gazebo and I'm getting an error.
I'm running Gazebo 1.3.1.
The SDF is copied straight from a tutorial. The code is:
<?xml version='1.0'?>
<sdf version='1.3'>
<model name="my_robot">
<static>true</static>
<link name='chassis'>
<pose>0 0 .1 0 0 0</pose>
<collision name='collision'>
<geometry>
<box>
<size>.4 .2 .1</size>
</box>
</geometry>
</collision>
<visual name='visual'>
<geometry>
<box>
<size>.4 .2 .1</size>
</box>
</geometry>
</visual>
</link>
</model>
</sdf>
I tried to launch it using:
gzfactory spawn -f model3.sdf
The error I'm getting is this:
Error [SDF.cc:984] Unable to find value for key[origin]
Error [SDF.cc:738] Missing element description for [origin]
Segmentation fault (core dumped)
Someone else posted about this error here. It was said to be fixed in the bug report, but I don't think it was.
Is there a fix for this? Is there a better way to spawn an SDF?
Verdict: Probably a bug. Filed here . Workaround: Follow the directions given in the answer below or equivalently in the Gazebo Handbook.
I have same problem. Any solution?
Perhaps upvoting the question will get it more attention from the admins. (And a solution is given below by Andrei).