Skip to content

Commit

Permalink
fix(behavior_path_planner): fix turn singal (tier4#1539)
Browse files Browse the repository at this point in the history
* fix(behavior_path_planner): fix turn singal

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* apply pre-commit

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
  • Loading branch information
tkimura4 authored and boyali committed Sep 28, 2022
1 parent 6465b33 commit bf8f4fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion planning/behavior_path_planner/src/turn_signal_decider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ std::pair<TurnIndicatorsCommand, double> TurnSignalDecider::getIntersectionTurnS
const double distance_from_vehicle_front =
accumulated_distance - vehicle_pose_frenet.length - base_link2front_;
if (distance_from_vehicle_front > intersection_search_distance_) {
if (turn_signal.command == TurnIndicatorsCommand::DISABLE) {
distance = std::numeric_limits<double>::max();
}
return std::make_pair(turn_signal, distance);
}
// TODO(Horibe): Route Handler should be a library.
Expand Down Expand Up @@ -103,7 +106,7 @@ std::pair<TurnIndicatorsCommand, double> TurnSignalDecider::getIntersectionTurnS
}
}
}
if (turn_signal.command == TurnIndicatorsCommand::NO_COMMAND) {
if (turn_signal.command == TurnIndicatorsCommand::DISABLE) {
distance = std::numeric_limits<double>::max();
}
return std::make_pair(turn_signal, distance);
Expand Down

0 comments on commit bf8f4fd

Please sign in to comment.