ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Sezgin S.'s profile - activity

2014-08-13 23:44:31 -0500 received badge  Nice Question (source)
2014-06-24 03:23:11 -0500 received badge  Enlightened (source)
2014-06-24 03:23:11 -0500 received badge  Good Answer (source)
2014-04-07 21:38:58 -0500 commented answer Problem at URDF to SDF conversion using gzsdf

I updated the urdf file so that you can see the changes. Actually there are also some minor changes, however the important ones are about the "base" and "link_0" links. The problem is solved when I specify their inertial properties like mass and inertia.

2014-02-02 00:55:05 -0500 received badge  Scholar (source)
2014-02-01 07:22:40 -0500 received badge  Nice Answer (source)
2014-01-25 04:15:34 -0500 received badge  Necromancer (source)
2014-01-25 04:15:34 -0500 received badge  Teacher (source)
2014-01-25 04:15:34 -0500 received badge  Self-Learner (source)
2014-01-24 23:52:52 -0500 answered a question Problem at URDF to SDF conversion using gzsdf

I've already solved this problem. I think the problem was inertial elements which I didn't specify any for the base link and link_0. I didn't specify their inertial properties at first. However when I specify inertial elements like mass and inertia, I successfully converted the exact urdf model to sdf.

Here is the new urdf file that the problem is solved in;

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

    <!--platform-->

    <link name="pform">

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

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

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

    </link>


    <!--base cylinder-->

    <link name="base">

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

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

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

    </link>


    <!--joint between pform and base-->

    <joint name="pform_to_base" type="fixed">
        <origin xyz="0 0 0.075" rpy="0 0 0" />
        <axis xyz="0 0 0" />
            <parent link="pform"/>
            <child link="base"/>
    </joint>


    <!--link_0-->

    <link name="link_0">

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

            <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 between base and link0-->

    <joint name="base_to_link0" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0" />
        <axis xyz="0 0 0" />
            <parent link="base"/>
            <child link="link_0"/>
    </joint>


    <!--link_1-->

    <link name="link_1">

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

            <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 between link0 and link1-->

    <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_2-->

    <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 ...
(more)
2014-01-24 23:48:29 -0500 received badge  Famous Question (source)
2014-01-24 07:07:51 -0500 received badge  Student (source)
2014-01-24 07:07:15 -0500 received badge  Notable Question (source)
2013-12-15 20:40:06 -0500 received badge  Popular Question (source)
2013-12-03 12:54:54 -0500 received badge  Editor (source)
2013-12-03 12:51:17 -0500 asked a question 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 ...
(more)