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_pointcloud_preprocessor): redesign concatenate and time sync node #8300

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

Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…

3a24c26
Select commit
Loading
Failed to load commit list.
Open

feat(autoware_pointcloud_preprocessor): redesign concatenate and time sync node #8300

Merge branch 'feature/redesign_concatenate_and_time_sync_node' of git…
3a24c26
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 13, 2024 in 1m 11s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.68 (6.82 -> 7.50)

  • Declining Code Health: 28 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method test_concatenate_node_unit.cpp: TEST:ConcatenateCloudTest:TestConcatenateClouds
  • Code Duplication combine_cloud_handler.cpp
  • Overall Code Complexity combine_cloud_handler.cpp
  • Overall Code Complexity concatenate_and_time_sync_node.cpp
  • Deep, Nested Complexity concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::publish_clouds
  • Lines of Code in a Single File test_concatenate_node_component.py
  • Code Duplication test_concatenate_node_component.py
  • Code Duplication test_concatenate_node_unit.cpp
  • Complex Method concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchronizerComponent
  • Large Method test_concatenate_node_component.py: TestConcatenateNode.test_8_abnormal_pointcloud_drop_continue_normal
  • Large Method test_concatenate_node_component.py: TestConcatenateNode.test_7_abnormal_pointcloud_delay
  • Complex Method concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::publish_clouds
  • Complex Conditional combine_cloud_handler.cpp: CombineCloudHandler::convert_to_xyzirc_cloud
  • Excess Number of Function Arguments test_concatenate_node_component.py: generate_transform_msg
  • Primitive Obsession test_concatenate_node_unit.cpp
  • Excess Number of Function Arguments test_concatenate_node_unit.cpp: generate_transform_msg
  • Complex Method concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::check_concat_status
  • Complex Method concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::cloud_callback
  • Bumpy Road Ahead concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::check_concat_status
  • Bumpy Road Ahead concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::publish_clouds
  • Complex Method combine_cloud_handler.cpp: CombineCloudHandler::combine_pointclouds
  • Complex Method combine_cloud_handler.cpp: CombineCloudHandler::convert_to_xyzirc_cloud
  • Bumpy Road Ahead combine_cloud_handler.cpp: CombineCloudHandler::process_twist
  • Bumpy Road Ahead combine_cloud_handler.cpp: CombineCloudHandler::process_odometry
  • Bumpy Road Ahead combine_cloud_handler.cpp: CombineCloudHandler::convert_to_xyzirc_cloud
  • Bumpy Road Ahead combine_cloud_handler.cpp: CombineCloudHandler::combine_pointclouds
  • Bumpy Road Ahead concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchronizerComponent
  • Bumpy Road Ahead concatenate_and_time_sync_node.cpp: PointCloudConcatenateDataSynchronizerComponent::cloud_callback

Annotations

Check warning on line 73 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.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: CombineCloudHandler::process_odometry,CombineCloudHandler::process_twist. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 269 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

CombineCloudHandler::combine_pointclouds 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 160 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

CombineCloudHandler::convert_to_xyzirc_cloud 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 136 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

CombineCloudHandler::convert_to_xyzirc_cloud 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 warning on line 73 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CombineCloudHandler::process_twist 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 100 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CombineCloudHandler::process_odometry 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 160 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CombineCloudHandler::convert_to_xyzirc_cloud 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 269 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CombineCloudHandler::combine_pointclouds 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 sensing/autoware_pointcloud_preprocessor/src/concatenate_data/combine_cloud_handler.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 5.86 across 7 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 149 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchronizerComponent has a cyclomatic complexity of 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 warning on line 345 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PointCloudConcatenateDataSynchronizerComponent::publish_clouds has a cyclomatic complexity of 14, 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 435 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PointCloudConcatenateDataSynchronizerComponent::check_concat_status has a cyclomatic complexity of 10, 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 248 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

PointCloudConcatenateDataSynchronizerComponent::cloud_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 435 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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

PointCloudConcatenateDataSynchronizerComponent::check_concat_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 warning on line 345 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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

PointCloudConcatenateDataSynchronizerComponent::publish_clouds 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.

Check warning on line 149 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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

PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchronizerComponent 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 248 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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

PointCloudConcatenateDataSynchronizerComponent::cloud_callback 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 sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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 5.64 across 11 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 345 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_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

PointCloudConcatenateDataSynchronizerComponent::publish_clouds 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 1 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_component.py

See this annotation in the file changed.

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

❌ New issue: Lines of Code in a Single File

This module has 690 lines of code, improve code health by reducing it to 600. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check warning on line 909 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_component.py

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 7 functions with similar structure: TestConcatenateNode.test_1_normal_inputs,TestConcatenateNode.test_2_normal_inputs_with_noise,TestConcatenateNode.test_3_abnormal_null_pointcloud,TestConcatenateNode.test_5_abnormal_multiple_pointcloud_drop and 3 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 909 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_component.py

See this annotation in the file changed.

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

❌ New issue: Large Method

TestConcatenateNode.test_8_abnormal_pointcloud_drop_continue_normal has 89 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 warning on line 805 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_component.py

See this annotation in the file changed.

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

❌ New issue: Large Method

TestConcatenateNode.test_7_abnormal_pointcloud_delay has 81 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 warning on line 234 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_component.py

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

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

Check warning on line 202 in sensing/autoware_pointcloud_preprocessor/test/test_concatenate_node_unit.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: TEST:ConcatenateCloudTest:TestProcessOdometry,TEST:ConcatenateCloudTest:TestProcessTwist. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.