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(pointcloud_preprocessor): support for 3d distortion correction algorithm and refactor distortion correction node #7137

Merged

fix: fix bug in previous code

9fef37b
Select commit
Loading
Failed to load commit list.
Merged

feat(pointcloud_preprocessor): support for 3d distortion correction algorithm and refactor distortion correction node #7137

fix: fix bug in previous code
9fef37b
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 27, 2024 in 48s

CodeScene PR Check

Code Health Quality Gates: FAILED

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

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Overall Code Complexity distortion_corrector.cpp
  • Primitive Obsession distortion_corrector.cpp
  • Excess Number of Function Arguments distortion_corrector.cpp: DistortionCorrector2D::undistortPointImplementation
  • Excess Number of Function Arguments distortion_corrector.cpp: DistortionCorrector3D::undistortPointImplementation

✅ Improving Code Health:

  • Complex Method distortion_corrector.cpp: DistortionCorrectorComponent::undistortPointCloud
  • Bumpy Road Ahead distortion_corrector.cpp: DistortionCorrectorComponent::undistortPointCloud

Annotations

Check notice on line 371 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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

DistortionCorrectorComponent::undistortPointCloud 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 234 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Method

undistortPointCloud has a cyclomatic complexity of 13, 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 371 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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

DistortionCorrectorComponent::undistortPointCloud 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 234 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp

See this annotation in the file changed.

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

ℹ New issue: Bumpy Road Ahead

undistortPointCloud 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 sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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 4.14 across 14 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 sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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, 48.6% 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 371 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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

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

Check warning on line 417 in sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.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

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