feat(perception): add support of ML-based prediction with MTR #6777
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Code Health of new files: 9.41
- Declining Code Health: 10 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method builder.cpp: MTRBuilder::buildEngineFromOnnx
- Deep, Nested Complexity lanelet.cpp: LaneletConverter::convert
- Overall Code Complexity node.cpp
- Complex Method lanelet.cpp: LaneletConverter::convert
- Complex Method node.cpp: MTRNode::updateAgentHistory
- Complex Method node.cpp: MTRNode::callback
- Bumpy Road Ahead builder.cpp: MTRBuilder::setup
- Bumpy Road Ahead lanelet.cpp: LaneletConverter::convert
- Bumpy Road Ahead node.cpp: MTRNode::updateAgentHistory
- Bumpy Road Ahead node.cpp: MTRNode::extractTargetAgent
Annotations
Check warning on line 367 in perception/autoware_mtr/src/builder.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
MTRBuilder::buildEngineFromOnnx has a cyclomatic complexity of 12, 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 119 in perception/autoware_mtr/src/builder.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
MTRBuilder::setup 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 352 in perception/autoware_mtr/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
MTRNode::updateAgentHistory 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 214 in perception/autoware_mtr/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
MTRNode::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 352 in perception/autoware_mtr/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
MTRNode::updateAgentHistory 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 397 in perception/autoware_mtr/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
MTRNode::extractTargetAgent 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 perception/autoware_mtr/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.55 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 71 in perception/autoware_mtr/src/conversions/lanelet.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
LaneletConverter::convert has a cyclomatic complexity of 11, 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 71 in perception/autoware_mtr/src/conversions/lanelet.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
LaneletConverter::convert 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 71 in perception/autoware_mtr/src/conversions/lanelet.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
LaneletConverter::convert 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.