-
Notifications
You must be signed in to change notification settings - Fork 691
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_mpc_lateral_controller): replace Eigen::VectorXd with Eigen::Vector3d for state representation #10235
Conversation
…gen::Vector3d for state representation Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
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.
@kyoichi-sugahara Please modify the comments to align with the code for consistency.
// World coordinate x = [x, y, yaw, steer]
Additionally, it does not match the model used in the control model. It would be helpful to include a note stating:
"Ideally, the first-order delay of the steering should be considered, as in the control model. However, significant accuracy degradation was observed when discretizing with a long dt, so it has been ignored here. If the accuracy of the discretization improves, an appropriate model should be considered."
…esentation and discretization considerations Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
@TakaHoribe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10235 +/- ##
==========================================
+ Coverage 26.24% 26.34% +0.09%
==========================================
Files 1378 1384 +6
Lines 107445 107444 -1
Branches 41428 41350 -78
==========================================
+ Hits 28200 28303 +103
+ Misses 76426 76321 -105
- Partials 2819 2820 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Replaced all
Eigen::VectorXd
instances withEigen::Vector3d
in thecalculatePredictedTrajectoryInWorldCoordinate
methodissue
When building with
--cmake-args -DCMAKE_BUILD_TYPE=Debug
option, identified a critical bug in theKinematicsBicycleModel::calculatePredictedTrajectoryInWorldCoordinate
method.Debug logs showed that
state_w
had size 3 whiledstate
had size 4.This dimension mismatch caused an assertion failure in Eigen when performing the operation
state_w + dstate * dt
, resulting in the following error:This issue did not manifest in release builds as assertion checks are disabled in that mode.
How was this PR tested?
Inserted debug print before the next_state calculation as follows:
With the original implementation, I got the following error message:
With the updated version, there is no error and both vectors have the same size:
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.