Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem at URDF to SDF conversion using gzsdf

I've already created an urdf called "robot_arm.urdf". I want to spawn that model on Gazebo. Before trying to spawn, I used "gzsdf" to see it as a sdf file. However, the result was unexpected. Despite my urdf model includes 7 links and 6 joints, the created sdf file shows just one link called "__ default __". The only right thing in the converted file is the name of the model.

Here are the result when I enter "$ gzsdf print robot_arm.urdf":

> <sdf version='1.4'>        
>   <model name='robot_arm'>
>     <link name='__default__'>
>       <velocity_decay>
>         <linear>0</linear>
>         <angular>0</angular>
>       </velocity_decay>
>     </link>   
>   </model> 
> </sdf>

Here is my urdf file which is in ~/catkin_ws/src/testbot_description/robot_arm.urdf:

<?xml version="1.0" ?>
<robot name="robot_arm">

  <link name="base">

    <visual>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
    </collision>    

  </link>

  <link name="link_0">

    <visual>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </collision>   

  </link>

  <joint name="base_to_link0" type="fixed">
    <parent link="base"/>
    <child link="link_0"/>
  </joint>

  <link name="link_1">

    <visual>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </collision>    

  </link>

  <joint name="link0_to_link1" type="revolute">
    <limit effort="30" velocity="1.0" lower="-2.792526" upper="2.792526"/>
    <axis xyz="0 0 1"/>
    <parent link="link_0"/>
    <child link="link_1"/>
  </joint>

  <link name="link_2">

    <inertial>
      <mass value="17.4" />
      <inertia ixx="0.13" iyy="0.524" izz="0.539" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </collision>    

  </link>

  <joint name="link1_to_link2" type="revolute">
    <limit effort="30" velocity="1.0" lower="-3.906056" upper="0.785398"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0 0.092 0.2805"/>
    <parent link="link_1"/>
    <child link="link_2"/>
  </joint>

  <link name="link_3">

    <inertial>
      <mass value="4.8" />
      <inertia ixx="0.066" iyy="0.0125" izz="0.086" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </collision>    

  </link>

  <joint name="link2_to_link3" type="revolute">
    <limit effort="30" velocity="1.0" lower="-0.785398" upper="2.756056"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.1475 -0.045 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
  </joint>

  <link name="link_4">

    <inertial>
      <mass value="0.82" />
      <inertia ixx="0.0018" iyy="0.0018" izz="0.0013" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </collision>  

  </link>

  <joint name="link3_to_link4" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.919862" upper="2.96705"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.1275 0 0"/>
    <parent link="link_3"/>
    <child link="link_4"/>
  </joint>

  <link name="link_5">

    <inertial>
      <mass value="0.34" />
      <inertia ixx="0.0003" iyy="0.0003" izz="0.0004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </collision>    

  </link>

  <joint name="link4_to_link5" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.195329" upper="1.195329"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.0424 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
  </joint>


  <link name="link_6">

    <inertial>
      <mass value="0.09" />
      <inertia ixx="0.00015" iyy="0.00015" izz="0.00004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.0185 0.032 0.0185"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.0085 0.022 0.0085"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </collision>    

  </link>

  <joint name="link5_to_link6" type="revolute">
    <limit effort="30" velocity="1.0" lower="-4.642575" upper="4.642575"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.021 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
  </joint>

  <gazebo reference="base">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_0">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_1">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_2">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_3">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_4">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_5">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_6">
    <selfCollide>true</selfCollide>
  </gazebo>


</robot>

Problem at URDF to SDF conversion using gzsdf

I've already created an urdf called "robot_arm.urdf". I want to spawn that model on Gazebo. Before trying to spawn, I used "gzsdf" to see it as a sdf file. However, the result was unexpected. Despite my urdf model includes 7 links and 6 joints, the created sdf file shows just one link called "__ default __". The only right thing in the converted file is the name of the model.

Edit #1: I used ROS Hydro and Gazebo come with it. Also Ubuntu 13.04.

Here are the result when I enter "$ gzsdf print robot_arm.urdf":

> <sdf version='1.4'>        
>   <model name='robot_arm'>
>     <link name='__default__'>
>       <velocity_decay>
>         <linear>0</linear>
>         <angular>0</angular>
>       </velocity_decay>
>     </link>   
>   </model> 
> </sdf>

Here is my urdf file which is in ~/catkin_ws/src/testbot_description/robot_arm.urdf:

<?xml version="1.0" ?>
<robot name="robot_arm">

  <link name="base">

    <visual>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
    </collision>    

  </link>

  <link name="link_0">

    <visual>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </collision>   

  </link>

  <joint name="base_to_link0" type="fixed">
    <parent link="base"/>
    <child link="link_0"/>
  </joint>

  <link name="link_1">

    <visual>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </collision>    

  </link>

  <joint name="link0_to_link1" type="revolute">
    <limit effort="30" velocity="1.0" lower="-2.792526" upper="2.792526"/>
    <axis xyz="0 0 1"/>
    <parent link="link_0"/>
    <child link="link_1"/>
  </joint>

  <link name="link_2">

    <inertial>
      <mass value="17.4" />
      <inertia ixx="0.13" iyy="0.524" izz="0.539" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </collision>    

  </link>

  <joint name="link1_to_link2" type="revolute">
    <limit effort="30" velocity="1.0" lower="-3.906056" upper="0.785398"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0 0.092 0.2805"/>
    <parent link="link_1"/>
    <child link="link_2"/>
  </joint>

  <link name="link_3">

    <inertial>
      <mass value="4.8" />
      <inertia ixx="0.066" iyy="0.0125" izz="0.086" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </collision>    

  </link>

  <joint name="link2_to_link3" type="revolute">
    <limit effort="30" velocity="1.0" lower="-0.785398" upper="2.756056"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.1475 -0.045 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
  </joint>

  <link name="link_4">

    <inertial>
      <mass value="0.82" />
      <inertia ixx="0.0018" iyy="0.0018" izz="0.0013" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </collision>  

  </link>

  <joint name="link3_to_link4" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.919862" upper="2.96705"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.1275 0 0"/>
    <parent link="link_3"/>
    <child link="link_4"/>
  </joint>

  <link name="link_5">

    <inertial>
      <mass value="0.34" />
      <inertia ixx="0.0003" iyy="0.0003" izz="0.0004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </collision>    

  </link>

  <joint name="link4_to_link5" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.195329" upper="1.195329"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.0424 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
  </joint>


  <link name="link_6">

    <inertial>
      <mass value="0.09" />
      <inertia ixx="0.00015" iyy="0.00015" izz="0.00004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.0185 0.032 0.0185"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.0085 0.022 0.0085"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </collision>    

  </link>

  <joint name="link5_to_link6" type="revolute">
    <limit effort="30" velocity="1.0" lower="-4.642575" upper="4.642575"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.021 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
  </joint>

  <gazebo reference="base">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_0">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_1">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_2">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_3">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_4">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_5">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_6">
    <selfCollide>true</selfCollide>
  </gazebo>


</robot>

Problem at URDF to SDF conversion using gzsdf

I've already created an urdf called "robot_arm.urdf". I want to spawn that model on Gazebo. Before trying to spawn, I used "gzsdf" to see it as a sdf file. However, the result was unexpected. Despite my urdf model includes 7 links and 6 joints, the created sdf file shows just one link called "__ default __". The only right thing in the converted file is the name of the model.

Edit #1: I used ROS Hydro and Gazebo come with it. Also Ubuntu 13.04.

Here are the result when I enter "$ gzsdf print robot_arm.urdf":

> <sdf version='1.4'>        
>   <model name='robot_arm'>
>     <link name='__default__'>
>       <velocity_decay>
>         <linear>0</linear>
>         <angular>0</angular>
>       </velocity_decay>
>     </link>   
>   </model> 
> </sdf>

Here is my urdf file which is in ~/catkin_ws/src/testbot_description/robot_arm.urdf:

<?xml version="1.0" ?>
<robot name="robot_arm">

  <link name="base">

    <visual>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
    </collision>    

  </link>

  <link name="link_0">

    <visual>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </collision>   

  </link>

  <joint name="base_to_link0" type="fixed">
    <parent link="base"/>
    <child link="link_0"/>
  </joint>

  <link name="link_1">

    <visual>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </collision>    

  </link>

  <joint name="link0_to_link1" type="revolute">
    <limit effort="30" velocity="1.0" lower="-2.792526" upper="2.792526"/>
    <axis xyz="0 0 1"/>
    <parent link="link_0"/>
    <child link="link_1"/>
  </joint>

  <link name="link_2">

    <inertial>
      <mass value="17.4" />
      <inertia ixx="0.13" iyy="0.524" izz="0.539" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </collision>    

  </link>

  <joint name="link1_to_link2" type="revolute">
    <limit effort="30" velocity="1.0" lower="-3.906056" upper="0.785398"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0 0.092 0.2805"/>
    <parent link="link_1"/>
    <child link="link_2"/>
  </joint>

  <link name="link_3">

    <inertial>
      <mass value="4.8" />
      <inertia ixx="0.066" iyy="0.0125" izz="0.086" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </collision>    

  </link>

  <joint name="link2_to_link3" type="revolute">
    <limit effort="30" velocity="1.0" lower="-0.785398" upper="2.756056"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.1475 -0.045 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
  </joint>

  <link name="link_4">

    <inertial>
      <mass value="0.82" />
      <inertia ixx="0.0018" iyy="0.0018" izz="0.0013" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </collision>  

  </link>

  <joint name="link3_to_link4" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.919862" upper="2.96705"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.1275 0 0"/>
    <parent link="link_3"/>
    <child link="link_4"/>
  </joint>

  <link name="link_5">

    <inertial>
      <mass value="0.34" />
      <inertia ixx="0.0003" iyy="0.0003" izz="0.0004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </collision>    

  </link>

  <joint name="link4_to_link5" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.195329" upper="1.195329"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.0424 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
  </joint>


  <link name="link_6">

    <inertial>
      <mass value="0.09" />
      <inertia ixx="0.00015" iyy="0.00015" izz="0.00004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.0185 0.032 0.0185"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.0085 0.022 0.0085"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </collision>    

  </link>

  <joint name="link5_to_link6" type="revolute">
    <limit effort="30" velocity="1.0" lower="-4.642575" upper="4.642575"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.021 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
  </joint>

  <gazebo reference="base">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_0">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_1">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_2">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_3">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_4">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_5">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_6">
    <selfCollide>true</selfCollide>
  </gazebo>


</robot>

Problem at URDF to SDF conversion using gzsdf

I've already created an urdf called "robot_arm.urdf". I want to spawn that model on Gazebo. Before trying to spawn, I used "gzsdf" to see it as a sdf file. However, the result was unexpected. Despite my urdf model includes 7 links and 6 joints, the created sdf file shows just one link called "__ default __". The only right thing in the converted file is the name of the model.

Edit #1: I used ROS Hydro and Gazebo come with it. Also Ubuntu 13.04.

Here are the result when I enter "$ gzsdf print robot_arm.urdf":

> <sdf version='1.4'>        
>   <model name='robot_arm'>
>     <link name='__default__'>
>       <velocity_decay>
>         <linear>0</linear>
>         <angular>0</angular>
>       </velocity_decay>
>     </link>   
>   </model> 
> </sdf>

Here is my urdf file which is in ~/catkin_ws/src/testbot_description/robot_arm.urdf:

<?xml version="1.0" ?>
<robot name="robot_arm">

  <link name="base">

    <visual>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
    </collision>    

  </link>

  <link name="link_0">

    <visual>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </collision>   

  </link>

  <joint name="base_to_link0" type="fixed">
    <parent link="base"/>
    <child link="link_0"/>
  </joint>

  <link name="link_1">

    <visual>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </collision>    

  </link>

  <joint name="link0_to_link1" type="revolute">
    <limit effort="30" velocity="1.0" lower="-2.792526" upper="2.792526"/>
    <axis xyz="0 0 1"/>
    <parent link="link_0"/>
    <child link="link_1"/>
  </joint>

  <link name="link_2">

    <inertial>
      <mass value="17.4" />
      <inertia ixx="0.13" iyy="0.524" izz="0.539" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </collision>    

  </link>

  <joint name="link1_to_link2" type="revolute">
    <limit effort="30" velocity="1.0" lower="-3.906056" upper="0.785398"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0 0.092 0.2805"/>
    <parent link="link_1"/>
    <child link="link_2"/>
  </joint>

  <link name="link_3">

    <inertial>
      <mass value="4.8" />
      <inertia ixx="0.066" iyy="0.0125" izz="0.086" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </collision>    

  </link>

  <joint name="link2_to_link3" type="revolute">
    <limit effort="30" velocity="1.0" lower="-0.785398" upper="2.756056"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.1475 -0.045 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
  </joint>

  <link name="link_4">

    <inertial>
      <mass value="0.82" />
      <inertia ixx="0.0018" iyy="0.0018" izz="0.0013" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </collision>  

  </link>

  <joint name="link3_to_link4" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.919862" upper="2.96705"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.1275 0 0"/>
    <parent link="link_3"/>
    <child link="link_4"/>
  </joint>

  <link name="link_5">

    <inertial>
      <mass value="0.34" />
      <inertia ixx="0.0003" iyy="0.0003" izz="0.0004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </collision>    

  </link>

  <joint name="link4_to_link5" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.195329" upper="1.195329"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.0424 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
  </joint>


  <link name="link_6">

    <inertial>
      <mass value="0.09" />
      <inertia ixx="0.00015" iyy="0.00015" izz="0.00004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.0185 0.032 0.0185"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.0085 0.022 0.0085"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </collision>    

  </link>

  <joint name="link5_to_link6" type="revolute">
    <limit effort="30" velocity="1.0" lower="-4.642575" upper="4.642575"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.021 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
  </joint>

  <gazebo reference="base">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_0">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_1">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_2">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_3">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_4">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_5">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_6">
    <selfCollide>true</selfCollide>
  </gazebo>


</robot>

Problem at URDF to SDF conversion using gzsdf

I've already created an urdf called "robot_arm.urdf". I want to spawn that model on Gazebo. Before trying to spawn, I used "gzsdf" to see it as a sdf file. However, the result was unexpected. Despite my urdf model includes 7 links and 6 joints, the created sdf file shows just one link called "__ default __". The only right thing in the converted file is the name of the model.

Edit #1: I used ROS Hydro and Gazebo come with it. Also Ubuntu 13.04.

Here are the result when I enter "$ gzsdf print robot_arm.urdf":

> <sdf version='1.4'>        
>   <model name='robot_arm'>
>     <link name='__default__'>
>       <velocity_decay>
>         <linear>0</linear>
>         <angular>0</angular>
>       </velocity_decay>
>     </link>   
>   </model> 
> </sdf>

Here is my urdf file which is in ~/catkin_ws/src/testbot_description/robot_arm.urdf:

<?xml version="1.0" ?>
<robot name="robot_arm">

  <link name="base">

    <visual>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.025" radius="0.08"/>
      </geometry>
    </collision>    

  </link>

  <link name="link_0">

    <visual>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.2385" radius="0.0295"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.13175"/>
    </collision>   

  </link>

  <joint name="base_to_link0" type="fixed">
    <parent link="base"/>
    <child link="link_0"/>
  </joint>

  <link name="link_1">

    <visual>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.103" radius="0.0295"/>
      </geometry>
      <origin rpy="0 -1.57079 1.57079" xyz="0 0.022 0.2805"/>
    </collision>    

  </link>

  <joint name="link0_to_link1" type="revolute">
    <limit effort="30" velocity="1.0" lower="-2.792526" upper="2.792526"/>
    <axis xyz="0 0 1"/>
    <parent link="link_0"/>
    <child link="link_1"/>
  </joint>

  <link name="link_2">

    <inertial>
      <mass value="17.4" />
      <inertia ixx="0.13" iyy="0.524" izz="0.539" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.059 0.229 0.079"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.054 0 0"/>
    </collision>    

  </link>

  <joint name="link1_to_link2" type="revolute">
    <limit effort="30" velocity="1.0" lower="-3.906056" upper="0.785398"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0 0.092 0.2805"/>
    <parent link="link_1"/>
    <child link="link_2"/>
  </joint>

  <link name="link_3">

    <inertial>
      <mass value="4.8" />
      <inertia ixx="0.066" iyy="0.0125" izz="0.086" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.194 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.0425 0 0"/>
    </collision>    

  </link>

  <joint name="link2_to_link3" type="revolute">
    <limit effort="30" velocity="1.0" lower="-0.785398" upper="2.756056"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.1475 -0.045 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
  </joint>

  <link name="link_4">

    <inertial>
      <mass value="0.82" />
      <inertia ixx="0.0018" iyy="0.0018" izz="0.0013" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.032 0.015 0.032"/>
      </geometry>
      <origin rpy="0 0 -1.57079" xyz="0.019 0 0"/>
    </collision>  

  </link>

  <joint name="link3_to_link4" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.919862" upper="2.96705"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.1275 0 0"/>
    <parent link="link_3"/>
    <child link="link_4"/>
  </joint>

  <link name="link_5">

    <inertial>
      <mass value="0.34" />
      <inertia ixx="0.0003" iyy="0.0003" izz="0.0004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <material name="Black">
        <color rgba="0 0 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </visual>

    <collision>
      <geometry>
        <cylinder length="0.032" radius="0.016"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="-0.00015 0 0"/>
    </collision>    

  </link>

  <joint name="link4_to_link5" type="revolute">
    <limit effort="30" velocity="1.0" lower="-1.195329" upper="1.195329"/>
    <axis xyz="0 1 0"/>
    <origin xyz="0.0424 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
  </joint>


  <link name="link_6">

    <inertial>
      <mass value="0.09" />
      <inertia ixx="0.00015" iyy="0.00015" izz="0.00004" ixy="0" ixz="0" iyz="0" />
    </inertial>

    <visual>
      <geometry>
        <box size="0.0185 0.032 0.0185"/>
      </geometry>
      <material name="Orange">
        <color rgba="1 0.4 0 1"/>
      </material>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </visual>

    <collision>
      <geometry>
        <box size="0.0085 0.022 0.0085"/>
      </geometry>
      <origin rpy="1.57079 0 0" xyz="0.0043 0 0"/>
    </collision>    

  </link>

  <joint name="link5_to_link6" type="revolute">
    <limit effort="30" velocity="1.0" lower="-4.642575" upper="4.642575"/>
    <axis xyz="1 0 0"/>
    <origin xyz="0.021 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
  </joint>

  <gazebo reference="base">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_0">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_1">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_2">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_3">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_4">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_5">
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="link_6">
    <selfCollide>true</selfCollide>
  </gazebo>


</robot>