Skip to content

Commit

Permalink
feat(avoidance): consider previous module's turn signal (#3636)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored May 10, 2023
1 parent 3912985 commit f945c01
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2790,7 +2790,18 @@ BehaviorModuleOutput AvoidanceModule::plan()
}

BehaviorModuleOutput output;
output.turn_signal_info = calcTurnSignalInfo(avoidance_path);

// turn signal info
{
const auto original_signal = getPreviousModuleOutput().turn_signal_info;
const auto new_signal = calcTurnSignalInfo(avoidance_path);
const auto current_seg_idx = planner_data_->findEgoSegmentIndex(avoidance_path.path.points);
output.turn_signal_info = planner_data_->turn_signal_decider.use_prior_turn_signal(
avoidance_path.path, getEgoPose(), current_seg_idx, original_signal, new_signal,
planner_data_->parameters.ego_nearest_dist_threshold,
planner_data_->parameters.ego_nearest_yaw_threshold);
}

// sparse resampling for computational cost
{
avoidance_path.path =
Expand Down

0 comments on commit f945c01

Please sign in to comment.