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(pose_initializer, ndt_scan_matcher): check initial pose result and publish diag #8275

Merged

Merge branch 'main' into feat/diag_pose_initializer

5723d57
Select commit
Loading
Failed to load commit list.
Merged

feat(pose_initializer, ndt_scan_matcher): check initial pose result and publish diag #8275

Merge branch 'main' into feat/diag_pose_initializer
5723d57
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Aug 7, 2024 in 31s

CodeScene PR Check

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.03 (7.94 -> 7.97)

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method pose_initializer_core.cpp: PoseInitializer::on_initialize

✅ Improving Code Health:

  • Large Method ndt_scan_matcher_core.cpp: NDTScanMatcher::align_pose 🔥

Annotations

Check notice on line 1110 in localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp

See this annotation in the file changed.

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

✅ Getting better: Large Method

NDTScanMatcher::align_pose decreases from 87 to 81 lines of code, 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 176 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.