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

fix(autoware_mpc_lateral_controller): delete the zero speed constraint #7673

Merged

pre-commit

b53e313
Select commit
Loading
Failed to load commit list.
Merged

fix(autoware_mpc_lateral_controller): delete the zero speed constraint #7673

pre-commit
b53e313
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Jun 25, 2024 in 36s

CodeScene PR Check

Code Health Quality Gates: OK

  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

Details

✅ Improving Code Health:

  • Overall Code Complexity mpc.cpp
  • Excess Number of Function Arguments mpc.cpp: MPC::executeOptimization
  • Complex Method mpc.cpp: MPC::calcSteerRateLimitOnTrajectory

Annotations

Check notice on line 764 in control/autoware_mpc_lateral_controller/src/mpc.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

MPC::calcSteerRateLimitOnTrajectory is no longer above the threshold for cyclomatic complexity. 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 control/autoware_mpc_lateral_controller/src/mpc.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.84 to 4.79, 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 notice on line 579 in control/autoware_mpc_lateral_controller/src/mpc.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Excess Number of Function Arguments

MPC::executeOptimization is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.