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

feat(pid_longitudinal_controller): improve FF gain constant calculation #5079

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brkay54
Copy link
Member

@brkay54 brkay54 commented Sep 22, 2023

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.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Sep 22, 2023
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch 3 times, most recently from 13f73fe to bac84ba Compare September 26, 2023 22:20
@brkay54 brkay54 self-assigned this Sep 30, 2023
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch 5 times, most recently from 7ff3cf2 to 3cbb362 Compare November 10, 2023 15:42
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch from 3cbb362 to dcb3c98 Compare December 5, 2023 13:40
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch from dcb3c98 to 30ac90d Compare December 21, 2023 07:02
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch 6 times, most recently from 1f1e082 to 3f07254 Compare February 6, 2024 00:19
Signed-off-by: Berkay Karaman <brkay54@gmail.com>
@brkay54 brkay54 force-pushed the pid/change-ff-constant branch from 3f07254 to 99e3e09 Compare February 15, 2024 12:44
@brkay54
Copy link
Member Author

brkay54 commented Feb 15, 2024

@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.

@takayuki5168
Copy link
Contributor

@brkay54
The current implementation is based on #2729
Let me know if you still think this PR will be better than the current one.

@takayuki5168
Copy link
Contributor

@brkay54
Please make this and related PRs draft so that we know that this PR is under the fix.

@takayuki5168 takayuki5168 marked this pull request as draft April 1, 2024 14:46
Copy link

stale bot commented May 31, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label May 31, 2024
@takayuki5168 takayuki5168 removed their assignment Oct 9, 2024
@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Oct 9, 2024
Copy link

stale bot commented Dec 8, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants