Skip to content

Update documentation of PID class #388

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

Merged

Conversation

ViktorCVS
Copy link
Contributor

Documentation PR post-PR #298 merge

Clarify and expand migration instructions now that pull request ros-controls#298 has
been merged, ensuring users know how to adjust their configurations
accordingly.
@ViktorCVS
Copy link
Contributor Author

@christophfroehlich I’ve created a PR to update the documentation, but I’m not sure if there are other repositories or files I need to update. Can you help me with that?

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.38%. Comparing base (b2b3425) to head (fd7d000).

Additional details and impacted files
@@             Coverage Diff              @@
##           ros2-master     #388   +/-   ##
============================================
  Coverage        78.38%   78.38%           
============================================
  Files               30       30           
  Lines             1888     1888           
  Branches           114      114           
============================================
  Hits              1480     1480           
  Misses             338      338           
  Partials            70       70           
Flag Coverage Δ
unittests 78.38% <ø> (ø)

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

Files with missing lines Coverage Δ
control_toolbox/include/control_toolbox/pid.hpp 66.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich
Copy link
Contributor

@christophfroehlich I’ve created a PR to update the documentation, but I’m not sure if there are other repositories or files I need to update. Can you help me with that?

I suggest that you add the documentation here
https://github.com/ros-controls/control_toolbox/blob/ros2-master/doc/control_toolbox.md
which will be published here
https://control.ros.org/rolling/doc/control_toolbox/doc/index.html

Add a new section for the PID, copy basis information from the docstring and add your antiwindup description from the other PR there.

ViktorCVS and others added 3 commits June 12, 2025 10:31
Adds a comprehensive PID section to control_toolbox.md, covering the
standard PID equation, descriptions of proportional, integral, and
derivative gains, output limits, detailed explanations of anti-windup
strategies (back-calculation and conditional integration) with update
rules and default values, and a C++ usage example.
Clarify and expand migration instructions now that pull request ros-controls#298 has
been merged, ensuring users know how to adjust their configurations
accordingly.
@ViktorCVS ViktorCVS marked this pull request as ready for review June 13, 2025 13:40
@ViktorCVS
Copy link
Contributor Author

@christophfroehlich I’ve created a PR to update the documentation, but I’m not sure if there are other repositories or files I need to update. Can you help me with that?

I suggest that you add the documentation here https://github.com/ros-controls/control_toolbox/blob/ros2-master/doc/control_toolbox.md which will be published here https://control.ros.org/rolling/doc/control_toolbox/doc/index.html

Add a new section for the PID, copy basis information from the docstring and add your antiwindup description from the other PR there.

Done! I changed it from draft to open. If there is still documentation to add, I’ll add more commits.

ViktorCVS and others added 2 commits June 13, 2025 13:55
Adds a comprehensive PID section to control_toolbox.md, covering the
standard PID equation, descriptions of proportional, integral, and
derivative gains, output limits, detailed explanations of anti-windup
strategies (back-calculation and conditional integration) with update
rules and default values, and a C++ usage example.
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.

Thanks for this addition. Some details got outdated, comments see below.

please update also the docstring of the Pid Class in pid.hpp accordingly (remove i_clamp etc).

And could you please also add the references to literature?


Pid/PidRos
***********************************************************
* The parameters :paramref:`antiwindup`, :paramref:`i_clamp_max`, and :paramref:`i_clamp_min` have been removed. The anti-windup behavior is now configured via the :paramref:`AntiwindupStrategy` enum. (`#298 <https://github.com/ros-controls/control_toolbox/pull/298>`_).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The parameters :paramref:`antiwindup`, :paramref:`i_clamp_max`, and :paramref:`i_clamp_min` have been removed. The anti-windup behavior is now configured via the :paramref:`AntiwindupStrategy` enum. (`#298 <https://github.com/ros-controls/control_toolbox/pull/298>`_).
* The parameters :paramref:`antiwindup`, :paramref:`i_clamp_max`, and :paramref:`i_clamp_min` have been removed. The anti-windup behavior is now configured via the :paramref:`AntiWindupStrategy` enum. (`#298 <https://github.com/ros-controls/control_toolbox/pull/298>`_).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Solved in commit eaf1721

@ViktorCVS
Copy link
Contributor Author

Thanks for this addition. Some details got outdated, comments see below.

please update also the docstring of the Pid Class in pid.hpp accordingly (remove i_clamp etc).

And could you please also add the references to literature?

Done!

@christophfroehlich christophfroehlich changed the title Update documentation post-PR #298 merge Update documentation of PID class Jul 1, 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.

Thanks a lot. Next time, please use the github UI to apply suggested changes if you fully agree, this makes the re-review faster for us ;)

@christophfroehlich christophfroehlich added the backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 jazzy. label Jul 1, 2025
@christophfroehlich christophfroehlich merged commit ff1f2d6 into ros-controls:ros2-master Jul 1, 2025
22 of 24 checks passed
mergify bot pushed a commit that referenced this pull request Jul 1, 2025
(cherry picked from commit ff1f2d6)

# Conflicts:
#	doc/migration.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 jazzy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants