Page 1 of 2

Importing DAE meshes with URDF Plugin

Posted: 07 Mar 2016, 10:53
by jokla
Hi,

I am importing the URDF model of ROMEO in V-REP using the plugin. I was wondering why the meshes .DAE (the visual meshes) look better if I import them with the "Collada importer/exporter plugin".

The visual meshes of the torso are imported as .dae:

Code: Select all

  <link name="torso">
    <inertial>
      <mass value="5.85463"/>
      <inertia ixx="0.0587116" ixy="-3.02711e-06" ixz="0.0101426" iyy="0.0326812" iyz="-0.000132541" izz="0.0637705"/>
      <origin rpy="0 0 0" xyz="0.01512 0 0.06743"/>
    </inertial>
    <visual>
      <geometry>
        <mesh filename="package://romeo_description/meshes/Torso.dae" scale="1 1 1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </visual>
    <collision>
      <geometry>
        <mesh filename="package://romeo_description/meshes/Torso_0.10.stl" scale="1 1 1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </collision>
  </link>
Thanks for the help,

Image

Re: Importing DAE meshes with URDF Plugin

Posted: 08 Mar 2016, 09:53
by coppelia
Hello,

what is probably happening is following: when you import a URFD file, the plugin will check whether the collidable shapes are efficient for dynamics simulation (i.e. are convex decomposed objects). If not, V-REP will automatically generate convex decomposed objects, which will have different visual attributes. Try to play with the import options (e.g. Convex decompose non-convex collision links).

Cheers

Re: Importing DAE meshes with URDF Plugin

Posted: 08 Mar 2016, 16:16
by jokla
Thanks for the answer!

I have already tried to check the option "Convex decompose non-convex collision links" but the result is the same.
To solve this I have just imported the meshes with the Collada importer and substitute them with the original.

Re: Importing DAE meshes with URDF Plugin

Posted: 09 Mar 2016, 10:19
by jokla
I checked more deeply into the problem and I found out this:
It seems that the visual meshes are strange because they are actually a combination of the visual and collision meshes.

This is the URDF file of the HeadRollLink (The complete URDF and meshes are here: https://github.com/ros-aldebaran/romeo_robot):

Code: Select all

  <link name="HeadRoll_link">
    <inertial>
      <mass value="2.07047"/>
      <inertia ixx="0.00933153" ixy="-3.87986e-05" ixz="0.002764" iyy="0.0110877" iyz="0.000300351" izz="0.00918888"/>
      <origin rpy="0 0 0" xyz="0.01263 0 0.07498"/>
    </inertial>
    <visual>
      <geometry>
        <mesh filename="package://romeo_description/meshes/HeadRoll.dae" scale="1 1 1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </visual>
    <collision>
      <geometry>
        <mesh filename="package://romeo_description/meshes/HeadRoll_0.10.stl" scale="1 1 1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </collision>
  </link>
In the picture there are:
1) HeadRol_link_visual: this is the result if I import the URDF deleting the part of <collision> ... </collision>. In this way I will have not a mesh for the responsable object of the Head, but just a sphere.
2) HeadRol_link_visual2: this is the result if I import the URDF with the <collision> ... </collision> info. I have just changed the colors to be more clear.
3) STL_imported: I imported the mesh .stl

Image

So the HeadRoll_link_visual2 is a merge of the HeadRol_link_visual (Shape component 2 3 4) and the STL_imported (Shape component 1). Note that the layer of the responsable shapes was hidden.

Image

Re: Importing DAE meshes with URDF Plugin

Posted: 15 Mar 2016, 13:26
by jokla
Hi,

I checked also with others URDF files and there is the same problem: The visual meshes are merged with the collision ones.

In older versions of V-REP the meshes are imported correctly (I tried V-REP_PRO_EDU_V3_1_2_64_Linux with PLUGIN_VERSION 4).

Probably is due to something introduced in the new version of the plugin?

Many thanks,

Giovanni

Re: Importing DAE meshes with URDF Plugin

Posted: 16 Mar 2016, 10:11
by coppelia
You are probably right, we will look into this.

Cheers

Re: Importing DAE meshes with URDF Plugin

Posted: 17 Nov 2016, 07:47
by JJEHL
Hi,

I have the same issue. When you try to import URDF with both visual and collision meshes, the visual link is a merge between the two .stl files.

No problem with the collision meshes assing to the layer 9, but the visual link is really bad !

It doesn't worh with vrep 3.3.2 (rev 3) but it worked fine with previous version (I just checked and version 3.2.0 is working).

In fact, the change was for version 3.2.3. I mean it works for 3.2.0 but not for 3.2.3.

There is a possibility in the edition of compound shape to choose wireframe for the frame I don't want to see, but maybe it is not a good solution and better is to import manually each shape to replace the bad one.

Re: Importing DAE meshes with URDF Plugin

Posted: 18 Nov 2016, 09:28
by coppelia
We do not really support the URDF plugin, but we'll try to ship the two versions in future. Or if anyone can assist us to trace the bug in the current plugin, we'll gladly integrate that.

Cheers

Re: Importing DAE meshes with URDF Plugin

Posted: 22 Nov 2016, 09:34
by JJEHL
OK. Do you have a documentation to describe the URDF plugin ? Or a least something to explain where is the source code and how it works ?

Re: Importing DAE meshes with URDF Plugin

Posted: 23 Nov 2016, 09:17
by coppelia
The source code for the URDF plugin is located in programming/v_repExtUrdf

Cheers