Skip to content

Commit

Permalink
Fix requestSpeedChange sets target_speed only when it's reached
Browse files Browse the repository at this point in the history
  • Loading branch information
gmajrobotec committed Sep 26, 2024
1 parent a3e59a7 commit 4c76955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simulation/traffic_simulator/src/entity/entity_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ void EntityBase::requestSpeedChange(
return true;
}
if (isTargetSpeedReached(target_speed)) {
target_speed_ = target_speed.getAbsoluteValue(getCanonicalizedStatus(), other_status_);
return true;
}
target_speed_ = target_speed.getAbsoluteValue(getCanonicalizedStatus(), other_status_);
return false;
},
/**
Expand Down

0 comments on commit 4c76955

Please sign in to comment.