Skip to content

Commit

Permalink
fix(intersection): consider braking distance for pass judge
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 committed Oct 16, 2023
1 parent 8ed98a9 commit f367f51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1079,13 +1079,15 @@ IntersectionModule::DecisionResult IntersectionModule::modifyPathVelocityDetail(
const bool keep_detection =
(vel_norm < planner_param_.collision_detection.keep_detection_vel_thr);
const bool was_safe = std::holds_alternative<IntersectionModule::Safe>(prev_decision_result_);
const bool enable_sudden_stop = true;
// if ego is over the pass judge line and not stopped
if (is_over_default_stop_line && !is_over_pass_judge_line && keep_detection) {
RCLCPP_DEBUG(
logger_, "is_over_default_stop_line && !is_over_pass_judge_line && keep_detection");
// do nothing
} else if (
(was_safe && is_over_default_stop_line && is_over_pass_judge_line && is_go_out_) ||
(was_safe && (is_over_default_stop_line || enable_sudden_stop) && is_over_pass_judge_line &&
is_go_out_) ||
is_permanent_go_) {
// is_go_out_: previous RTC approval
// activated_: current RTC approval
Expand Down
2 changes: 2 additions & 0 deletions planning/behavior_velocity_intersection_module/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,14 @@ std::optional<IntersectionStopLines> generateIntersectionStopLines(
intersection_stop_lines_temp.occlusion_peeking_stop_line =
intersection_stop_lines_temp.default_stop_line;
}
/*
if (
intersection_stop_lines_temp.occlusion_peeking_stop_line >
intersection_stop_lines_temp.pass_judge_line) {
intersection_stop_lines_temp.pass_judge_line =
intersection_stop_lines_temp.occlusion_peeking_stop_line;
}
*/

IntersectionStopLines intersection_stop_lines;
intersection_stop_lines.closest_idx = intersection_stop_lines_temp.closest_idx;
Expand Down

0 comments on commit f367f51

Please sign in to comment.