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(obstacle_avoidance_planner): faster optimization by sparser re-formulation #4600

Merged

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Aug 11, 2023

Description

According to https://github.com/orgs/autowarefoundation/discussions/3681, this PR makes the optimization of MPT (Model Predictive Trajectory) sparser resulting in faster calculation.

TODO

  • check the result with debug build

Qualitative evaluation

I measured the calculation time of obstacle_avoidance_planner with the following route on the sample map.
image

without this PR
image

with this PR
The time rarely increases suddenly, but overall much better than without this PR.
image

Tests performed

planning simulator

Effects on system behavior

Nothing

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:planning Route planning, decision-making, and navigation. (auto-assigned) label Aug 11, 2023
@takayuki5168 takayuki5168 changed the title Feat/fast optimization path planner feat(obstacle_avoidance_planner): faster optimization by sparser re-formulation Aug 12, 2023
Signed-off-by: Takayuki Murooka <[email protected]>
@takayuki5168 takayuki5168 force-pushed the feat/fast-optimization-path-planner branch from e0405e9 to 182f490 Compare August 12, 2023 04:54
@takayuki5168 takayuki5168 marked this pull request as ready for review August 12, 2023 05:04
@takayuki5168 takayuki5168 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 12, 2023
@@ -1522,7 +1506,9 @@ std::optional<Eigen::VectorXd> MPTOptimizer::calcOptimizedSteerAngles(
const autoware::common::osqp::CSC_Matrix P_csc =
autoware::common::osqp::calCSCMatrixTrapezoidal(H);
const autoware::common::osqp::CSC_Matrix A_csc = autoware::common::osqp::calCSCMatrix(A);
if (mpt_param_.enable_warm_start && prev_mat_n_ == H.rows() && prev_mat_m_ == A.rows()) {
if (
prev_solution_status_ == 1 && mpt_param_.enable_warm_start && prev_mat_n_ == H.rows() &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without prev_solution_status_ == 1, the warm start is used even if the previous optimization failed, resulting in successive optimization failure.

Signed-off-by: Takayuki Murooka <[email protected]>
@codecov
Copy link

codecov bot commented Aug 12, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.01% ⚠️

Comparison is base (2b7afb1) 14.84% compared to head (4a0979a) 14.83%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4600      +/-   ##
==========================================
- Coverage   14.84%   14.83%   -0.01%     
==========================================
  Files        1529     1529              
  Lines      105769   105761       -8     
  Branches    32221    32215       -6     
==========================================
- Hits        15698    15694       -4     
+ Misses      72913    72912       -1     
+ Partials    17158    17155       -3     
Flag Coverage Δ *Carryforward flag
differential 38.68% <50.00%> (?)
total 14.81% <ø> (-0.03%) ⬇️ Carriedforward from 2b7afb1

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

Files Changed Coverage Δ
...ule/dynamic_avoidance/dynamic_avoidance_module.hpp 0.00% <ø> (ø)
...ule/dynamic_avoidance/dynamic_avoidance_module.cpp 0.00% <ø> (ø)
...ner/src/scene_module/dynamic_avoidance/manager.cpp 0.00% <ø> (ø)
...clude/obstacle_avoidance_planner/mpt_optimizer.hpp 85.71% <ø> (ø)
...cle_avoidance_planner/state_equation_generator.hpp 100.00% <ø> (ø)
...g/obstacle_avoidance_planner/src/mpt_optimizer.cpp 40.11% <44.77%> (+0.11%) ⬆️
...avoidance_planner/src/state_equation_generator.cpp 65.21% <81.81%> (-3.75%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@takayuki5168 takayuki5168 merged commit 9ac3a7c into autowarefoundation:main Aug 12, 2023
19 of 23 checks passed
@takayuki5168 takayuki5168 deleted the feat/fast-optimization-path-planner branch August 12, 2023 14:27
LeoDriveProject pushed a commit to leo-drive/autoware.universe.golf that referenced this pull request Aug 16, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
rej55 pushed a commit to tier4/autoware.universe that referenced this pull request Aug 18, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Aug 21, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
takayuki5168 added a commit to tier4/autoware.universe that referenced this pull request Nov 16, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
takayuki5168 added a commit to tier4/autoware.universe that referenced this pull request Nov 25, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
takayuki5168 added a commit to tier4/autoware.universe that referenced this pull request Nov 26, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
takayuki5168 added a commit to tier4/autoware.universe that referenced this pull request Nov 30, 2023
…ormulation (autowarefoundation#4600)

* feat(obstacle_avoidance_planner): re-formulate for faster QP

Signed-off-by: Takayuki Murooka <[email protected]>

* minor change

Signed-off-by: Takayuki Murooka <[email protected]>

* update

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
takayuki5168 added a commit to tier4/autoware.universe that referenced this pull request Nov 30, 2023
…ormulation (autowarefoundation#4600) (#1051)

* feat(obstacle_avoidance_planner): re-formulate for faster QP



* minor change



* update



* fix



---------

Signed-off-by: Takayuki Murooka <[email protected]>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 14, 2024
…ormulation (autowarefoundation#4600) (autowarefoundation#1051)

* feat(obstacle_avoidance_planner): re-formulate for faster QP



* minor change



* update



* fix



---------

Signed-off-by: Takayuki Murooka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants