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(localization): add nerf_based_localizer #5312

style(pre-commit): autofix

26b2e68
Select commit
Loading
Failed to load commit list.
Closed

feat(localization): add nerf_based_localizer #5312

style(pre-commit): autofix
26b2e68
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 1, 2024 in 54s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.56 (9.05 -> 9.61)

  • Declining Code Health: 12 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method nerf_based_localizer.cpp: NerfBasedLocalizer::localize
  • Complex Method walk.cpp: walk
  • Complex Method train_manager.cpp: TrainManager::train
  • Large Method renderer.cpp: Renderer::render
  • Large Method infer.cpp: infer
  • Excess Number of Function Arguments renderer.cpp: Renderer::render_image
  • Complex Conditional nerf_based_localizer.cpp: NerfBasedLocalizer::callback_initial_pose
  • Global Conditionals prepare_data.py
  • Complex Method pose_initializer_core.cpp: PoseInitializer::PoseInitializer
  • Complex Method pose_initializer_core.cpp: PoseInitializer::on_initialize
  • Bumpy Road Ahead hash_3d_anchored.cpp: Hash3DAnchored::Hash3DAnchored
  • Bumpy Road Ahead nerf_based_localizer.cpp: NerfBasedLocalizer::callback_initial_pose

Annotations

Check warning on line 84 in localization/nerf_based_localizer/src/nerf/hash_3d_anchored.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

Hash3DAnchored::Hash3DAnchored 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 140 in localization/nerf_based_localizer/src/nerf/renderer.cpp

See this annotation in the file changed.

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

❌ New issue: Large Method

Renderer::render has 75 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 189 in localization/nerf_based_localizer/src/nerf/renderer.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

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

Check warning on line 124 in localization/nerf_based_localizer/src/nerf_based_localizer.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

NerfBasedLocalizer::callback_initial_pose 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 363 in localization/nerf_based_localizer/src/nerf_based_localizer.cpp

See this annotation in the file changed.

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

❌ New issue: Large Method

NerfBasedLocalizer::localize has 117 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 138 in localization/nerf_based_localizer/src/nerf_based_localizer.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

NerfBasedLocalizer::callback_initial_pose 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 localization/nerf_based_localizer/training_tool/script/prepare_data.py

See this annotation in the file changed.

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

❌ New issue: Global Conditionals

There's global code outside of functions with a cyclomatic complexity of 18, threshold = 10. The code has become too complex as it contains many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more.

Check warning on line 117 in localization/nerf_based_localizer/training_tool/src/infer.cpp

See this annotation in the file changed.

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

❌ New issue: Large Method

infer has 70 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 177 in localization/nerf_based_localizer/training_tool/src/train_manager.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

TrainManager::train 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 145 in localization/nerf_based_localizer/training_tool/src/walk.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

walk 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 56 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

PoseInitializer::PoseInitializer increases in cyclomatic complexity from 14 to 15, 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 165 in localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

PoseInitializer::on_initialize increases in cyclomatic complexity from 13 to 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.