feat(autoware_image_based_projection_fusion): redesign image based projection fusion node #10016
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.05 (8.28 -> 8.23)
- Declining Code Health: 14 findings(s) 🚩
- Improving Code Health: 10 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Code Duplication fusion_collector.cpp
- Code Duplication fusion_matching_strategy.cpp
- Overall Code Complexity fusion_matching_strategy.cpp
- Code Duplication fusion_node.cpp
- Complex Method concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchronizerComponent
- Deep, Nested Complexity fusion_matching_strategy.cpp: get_offset
- Complex Method fusion_matching_strategy.cpp: get_offset
- Complex Conditional fusion_matching_strategy.cpp: match_rois_to_collector
- Complex Conditional fusion_matching_strategy.cpp: match_det3d_to_collector
- Complex Conditional fusion_matching_strategy.cpp: get_offset
- Complex Conditional fusion_node.cpp: check_fusion_status
- Deep, Nested Complexity fusion_matching_strategy.cpp: match_rois_to_collector
- Deep, Nested Complexity fusion_matching_strategy.cpp: match_det3d_to_collector
- Bumpy Road Ahead fusion_matching_strategy.cpp: get_offset
✅ Improving Code Health:
- Overall Code Complexity fusion_node.cpp
- Complex Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Deep, Nested Complexity fusion_node.cpp: roiCallback
- Bumpy Road Ahead node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Deep, Nested Complexity node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Complex Method fusion_node.cpp: subCallback
- Complex Method fusion_node.cpp: roiCallback
- Complex Method fusion_node.cpp: setDet2DStatus
- Bumpy Road Ahead fusion_node.cpp: subCallback
- Bumpy Road Ahead fusion_node.cpp: roiCallback
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: process_msg_3d,process_rois. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: match_det3d_to_collector,match_rois_to_collector. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
get_offset 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
match_rois_to_collector 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
match_det3d_to_collector 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
get_offset 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
get_offset 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 5.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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
get_offset has a nested complexity depth of 5, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
match_rois_to_collector 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
match_det3d_to_collector 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 376 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: roi_callback,sub_callback. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 376 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
subCallback 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 417 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
roiCallback 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 230 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
setDet2DStatus 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 639 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Method
check_fusion_status 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 notice on line 376 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Method
sub_callback has a cyclomatic complexity of 9, 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 570 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
check_fusion_status 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.
Check notice on line 376 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
subCallback 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 417 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
roiCallback 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 639 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Bumpy Road Ahead
check_fusion_status has 4 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 notice on line 1 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 7.00 to 4.86, threshold = 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 417 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Deep, Nested Complexity
roiCallback is no longer above the threshold for nested complexity depth. 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 484 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Deep, Nested Complexity
diagnostic_callback 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
RoiClusterFusionNode::fuseOnSingleImage 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.