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

PID: Improve the API docs and change default value of antiwindup #202

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

christophfroehlich
Copy link
Contributor

  • improve function docs
  • add [[nodiscard]] to computeCommand

Comment on lines 127 to 130
Gains(double p, double i, double d, double i_max, double i_min)
: p_gain_(p), i_gain_(i), d_gain_(d), i_max_(i_max), i_min_(i_min), antiwindup_(false)
{
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

does this constructor make sense at all? shouldn't be andiwindup_ set to true? Otherwise i_max and i_min doesn't have any effect.

Copy link
Member

Choose a reason for hiding this comment

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

I think it is good to change it to true as well by default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.41%. Comparing base (fbf9e75) to head (e29ebc1).

Additional details and impacted files
@@             Coverage Diff              @@
##           ros2-master     #202   +/-   ##
============================================
  Coverage        50.41%   50.41%           
============================================
  Files                9        9           
  Lines              486      486           
  Branches            63       62    -1     
============================================
  Hits               245      245           
  Misses             215      215           
  Partials            26       26           
Flag Coverage Δ
unittests 50.41% <ø> (ø)

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

Files Coverage Δ
include/control_toolbox/pid.hpp 77.77% <ø> (ø)

@christophfroehlich christophfroehlich requested review from saikishor and removed request for jaron-l July 18, 2024 07:22
saikishor
saikishor previously approved these changes Jul 18, 2024
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.

The rest looks spot on!

Comment on lines 127 to 130
Gains(double p, double i, double d, double i_max, double i_min)
: p_gain_(p), i_gain_(i), d_gain_(d), i_max_(i_max), i_min_(i_min), antiwindup_(false)
{
}
Copy link
Member

Choose a reason for hiding this comment

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

I think it is good to change it to true as well by default

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.

Awesome. Thanks for the change!

@christophfroehlich christophfroehlich changed the title PID: Improve the API docs PID: Improve the API docs and change default value of antiwindup Jul 18, 2024
@christophfroehlich christophfroehlich merged commit 7d8f745 into ros2-master Jul 18, 2024
26 checks passed
@christophfroehlich christophfroehlich deleted the improve_docs branch July 18, 2024 08:48
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.

3 participants