Skip to content

Commit

Permalink
feat(goal_planner): consider previous module's turn signal (autowaref…
Browse files Browse the repository at this point in the history
…oundation#3637)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed May 10, 2023
1 parent dc3633c commit 0f18d2e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,13 @@ BehaviorModuleOutput GoalPlannerModule::planWithGoalModification()

// set hazard and turn signal
if (status_.has_decided_path) {
output.turn_signal_info = calcTurnSignalInfo();
const auto original_signal = getPreviousModuleOutput().turn_signal_info;
const auto new_signal = calcTurnSignalInfo();
const auto current_seg_idx = planner_data_->findEgoSegmentIndex(output.path->points);
output.turn_signal_info = planner_data_->turn_signal_decider.use_prior_turn_signal(
*output.path, getEgoPose(), current_seg_idx, original_signal, new_signal,
planner_data_->parameters.ego_nearest_dist_threshold,
planner_data_->parameters.ego_nearest_yaw_threshold);
}

const auto distance_to_path_change = calcDistanceToPathChange();
Expand Down

0 comments on commit 0f18d2e

Please sign in to comment.