-
Notifications
You must be signed in to change notification settings - Fork 689
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
fix(autoware_pid_longitudinal_controller): correct the PID controller #8118
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
a8af174
to
25c964e
Compare
Line 33 in c0f07c2
doxygen comment also should be changed |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8118 +/- ##
=======================================
Coverage 29.25% 29.25%
=======================================
Files 1600 1600
Lines 117736 117751 +15
Branches 50713 50707 -6
=======================================
+ Hits 34438 34447 +9
+ Misses 74098 74064 -34
- Partials 9200 9240 +40
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
…equired. Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
Signed-off-by: Zhe Shen <[email protected]>
55f0787
to
ceab242
Compare
@@ -1107,11 +1107,13 @@ double PidLongitudinalController::applyVelocityFeedback(const ControlData & cont | |||
(vehicle_is_moving || (m_enable_integration_at_low_speed && vehicle_is_stuck)) && | |||
is_under_control; | |||
|
|||
const bool erase_integral = !enable_integration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to use the negative enable_integration here?
Using enable_integration consistently is easier to understand the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 0555ea5
Signed-off-by: Zhe Shen <[email protected]>
This pull request has been automatically marked as stale because it has not had recent activity. |
@HansOersted @takayuki5168 Do you still need this modification? |
It will take time to confirm this PR including the real vehicle experiment and we don't have a plan for that, so let me close it for now. |
Description
The previous PID controller in Autoware is actually equivalent to a PD/PI controller.
This PR corrects the utilization of and upgrades to the PID controller.
N.B. Without specific reasons, the parameters adopted in the previous PD/PI controller are adopted in another PR. And the parameters in that PR are equivalent to the PD/PI controller.
Before change:
Screencast from 07-19-2024 02_05_57 PM.webm
After change:
Screencast from 07-19-2024 02_37_49 PM.webm
Note that one of the benefits of using implementing PID controllers is being robust to the external noise (e.g., driving on an ice road). Therefore, a noise was introduced artificially to test the PD/PI controller (before) and PID controller (after).
Noise definition: a constant acceleration (+1.0 m/s2), that is
return feedback_acc + 1.0;
.Also, note the PID output constraint has been relaxted to
max_out: 2.0
,min_out: -2.0
in the analysis.Before change:
Screencast from 07-19-2024 02_15_43 PM.webm
After change (with new parameters below)
Screencast.from.07-19-2024.04_26_14.PM.webm
N.B. In the parameter PR, we picked the parameters equivalent to the PI/PD controller.
It means that it will also show limit robustness to the external noise.
Conclusions:
Further steps:
Discussions:
reset()
.Tests performed
Effects on system behavior
Not applicable.
Interface changes
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.