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(perception_online_evaluator): add perception_online_evaluator #6493

Merged
merged 8 commits into from
Feb 29, 2024

fix: ci check

e203c3e
Select commit
Loading
Failed to load commit list.
Merged

feat(perception_online_evaluator): add perception_online_evaluator #6493

fix: ci check
e203c3e
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 28, 2024 in 32s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 28 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 0 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):

  • Code Duplication test_perception_online_evaluator_node.cpp
  • Code Duplication metrics_calculator.cpp
  • Overall Code Complexity metrics_calculator.cpp
  • Overall Code Complexity perception_online_evaluator_node.cpp
  • Complex Method metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Complex Method objects_filtering.cpp: isTargetObjectType
  • Complex Method perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::onParameter
  • Complex Method perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::publishDebugMarker
  • Deep, Nested Complexity metrics_calculator.cpp: MetricsCalculator::getClosestStamp
  • Deep, Nested Complexity metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Missing Arguments Abstractions marker_utils.cpp
  • Primitive Obsession marker_utils.cpp
  • Complex Method objects_filtering.cpp: getDeviationCheckObjectTypes
  • Complex Method metrics_calculator.cpp: MetricsCalculator::averageFilterPath
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Bumpy Road Ahead perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::publishMetrics
  • Bumpy Road Ahead perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::publishDebugMarker
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::hasPassedTime
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::getClosestStamp
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::deleteOldObjects
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::averageFilterPath
  • Excess Number of Function Arguments marker_utils.cpp: createPosesMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createFootprintMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createPointsMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createPointsMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createDeviationLines
  • Excess Number of Function Arguments marker_utils.cpp: createPoseMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createObjectPolygonMarkerArray

Annotations

Check warning on line 179 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: MetricsCalculator::calcLateralDeviationMetrics,MetricsCalculator::calcYawDeviationMetrics. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

MetricsCalculator::calcPredictedPathDeviationMetrics has a cyclomatic complexity of 19, 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 456 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

MetricsCalculator::averageFilterPath has a cyclomatic complexity of 10, 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 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

MetricsCalculator::calcPredictedPathDeviationMetrics 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 87 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

MetricsCalculator::hasPassedTime 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 123 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

MetricsCalculator::getClosestStamp 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 350 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

MetricsCalculator::deleteOldObjects 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 456 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

MetricsCalculator::averageFilterPath 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 1 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 5.12 across 17 functions. The mean complexity threshold is 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 123 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

MetricsCalculator::getClosestStamp 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 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

MetricsCalculator::calcPredictedPathDeviationMetrics 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 271 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PerceptionOnlineEvaluatorNode::onParameter 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 183 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PerceptionOnlineEvaluatorNode::publishDebugMarker 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 88 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

PerceptionOnlineEvaluatorNode::publishMetrics 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 183 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

PerceptionOnlineEvaluatorNode::publishDebugMarker 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 1 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

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

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 5.29 across 7 functions. The mean complexity threshold is 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 1 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

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

❌ New issue: Missing Arguments Abstractions

The average number of function arguments in this module is 5.44 across 9 functions. The average arguments threshold is 4.00. The functions in this file have too many arguments, indicating a lack of encapsulation or too many responsibilities in the same functions. Avoid adding more.

Check warning on line 1 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

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

❌ New issue: Primitive Obsession

In this module, 65.3% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check warning on line 76 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 93 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 110 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 129 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 144 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 161 in evaluator/perception_online_evaluator/src/utils/marker_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

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

Check warning on line 194 in evaluator/perception_online_evaluator/src/utils/marker_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

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