Skip to content

Conversation

@ViktorCVS
Copy link
Contributor

Add new members to the PID controller parameters to support saturation and three new anti-windup features.

These changes support modifications made to the PID controller in the control_toolbox package. For more details, see ros-controls/control_toolbox#298.

If this PR is approved, it should be merged together with the main PR in the control_toolbox package referenced above.

@christophfroehlich
Copy link
Contributor

I set this as draft until we approved the control_toolbox PR.

ViktorCVS and others added 4 commits April 24, 2025 18:07
Adds new members to PID controller parameters to support saturation and
three new anti-windup features.
Replace the `subset_of` validator with `one_of` because
`antiwindup_strategy` is a single string, not a string_array.
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.23%. Comparing base (6920a2a) to head (cd62bc8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1585   +/-   ##
=======================================
  Coverage   86.23%   86.23%           
=======================================
  Files         123      123           
  Lines       11903    11903           
  Branches      994      994           
=======================================
  Hits        10264    10264           
  Misses       1337     1337           
  Partials      302      302           
Flag Coverage Δ
unittests 86.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich marked this pull request as ready for review June 6, 2025 09:37
destogl
destogl previously approved these changes Jun 7, 2025
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

I know that this is not only related to this PR here, but I realize now that the saturation parameter is somehow superfluous: What do you think about initializing u_clamp with inf here, which will be std::numeric_limits<double>::infinity() and the clamping in the base class automatically deactivated? I don't see the benefit of adding an additional boolean parameter..

@christophfroehlich
Copy link
Contributor

Sai is working on this in ros-controls/control_toolbox#390

ViktorCVS and others added 2 commits June 13, 2025 14:59
The saturation parameter has been removed, and the anti-windup
parameter, along with i_clamp_max and i_clamp_min—has been marked as
deprecated. Additionally, the default saturation bounds have been updated
to positive and negative infinity.
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.

I suggested some changes based on the upcoming changes of
ros-controls/control_toolbox#400

Co-authored-by: Sai Kishor Kothakota <[email protected]>
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Another update. I'll open a similar PR with changes to JTC soon.

@ViktorCVS
Copy link
Contributor Author

Another update. I'll open a similar PR with changes to JTC soon.

Nice! There are something more I can change in this PR?

@christophfroehlich
Copy link
Contributor

Could you please add release_notes similar to #1759? Then everything is fine I think

ViktorCVS and others added 2 commits June 18, 2025 07:26
Simplified the PID controller section in doc/release_notes.rst by adding
support for u_clamp_max and u_clamp_min output limits, deprecating the
old antiwindup flag and i_clamp_max/i_clamp_min in favor of a more
flexible antiwindup_strategy and introducing tracking_time_constant and
error_deadband.
@ViktorCVS
Copy link
Contributor Author

Could you please add release_notes similar to #1759? Then everything is fine I think

After merging this PR, I’ll open a new one in control_toolbox to remove the old anti-windup technique, right?

@christophfroehlich
Copy link
Contributor

I had to fix some pre-commit errors, and added explicit migration notes.

After merging this PR, I’ll open a new one in control_toolbox to remove the old anti-windup technique, right?

Let us fix ros-controls/control_toolbox#156 first, then we remove all deprecations at once.

@christophfroehlich christophfroehlich added the backport-jazzy Triggers PR backport to ROS 2 jazzy. label Jun 19, 2025
@christophfroehlich christophfroehlich merged commit aebe6b1 into ros-controls:master Jun 19, 2025
19 of 27 checks passed
mergify bot pushed a commit that referenced this pull request Jun 19, 2025
(cherry picked from commit aebe6b1)

# Conflicts:
#	doc/migration.rst
#	doc/release_notes.rst
christophfroehlich added a commit that referenced this pull request Jun 23, 2025
Co-authored-by: Victor Coutinho Vieira Santos <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants