Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem Link and URDF

I have urdf model imported from SolidWork. And i try to visualize it on ROS kinetic with RViZ. I also use joint_state_publisher and added gui (slider) to input joint value. But i have a problem when i try to move the slider, the joint is change the child also move but the parent is moving too like the parent and child is the one part and the link is just center of rotation of that onlyone part. Here the code of my URDF file. Did i have some mistake on the joint script?

    <?xml version="1.0" ?>
<robot
  name="robot_model">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="1.1861E-09 -0.015203 0.022452"
        rpy="0 0 0" />
      <mass
        value="0.072402" />
      <inertia
        ixx="0"
        ixy="0"
        ixz="0"
        iyy="0"
        iyz="0"
        izz="0" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.21176 0.21176 0.21176 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="bahu_Link">
    <inertial>
      <origin
        xyz="0.00043596 4.113E-05 0.035563"
        rpy="0 0 0" />
      <mass
        value="0.075111" />
      <inertia
        ixx="3.0564E-06"
        ixy="1.3467E-09"
        ixz="-4.0379E-08"
        iyy="3.0536E-06"
        iyz="1.0182E-07"
        izz="3.9301E-09" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/bahu_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/bahu_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="bahu"
    type="revolute">
    <origin
      xyz="0 0 0.0455"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="bahu_Link" />
    <axis
      xyz="0 0 -1" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="pundak_Link">
    <inertial>
      <origin
        xyz="0.00015346 -0.051427 6.8183E-06"
        rpy="0 0 0" />
      <mass
        value="0.065441" />
      <inertia
        ixx="6.7347E-07"
        ixy="1.3322E-08"
        ixz="-1.1234E-08"
        iyy="4.3942E-07"
        iyz="3.3191E-07"
        izz="5.5303E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/pundak_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.92157 0.92157 0.92157 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/pundak_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="pundak"
    type="revolute">
    <origin
      xyz="-0.0015 -0.00043603 0.052"
      rpy="0 0 0" />
    <parent
      link="bahu_Link" />
    <child
      link="pundak_Link" />
    <axis
      xyz="1 0 0" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="siku_atas_Link">
    <inertial>
      <origin
        xyz="0.0049333 -0.030149 -0.0017218"
        rpy="0 0 0" />
      <mass
        value="0.10908" />
      <inertia
        ixx="1.4274E-05"
        ixy="7.5526E-06"
        ixz="3.6777E-07"
        iyy="4.0395E-06"
        iyz="-6.9341E-07"
        izz="1.8246E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/siku_atas_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/siku_atas_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="siku_atas"
    type="revolute">
    <origin
      xyz="0.001 -0.089976 0"
      rpy="-0.064415 -0.0069029 -0.0016824" />
    <parent
      link="pundak_Link" />
    <child
      link="siku_atas_Link" />
    <axis
      xyz="-0.0016824 0.99792 0.064382" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="siku_bawah_Link">
    <inertial>
      <origin
        xyz="-0.010884 -0.30397 -0.0099387"
        rpy="0 0 0" />
      <mass
        value="16.401" />
      <inertia
        ixx="0.059637"
        ixy="0.0022887"
        ixz="8.2814E-06"
        iyy="0.011424"
        iyz="0.0014347"
        izz="0.069565" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/siku_bawah_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.92157 0.92157 0.92157 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/siku_bawah_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="siku_bawah"
    type="revolute">
    <origin
      xyz="0.015091 -0.053711 -0.0040681"
      rpy="0.064427 -4.9431E-15 0.0016859" />
    <parent
      link="siku_atas_Link" />
    <child
      link="siku_bawah_Link" />
    <axis
      xyz="0 0 -1" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="kering_Link">
    <inertial>
      <origin
        xyz="0.00026169 -0.034344 0.00033487"
        rpy="0 0 0" />
      <mass
        value="0.063177" />
      <inertia
        ixx="0"
        ixy="0"
        ixz="0"
        iyy="0"
        iyz="0"
        izz="0" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/kering_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.92157 0.92157 0.92157 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/kering_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="kering"
    type="revolute">
    <origin
      xyz="0.0011 -0.081054 0"
      rpy="3.2732E-08 -0.0037504 -6.3285E-18" />
    <parent
      link="siku_bawah_Link" />
    <child
      link="kering_Link" />
    <axis
      xyz="0 1 0" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="kering_dalam_Link">
    <inertial>
      <origin
        xyz="-0.00017342 -0.0090325 -0.025496"
        rpy="0 0 0" />
      <mass
        value="0.047313" />
      <inertia
        ixx="1.8519E-06"
        ixy="1.7984E-07"
        ixz="-1.1671E-08"
        iyy="1.7438E-06"
        iyz="-6.2981E-07"
        izz="6.8047E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/kering_dalam_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/kering_dalam_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="kering_dalam"
    type="revolute">
    <origin
      xyz="0.00023725 -0.0788 0.022499"
      rpy="7.8276E-06 0.010545 0.00074544" />
    <parent
      link="kering_Link" />
    <child
      link="kering_dalam_Link" />
    <axis
      xyz="0 0 -1" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
  <link
    name="tangan_Link">
    <inertial>
      <origin
        xyz="0.0001859 -0.13261 -0.0053779"
        rpy="0 0 0" />
      <mass
        value="15.97" />
      <inertia
        ixx="0.0014667"
        ixy="0.0018243"
        ixz="-3.1806E-05"
        iyy="0.01033"
        iyz="-1.4127E-05"
        izz="0.011787" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/tangan_Link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_model/meshes/tangan_Link.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="tangan"
    type="revolute">
    <origin
      xyz="-0.0053392 -0.02075 -0.027"
      rpy="3.5707E-15 6.3547E-16 -0.052164" />
    <parent
      link="kering_dalam_Link" />
    <child
      link="tangan_Link" />
    <axis
      xyz="1 0 0" />
    <limit
      effort="0"
      lower="-1.57" upper="1.57"
      velocity="0" />
  </joint>
</robot>