feat(autoware_probabilistic_occupancy_grid_map): cuda accelerated implementation #9542
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.47 (8.54 -> 9.01)
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 10 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Complex Conditional synchronized_grid_map_fusion_node.cpp: GridMapFusionNode::SingleFrameOccupancyFusion
- Large Method occupancy_grid_map_projective.cpp: OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud
✅ Improving Code Health:
- Complex Method pointcloud_based_occupancy_grid_map_node.cpp: PointcloudBasedOccupancyGridMapNode::onPointcloudWithObstacleAndRaw
- Bumpy Road Ahead pointcloud_based_occupancy_grid_map_node.cpp: PointcloudBasedOccupancyGridMapNode::onPointcloudWithObstacleAndRaw
- Primitive Obsession occupancy_grid_map_base.cpp
- Excess Number of Function Arguments occupancy_grid_map_base.cpp: OccupancyGridMapInterface::raytrace
- Complex Method occupancy_grid_map_fixed.cpp: OccupancyGridMapFixedBlindSpot::updateWithPointCloud
- Bumpy Road Ahead occupancy_grid_map_fixed.cpp: OccupancyGridMapFixedBlindSpot::updateWithPointCloud
- Deep, Nested Complexity occupancy_grid_map_fixed.cpp: OccupancyGridMapFixedBlindSpot::updateWithPointCloud
- Complex Method occupancy_grid_map_projective.cpp: OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud
- Bumpy Road Ahead occupancy_grid_map_projective.cpp: OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud
- Deep, Nested Complexity occupancy_grid_map_projective.cpp: OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Primitive Obsession
The ratio of primivite types in function arguments is no longer above the threshold
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
OccupancyGridMapInterface::raytrace is no longer above the threshold for number of arguments
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
OccupancyGridMapFixedBlindSpot::updateWithPointCloud is no longer above the threshold for cyclomatic complexity
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
OccupancyGridMapFixedBlindSpot::updateWithPointCloud is no longer above the threshold for logical blocks with deeply nested code
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Deep, Nested Complexity
OccupancyGridMapFixedBlindSpot::updateWithPointCloud is no longer above the threshold for nested complexity depth
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud is no longer above the threshold for cyclomatic complexity
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud has 76 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud is no longer above the threshold for logical blocks with deeply nested code
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Deep, Nested Complexity
OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud is no longer above the threshold for nested complexity depth
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Complex Method
GridMapFusionNode::SingleFrameOccupancyFusion increases in cyclomatic complexity from 9 to 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
GridMapFusionNode::SingleFrameOccupancyFusion 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 7.88 to 8.38, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
PointcloudBasedOccupancyGridMapNode::onPointcloudWithObstacleAndRaw decreases in cyclomatic complexity from 21 to 16, 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)
✅ Getting better: Bumpy Road Ahead
PointcloudBasedOccupancyGridMapNode::onPointcloudWithObstacleAndRaw decreases from 5 to 4 logical blocks with deeply nested code, threshold is one single 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.