Skip to content

Commit

Permalink
fix(avoidance): fix sudden deceleration
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed Dec 7, 2023
1 parent dd0d6eb commit 703905e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planning/behavior_path_avoidance_module/src/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ void AvoidanceModule::insertPrepareVelocity(ShiftedPath & shifted_path) const
// insert slow down speed.
const double current_target_velocity = PathShifter::calcFeasibleVelocityFromJerk(
shift_length, helper_->getLateralMinJerkLimit(), distance_to_object);
if (current_target_velocity < getEgoSpeed() && decel_distance < remaining_distance) {
if (current_target_velocity < getEgoSpeed() + parameters_->buf_slow_down_speed) {
utils::avoidance::insertDecelPoint(
getEgoPosition(), decel_distance, parameters_->velocity_map.front(), shifted_path.path,
slow_pose_);
Expand Down

0 comments on commit 703905e

Please sign in to comment.