Problem on using URDF plugin

Typically: "How do I... ", "How can I... " questions
Post Reply
ljklonepiece
Posts: 105
Joined: 10 Oct 2013, 14:51

Problem on using URDF plugin

Post by ljklonepiece »

Hi my friends,

I am trying to import my robot model using URDF plugin, but when i import, it says "failed to create the mesh" for the links, however, all the joints are added already. Inside the urdf, i am sure the path for different meshes are correct. but don't why VREP cannot find the physical meshes.
One problem i noticed is that the path reported by the error message is different from the one i specified:
Mine:

Code: Select all

~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_base.dae
Error path:

Code: Select all

/home/juekun/catkin_ws/src/jaco_ros/jaco_modelws/src/jaco_ros/jaco_model/meshes/jaco_link_base.dae
the ws/src/jaco_ros/jaco_model part is obviously redundant

The screen shot of the error message can be found at https://docs.google.com/file/d/0B3-BbMZ ... sp=sharing
Image
Any help will do~~
Thanks a lot in advance!

my URDF file is as follows

Code: Select all

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /home/mdedonato/groovy_workspace/jaco_arm/jaco_model/urdf/standalone_arm.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->


<robot name="jaco" xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz" xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint" xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model" xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable" xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering" xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="http://ros.org/wiki/xacro" xmlns:xi="http://www.w3.org/2001/XInclude">
  <link name="root">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0 0 0"/>
        <!--making it slightly bigger in x and z direction-->
      </geometry>
      <material name="Black"/>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0 0 0"/>
        <!--making it slightly bigger in x and z direction-->
      </geometry>
    </collision>
  </link>
  <link name="jaco_link_base">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_base.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_base.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_base" type="fixed">
    <parent link="root"/>
    <child link="jaco_link_base"/>
    <axis xyz="0 0 0"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
  </joint>
  <link name="jaco_link_1">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_1.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_1.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_1" type="continuous">
    <parent link="jaco_link_base"/>
    <child link="jaco_link_1"/>
    <axis xyz="0 0 1"/>
    <origin rpy="3.14159265359 0 0" xyz="0 0 0.1535"/>
  </joint>
  <link name="jaco_link_2">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_2.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_2.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_2" type="continuous">
    <parent link="jaco_link_1"/>
    <child link="jaco_link_2"/>
    <axis xyz="0 0 1"/>
    <origin rpy="-1.57079632679 -1.57079632679 0" xyz="0 0 -0.1185"/>
  </joint>
  <link name="jaco_link_3">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_3.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_3.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_3" type="continuous">
    <parent link="jaco_link_2"/>
    <child link="jaco_link_3"/>
    <axis xyz="0 0 1"/>
    <origin rpy="3.14159265359 0 3.14159265359" xyz="0.41 0 0"/>
  </joint>
  <link name="jaco_link_4">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_4.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_4.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_4" type="continuous">
    <parent link="jaco_link_3"/>
    <child link="jaco_link_4"/>
    <axis xyz="0 0 1"/>
    <origin rpy="0 -1.57079632679 0" xyz="0.207 0 -0.01125"/>
  </joint>
  <link name="jaco_link_5">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_5.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_5.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_5" type="continuous">
    <parent link="jaco_link_4"/>
    <child link="jaco_link_5"/>
    <axis xyz="0 0 1"/>
    <origin rpy="0 0.959931088597 3.14159265359" xyz="0.0343 0 -0.06588"/>
  </joint>
  <link name="jaco_link_hand">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_hand.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_hand.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_6" type="continuous">
    <parent link="jaco_link_5"/>
    <child link="jaco_link_hand"/>
    <axis xyz="0 0 1"/>
    <origin rpy="0 0.959931088597 3.14159265359" xyz="0.0343 0 -0.06588"/>
  </joint>
  <link name="jaco_link_finger_1">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_1.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_1.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_finger_1" type="revolute">
    <parent link="jaco_link_hand"/>
    <child link="jaco_link_finger_1"/>
    <axis xyz="0 0 1"/>
    <origin rpy="-1.7983 1.117 3.1416" xyz="-0.03978 0 -0.10071"/>
    <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/>
  </joint>
  <link name="jaco_link_finger_2">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_2.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_2.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_finger_2" type="revolute">
    <parent link="jaco_link_hand"/>
    <child link="jaco_link_finger_2"/>
    <axis xyz="0 0 1"/>
    <origin rpy="-1.6222 1.117 -0.23615" xyz="0.03569 -0.0216 -0.10071"/>
    <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/>
  </joint>
  <link name="jaco_link_finger_3">
    <visual>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_3.dae"/>
      </geometry>
      <material name="carbon_fiber">
        <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <mesh filename="~/catkin_ws/src/jaco_ros/jaco_model/meshes/jaco_link_finger_3.dae"/>
      </geometry>
    </collision>
  </link>
  <joint name="jaco_joint_finger_3" type="revolute">
    <parent link="jaco_link_hand"/>
    <child link="jaco_link_finger_3"/>
    <axis xyz="0 0 1"/>
    <origin rpy="-1.5161 1.1459 0.23978" xyz="0.03569 0.0216 -0.10071"/>
    <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/>
  </joint>
</robot>


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

Re: Problem on using URDF plugin

Post by coppelia »

Hello,

you are right. The current implementation expects filenames in the form of:

Code: Select all

<mesh filename="package://robot_description/meshes/head/head_collision.stl"/>
i.e. a package:/ heading.

We'll try to change his for a future version.

Cheers

ljklonepiece
Posts: 105
Joined: 10 Oct 2013, 14:51

Re: Problem on using URDF plugin

Post by ljklonepiece »

coppelia wrote:Hello,

you are right. The current implementation expects filenames in the form of:

Code: Select all

<mesh filename="package://robot_description/meshes/head/head_collision.stl"/>
i.e. a package:/ heading.

We'll try to change his for a future version.

Cheers
Hi,

Thanks for your reply!
I have changed my file as the way you suggested but this time, when i import urdf, VREP simply crashes:

Code: Select all

<mesh filename="package://meshes/jaco_link_base.dae"/>
where my package is at

Code: Select all

~/catkin_ws/src/jaco_ros/jaco_model

Code: Select all

URDF import operation started.
There are 10 joints.
ERROR: there is no joint with name ''
There are 11 links.
Creating link 'root'...
ERROR: there is no joint with name ''
Creating link 'jaco_link_base'...
Reading and parsing the XML file...
terminate called after throwing an instance of 'int'
Aborted (core dumped)
To add on, when i tried COLLADA plugin to import .dae file, it also crashes.

Don't know what happens~~
Looking forward to your reply!

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

Re: Problem on using URDF plugin

Post by coppelia »

Mmmh, then I guess your dae file is the culprit. The Collada plugin understands a subset of the Collada format only (actually the collada format is quite complex with several different versions. It is very difficult to support all features).

Can you try to use a different format, or see if the DAE file loads fine in Blender for instance?

Cheers

ljklonepiece
Posts: 105
Joined: 10 Oct 2013, 14:51

Re: Problem on using URDF plugin

Post by ljklonepiece »

coppelia wrote:Mmmh, then I guess your dae file is the culprit. The Collada plugin understands a subset of the Collada format only (actually the collada format is quite complex with several different versions. It is very difficult to support all features).

Can you try to use a different format, or see if the DAE file loads fine in Blender for instance?

Cheers
Yeah, you r right. I change another .dae file and now it works fine!
Thanks a lot for your help

JK

Post Reply