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