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(path_optimizer): additional failure logging and failure mode handling #10276

MRM when MPT fails

da4d43f
Select commit
Loading
Failed to load commit list.
Merged

feat(path_optimizer): additional failure logging and failure mode handling #10276

MRM when MPT fails
da4d43f
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Mar 19, 2025 in 1m 21s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (1 files improve in Code Health)

Gates Failed
Enforce advisory code health rules (2 files with Complex Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
velocity_optimizer.cpp 1 advisory rule 8.43 → 8.42 Suppress
velocity_optimizer.cpp 1 advisory rule 8.43 → 8.42 Suppress
View Improvements
File Code Health Impact Categories Improved
mpt_optimizer.cpp 4.75 → 4.76 Lines of Code in a Single File, Overall Code Complexity

Absence of Expected Change Pattern

  • autoware.universe/planning/autoware_velocity_smoother/src/smoother/linf_pseudo_jerk_smoother.cpp is usually changed with: autoware.universe/planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method velocity_optimizer.cpp: VelocityOptimizer::optimize
  • Complex Method velocity_optimizer.cpp: VelocityOptimizer::optimize

✅ Improving Code Health:

  • Lines of Code in a Single File mpt_optimizer.cpp 🔥
  • Overall Code Complexity mpt_optimizer.cpp 🔥

Annotations

Check warning on line 253 in planning/autoware_obstacle_cruise_planner/src/optimization_based_planner/velocity_optimizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

VelocityOptimizer::optimize already has high cyclomatic complexity, and now it increases in Lines of Code from 192 to 193. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in planning/autoware_path_optimizer/src/mpt_optimizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Lines of Code in a Single File

The lines of code decreases from 1254 to 1243, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check notice on line 1 in planning/autoware_path_optimizer/src/mpt_optimizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.56 to 4.54, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 255 in planning/motion_velocity_planner/autoware_motion_velocity_obstacle_cruise_module/src/optimization_based_planner/velocity_optimizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

VelocityOptimizer::optimize already has high cyclomatic complexity, and now it increases in Lines of Code from 192 to 193. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.