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(image_projection_based_fusion): add cache for camera projection #9635

chore: add option description to project points to unrectified image

3b0bbd0
Select commit
Loading
Failed to load commit list.
Merged

feat(image_projection_based_fusion): add cache for camera projection #9635

chore: add option description to project points to unrectified image
3b0bbd0
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 23, 2024 in 46s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.41 (8.05 -> 8.46)

  • Declining Code Health: 5 findings(s) 🚩
  • Improving Code Health: 9 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication camera_projection.cpp
  • Overall Code Complexity camera_projection.cpp
  • Complex Conditional camera_projection.cpp: CameraProjection::calcRectifiedImageProjectedPoint
  • Complex Conditional camera_projection.cpp: CameraProjection::calcRawImageProjectedPoint
  • Complex Method camera_projection.cpp: CameraProjection::CameraProjection

✅ Improving Code Health:

  • Complex Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Complex Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Complex Conditional node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Brain Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Complex Conditional node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Excess Number of Function Arguments node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Brain Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Excess Number of Function Arguments node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Overall Code Complexity utils.cpp

Annotations

Check warning on line 171 in perception/autoware_image_projection_based_fusion/src/camera_projection.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: CameraProjection::calcRawImageProjectedPoint,CameraProjection::calcRectifiedImageProjectedPoint. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 91 in perception/autoware_image_projection_based_fusion/src/camera_projection.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

CameraProjection::CameraProjection 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 165 in perception/autoware_image_projection_based_fusion/src/camera_projection.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

CameraProjection::calcRectifiedImageProjectedPoint has 1 complex conditionals with 3 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.

Check warning on line 185 in perception/autoware_image_projection_based_fusion/src/camera_projection.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

CameraProjection::calcRawImageProjectedPoint has 1 complex conditionals with 3 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.

Check warning on line 1 in perception/autoware_image_projection_based_fusion/src/camera_projection.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.50 across 10 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 notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Brain Method

RoiClusterFusionNode::fuseOnSingleImage is no longer a brain method

Check notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

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

✅ Getting better: Complex Method

RoiClusterFusionNode::fuseOnSingleImage decreases in cyclomatic complexity from 41 to 37, 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 156 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.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

RoiClusterFusionNode::fuseOnSingleImage no longer has a complex conditional

Check notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.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

RoiClusterFusionNode::fuseOnSingleImage is no longer above the threshold for number of arguments

Check notice on line 174 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Brain Method

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer a brain method

Check notice on line 174 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

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

✅ Getting better: Complex Method

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs decreases in cyclomatic complexity from 21 to 18, 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 174 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.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

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs 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 174 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.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

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer above the threshold for number of arguments

Check notice on line 1 in perception/autoware_image_projection_based_fusion/src/utils/utils.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold