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(map): add differential lanelet loading #6241

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

feat: put back lanelet2_map_loader_ndoe.hpp in public include

169cf80
Select commit
Loading
Failed to load commit list.
Open

feat(map): add differential lanelet loading #6241

feat: put back lanelet2_map_loader_ndoe.hpp in public include
169cf80
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Mar 24, 2025 in 1m 24s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce critical code health rules (3 files with Bumpy Road Ahead, Deep, Nested Complexity)
Enforce advisory code health rules (4 files with Complex Method, Excess Number of Function Arguments, Overall Code Complexity)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
lanelet2_map_loader_node.cpp 2 critical rules 9.10 → 7.54 Suppress
dynamic_lanelet_provider.cpp 1 critical rule 10.00 → 9.19 Suppress
lanelet2_differential_loader_module.cpp 1 critical rule 10.00 → 9.51 Suppress
Enforce advisory code health rules Violations Code Health Impact
lanelet2_map_loader_node.cpp 2 advisory rules 9.10 → 7.54 Suppress
dynamic_lanelet_provider.cpp 2 advisory rules 10.00 → 9.19 Suppress
lanelet2_differential_loader_module.cpp 1 advisory rule 10.00 → 9.51 Suppress
lanelet2_map_loader_utils.cpp 1 advisory rule 10.00 → 9.69 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Overall Code Complexity lanelet2_map_loader_node.cpp
  • Deep, Nested Complexity lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::get_lanelet2_paths
  • Complex Method lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::on_map_projector_info
  • Complex Method dynamic_lanelet_provider.cpp: DynamicLaneletProviderNode::updateMap
  • Complex Method lanelet2_differential_loader_module.cpp: Lanelet2DifferentialLoaderModule::on_service_get_differential_lanelet2_map
  • Excess Number of Function Arguments dynamic_lanelet_provider.cpp: is_inside_region
  • Complex Method lanelet2_map_loader_utils.cpp: merge_lanelet2_maps
  • Bumpy Road Ahead lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::on_map_projector_info
  • Bumpy Road Ahead dynamic_lanelet_provider.cpp: DynamicLaneletProviderNode::updateMap
  • Bumpy Road Ahead lanelet2_differential_loader_module.cpp: Lanelet2DifferentialLoaderModule::on_service_get_differential_lanelet2_map
  • Bumpy Road Ahead lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::get_lanelet2_paths

Annotations

Check warning on line 191 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

DynamicLaneletProviderNode::updateMap 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 warning on line 191 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

DynamicLaneletProviderNode::updateMap 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 66 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.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

is_inside_region has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 108 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_differential_loader_module.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

Lanelet2DifferentialLoaderModule::on_service_get_differential_lanelet2_map 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 108 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_differential_loader_module.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

Lanelet2DifferentialLoaderModule::on_service_get_differential_lanelet2_map 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 216 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

Lanelet2MapLoaderNode::on_map_projector_info increases in cyclomatic complexity from 12 to 20, 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 216 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Bumpy Road Ahead

Lanelet2MapLoaderNode::on_map_projector_info increases from 2 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.

Check warning on line 325 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

Lanelet2MapLoaderNode::get_lanelet2_paths 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 map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.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 6.00 across 8 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 325 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

Lanelet2MapLoaderNode::get_lanelet2_paths 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 121 in map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_utils.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

merge_lanelet2_maps 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.