Skip to content

refactor(tracker): simplify shape update logic in measurement processing

30b58be
Select commit
Loading
Failed to load commit list.
Draft

fix(autoware_multi_object_tracker): tracker update path, shape gating, and association data structure #12560

refactor(tracker): simplify shape update logic in measurement processing
30b58be
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed May 8, 2026 in 54s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (1 files improve in Code Health)

Gates Failed
Enforce advisory code health rules (1 file with Complex Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
tracker_base.cpp 1 advisory rule 8.64 → 8.61 Suppress
View Improvements
File Code Health Impact Categories Improved
shapes.cpp 9.39 → 9.69 Complex Method

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method tracker_base.cpp: Tracker::updateWithMeasurement

✅ Improving Code Health:

  • Overall Code Complexity bev_association.cpp
  • Excess Number of Function Arguments bev_assignment_scoring.cpp: calculateBevAssignmentScore
  • Complex Method shapes.cpp: convertConvexHullToBoundingBox

Annotations

Check notice on line 1 in perception/autoware_multi_object_tracker/lib/association/bev_association.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.18 to 4.09, threshold = 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 notice on line 104 in perception/autoware_multi_object_tracker/lib/association/scoring/bev_assignment_scoring.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ Getting better: Excess Number of Function Arguments

calculateBevAssignmentScore decreases from 9 to 8 arguments, max arguments = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 235 in perception/autoware_multi_object_tracker/lib/object_model/shapes.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Complex Method

convertConvexHullToBoundingBox is no longer above the threshold for cyclomatic complexity

Check warning on line 235 in perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

Tracker::updateWithMeasurement 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.