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

perf(costmap_generator): manual blurring and fill polygons without OpenCV #9160

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Revert "[TMP] run costmap_generator with gdb+konsole"

e8f2cd6
Select commit
Loading
Failed to load commit list.
Open

perf(costmap_generator): manual blurring and fill polygons without OpenCV #9160

Revert "[TMP] run costmap_generator with gdb+konsole"
e8f2cd6
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Oct 25, 2024 in 54s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.34 (9.47 -> 9.13)

  • Declining Code Health: 4 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Deep, Nested Complexity objects_to_costmap.cpp: naive_mean_filter_on_grid_edges
  • Complex Method objects_to_costmap.cpp: naive_mean_filter_on_grid_edges
  • Bumpy Road Ahead objects_to_costmap.cpp: naive_mean_filter_on_grid_edges
  • Bumpy Road Ahead objects_to_costmap.cpp: ObjectsToCostmap::makeCostmapFromObjects

✅ Improving Code Health:

  • Excess Number of Function Arguments object_map_utils.cpp: FillPolygonAreas

Annotations

Check warning on line 187 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/objects_to_costmap.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

naive_mean_filter_on_grid_edges has a cyclomatic complexity of 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 warning on line 187 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/objects_to_costmap.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

naive_mean_filter_on_grid_edges has 2 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 warning on line 231 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/objects_to_costmap.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

ObjectsToCostmap::makeCostmapFromObjects has 2 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 warning on line 187 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/objects_to_costmap.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

naive_mean_filter_on_grid_edges has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check notice on line 71 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/object_map_utils.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

FillPolygonAreas 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.

Check notice on line 71 in planning/autoware_costmap_generator/nodes/autoware_costmap_generator/object_map_utils.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

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