-
Notifications
You must be signed in to change notification settings - Fork 696
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_lateral_controller): align the MPC steering angle when the car is controlled manually. #7109
fix(mpc_lateral_controller): align the MPC steering angle when the car is controlled manually. #7109
Conversation
893f5af
to
fb242a6
Compare
@HansOersted |
3b04ccd
to
ce00f6d
Compare
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.
If the vehicle does not follow the MPC command (e.g. in manual mode), the previous value used to keep the consistency will not make sense. It is reasonable to reset the previous value to the current value in this case.
@HansOersted Please read the description and make sure these check box are done before merge. |
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
…abled Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
3ed6531
to
5e044bf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7109 +/- ##
===========================================
+ Coverage 14.84% 18.89% +4.05%
===========================================
Files 1999 149 -1850
Lines 139163 13429 -125734
Branches 43716 2214 -41502
===========================================
- Hits 20661 2538 -18123
+ Misses 95731 10537 -85194
+ Partials 22771 354 -22417
☔ View full report in Codecov by Sentry. |
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
…r is controlled manually. (autowarefoundation#7109) * align the MPC steering angle when the car is controlled manually. Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * update the condition for is_driving_manually Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * STOP mode included Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * comment the is_driving_manually Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * align the steering outside (after) the solver. Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * use the flag input_data.current_operation_mode.is_autoware_control_enabled Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * correct a typo Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * correct the under control condition check Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * undo the space delete Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * unchange the unrelevant line Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * pre-commit Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> --------- Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> Signed-off-by: Simon Eisenmann <simon.eisenmann@driveblocks.ai>
…r is controlled manually. (#7109) * align the MPC steering angle when the car is controlled manually. Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * update the condition for is_driving_manually Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * STOP mode included Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * comment the is_driving_manually Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * align the steering outside (after) the solver. Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * use the flag input_data.current_operation_mode.is_autoware_control_enabled Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * correct a typo Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * correct the under control condition check Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * undo the space delete Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * unchange the unrelevant line Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> * pre-commit Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com> --------- Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
Description
The MPC steering angle stops tracking the actual one while the car is driving manually.
This causes the so-called "improper initial steering angle" after switching from manual to auto as below:
case 1
Screencast from 06-14-2024 01:39:49 PM.webm
case 2
Screencast from 06-14-2024 02:10:00 PM.webm
case 3
Screencast from 06-14-2024 02:31:54 PM.webm
This PR aligns the MPC steering angle when the car is controlled manually.
The resulting response of the updated algorithm is given below:
case 1 (after modification)
Screencast from 06-14-2024 01:27:01 PM.webm
case 2 (after modification)
Screencast from 06-14-2024 02:04:21 PM.webm
case 3 (after modification)
Screencast from 06-14-2024 02:28:51 PM.webm
The flag used is const
bool is_under_control
= input_data.current_operation_mode.is_autoware_control_enabled &&input_data.current_operation_mode.mode ==
autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS;
Related links
case 1
https://tier4.atlassian.net/jira/software/c/projects/RT1/boards/438?selectedIssue=RT0-31121
case 2
https://tier4.atlassian.net/jira/software/c/projects/RT1/boards/438?selectedIssue=RT0-30739
case 3
Case 3 was raised by Dr. M. @maxime-clem
Tests performed
https://evaluation.tier4.jp/evaluation/reports/b49b340f-dcb8-5bf0-8feb-7dfbdfd24179?page=1&project_id=prd_jt
Notes for reviewers
Interface changes
ROS Topic Changes
ROS Parameter Changes
Effects on system behavior
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.