Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuning Parameters for Velocity Controller #124

Open
jbeck28 opened this issue Feb 27, 2020 · 3 comments
Open

Tuning Parameters for Velocity Controller #124

jbeck28 opened this issue Feb 27, 2020 · 3 comments
Labels
documentation Indicates that improvements or additions to documentation are needed help wanted Extra attention is needed

Comments

@jbeck28
Copy link

jbeck28 commented Feb 27, 2020

I've been using the compliance_controller, which for reference can be located here:
compliance_controller

This is a velocity controller, and hence I've had to do a bit of tuning of the PID parameters that I've found deliver acceptable results. The original issue which led to this is here: #437

Although I'm using the compliance_controller, this inherits from the joint_trajectory_controller, and so should work for that controller as well (a more typical controller).

Here is a copy of the relevant part of my ur5e_controllers.yaml, but keep in mind that I'm not expert, and someone with more experience could probably do a better job finding optimal parameters. Further, the performance of these is dependent on the load on the arm, and my arm is carrying about 1.5kg or so.

compliance_controller:
     type: velocity_controllers/ComplianceController
     joints:
       - shoulder_pan_joint
       - shoulder_lift_joint
       - elbow_joint
       - wrist_1_joint
       - wrist_2_joint
       - wrist_3_joint
     compliance_command_timeout: 1.5
     constraints:
        goal_time: 4
        stopped_velocity_tolerance: 0.01
        shoulder_pan_joint: {trajectory: 0.1, goal: 0.001}
        shoulder_lift_joint: {trajectory: 0.1, goal: 0.001}
        elbow_joint: {trajectory: 0.1, goal: 0.001}
        wrist_1_joint: {trajectory: 0.1, goal: 0.001}
        wrist_2_joint: {trajectory: 0.1, goal: 0.001}
        wrist_3_joint: {trajectory: 0.1, goal: 0.001}
     stop_trajectory_duration: 0.5
     state_publish_rate:  125
     action_monitor_rate: 10
     gains:
        #!!These values have not been optimized!!
        shoulder_pan_joint:  {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}
        shoulder_lift_joint: {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}
        elbow_joint:         {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}
        wrist_1_joint:       {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}
        wrist_2_joint:       {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}
        wrist_3_joint:       {p: 10.0,  i: 0.05, d: 0.1, i_clamp: 1}

     # Use a feedforward term to reduce the size of PID gains
     velocity_ff:
      shoulder_pan_joint: 1.5
      shoulder_lift_joint: 1.5
      elbow_joint: 1.5
      wrist_1_joint: 1.5
      wrist_2_joint: 1.5
      wrist_3_joint: 1.5
@gavanderhoorn
Copy link
Contributor

I asked @jbeck28 to post this here.

Connects to the discussion in #119.

@fmauch
Copy link
Collaborator

fmauch commented Mar 5, 2020

@jbeck28

Without having a deeper look into the compliance_controller implementation: Can you estimate how well those optimizations can be transferred to a pure velocity controller?

I guess especially the weight issue is strongly connected to the compliance implementation?

@jbeck28
Copy link
Author

jbeck28 commented Mar 9, 2020

From my understanding of the compliance_controller, it inherits from the joint_trajectory_controller, and therefore when compliance is disabled it should behave exactly the same.

Weight does make a big difference for compliance, but I did all this tuning without any compliance. I just figured weight might influence the choice of PID values, even for a more typical controller.

@stefanscherzinger stefanscherzinger added documentation Indicates that improvements or additions to documentation are needed help wanted Extra attention is needed labels Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Indicates that improvements or additions to documentation are needed help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants