Importing DAE meshes with URDF Plugin

Typically: "How do I... ", "How can I... " questions
jokla
Posts: 8
Joined: 26 Nov 2013, 17:14

Importing DAE meshes with URDF Plugin

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Importing DAE meshes with URDF Plugin

Post 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

jokla
Posts: 8
Joined: 26 Nov 2013, 17:14

Re: Importing DAE meshes with URDF Plugin

Post 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.

jokla
Posts: 8
Joined: 26 Nov 2013, 17:14

Re: Importing DAE meshes with URDF Plugin

Post 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

jokla
Posts: 8
Joined: 26 Nov 2013, 17:14

Re: Importing DAE meshes with URDF Plugin

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Importing DAE meshes with URDF Plugin

Post by coppelia »

You are probably right, we will look into this.

Cheers

JJEHL
Posts: 12
Joined: 02 Apr 2015, 10:35

Re: Importing DAE meshes with URDF Plugin

Post 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.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Importing DAE meshes with URDF Plugin

Post 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

JJEHL
Posts: 12
Joined: 02 Apr 2015, 10:35

Re: Importing DAE meshes with URDF Plugin

Post 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 ?

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Importing DAE meshes with URDF Plugin

Post by coppelia »

The source code for the URDF plugin is located in programming/v_repExtUrdf

Cheers

Post Reply