ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Why joint position controller is not sensitive to changing PID gains?

asked 2016-10-16 07:44:06 -0600

Masoud gravatar image

updated 2016-10-16 11:48:34 -0600

Dear Ros Users

I'm going to use ziegler-nichols method to tune PID gains of an simple inverted pendulum model. I'm wondering why my controller whom type is "position_controllers/JointPositionController", is not sensitive to changing PID gains. Even in the case of setting all k_p, k_i and k_d to zero in following YAML configuation file, controller works well as before.

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

  # Position Controllers ---------------------------------------
  joint1_position_controller:
    type: position_controllers/JointPositionController
    joint: shoulder_pan_joint
    pid: {p: 0.0, i: 0.0, d: 0.0}

And this is the snippets of the urdf model:

  <joint name="shoulder_pan_joint" type="revolute">

    <parent link="Link1"/>

    <child link="Rod"/>

    <!--<origin xyz="0 0.15 0.65" rpy="0 0 0" />-->

    <origin xyz="0 -0.015 0.65" rpy="0 0 0" />

    <axis xyz="0 1 0" />

    <limit effort="300" velocity="1" lower="-2.61799387799" upper="1.98394848567"/>

    <dynamics damping="5" friction="0.1"/>

  </joint>

      <transmission name="tran1">

        <type>transmission_interface/SimpleTransmission</type>

        <joint name="shoulder_pan_joint">
          <hardwareInterface>PositionJointInterface</hardwareInterface>
        </joint>

        <actuator name="motor1">
          <hardwareInterface>PositionJointInterface</hardwareInterface>
          <mechanicalReduction>1</mechanicalReduction>
        </actuator>

      </transmission>

<gazebo reference="shoulder_pan_joint">
    <provideFeedback>true</provideFeedback>
    <disableFixedJointLumping>true</disableFixedJointLumping>
</gazebo>

  <!-- ros_control plugin -->
  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotNamespace>/inverted_pendulum</robotNamespace>
    </plugin>
  </gazebo>

Would you please help me to resolve this issue?

I'm using Ubuntu 14.01 and ROS indigo.

edit retag flag offensive close merge delete

Comments

Hello,friend! Have you solve this problem? I have the same problem as yours. I have commented all the pid codes in my YAML configruation file,but the performance of controller are the same as before.

Johnson gravatar image Johnson  ( 2017-01-18 04:32:01 -0600 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2017-01-18 09:26:15 -0600

rbbg gravatar image

Hi Masoud (And Johnson),

I am by no means a ros_control and/or ros_controllers expert, but here's my interpretation:

You are using a position_controllers/JointPositionController which means you are attempting to control a JointPosition through a position interface. In this case, the interface which you use to communicate with your joint is of the same 'type' as the desired quantity, so it is implied that no controller is needed. Therefore, you can not specify pid gains (I checked the source and indeed it is not a parameter for this type).

As a counter example: if you can only command your joint with a velocity, but would still like to use a jointPositionController, you would use a velocity_controllers/JointPositionController, which does have a pid parameter.

From your description, it seems to me you would be better of using a different type of controller, but I'm not entirely sure which type would suit your application.

Good luck

edit flag offensive delete link more

Comments

3

Thanks!You are right! This site:link text explains it over all.

Johnson gravatar image Johnson  ( 2017-01-19 03:55:00 -0600 )edit
1

I agree with the explanation. The proposed site in english would be great. What language is that website written in? Seems like it is not Chinese. Would like google to translate it for me.

nmelchert gravatar image nmelchert  ( 2018-11-24 01:13:14 -0600 )edit

Question Tools

6 followers

Stats

Asked: 2016-10-16 07:44:06 -0600

Seen: 2,910 times

Last updated: Jan 18 '17