Joint axes problem in urdf

asked 2017-01-31 03:38:07 -0500

Nemo_Nullius gravatar image

updated 2017-01-31 12:56:23 -0500

gvdhoorn gravatar image

Good morning,
I am trying to build the urdf of a robot. When I declare the kinematic model inserting for example one joint between two link, the child one does not rotate on the joint axes.

This is the code

<link name="upper_arm_link">
    <visual>
      <geometry>
        <mesh filename="package://omni_base_robot_model_tom/meshes/STL_Comau/AA_Racer5_2.stl" />
      </geometry>
    </visual>
</link>

 <joint name="elbow_joint" type="revolute">
    <parent link="upper_arm_link" />
    <child link = "forearm_link" />
    <origin xyz="0.27 0 0.2" rpy="0.0 0.0 0.0" />
    <axis xyz="1 0 0"/>
    <limit lower="-6.24" upper="6.24" effort="10.0" velocity="3.14"/>
    <dynamics damping="10" friction="0.1"/>
  </joint>

<link name="forearm_link">
    <visual>
      <geometry>
        <mesh filename="package://omni_base_robot_model_tom/meshes/STL_Comau/AA_Racer5_3.stl" />
      </geometry>
    </visual>
</link>

According to the code the "forearm_link" should rotate on the x axes of the joint; but it rotates on the x axes of the global frame. How can i fix this problem?


Edit: Hi @bhavyadoshi26 and thanks for your interest, here is the full code I am using:

<!--kinematic chain-->

<link name="base_footprint" >
      <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0" />
</link>


<link name="base_link">
    <visual>
      <geometry>
        <mesh filename="package://omni_base_robot_model_tom/meshes/STL_Comau/AA_Racer5_1.stl" />
      </geometry>
     <material name="gray"/>
    </visual>
</link>

<joint name="base_footprint_joint" type="fixed">
    <origin xyz="0 0 0.051" rpy="0 0 0" />
    <parent link="base_footprint"/>
    <child link="base_link"/>
</joint>

<link name="upper_arm_link">
    <visual>
      <geometry>
        <mesh filename="package://omni_base_robot_model_tom/meshes/STL_Comau/AA_Racer5_2.stl" />
      </geometry>
     <material name="gray"/>
     <origin rpy="0 0 0" xyz="0.05 0 0.3650"/>
    </visual>
</link>

<joint name="shoulder_lift_joint" type="revolute">
    <axis xyz="0 0 1" rpy="-1.57 0 0"/>
    <parent link="base_link" />
    <child link = "upper_arm_link" />
    <limit lower="-6.28" upper="6.28" effort="10.0" velocity="3.14"/>
    <dynamics damping="10" friction="0.1"/>
</joint>

<link name="forearm_link">
    <visual>
      <geometry>
        <mesh filename="package://omni_base_robot_model_tom/meshes/STL_Comau/AA_Racer5_3.stl" />
      </geometry>
      <origin rpy="0 0 0" xyz="0.027 0 0.0"/>
     <material name="gray"/>
    </visual>
</link>

<joint name="elbow_joint" type="revolute">
    <axis xyz="1 0 0" rpy="0 0 0"/>
    <parent link="upper_arm_link" />
    <child link = "forearm_link" />
    <limit lower="-6.28" upper="6.28" effort="10.0" velocity="3.14"/>
    <dynamics damping="10" friction="0.1"/>
</joint>

Unfortunately I cannot upload the image because of the rate (<5), anyway the problem seems to be the same discussed on the question you linked, but the solution does not seems to be helpfull.

edit retag flag offensive close merge delete

Comments

The links don't have any origin element. Have you checked the geometric origins for the links? Refer to the answer and comments in this question to see if it helps. Also if possible please share the RViz screenshot.

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2017-01-31 11:03:00 -0500 )edit

@Nemo_Nullius: please don't post answers unless you are actually answering your own question. Please just update your question if you have new information or want to clarify something.

re: img upload: I've given you enough karma to do so.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-31 12:57:56 -0500 )edit