How change a joint orientation?

asked 2017-09-19 22:09:01 -0500

williamtovar gravatar image

Hi Guys, excuse my English i'm native Spanish speaker, but I'll try to explain myself. i'm making a simple model of the "dobot magician" in SolidWorks, and was export it to. STL, the normal process. I was use how base a old urdf of a other proyect whit a friend, i was trying to adapt this for my dobot. This is the URDF:

<robot name="Dobot">
  <link name="Base">
    <visual>
      <geometry>
    <mesh filename="package://dobot/meshes/base_link.STL"/>
     </geometry>
     <origin rpy="0 0 0" xyz="0 0 0"/>
     <material name="blue">
       <color rgba="255 0 0 1"/>
     </material>
    </visual>

<collision>
  <geometry>
<mesh filename="package://dobot/meshes/base_link.STL"/>
  </geometry>
  <origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</link>

<joint name="joint1" type="revolute">
  <parent link="Base"/>
  <child link="linkA"/>
  <origin rpy="0 0 0" xyz="0.32 0.3 0.01"/>
  <axis xyz="0 0 0.01" />
  <limit effort="300" velocity="0.1" lower="0" upper="6"/>
  <dynamics damping="50" friction="1"/>
</joint>

<link name="linkA">
   <visual>
       <geometry>
      <mesh filename="package://dobot/meshes/Link_1.STL"/>
       </geometry>
       <origin rpy="0 0 0" xyz="-0.32 -0.3 0.01"/>
       <material name="red">
          <color rgba="0 0 1 1"/>
       </material>
     </visual>
  <collision>
     <geometry>
   <mesh filename="package://dobot/meshes/Link_1.STL"/>
     </geometry>
     <origin rpy="0 0 0" xyz="0 0 0"/>
  </collision>
   <inertial>
  <mass value="1"/>
   <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
  </inertial>
</link>

<joint name="joint2" type="revolute">
    <parent link="linkA"/>
    <child link="linkB"/>
    <origin rpy="-0.78 -0.78 0" xyz="0 0 0"/>
    <axis xyz="0.32 0.3 0.34" />
    <limit effort="300" velocity="0.1" lower="0" upper="3"/>
    <dynamics damping="50" friction="1"/>
 </joint>

 <link name="linkB">
     <visual>
       <geometry>
                <mesh filename="package://dobot/meshes/Link_2.STL"/>
       </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
       <material name="red">
            <color rgba="1 0 0 0"/>
       </material>
    </visual>
  <collision>
     <geometry>
   <mesh filename="package://dobot/meshes/Link_2.STL"/>
     </geometry>
     <origin rpy="0 0 0" xyz="0 0 0"/>
   </collision>
    <inertial>
        <mass value="1"/>
        <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>
 </robot>

Whe i try visualizate the model on RVIZ, the second joint have a rare orientation and i cant change that whit the rpy:

picture of RVIZ:

image description

if i change for example the rpy and xyz of the joint 2, the orientation of the joint not change: Change in the URDF:

      <joint name="joint2" type="revolute">
            <parent link="linkA"/>
            <child link="linkB"/>
            <origin rpy="0 0 0" xyz="0 0 0.34"/>
            <axis xyz="0.32 0.3 0.34" />
            <limit effort="300" velocity="0.1" lower="0" upper="3"/>
            <dynamics damping="50" friction="1"/>
       </joint>

Picture of RVIZ:

image description

Some one know what ... (more)

edit retag flag offensive close merge delete