Skip to content

Commit

Permalink
planning: add mission_complete decision when pull over for destinatio…
Browse files Browse the repository at this point in the history
…n is completed
  • Loading branch information
jmtao authored and Capri2014 committed May 14, 2020
1 parent 39b11f8 commit 4289c34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/planning/common/reference_line_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,8 @@ void ReferenceLineInfo::ExportVehicleSignal(

bool ReferenceLineInfo::ReachedDestination() const {
static constexpr double kDestinationDeltaS = 0.05;
return SDistanceToDestination() <= kDestinationDeltaS;
const double distance_destination = SDistanceToDestination();
return distance_destination <= kDestinationDeltaS;
}

double ReferenceLineInfo::SDistanceToDestination() const {
Expand Down Expand Up @@ -693,7 +694,8 @@ void ReferenceLineInfo::MakeMainMissionCompleteDecision(
return;
}
auto main_stop = decision_result->main_decision().stop();
if (main_stop.reason_code() != STOP_REASON_DESTINATION) {
if (main_stop.reason_code() != STOP_REASON_DESTINATION &&
main_stop.reason_code() != STOP_REASON_PULL_OVER) {
return;
}
const auto& adc_pos = adc_planning_point_.path_point();
Expand Down

0 comments on commit 4289c34

Please sign in to comment.