Ask Your Question

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.

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

  # Position Controllers ---------------------------------------
    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"/>


      <transmission name="tran1">


        <joint name="shoulder_pan_joint">

        <actuator name="motor1">


<gazebo reference="shoulder_pan_joint">

  <!-- ros_control plugin -->
    <plugin name="gazebo_ros_control" filename="">

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


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

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



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

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



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

Seen: 1,976 times

Last updated: Jan 18 '17