Skip to content

Commit

Permalink
fix(lane_change): update lane change status in planWaitingApproval() (#…
Browse files Browse the repository at this point in the history
…3061)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed Mar 13, 2023
1 parent 5ca8e68 commit e6615b3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,13 @@ CandidateOutput LaneChangeModule::planCandidate() const
#endif
const auto lane_change_lanes = getLaneChangeLanes(current_lanes, lane_change_lane_length_);

#ifdef USE_OLD_ARCHITECTURE
[[maybe_unused]] const auto [found_valid_path, found_safe_path] =
getSafePath(lane_change_lanes, check_distance_, selected_path);
#else
selected_path = status_.lane_change_path;
#endif

selected_path.path.header = planner_data_->route_handler->getRouteHeader();

if (isAbortState()) {
Expand Down Expand Up @@ -295,6 +300,10 @@ BehaviorModuleOutput LaneChangeModule::planWaitingApproval()
out.path = std::make_shared<PathWithLaneId>(prev_approved_path_);
out.reference_path = getPreviousModuleOutput().reference_path;

#ifndef USE_OLD_ARCHITECTURE
updateLaneChangeStatus();
#endif

const auto candidate = planCandidate();
path_candidate_ = std::make_shared<PathWithLaneId>(candidate.path_candidate);
path_reference_ = getPreviousModuleOutput().reference_path;
Expand Down

0 comments on commit e6615b3

Please sign in to comment.