0
$\begingroup$

Really need help, thanks! I got a URDF file of Fanuc CRX-10ia robot.It is converted from solidwords by SW2URDF. The urdf seems correct by a visualization software.

urdf file and roboguide

But when i test inverse kinematics(for example, ikpy), the result is not correct. The position is (540,-150,380,-180,0,0)(i had already add 245mm bias to z because fanuc robot origin z is set to joint2 z), the joints supposed to be [0,0,0,0,-90,0],but my result is not correct. enter image description here

Is there any wrong in the URDF file? Can you help check urdf or test inverse kinematic using my urdf?Thanks.

    <?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner ([email protected]) 
     Commit Version: 1.6.0-4-g7f85cfe  Build Version: 1.6.7995.38578
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="crx10ia">
  <link name="dummy">
  </link>
  <joint name="dummy_joint" type="fixed">
     <parent link="dummy"/>
     <child link="base_link"/>
  </joint>
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="-0.0054019 -4.3001E-07 0.040868"
        rpy="0 0 0" />
      <mass
        value="1.9033" />
      <inertia
        ixx="0.004446"
        ixy="-1.192E-06"
        ixz="4.87E-05"
        iyy="0.0051616"
        iyz="-2.3621E-08"
        izz="0.0076083" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="/home/zsw3106/Workspace/curobo/src/curobo/content/assets/robot/fanuc_description/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="/home/zsw3106/Workspace/curobo/src/curobo/content/assets/robot/fanuc_description/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="Link_1">
    <inertial>
      <origin
        xyz="-3.4435E-07 -0.017683 0.12491"
        rpy="0 0 0" />
      <mass
        value="5.5064" />
      <inertia
        ixx="0.03664"
        ixy="-8.9875E-09"
        ixz="1.0812E-07"
        iyy="0.031274"
        iyz="0.00356"
        izz="0.022961" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_1.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_1"
    type="revolute">
    <origin
      xyz="0 0 0.085"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="Link_1" />
    <axis
      xyz="0 0 -1" />
    <limit
      lower="-3.315"
      upper="3.315"
      effort="100"
      velocity="2.09" />
  </joint>
  <link
    name="Link_2">
    <inertial>
      <origin
        xyz="5.7926E-07 -0.25879 -0.082018"
        rpy="0 0 0" />
      <mass
        value="10.587" />
      <inertia
        ixx="0.52427"
        ixy="-1.3151E-06"
        ixz="-6.8844E-07"
        iyy="0.035436"
        iyz="0.019188"
        izz="0.51313" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_2.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_2.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_2"
    type="revolute">
    <origin
      xyz="0 -0.119 0.16"
      rpy="-1.5708 0 0" />
    <parent
      link="Link_1" />
    <child
      link="Link_2" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-3.14"
      upper="3.14"
      effort="100"
      velocity="2.09" />
  </joint>
  <link
    name="Link_3">
    <inertial>
      <origin
        xyz="0.0352 -2.2701E-05 -0.069533"
        rpy="0 0 0" />
      <mass
        value="2.8443" />
      <inertia
        ixx="0.0064625"
        ixy="-2.0546E-08"
        ixz="0.00075403"
        iyy="0.012855"
        iyz="2.0951E-08"
        izz="0.012565" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_3.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_3.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_3"
    type="revolute">
    <origin
      xyz="0 -0.54002 0.043"
      rpy="-3.1416 0 0" />
    <parent
      link="Link_2" />
    <child
      link="Link_3" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-4.975"
      upper="4.975"
      effort="100"
      velocity="3.14" />
  </joint>
  <link
    name="Link_4">
    <inertial>
      <origin
        xyz="-3.2762E-07 -0.001693 -0.22934"
        rpy="0 0 0" />
      <mass
        value="3.4172" />
      <inertia
        ixx="0.059409"
        ixy="3.2824E-08"
        ixz="-6.874E-08"
        iyy="0.059142"
        iyz="-0.00093412"
        izz="0.0045032" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_4.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_4.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_4"
    type="revolute">
    <origin
      xyz="0.153 -2.2036E-05 -0.076"
      rpy="-1.5708 0 1.5708" />
    <parent
      link="Link_3" />
    <child
      link="Link_4" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-3.315"
      upper="3.315"
      effort="34.8"
      velocity="3.14" />
  </joint>
  <link
    name="Link_5">
    <inertial>
      <origin
        xyz="1.3661E-07 -0.02022 0.074037"
        rpy="0 0 0" />
      <mass
        value="1.483" />
      <inertia
        ixx="0.0040117"
        ixy="-1.117E-08"
        ixz="1.5077E-08"
        iyy="0.0027408"
        iyz="0.00038446"
        izz="0.0031959" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_5.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_5.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_5"
    type="revolute">
    <origin
      xyz="0 -0.064 -0.387"
      rpy="1.5708 3.1416 0" />
    <parent
      link="Link_4" />
    <child
      link="Link_5" />
    <axis
      xyz="0 0 -1" />
    <limit
      lower="-3.14"
      upper="3.14"
      effort="26"
      velocity="3.14" />
  </joint>
  <link
    name="Link_6">
    <inertial>
      <origin
        xyz="4.4881E-06 0 -0.028492"
        rpy="0 0 0" />
      <mass
        value="0.36405" />
      <inertia
        ixx="0.00028226"
        ixy="-2.3203E-27"
        ixz="2.353E-08"
        iyy="0.0002823"
        iyz="5.2949E-24"
        izz="0.0003782" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_6.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="meshes/Link_6.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_6"
    type="revolute">
    <origin
      xyz="0 -0.0995 0.086"
      rpy="-1.5708 0 0" />
    <parent
      link="Link_5" />
    <child
      link="Link_6" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-3.925"
      upper="3.925"
      effort="11"
      velocity="3.14" />
  </joint>
  <link name="tool0">
    <collision>
      <geometry>
        <box size="0.01 0.01 0.01"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0.0 0 -0.06"/>
    </collision>
  </link>
  <joint name="joint_tool0" type="fixed">
    <!-- default toolframe: X+ left, Y+ up, Z+ front -->
    <origin rpy="0 0 0" xyz="0 0 0.0"/>
    <parent link="Link_6"/>
    <child link="tool0"/>
  </joint>
</robot>
$\endgroup$

1 Answer 1

0
$\begingroup$

Check with some tool like RViz to see if the joint zero position is where expected and if the direction of the rotation when changing from zero to some positive or negative angles matches what is expected.

If the joint rotates in the opposite direction than it should, you need to reverse the sign of the item in the <axis> entry. If the zero is at the wrong position, this can be fixed by rotating the whole joint in the <origin> entry (one of the values of the "rpy" attribute). See here for documentation about these entries.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.