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/cruise stop slow down modules #9807

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

build failed: cruise and slow down

e796478
Select commit
Loading
Failed to load commit list.
Draft

Feat/cruise stop slow down modules #9807

build failed: cruise and slow down
e796478
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jan 9, 2025 in 36s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +3.33 (4.46 -> 7.79)

  • Declining Code Health: 29 findings(s) 🚩
  • Improving Code Health: 33 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method velocity_optimizer.cpp: VelocityOptimizer::optimize
  • Complex Conditional optimization_based_planner.cpp: OptimizationBasedPlanner::processOptimizedResult
  • Overall Code Complexity optimization_based_planner.cpp
  • Bumpy Road Ahead velocity_optimizer.cpp: VelocityOptimizer::optimize
  • Overall Function Size pid_based_planner.cpp
  • Overall Code Complexity pid_based_planner.cpp
  • Complex Method pid_based_planner.cpp: PIDBasedPlanner::calcObstacleToCruise
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::generateCruiseTrajectory
  • Complex Conditional node.cpp: ObstacleCruisePlannerNode::onTrajectory
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::processOptimizedResult
  • Large Method pid_based_planner.cpp: PIDBasedPlanner::PIDBasedPlanner
  • Large Method utils.cpp: createOneStepPolygons
  • Large Method pid_based_planner.cpp: PIDBasedPlanner::updateCruiseParam
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundaries
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundariesForOffTrajectoryObject
  • Complex Conditional optimization_based_planner.cpp: OptimizationBasedPlanner::checkHasReachedGoal
  • Excess Number of Function Arguments pid_based_planner.cpp: createVelocityLimitMsg
  • Primitive Obsession utils.cpp
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::calcInitialMotion
  • Bumpy Road Ahead optimization_based_planner.cpp: OptimizationBasedPlanner::generateCruiseTrajectory
  • Bumpy Road Ahead optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundaries
  • Bumpy Road Ahead optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundariesForOffTrajectoryObject
  • Bumpy Road Ahead pid_based_planner.cpp: PIDBasedPlanner::calcObstacleToCruise
  • Bumpy Road Ahead utils.cpp: createOneStepPolygons
  • Bumpy Road Ahead optimization_based_planner.cpp: OptimizationBasedPlanner::processOptimizedResult
  • Excess Number of Function Arguments optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundaries
  • Excess Number of Function Arguments optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundariesForOnTrajectoryObject
  • Excess Number of Function Arguments optimization_based_planner.cpp: OptimizationBasedPlanner::getSBoundariesForOffTrajectoryObject
  • Excess Number of Function Arguments optimization_based_planner.cpp: OptimizationBasedPlanner::publishDebugTrajectory

✅ Improving Code Health:

  • 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
  • Excess Number of Function Arguments polygon_utils.cpp: getCollisionPoint
  • 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

See this annotation in the file changed.

@codescene-delta-analysis 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 376 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 376 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 375 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 359 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 374 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 355 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 374 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 374 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 265 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 419 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 380 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 193 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 110 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 110 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 267 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 376 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 359 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 375 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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 267 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 355 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 374 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 374 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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 375 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.