Skip to content

Commit

Permalink
feat(start_planner): output velocity factor
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Nov 18, 2024
1 parent 93828b6 commit 0604e87
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ StartPlannerModule::StartPlannerModule(
}

steering_factor_interface_.init(PlanningBehavior::START_PLANNER);
velocity_factor_interface_.init(PlanningBehavior::START_PLANNER);
}

void StartPlannerModule::onFreespacePlannerTimer()
Expand Down Expand Up @@ -738,6 +739,8 @@ BehaviorModuleOutput StartPlannerModule::plan()

setDrivableAreaInfo(output);

setVelocityFactor(output.path);

Check warning on line 743 in planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

StartPlannerModule::plan already has high cyclomatic complexity, and now it increases in Lines of Code from 80 to 81. 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.
const auto steering_factor_direction = getSteeringFactorDirection(output);

if (status_.driving_forward) {
Expand Down

0 comments on commit 0604e87

Please sign in to comment.