0
$\begingroup$

Rosanswers logo

Hi all ,

I create a one URDF file from Solidworks and i tried to rotate its joint . then i get Wrong origin of joint . i mean when i rotate joint of Robotic arm its rotate about its base joint not about its axis . i need to define cooridante frame in specific direction or need to create every joint cooridante system in specific directions

here is my URDF code :-

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

<link name="world"/>
  <link name="base_link">
   
<inertial>
 <mass value="0.11529" />
<inertia ixx="9.8E-05" ixy="-1.15E-05"  ixz="8.6465E-05" iyy="4.444E-05" iyz="-3.4586E-05" izz="4.73321E-05" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 -1.7 0" />
      <geometry>
        <mesh filename="package://ros_as/meshes/base_link.STL" />
      </geometry>
      <material name="">
        <color rgba="0.77647 0.75686 0.73725 1" />
      </material>
    </visual>
  </link>

  <link name="link1">
  
<inertial>
<mass value="0.11529" />
<inertia ixx="1.2008E-05" ixy="-4.262E-05"  ixz="-2.59095E-05" iyy="2.743395E-05" iyz="4.1807E-05" izz="2.794303E-05" />
    </inertial>
    <visual>
      <origin xyz="0.001 -0.038 0.02" rpy="-1.7 0 0" />
      <geometry>
        <mesh filename="package://ros_as/meshes/link1.STL" />
      </geometry>
      <material name="">
        <color rgba="0.77647 0.75686 0.73725 1" />
      </material>
    </visual>
  </link>



  <link name="link2">
   
<inertial>
<mass value="0.11529" />
<inertia ixx="3.46069E-05" ixy="-7.86556E-05" ixz="-1.295125E-05" iyy="7.548495E-05" iyz="1.42141E-05" izz="7.410357E-05" />
    </inertial>
    <visual>
      <origin xyz="0.001 -0.066 0.05" rpy="-1.7 0 0" />
      <geometry>
        <mesh filename="package://ros_as/meshes/link2.STL" />
      </geometry>
      <material name="">
        <color rgba="0.77647 0.75686 0.73725 1" />
      </material>
    </visual>
 
  </link>

<joint name="j0" type="fixed">
    <parent link="world" />
    <child link="base_link" />
  <origin xyz="0 0 0" rpy="0 0 0" />
</joint>

  <joint name="j1" type="revolute">
    <parent link="base_link" />
    <child link="link1" />
    <origin xyz="0.03593 0 0" rpy="-1.5708 0 1.657" />
    <axis xyz="0 0 1" />
    <limit lower="-3.14" upper="3.14" effort="20" velocity="5" />
  </joint>

  <joint name="j2" type="revolute">
    <parent link="link1" />
    <child link="link2" />
    <origin  xyz="0 -0.01 -0.03593" rpy="0 0.034067 0" />
    <axis xyz="0 0 1" />
    <limit lower="-3.14" upper="3.14" effort="20" velocity="5" />
  </joint>

<transmission name="tran0">
<type>transmission_interface/SimpleTransmission</type>
<joint name="j1">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="motor0">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<transmission name="tran1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="j2">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="motor1">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<gazebo>
<plugin name="control" filename="libgazebo_ros_control.so"/>
</gazebo>

</robot>

Home position joints potion


Originally posted by lagankapoor on ROS Answers with karma: 216 on 2018-03-14

Post score: 0


Original comments

Comment by Delb on 2018-03-14:
Can you edit your question to put your urdf code wiht the preformatted text (101010 button or CTRL+K) ?

Comment by lagankapoor on 2018-03-14:
@delb Done Sir

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

If you used the SolidWorks urdf exporter plugin this is most likely caused by the fact that your mates were not in the correct location.

Or if they were, then either the plugin failed in correctly identifying them, or you misconfigured them in the export wizard.


Originally posted by gvdhoorn with karma: 86574 on 2018-03-14

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by lagankapoor on 2018-03-14:
@gvdhoorn Sir i chose them Right in solidworks wizard and then after geting URDF file i manually translate links from horizontal to vertical position . is there any way to correct them ?

Comment by lagankapoor on 2018-03-15:
@gvdhoorn Sir help me to be more specific about URDF wizard information , so that i learn . in SW tutorials not explain much about that

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have solved this issue with URDF base coordinates and with its reference joint coordinates
i attached screenshot hereWorking well


Originally posted by lagankapoor with karma: 216 on 2018-03-15

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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