Model is valid only if not saved as "model.sdf"!!
I am using "gz sdf -p <file>" (or with "-k") to check the validity of a model. I was always getting errors, even when I removed pretty much everything from my model. I ended up with just the following, but still without a successful validation:
<?xml version='1.0' ?>
<sdf version='1.6'>
<model name='forklift'>
<!-- Base/Support link -->
<link name='base_link'>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose>0.237624 0 0.122112 0 0 0</pose>
<mass>0.100</mass>
<inertia>
<ixx>0.00101506</ixx>
<ixy>0</ixy>
<ixz>-2.93069e-05</ixz>
<iyy>0.00107209</iyy>
<iyz>0</iyz>
<izz>0.00105703</izz>
</inertia>
</inertial>
<collision name='base_link_collision'>
<pose>0.24 0 0.123333 0 0 0</pose>
<geometry>
<box>
<size>0.06 0.2 0.06</size>
</box>
</geometry>
</collision>
<visual name='base_link_visual'>
<pose>0.24 0 0.123333 0 0 0</pose>
<geometry>
<box>
<size>0.06 0.2 0.06</size>
</box>
</geometry>
</visual>
<gravity>1</gravity>
<velocity_decay/>
</link>
</model>
</sdf>
The strange thing is, if I save this as anything but "model.sdf", it says it is valid. If I save it as "model.sdf", it says it has errors (although they do not include any relevante information, as stated in https://bitbucket.org/osrf/sdformat/i... ).
Any ideia why is this?
humm... I saved your example as model.sdf and it checked fine...
It seems to me that when I write "model.sdf" it uses another (maybe somewhere in the path) model. If I input the full path into the command line, it parses OK.