Skip to content

Commit

Permalink
fix(lane_change): fix prepare length too short at low speed (RT1-8909) (
Browse files Browse the repository at this point in the history
#9735)

fix prepare length too short at low speed (RT1-8909)

Signed-off-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 authored Dec 24, 2024
1 parent 38bd911 commit daa8a15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ double calc_actual_prepare_duration(
if (max_acc < eps) {
return params.max_prepare_duration;
}
return (min_lc_velocity - current_velocity) / max_acc;
return std::max((min_lc_velocity - current_velocity) / max_acc, params.min_prepare_duration);
});

return std::max(params.max_prepare_duration - active_signal_duration, min_prepare_duration);
Expand Down

0 comments on commit daa8a15

Please sign in to comment.