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(autoware_probabilistic_occupancy_grid_map): cuda accelerated implementation #9542

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

fix: missing cuda linking (?)

5bfa282
Select commit
Loading
Failed to load commit list.
Open

feat(autoware_probabilistic_occupancy_grid_map): cuda accelerated implementation #9542

fix: missing cuda linking (?)
5bfa282
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 27, 2024 in 41s

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) ✅

View detailed results in CodeScene

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

Check notice on line 1 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_base.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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

Check notice on line 185 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_base.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

OccupancyGridMapInterface::raytrace is no longer above the threshold for number of arguments

Check notice on line 160 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_fixed.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

OccupancyGridMapFixedBlindSpot::updateWithPointCloud is no longer above the threshold for cyclomatic complexity

Check notice on line 160 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_fixed.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

OccupancyGridMapFixedBlindSpot::updateWithPointCloud is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 160 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_fixed.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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

Check notice on line 161 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_projective.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

OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud is no longer above the threshold for cyclomatic complexity

Check warning on line 161 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_projective.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 161 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_projective.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

OccupancyGridMapProjectiveBlindSpot::updateWithPointCloud is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 161 in perception/autoware_probabilistic_occupancy_grid_map/lib/costmap_2d/occupancy_grid_map_projective.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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

Check notice on line 408 in perception/autoware_probabilistic_occupancy_grid_map/src/fusion/synchronized_grid_map_fusion_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 372 in perception/autoware_probabilistic_occupancy_grid_map/src/fusion/synchronized_grid_map_fusion_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in perception/autoware_probabilistic_occupancy_grid_map/src/fusion/synchronized_grid_map_fusion_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 209 in perception/autoware_probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/pointcloud_based_occupancy_grid_map_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 209 in perception/autoware_probabilistic_occupancy_grid_map/src/pointcloud_based_occupancy_grid_map/pointcloud_based_occupancy_grid_map_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.