Skip to content

Commit

Permalink
Revert "fix(crosswalk): set large minus value in rtc distance if the …
Browse files Browse the repository at this point in the history
…ego already passed crosswalk (autowarefoundation#4869)"

This reverts commit fa8da4c.
  • Loading branch information
tkimura4 committed Sep 5, 2023
1 parent eb13433 commit e2cabf5
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,9 @@ bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path, StopReason * sto

// Calculate stop point with margin
const auto p_stop_line = getStopPointWithMargin(*path, path_intersects);

std::optional<geometry_msgs::msg::Pose> default_stop_pose = std::nullopt;
if (p_stop_line.has_value()) {
default_stop_pose = toStdOptional(
calcLongitudinalOffsetPose(path->points, p_stop_line->first, p_stop_line->second));
}
// TODO(murooka) add a guard of p_stop_line
const auto default_stop_pose = toStdOptional(
calcLongitudinalOffsetPose(path->points, p_stop_line->first, p_stop_line->second));

// Resample path sparsely for less computation cost
constexpr double resample_interval = 4.0;
Expand Down Expand Up @@ -996,8 +993,6 @@ void CrosswalkModule::setDistanceToStop(
const auto & ego_pos = planner_data_->current_odometry->pose.position;
const double dist_ego2stop = calcSignedArcLength(ego_path.points, ego_pos, *stop_pos);
setDistance(dist_ego2stop);
} else {
setDistance(std::numeric_limits<double>::lowest());
}
}

Expand Down

0 comments on commit e2cabf5

Please sign in to comment.