Feat/cruise stop slow down modules #9807
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +2.18 (5.26 -> 7.44)
- Declining Code Health: 8 findings(s) 🚩
- Improving Code Health: 33 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method pid_based_planner.cpp: PIDBasedPlanner::getAccelerationLimitedTrajectory
- Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::generateCruiseTrajectory
- Complex Conditional node.cpp: ObstacleCruisePlannerNode::onTrajectory
- Large Method utils.cpp: createOneStepPolygons
- Complex Method pid_based_planner.cpp: PIDBasedPlanner::calcObstacleToCruise
- Primitive Obsession utils.cpp
- Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::calcInitialMotion
- Bumpy Road Ahead utils.cpp: createOneStepPolygons
✅ Improving Code Health:
- Large Method pid_based_planner.cpp: PIDBasedPlanner::PIDBasedPlanner
- Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
- Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::findYieldCruiseObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject
- Complex Method node.cpp: ObstacleCruisePlannerNode::createStopObstacleForPredictedObject
- Complex Method node.cpp: ObstacleCruisePlannerNode::findYieldCruiseObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::createCruiseObstacle
- Complex Method node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPointCloudObstacles
- Complex Method node.cpp: ObstacleCruisePlannerNode::onTrajectory
- Complex Method node.cpp: ObstacleCruisePlannerNode::publishDebugMarker
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::findYieldCruiseObstacles
- Bumpy Road Ahead node.cpp: resampleHighestConfidencePredictedPaths
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createOneStepPolygons
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::convertToObstacles
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPointCloudObstacles
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createCollisionPointsForInsideCruiseObstacle
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createStopObstacleForPredictedObject
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::checkConsistency
- Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::publishDebugMarker
- Lines of Code in a Single File node.cpp
- Large Method node.cpp: ObstacleCruisePlannerNode::BehaviorDeterminationParam::onParam
- Large Method node.cpp: ObstacleCruisePlannerNode::BehaviorDeterminationParam::BehaviorDeterminationParam
- Large Method node.cpp: ObstacleCruisePlannerNode::createOneStepPolygons
- Overall Code Complexity node.cpp
- Excess Number of Function Arguments node.cpp: ObstacleCruisePlannerNode::createCruiseObstacle
Annotations
Check notice on line 1 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Lines of Code in a Single File
The lines of code in this module is no longer above the threshold
Check notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject is no longer above the threshold for cyclomatic complexity. 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 notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::createStopObstacleForPredictedObject is no longer above the threshold for cyclomatic complexity. 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 notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::findYieldCruiseObstacles is no longer above the threshold for cyclomatic complexity. 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 notice on line 457 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::convertToObstacles is no longer above the threshold for cyclomatic complexity. 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 notice on line 517 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles is no longer above the threshold for cyclomatic complexity. 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 notice on line 391 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::convertToObstacles is no longer above the threshold for cyclomatic complexity. 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 notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::createCruiseObstacle is no longer above the threshold for cyclomatic complexity. 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 notice on line 541 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPointCloudObstacles is no longer above the threshold for cyclomatic complexity. 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 notice on line 277 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::onTrajectory is no longer above the threshold for cyclomatic complexity. 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 notice on line 581 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
ObstacleCruisePlannerNode::publishDebugMarker is no longer above the threshold for cyclomatic complexity. 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 notice on line 391 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Method
ObstacleCruisePlannerNode::convertToPredictedObjectBasedObstacles has a cyclomatic complexity of 10, 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 202 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Conditional
ObstacleCruisePlannerNode::onTrajectory increases from 1 complex conditionals with 2 branches to 1 complex conditionals with 3 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 notice on line 119 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Large Method
ObstacleCruisePlannerNode::BehaviorDeterminationParam::onParam is no longer above the threshold for lines of code
Check notice on line 119 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Large Method
ObstacleCruisePlannerNode::BehaviorDeterminationParam::BehaviorDeterminationParam is no longer above the threshold for lines of code
Check notice on line 279 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Large Method
ObstacleCruisePlannerNode::createOneStepPolygons is no longer above the threshold for lines of code
Check notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 457 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::convertToObstacles is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::findYieldCruiseObstacles is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 56 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
resampleHighestConfidencePredictedPaths is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 279 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::createOneStepPolygons is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 391 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::convertToObstacles is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 517 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 541 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPointCloudObstacles is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 544 in planning/autoware_obstacle_cruise_planner/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
ObstacleCruisePlannerNode::createCollisionPointsForInsideCruiseObstacle is no longer above the threshold for logical blocks with deeply nested code. 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.