How to import stl files into urdf files
I am trying to use stl files with the tag mesh with this code:
<geometry>
<mesh filename="package://auriga_model/auriga_base.stl"/>
</geometry>
The package existes and the file is located there but I get this message when I try to launch it:
[ERROR] [1301591093.704357996]: Malformed geometry for Visual element
[ERROR] [1301591093.704545807]: Could not parse visual element for Link '/base_laser'
[ERROR] [1301591093.704624976]: link xml is not initialized correctly
I have been doing some test with PR2 stl model and I had no success. Here are some of my tries:
<!-- description of the robot -->
<link name="/base_link">
<visual>
<origin rpy="0 0 0" xyz="0.15 0 0.35"/>
<geometry>
<!-- mesh filename="package://auriga_model/meshes/auriga_base.stl" /-->
<!-- mesh filename="package://auriga_model/meshes/head_pan.stl" /-->
<mesh filename="package://pr2_description/meshes/head_v0/head_pan.stl"/>
</geometry>
</visual>
</link>
<link name="/base_laser">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
</visual>
</link>
For me, it looks like it can't resolve properly "filename="package://". Is it possible? I tested and "rospack find" command works fine with me.
Any clue?
Now I am able to load PR2 models but not the one of my robot. The original model was build in solidworks and maybe this is the problem. I will try to port it from Catia and I will say if it works.