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

fix(lane_change): update lane change status in planWaitingApproval() #3061

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ CandidateOutput LaneChangeModule::planCandidate() const
const auto current_lanes = util::getCurrentLanes(planner_data_);
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 @@ -273,6 +278,10 @@ BehaviorModuleOutput LaneChangeModule::planWaitingApproval()
BehaviorModuleOutput out;
out.path = std::make_shared<PathWithLaneId>(prev_approved_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