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(shape_estimation): add ml shape estimation #7860

Merge branch 'main' into feat/add-deep-learning-based-shape-estimator

16a98d9
Select commit
Loading
Failed to load commit list.
Merged

feat(shape_estimation): add ml shape estimation #7860

Merge branch 'main' into feat/add-deep-learning-based-shape-estimator
16a98d9
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 1, 2024 in 36s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -1.12 (9.64 -> 8.51)

  • Declining Code Health: 7 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Deep, Nested Complexity tensorrt_shape_estimator.cpp: TrtShapeEstimator::preprocess
  • Complex Method tensorrt_shape_estimator.cpp: TrtShapeEstimator::preprocess
  • Large Method tensorrt_shape_estimator.cpp: TrtShapeEstimator::feed_forward_and_decode
  • Excess Number of Function Arguments tensorrt_shape_estimator.cpp: TrtShapeEstimator::TrtShapeEstimator
  • Complex Conditional shape_estimation_node.cpp: ShapeEstimationNode::callback
  • Bumpy Road Ahead tensorrt_shape_estimator.cpp: TrtShapeEstimator::preprocess
  • Bumpy Road Ahead tensorrt_shape_estimator.cpp: TrtShapeEstimator::feed_forward_and_decode

Annotations

Check warning on line 218 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

TrtShapeEstimator::preprocess 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 321 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Large Method

TrtShapeEstimator::feed_forward_and_decode has 79 lines, 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.

Check warning on line 218 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TrtShapeEstimator::preprocess has 3 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 321 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TrtShapeEstimator::feed_forward_and_decode 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 218 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

TrtShapeEstimator::preprocess 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 warning on line 75 in perception/autoware_shape_estimation/lib/tensorrt_shape_estimator.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

TrtShapeEstimator::TrtShapeEstimator has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 178 in perception/autoware_shape_estimation/src/shape_estimation_node.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Complex Method

ShapeEstimationNode::callback increases in cyclomatic complexity from 13 to 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 warning on line 134 in perception/autoware_shape_estimation/src/shape_estimation_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

ShapeEstimationNode::callback has 1 complex conditionals with 2 branches, threshold = 2. 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.