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

Add support for getting PID parameters from loaded parameters (backport #374) #376

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 16, 2024

Hello!

The issue #369 will be fixed once this is merged. It seems that for our Humanoids we will be needing this PID feature to make it work using position.

This PR:

I hope this helps someone. If this PR changes look fine. I will open the following PR in the gz_ros2_control

   <gazebo>
      <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
        <ros>
          <argument>--ros-args</argument>
          <argument>--params-file</argument>
          <argument>$(find talos_description)/config/gazebo_controller_manager_cfg.yaml</argument>
        </ros>
        <hold_joints>false</hold_joints>
        <parameters>$(find talos_description)/config/gazebo_controller_manager_cfg.yaml</parameters>
      </plugin>
    </gazebo>

Defining it like this should work

gazebo_ros2_control:
  ros__parameters:
    pid_gains:
      position:
        leg_left_1_joint: {kp:  5000.0, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}
        leg_left_2_joint: {kp:  5000.0, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}
        leg_left_3_joint: {kp:  5000.0, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}
        leg_left_4_joint: {kp:  5000.0, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}
        leg_left_5_joint: {kp:  5000, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}
        leg_left_6_joint: {kp:  5000.0, kd: 20.0, ki:  5.0, max_integral_error: 10000.0}<hr>This is an automatic backport of pull request #374 done by [Mergify](https://mergify.com).

Co-authored-by: Christoph Fröhlich <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit 6a4cc84)
Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahcorde Great news! This backport works already without any other changes. Tested on a fresh docker Iron docker

@ahcorde ahcorde merged commit 708423d into iron Sep 17, 2024
5 checks passed
@ahcorde ahcorde deleted the mergify/bp/iron/pr-374 branch September 17, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants