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

fix(mpc): optimization failure due to steer limit #3044

Merged

Conversation

TakaHoribe
Copy link
Contributor

@TakaHoribe TakaHoribe commented Mar 10, 2023

Description

MPC optimization sometimes failed when it receives a steering status larger than mpc_steering_limit. It is due to the break of the optimization constraint.
This PR fixes the prev_steering_value considering the steering limit.

Related links

TIERIV COMPANY INTERNAL LINK: https://tier4.atlassian.net/browse/T4PB-26780

Tests performed

Notes for reviewers

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

@TakaHoribe TakaHoribe requested review from takayuki5168 and a team as code owners March 10, 2023 04:55
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Mar 10, 2023
m_raw_steer_cmd_pprev = current_steer.steering_tire_angle;
// Consider limit. The prev value larger than limiation brakes the optimization constraint and
// resluts in optimization failure.
float steer_lim_f = static_cast<float>(m_steer_lim);
Copy link
Contributor

Choose a reason for hiding this comment

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

const police 👮‍♂️

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!
d49e079

Signed-off-by: Takamasa Horibe <[email protected]>
@TakaHoribe TakaHoribe enabled auto-merge (squash) March 10, 2023 05:33
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (90b7576) 11.93% compared to head (d49e079) 11.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3044      +/-   ##
==========================================
- Coverage   11.93%   11.93%   -0.01%     
==========================================
  Files        1321     1321              
  Lines       91991    91992       +1     
  Branches    24566    24568       +2     
==========================================
  Hits        10978    10978              
- Misses      69654    69655       +1     
  Partials    11359    11359              
Flag Coverage Δ *Carryforward flag
differential 46.27% <0.00%> (?)
total 11.93% <ø> (+<0.01%) ⬆️ Carriedforward from 90b7576

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
control/mpc_lateral_controller/src/mpc.cpp 46.93% <0.00%> (-0.13%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TakaHoribe TakaHoribe merged commit def79f3 into autowarefoundation:main Mar 10, 2023
@TakaHoribe TakaHoribe deleted the fix/mpc-over-steer-lim-failure branch March 10, 2023 05:43
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants