Blender model import STL and Dae problem with link names
Hello guys,
today i imported some blender models all got no link name. With no link name i canĀ“t do anything with them.
Can u tell me why they got no link name?
Please help me
Asked by Baumboon on 2017-10-25 09:04:41 UTC
Answers
A Collada or STL file by itself won't give you Gazebo links, you must put each "node" of your mesh into a separate <link>
in your model's SDF description.
I recommend you first get familiar with links, joints, collisions and visuals in Gazebo. This tutorial should give you a good idea.
After you've understood those concepts, let's go through an example of creating separate links for each node
on a COLLADA mesh.
Let's take the zephyr_delta_wing model as an example.
Open the collada file and look for
<node>
elements (they should be inside<visual_scene>
. This is what they look like for the Zephyr wing:<node name="EnvironmentAmbientLight"> (...) </node> <node id="node-Wing_Bone" name="Wing_Bone"> (...) <node id="node-Wing" name="Wing"> (...) </node> <node id="node-Flap_Left_Bone" name="Flap_Left_Bone"> (...) <node id="node-Flap_Left" name="Flap_Left"> (...) </node> </node> <node id="node-Flap_Right_Bone" name="Flap_Right_Bone"> (...) <node id="node-Flap_Right" name="Flap_Right"> </node> </node> <node id="node-Prop_Bone" name="Prop_Bone"> (...) <node id="node-Prop" name="Propeller"> (...) </node> </node> </node>
On our SDF file, where we reference the COLLADA file, if we don't choose a submesh, all the nodes will be used together. But if we want only one node, we can refer to its
name
. For example, for the propeller link we have the following:<link name="propeller"> (...) <visual name="visual"> (...) <geometry> <mesh> <uri>model://zephyr_delta_wing/meshes/wing.dae</uri> <submesh> <name>Propeller</name> <center>true</center> </submesh> </mesh> </geometry> </visual> </link>
Note how each link of that model has a different submesh and how they can be moved independently in simulation:
Asked by chapulina on 2017-10-25 10:06:02 UTC
Comments
So if i understand u right i can use whole mesh and after i import it as dae i can use the submesh to make me a proper model with correct links and joints ? I just need to set the correct reference to the nodes?
Asked by Baumboon on 2017-10-26 04:24:25 UTC
Correct. And make sure the parts you want to separate are different nodes before you export to collada.
Asked by chapulina on 2017-10-26 12:44:58 UTC
Comments