Can't set p gain higher than 100000.0 in pid loop

asked 2020-04-27 13:37:04 -0500

sr.Felipes gravatar image

Hi! I'm working in the tunning of the PID controllers in a custom made SCARA following the tutorial in http://gazebosim.org/tutorials/?tut=r.... For doing this I tried to follow a ziegler-nichols approach, to do so I have to find the critical gain this is the higher value of the gain that generates oscillations that do not diverge. I used the dynamic reconfigure node to do this but i can't set the gain higher than 100000.0, I tried using the rqt_gui and the command line 'rosrun dynamic_reconfigure dynparam set' with the same result. I can set higher values in the .yaml configuration file but if the dynamic reconfigure is called the gain is set to 10000.0, I get no messages or errors btw. I'm Using ROS Melodic with gazebo 9 and running in ubuntu Ubuntu 18.04.4 LTS with an I5 i5-3210M 2.5GHzx4 and 10GB ram. My controller configuration file is:

nelen:
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 250
  codo_cont:
    type: effort_controllers/JointPositionController
    joint: codo
    pid: {p: 100.0, i: 0.01, d: 10.0}
 hombro_control:
   type: effort_controllers/JointPositionController
   joint: hombro
   pid: {p:  1000000.0, i: 0.01, d: 10.0}
 prism_control:
   type: effort_controllers/JointPositionController
   joint: pris
   pid: {p: 100.0, i: 0.01, d: 10.0}

And my xacro urdf is

<?xml version="1.0"?>

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro%22" name="nelen">xmlns:xacro="http://www.ros.org/wiki/...></robot>

<!-- XACRO parameters-->
<xacro:arg name="simulation" default="false"/>
<xacro:arg name="fixed" default="true"/>
<xacro:arg name="name" default="base"/>

<!-- Controller parameters-->
<xacro:property name="ctrl_period" value="0.001"/>

<!-- Arm parameterization -->
<!-- Links -->
<!-- Base -->
<xacro:property name="base_name" value= "base"/>
<xacro:property name="base_x" value= "0.0"/>
<xacro:property name="base_y" value= "-0.013269"/>
<xacro:property name="base_z" value= "0.186625"/>
<xacro:property name="base_mass" value= "16.257"/>
<xacro:property name="base_inertia_xx" value="0.287904198"/>
<xacro:property name="base_inertia_xy" value="1.2458E-05"/>
<xacro:property name="base_inertia_xz" value="-3.6572E-05"/>
<xacro:property name="base_inertia_yy" value="0.273812908"/>
<xacro:property name="base_inertia_yz" value="0.028468483"/>
<xacro:property name="base_inertia_zz" value="0.103858097"/>

<!-- Upper arm (humero) -->
<xacro:property name="upper_arm_name" value= "humero"/>
<xacro:property name="upper_arm_x" value="0.0"/>
<xacro:property name="upper_arm_y" value="0.140081"/>
<xacro:property name="upper_arm_z" value="0.046772"/>
<xacro:property name="upper_arm_mass" value= "4.508"/>
<xacro:property name="upper_arm_inertia_xx" value="0.084313192"/>
<xacro:property name="upper_arm_inertia_xy" value="0.0"/>
<xacro:property name="upper_arm_inertia_xz" value="0.0"/>
<xacro:property name="upper_arm_inertia_yy" value="0.004921527"/>
<xacro:property name="upper_arm_inertia_yz" value="-0.003897897"/>
<xacro:property name="upper_arm_inertia_zz" value="0.086393037"/>

<!-- Fore Arm (radio cubito) -->
<xacro:property name="fore_arm_name" value= "rc"/>
<xacro:property name="fore_arm_x" value= "0.0"/>
<xacro:property name="fore_arm_y" value ...
(more)
edit retag flag offensive close merge delete