-
Notifications
You must be signed in to change notification settings - Fork 683
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
feat(pid_longitudinal_controller): improve FF gain constant calculation #5079
base: main
Are you sure you want to change the base?
Conversation
13f73fe
to
bac84ba
Compare
7ff3cf2
to
3cbb362
Compare
3cbb362
to
dcb3c98
Compare
dcb3c98
to
30ac90d
Compare
1f1e082
to
3f07254
Compare
Signed-off-by: Berkay Karaman <brkay54@gmail.com>
3f07254
to
99e3e09
Compare
@TakaHoribe -san It is a very small change. The core idea is FF gain should increase if the velocity error increases. In the current implementation, it might not increase in some cases. |
@brkay54 |
This pull request has been automatically marked as stale because it has not had recent activity. |
This pull request has been automatically marked as stale because it has not had recent activity. |
Description
In current implementation:
FF Gain Calculation --> min_gain <= current_vel_abs/target_vel_abs <= max_gain
I assume that FF Gain should increase if the velocity error increases. In the current implementation, The gain can decrease if the velocity error increases in the case current_vel_abs < target_vel_abs.
However, a better approach would be:
FF Gain Calculation --> min_gain <= 1.0 + (abs(current_target_vel_abs - current_vel_abs) / std::max(current_target_vel_abs, 0.1)) <= max_gain
It will increase or decrease the FF gain concerning the last velocity error.
Tests performed
Tested in Planning Simulator and worked well.
Effects on system behavior
There is no effect.
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.