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(avoidance): make it possible to use freespace areas in avoidance module #6001

Merged
merged 10 commits into from
Jan 29, 2024

fix(avoidance): add param

0e1edea
Select commit
Loading
Failed to load commit list.
Merged

feat(avoidance): make it possible to use freespace areas in avoidance module #6001

fix(avoidance): add param
0e1edea
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jan 28, 2024 in 33s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 5 findings(s) 🚩
  • Improving Code Health: 6 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method static_drivable_area.cpp: postProcess
  • Complex Method static_drivable_area.cpp: getBoundWithFreeSpaceAreas
  • Large Method scene.cpp: AvoidanceModule::plan 🔥
  • Complex Method static_drivable_area.cpp: combineDrivableLanes
  • Complex Method static_drivable_area.cpp: calcBound

✅ Improving Code Health:

  • Complex Method static_drivable_area.cpp: makeBoundLongitudinallyMonotonic
  • Complex Method static_drivable_area.cpp: generateDrivableArea
  • Complex Method static_drivable_area.cpp: generateDrivableArea
  • Complex Conditional static_drivable_area.cpp: generateDrivableArea
  • Bumpy Road Ahead static_drivable_area.cpp: generateDrivableArea
  • Bumpy Road Ahead static_drivable_area.cpp: generateDrivableArea

Annotations

Check notice on line 1 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1498 to 1644, 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 1954 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

✅ Getting better: Complex Method

makeBoundLongitudinallyMonotonic decreases in cyclomatic complexity from 52 to 50, threshold = 9. 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 warning on line 1966 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

combineDrivableLanes increases in cyclomatic complexity from 14 to 16, threshold = 9. 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 800 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

✅ Getting better: Complex Method

generateDrivableArea decreases in cyclomatic complexity from 34 to 14, threshold = 9. 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 warning on line 1642 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

calcBound increases in cyclomatic complexity from 10 to 12, threshold = 9. 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/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.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

generateDrivableArea 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 warning on line 1564 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

postProcess has a cyclomatic complexity of 28, threshold = 9. 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 warning on line 1424 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

getBoundWithFreeSpaceAreas has a cyclomatic complexity of 20, threshold = 9. 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 800 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Conditional

generateDrivableArea no longer has a complex conditional. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 800 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

✅ Getting better: Bumpy Road Ahead

generateDrivableArea decreases from 6 to 3 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Bumpy Road Ahead

generateDrivableArea is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1564 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

ℹ New issue: Bumpy Road Ahead

postProcess has 5 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 10.03 to 10.09, 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 1642 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Excess Number of Function Arguments

calcBound increases from 5 to 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 1564 in planning/behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

See this annotation in the file changed.

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

ℹ New issue: Excess Number of Function Arguments

postProcess has 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 1 in planning/behavior_path_avoidance_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1122 to 1125, 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 warning on line 944 in planning/behavior_path_avoidance_module/src/scene.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

AvoidanceModule::plan increases from 78 to 79 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.