Skip to content

Commit

Permalink
comment-aligned changes
Browse files Browse the repository at this point in the history
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
  • Loading branch information
kyoichi-sugahara committed Sep 8, 2023
1 parent 242cee3 commit 0560fd2
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ void GoalPlannerModule::setOutput(BehaviorModuleOutput & output)

output.path = std::make_shared<PathWithLaneId>(current_path);
output.reference_path = getPreviousModuleOutput().reference_path;
} else {
} else if (status_.has_decided_path && isActivated()) {
// situation : not safe against dynamic objects after approval
// insert stop point in current path if ego is able to stop with acceleration and jerk
// constraints
Expand Down Expand Up @@ -1111,14 +1111,12 @@ PathWithLaneId GoalPlannerModule::generateFeasibleStopPath()
PathWithLaneId GoalPlannerModule::generateStopPointInCurrentPath()
{
const auto & current_pose = planner_data_->self_odometry->pose.pose;
auto current_path = getCurrentPath();

if (status_.current_lanes.empty()) {
if (status_.current_lanes.empty() || current_path.points.empty()) {
return PathWithLaneId{};
}

// get current path
auto current_path = getCurrentPath();

// try to insert stop point in current_path after approval
// but if can't stop with constraints(maximum deceleration, maximum jerk), don't insert stop point
const auto min_stop_distance = calcFeasibleDecelDistance(
Expand Down

0 comments on commit 0560fd2

Please sign in to comment.