choose right ros_control configuration for a kuka arm

asked 2018-05-02 01:59:11 -0500

Markus gravatar image

Hey there,

I currently decided to use a kuka kr 5 robot (one of the ros -industrial robots). I use ros - indigo.

What is the simplest way to control the Endeffectors position accurately?

I mean there a lots of possibilities:

1) What Controller should I choose? (I currently use effort_controllers/Joint Effort controller) 2) What Hardware Interface should I choose? (EffortJointInterface) 3) How to correctly adjust the pid values? 4) Should I choose for every joint the same configuration?

Here is what I have so far (however the last 3 joints are trembling a lot even though I do not do anything with them ...)

Code snippets:

<xacro:arg name="motors_controller_type" default="EffortJointInterface" /> <!-- PositionJointInterface EffortJointInterface-->
    <!-- ros_control plugin -->
  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotNamespace>/manipulator</robotNamespace>
<!--      <robotParam>robot_description</robotParam>  this causes a lot of trouble!!!-->
      <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
      <controlPeriod>0.001</controlPeriod>
    </plugin>
  </gazebo>

 <!-- Transmissions for ROS Control same for all 5 joints!-->
<transmission name="tran1">
   <type>transmission_interface/SimpleTransmission</type>
   <joint name="joint_a1">
   <hardwareInterface>$(arg motors_controller_type)</hardwareInterface>
   </joint>
   <actuator name="motor1">
      <hardwareInterface>$(arg motors_controller_type)</hardwareInterface>

5) Now the joint_effort_limits of the links is what I had to set quite precisely otherwise the robot arm collapses or trembels a lot!

<!--    effort values can be found here: https://github.com/ros-industrial/universal_robot/issues/32-->
    <xacro:property name="joint_effort_limit_1" value="150" />
    <xacro:property name="joint_effort_limit_2" value="150" />
    <xacro:property name="joint_effort_limit_3" value="150" />
    <xacro:property name="joint_effort_limit_4" value="28" />
    <xacro:property name="joint_effort_limit_5" value="0.01" />
    <xacro:property name="joint_effort_limit_6" value="2" /> <!-- let this value low! -->

   <xacro:macro name="kuka_kr5" params="prefix">

<!-- LINKS -->
<!-- base link -->
<link name="${prefix}base_link">
  <inertial>
    <origin xyz="-0.017519394031846 8.11394768450848E-07 0.0975924044854325"
            rpy="0 0 0" />
    <mass value="7000" /> <!-- changed mass! 7.58585707666653 -->
    <inertia
        ixx="0.0441803207364147"
        ixy="5.37433593375545E-07"
        ixz="0.004045564920652"
        iyy="0.0584309411563095"
        iyz="-4.8990117845347E-07"
        izz="0.0514875586171667" />
  </inertial>
  <visual>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
      <mesh filename="package://kuka_kr5_description/meshes/kr5_arc/visual/base_link.dae" />
    </geometry>
  </visual>
  <collision>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <geometry>
      <mesh filename="package://kuka_kr5_description/meshes/kr5_arc/collision/base_link.stl" />
    </geometry>
  </collision>
</link>
<!-- link 1 (A1) -->
<link name="${prefix}link_1">
  <inertial>
    <origin
      xyz="0.0359968408135882 0.00783796591813503 -0.0864969937502713"
      rpy="0 0 0" />
    <mass
      value="5.77242340173648" />
    <inertia
      ixx="0.0327019582662897"
      ixy="-0.00189987845379704"
      ixz="0.00937014136132958"
      iyy="0.0373787564144547"
      iyz="-0.00197023031658988"
      izz="0.0348614383349291" />
  </inertial>
  <visual>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://kuka_kr5_description/meshes/kr5_arc/visual/link_1.dae" />
    </geometry>
  </visual>
  <collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://kuka_kr5_description/meshes/kr5_arc/collision/link_1.stl" />
    </geometry>
  </collision>
</link>
          <mechanicalReduction>1</mechanicalReduction>
       </actuator>
    </transmission>

6) .pid's should they be choosen for every ros_controller type? I always thought there are some controller types where choosing the pid values is not necessary.....

manipulator:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  

  # Position Controllers ---------------------------------------
  link_1_controller:
    type: effort_controllers/JointPositionController
    joint: joint_a1
    pid: {p: 1000.00, i: 200.00, d ...
(more)
edit retag flag offensive close merge delete

Comments

Did you get any solution? I am also facing the same issue. Instead of end effector, my full robot is trembling

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-07-30 06:24:09 -0500 )edit