Skip to content

Commit

Permalink
feat(goal_planner): prevent auto approval for unsafe path (autowarefo…
Browse files Browse the repository at this point in the history
…undation#5621)

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 committed Nov 20, 2023
1 parent a395e72 commit 20e4492
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,12 @@ bool GoalPlannerModule::hasDecidedPath() const
return false;
}

// If it is dangerous before approval, do not determine the path.
// This eliminates a unsafe path to be approved
if (!isSafePath() && !isActivated()) {
return false;
}

// if ego is sufficiently close to the start of the nearest candidate path, the path is decided
const auto & current_pose = planner_data_->self_odometry->pose.pose;
const size_t ego_segment_idx = motion_utils::findNearestSegmentIndex(
Expand Down

0 comments on commit 20e4492

Please sign in to comment.