0
$\begingroup$

Rosanswers logo

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.


Originally posted by Masoud on ROS Answers with karma: 41 on 2016-10-16

Post score: 1


Original comments

Comment by Johnson on 2017-01-18:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by rbbg with karma: 1823 on 2017-01-18

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by Johnson on 2017-01-19:
Thanks!You are right! This site:link text explains it over all.

Comment by nmelchert on 2018-11-24:
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.

$\endgroup$

Your Answer

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