Skip to content

Commit

Permalink
fix: stop for wrong-way car (#1309)
Browse files Browse the repository at this point in the history
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
  • Loading branch information
tkimura4 authored Jul 11, 2022
1 parent b11a689 commit db01212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planning/obstacle_cruise_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,12 @@ void ObstacleCruisePlannerNode::updateHasStopped(std::vector<TargetObstacle> & t
});
const bool has_already_stopped = (itr != prev_target_obstacles_.end()) && itr->has_stopped;
if (has_already_stopped) {
if (std::abs(obstacle.velocity) < obstacle_velocity_threshold_from_stop_to_cruise_) {
if (obstacle.velocity < obstacle_velocity_threshold_from_stop_to_cruise_) {
obstacle.has_stopped = true;
continue;
}
} else {
if (std::abs(obstacle.velocity) < obstacle_velocity_threshold_from_cruise_to_stop_) {
if (obstacle.velocity < obstacle_velocity_threshold_from_cruise_to_stop_) {
obstacle.has_stopped = true;
continue;
}
Expand Down

0 comments on commit db01212

Please sign in to comment.