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

refactor(autoware_mpc_lateral_controller): speed up matrix calculation with sparse matrix #8908

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

Conversation

kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Sep 18, 2024

Description

This PR optimizes the MPC lateral controller by introducing sparse matrix operations and vectorizing calculations for improved performance and memory efficiency.

  • Sparse Matrix Implementation:
    • Replaced dense matrices (Cex, Bex, Qex, R1ex, R2ex, H, A) with Eigen::SparseMatrix, reducing memory usage and speeding up computations for large matrices.

Related links

Parent Issue:

None.

How was this PR tested?

computational cost of from generateMPCMatrix to executeOptimization function and checked with same test case.

original result:

original

udated result:

updated

  • run psim
  • PASS TIERIVE INTERNAL SCENARIOS

None.

Interface changes

None.

@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Sep 18, 2024
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Copy link

stale bot commented Nov 19, 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 Nov 19, 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.

1 participant