Skip to content

Commit

Permalink
fix(behavior_path_planner): fix turn signal logic in intersection (#1519
Browse files Browse the repository at this point in the history
)

Signed-off-by: Fumiya Watanabe <[email protected]>
  • Loading branch information
rej55 authored and tkimura4 committed Aug 4, 2022
1 parent 5e722a9 commit f3bc09c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions planning/behavior_path_planner/src/turn_signal_decider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ std::pair<TurnIndicatorsCommand, double> TurnSignalDecider::getIntersectionTurnS
turn_signal.command = TurnIndicatorsCommand::ENABLE_LEFT;
} else if (lane_attribute == std::string("right")) {
turn_signal.command = TurnIndicatorsCommand::ENABLE_RIGHT;
} else {
// when lane_attribute is straight, return the turn signal with max distance
return std::make_pair(turn_signal, std::numeric_limits<double>::max());
}
distance = distance_from_vehicle_front;
}
}
}
if (turn_signal.command == TurnIndicatorsCommand::NO_COMMAND) {
distance = std::numeric_limits<double>::max();
}
return std::make_pair(turn_signal, distance);
}
} // namespace behavior_path_planner

0 comments on commit f3bc09c

Please sign in to comment.